OpenMD 3.1
Molecular Dynamics in the Open
|
Armijo line search. More...
#include <Armijo.hpp>
Public Member Functions | |
ArmijoLineSearch (RealType eps=1e-8, RealType alpha=0.05, RealType beta=0.65) | |
Default constructor. | |
RealType | operator() (Problem &P, EndCriteria::Type &ecType, const EndCriteria &, const RealType t_ini) |
Perform line search. | |
Public Member Functions inherited from QuantLib::LineSearch | |
LineSearch (RealType=0.0) | |
Default constructor. | |
virtual | ~LineSearch () |
Destructor. | |
const DynamicVector< RealType > & | lastX () |
return last x value | |
RealType | lastFunctionValue () |
return last objective function value | |
const DynamicVector< RealType > & | lastGradient () |
return last gradient | |
RealType | lastGradientNorm2 () |
return square norm of last gradient | |
bool | succeed () |
RealType | update (DynamicVector< RealType > ¶ms, const DynamicVector< RealType > &direction, RealType beta, const Constraint &constraint) |
const DynamicVector< RealType > & | searchDirection () const |
current value of the search direction | |
DynamicVector< RealType > & | searchDirection () |
Additional Inherited Members | |
Protected Attributes inherited from QuantLib::LineSearch | |
DynamicVector< RealType > | searchDirection_ |
current values of the search direction | |
DynamicVector< RealType > | xtd_ |
new x and its gradient | |
DynamicVector< RealType > | gradient_ |
RealType | qt_ |
objective function value and gradient norm corresponding to xtd_ | |
RealType | qpt_ |
bool | succeed_ |
flag to know if linesearch succeed | |
Armijo line search.
Let \( \alpha \) and \( \beta \) be 2 scalars in \( [0,1] \). Let \( x \) be the current value of the unknown, \( d \) the search direction and \( t \) the step. Let \( f \) be the function to minimize. The line search stops when \( t \) verifies
\[ f(x + t \cdot d) - f(x) \leq -\alpha t f'(x+t \cdot d) \]
and
\[ f(x+\frac{t}{\beta} \cdot d) - f(x) > -\frac{\alpha}{\beta} t f'(x+t \cdot d) \]
(see Polak, Algorithms and consistent approximations, Optimization, volume 124 of Applied Mathematical Sciences, Springer-Verlag, NY, 1997)
Definition at line 48 of file Armijo.hpp.
|
inline |
Default constructor.
Definition at line 51 of file Armijo.hpp.
|
virtual |
Perform line search.
Implements QuantLib::LineSearch.
Definition at line 27 of file Armijo.cpp.
References QuantLib::EndCriteria::checkMaxIterations(), QuantLib::Problem::constraint(), QuantLib::Problem::currentValue(), QuantLib::Problem::functionValue(), QuantLib::Problem::gradient(), QuantLib::Problem::gradientNormValue(), QuantLib::LineSearch::qt_, QuantLib::LineSearch::searchDirection_, QuantLib::LineSearch::succeed_, QuantLib::Problem::value(), and QuantLib::LineSearch::xtd_.