QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | List of all members
BFGS Class Reference

Broyden-Fletcher-Goldfarb-Shanno algorithm. More...

#include <bfgs.hpp>

+ Inheritance diagram for BFGS:
+ Collaboration diagram for BFGS:

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< LineSearchlineSearch_
 line search More...
 

Detailed Description

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.

Definition at line 39 of file bfgs.hpp.

Constructor & Destructor Documentation

◆ BFGS()

BFGS ( const ext::shared_ptr< LineSearch > &  lineSearch = ext::shared_ptr<LineSearch>())

Definition at line 41 of file bfgs.hpp.

Member Function Documentation

◆ getUpdatedDirection()

Array getUpdatedDirection ( const Problem P,
Real  gold2,
const Array gradient 
)
overrideprivatevirtual

computes the new search direction

Implements LineSearchBasedMethod.

Definition at line 26 of file bfgs.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ inverseHessian_

Matrix inverseHessian_
private

inverse of hessian matrix

Definition at line 50 of file bfgs.hpp.