[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Waldhäuser Str. 64, D-72076 Tübingen, Germany
[Uni logo]


MINF_BRACKET Source code in minf_bracket.pro

MINF_BRACKET

Name
       MINF_BRACKET
Purpose
       Bracket a local minimum of a 1-D function with 3 points,
Explanation
       Brackets a local minimum of a 1-d function with 3 points,
       thus ensuring that a minimum exists somewhere in the interval.
       This routine assumes that the function has a minimum somewhere....
       Routine can also be applied to a scalar function of many variables,
       for such case the local minimum in a specified direction is bracketed,
       This routine is called by minF_conj_grad, to bracket minimum in the
       direction of the conjugate gradient of function of many variables
Example
       xa=0  & xb=1
       minF_bracket, xa,xb,xc, fa,fb,fc, FUNC_NAME="name"      ;for 1-D func.
  or:
       minF_bracket, xa,xb,xc, fa,fb,fc, FUNC="name",     $
                                         POINT=[0,1,1],   $
                                         DIRECTION=[2,1,1]     ;for 3-D func.
Input Parameters
       xa = scalar, guess for point bracketing location of minimum.
       xb = scalar, second guess for point bracketing location of minimum.
Keyword Parameters
       FUNC_NAME = function name (string)
               Calling mechanism should be:  F = func_name( px )
               where:
                       px = scalar or vector of independent variables, input.
                       F = scalar value of function at px.
       POINT_NDIM = when working with function of N variables,
               use this keyword to specify the starting point in N-dim space.
               Default = 0, which assumes function is 1-D.
       DIRECTION = when working with function of N variables,
               use this keyword to specify the direction in N-dim space
               along which to bracket the local minimum, (default=1 for 1-D).
               (xa,xb,xc) are then relative distances from POINT_NDIM.
Output Parameters
       xa,xb,xc = scalars, 3 points which bracket location of minimum,
               that is, f(xb) < f(xa) and f(xb) < f(xc), so minimum exists.
               When working with function of N variables
               (xa,xb,xc) are then relative distances from POINT_NDIM,
               in the direction specified by keyword DIRECTION,
               with scale factor given by magnitude of DIRECTION.
Optional Output
       fa,fb,fc = value of function at 3 points which bracket the minimum,
                       again note that fb < fa and fb < fc if minimum exists.
Procedure
       algorithm from Numerical Recipes (by Press, et al.), sec.10.1 (p.281).
Revision History
       Written, Frank Varosi NASA/GSFC 1992.
       Converted to IDL V5.0   W. Landsman   September 1997

Last modified by pro2html on 2001 April 26 at 03:13 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically