[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

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


MINF_PARABOL_D Source code in minf_parabol_d.pro

MINF_PARABOL_D

Name
       MINF_PARABOL_D
Purpose
       Minimize a function using a modified  Brent's method with derivatives
Explanation
       Based on the procedure DBRENT in Numerical Recipes by Press et al.
       Finds a local minimum of a 1-D function up to specified tolerance,
       using the first derivative of function in the algorithm.
       This routine assumes that the function has a minimum nearby.
       (recommend first calling minF_bracket, xa,xb,xc, to bracket minimum).
       Routine can also be applied to a scalar function of many variables,
       for such case the local minimum in a specified direction is found,
       This routine is called by minF_conj_grad, to locate minimum in the
       direction of the conjugate gradient of function of many variables.
Example
       minF_parabol_D, xa,xb,xc, xmin, fmin, FUNC_NAME="name"  ;for 1-D func.
  or:
       minF_parabol_D, xa,xb,xc, xmin, fmin, FUNC="name", $
                                         POINT=[0,1,1],   $
                                         DIRECTION=[2,1,1]     ;for 3-D func.
Input 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.
Keyword Parameters
       FUNC_NAME = function name (string)
               Calling mechanism should be:  F = func_name( px, gradient )
               where:
                       px = scalar or vector of independent variables, input.
                       F = scalar value of function at px.
                       gradient = derivative of function, a scalar if 1-D,
                               a gradient vector if N-D,
                               (should only be computed if arg. is present).
       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, x_min are then relative distances from POINT_NDIM)
       MAX_ITER = maximum allowed number iterations, default=100.
       TOLERANCE = desired accuracy of minimum location, default=sqrt(1.e-7).
Output Parameters
       xmin = estimated location of minimum.
               When working with function of N variables,
               xmin is the relative distance from POINT_NDIM,
               in the direction specified by keyword DIRECTION,
               with scale factor given by magnitude of DIRECTION,
               so that min. Loc. Pmin = Point_Ndim + xmin * Direction.
       fmin = value of function at xmin (or Pmin).
Procedure
       Brent's method to minimize a function by using parabolic interpolation
       and using first derivative of function,
       from Numerical Recipes (by Press, et al.), sec.10.3 (p.287),
Revision History
       Written, Frank Varosi NASA/GSFC 1992.

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