NPL
Neurological Programs and Libraries
npl::Wolfe Class Reference

Implementation of Armijo approximate line search algorithm. More...

#include <linesearch.h>

Public Member Functions

 Wolfe (const ValFunc &valFunc, const GradFunc &gradFunc)
 Constructs a line search that satisfies the wolfe conditions (Armijo and curvature condition). This requires both the gradient and value. More...
 
double search (double init_val, const VectorXd &init_x, const VectorXd &init_g, const VectorXd &direction)
 Performs a line search to find the alpha (step size) that satifies the armijo rule. More...
 

Public Attributes

double opt_minstep
 Minimum non-zero step, once alpha drops below this, returns 0. More...
 
double opt_s
 Maximum step. More...
 
double opt_beta
 Power function base, values closer to 0 will decrease step size faster than ones close to 1. More...
 
double opt_c1
 Theshold for stopping based on function values. More...
 
double opt_c2
 Theshold for stopping based on curvature. More...
 
int opt_maxIt
 Maximum number of iterations. More...
 

Detailed Description

Implementation of Armijo approximate line search algorithm.

Definition at line 88 of file linesearch.h.

Constructor & Destructor Documentation

npl::Wolfe::Wolfe ( const ValFunc valFunc,
const GradFunc gradFunc 
)

Constructs a line search that satisfies the wolfe conditions (Armijo and curvature condition). This requires both the gradient and value.

Parameters
valFunc
gradFunc

Member Function Documentation

double npl::Wolfe::search ( double  init_val,
const VectorXd &  init_x,
const VectorXd &  init_g,
const VectorXd &  direction 
)

Performs a line search to find the alpha (step size) that satifies the armijo rule.

Parameters
init_valInitial energy/function value
init_xInitial state
init_gInitial gradient
directionDirection to search
Returns

Member Data Documentation

double npl::Wolfe::opt_beta

Power function base, values closer to 0 will decrease step size faster than ones close to 1.

Definition at line 116 of file linesearch.h.

double npl::Wolfe::opt_c1

Theshold for stopping based on function values.

Definition at line 121 of file linesearch.h.

double npl::Wolfe::opt_c2

Theshold for stopping based on curvature.

Definition at line 126 of file linesearch.h.

int npl::Wolfe::opt_maxIt

Maximum number of iterations.

Definition at line 131 of file linesearch.h.

double npl::Wolfe::opt_minstep

Minimum non-zero step, once alpha drops below this, returns 0.

Definition at line 105 of file linesearch.h.

double npl::Wolfe::opt_s

Maximum step.

Definition at line 110 of file linesearch.h.


The documentation for this class was generated from the following file: