QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Broyden-Fletcher-Goldfarb-Shanno algorithm. More...
#include <bfgs.hpp>
Public Member Functions | |
BFGS (const ext::shared_ptr< LineSearch > &lineSearch=ext::shared_ptr< LineSearch >()) | |
Public Member Functions inherited from LineSearchBasedMethod | |
LineSearchBasedMethod (ext::shared_ptr< LineSearch > lSearch=ext::shared_ptr< LineSearch >()) | |
~LineSearchBasedMethod () override=default | |
EndCriteria::Type | minimize (Problem &P, const EndCriteria &endCriteria) override |
minimize the optimization problem P More... | |
Public Member Functions inherited from OptimizationMethod | |
virtual | ~OptimizationMethod ()=default |
virtual EndCriteria::Type | minimize (Problem &P, const EndCriteria &endCriteria)=0 |
minimize the optimization problem P More... | |
LineSearchBasedMethod interface | |
Matrix | inverseHessian_ |
inverse of hessian matrix More... | |
Array | getUpdatedDirection (const Problem &P, Real gold2, const Array &oldGradient) override |
computes the new search direction More... | |
Additional Inherited Members | |
virtual Array | getUpdatedDirection (const Problem &P, Real gold2, const Array &gradient)=0 |
computes the new search direction More... | |
Protected Attributes inherited from LineSearchBasedMethod | |
ext::shared_ptr< LineSearch > | lineSearch_ |
line search More... | |
Broyden-Fletcher-Goldfarb-Shanno algorithm.
See http://en.wikipedia.org/wiki/BFGS_method.
Adapted from Numerical Recipes in C, 2nd edition.
User has to provide line-search method and optimization end criteria.
BFGS | ( | const ext::shared_ptr< LineSearch > & | lineSearch = ext::shared_ptr<LineSearch>() | ) |
|
overrideprivatevirtual |
computes the new search direction
Implements LineSearchBasedMethod.
Definition at line 26 of file bfgs.cpp.