Mathematics Source Library
C & ASM

 Home Optimization Home Nonlinear Optimization Home One-Dimensional Optimization Home Rosenbrock's Success/Failure Routines Exhaustive Grid Search Three Point Equal Interval Search Golden Section Search Fibonacci Search Parabolic Extrapolation for Bracketing an Extremum Parabolic Interpolation Minimize Down the Line / Maximize Up the Line

## Minimize down the LineMaximize up the Line

Given a smooth function f : Rn → R, a base point x ∈ Rn, and a nonzero vector v the method called minimizing down the line is the method of finding the minimum of
g( p ) = f ( x - pv) for p > 0 and the method called maximizing up the line is the method of finding the maximum of h( p ) = f ( x + pv) for p > 0. The terminology stems from the application when v is in the direction of the gradient of f. The procedures below use the one-dimensional parabolic extrapolation and interpolation methods to find the minimum or maximum.

### Function List

• int Minimize_Down_the_Line( double (*f)(double *), double x[ ], double fx, double *p, double v[ ], double y[ ], double cutoff, double cutoff_scale_factor, double tolerance, int n )

Given a function f : Rn → R, a point x ∈ Rn, and a direction v this function minimizes g( p ) = f ( x - pv) for 0 < pcutoff. In particular, if v is the gradient of f, then as long as v0, this function searches for a minimum of f in the direction opposite to that of the direction of the grad f. Upon completion y is the vector x - pv. The parameter cut_off_scale_factor is passed to the routine Min_Search_Parabolic_Extrapolation and the parameter tolerance is passed to the routine Min_Search_Parabolic_Interpolation. The return values are the same as the return values of Min_Search_Parabolic_Interpolation.

• int Maximize_Up_the_Line( double (*f)(double *), double x[ ], double fx, double *p, double v[ ], double y[ ], double cutoff, double cutoff_scale_factor, double tolerance, int n )

Given a function f : Rn → R, a point x ∈ Rn, and a direction v this function maximizes g( p ) = f ( x + pv) for 0 < pcutoff. In particular, if v is the gradient of f, then as long as v0, this function searches for a maximum of f in the direction of the direction of the grad f. Upon completion y is the vector x + pv. The parameter cut_off_scale_factor is passed to the routine Max_Search_Parabolic_Extrapolation and the parameter tolerance is passed to the routine Max_Search_Parabolic_Interpolation. The return values are the same as the return values of Max_Search_Parabolic_Interpolation.