|
QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
#include <goldstein.hpp>
Inheritance diagram for GoldsteinLineSearch:
Collaboration diagram for GoldsteinLineSearch:Public Member Functions | |
| GoldsteinLineSearch (Real eps=1e-8, Real alpha=0.05, Real beta=0.65, Real extrapolation=1.5) | |
| Default constructor. More... | |
| Real | operator() (Problem &P, EndCriteria::Type &ecType, const EndCriteria &, Real t_ini) override |
| Perform line search. More... | |
Public Member Functions inherited from LineSearch | |
| LineSearch (Real=0.0) | |
| Default constructor. More... | |
| virtual | ~LineSearch ()=default |
| Destructor. More... | |
| const Array & | lastX () |
| return last x value More... | |
| Real | lastFunctionValue () const |
| return last cost function value More... | |
| const Array & | lastGradient () |
| return last gradient More... | |
| Real | lastGradientNorm2 () const |
| return square norm of last gradient More... | |
| bool | succeed () const |
| virtual Real | operator() (Problem &P, EndCriteria::Type &ecType, const EndCriteria &, Real t_ini)=0 |
| Perform line search. More... | |
| Real | update (Array ¶ms, const Array &direction, Real beta, const Constraint &constraint) |
| const Array & | searchDirection () const |
| current value of the search direction More... | |
| Array & | searchDirection () |
Private Attributes | |
| Real | alpha_ |
| Real | beta_ |
| Real | extrapolation_ |
Additional Inherited Members | |
Protected Attributes inherited from LineSearch | |
| Array | searchDirection_ |
| current values of the search direction More... | |
| Array | xtd_ |
| new x and its gradient More... | |
| Array | gradient_ |
| Real | qt_ = 0.0 |
| cost function value and gradient norm corresponding to xtd_ More... | |
| Real | qpt_ = 0.0 |
| bool | succeed_ = true |
| flag to know if linesearch succeed More... | |
Definition at line 30 of file goldstein.hpp.
| GoldsteinLineSearch | ( | Real | eps = 1e-8, |
| Real | alpha = 0.05, |
||
| Real | beta = 0.65, |
||
| Real | extrapolation = 1.5 |
||
| ) |
Default constructor.
Definition at line 33 of file goldstein.hpp.
|
overridevirtual |
Perform line search.
Implements LineSearch.
Definition at line 26 of file goldstein.cpp.
Here is the call graph for this function:
|
private |
Definition at line 46 of file goldstein.hpp.
|
private |
Definition at line 46 of file goldstein.hpp.
|
private |
Definition at line 47 of file goldstein.hpp.