OpenMD  2.5
Molecular Dynamics in the Open
QuantLib::ConjugateGradient Class Reference

Multi-dimensional Conjugate Gradient class. More...

#include <ConjugateGradient.hpp>

Inheritance diagram for QuantLib::ConjugateGradient:
QuantLib::LineSearchBasedMethod QuantLib::OptimizationMethod

Public Member Functions

 ConjugateGradient (LineSearch *lineSearch=NULL)
 
- Public Member Functions inherited from QuantLib::LineSearchBasedMethod
 LineSearchBasedMethod (LineSearch *lSearch=NULL)
 
virtual ~LineSearchBasedMethod ()
 
virtual EndCriteria::Type minimize (Problem &P, const EndCriteria &endCriteria)
 minimize the optimization problem P More...
 
- Public Member Functions inherited from QuantLib::OptimizationMethod
virtual ~OptimizationMethod ()
 

Private Member Functions

LineSearchBasedMethod interface
DynamicVector< RealType > getUpdatedDirection (const Problem &P, RealType gold2, const DynamicVector< RealType > &oldGradient)
 computes the new search direction More...
 

Additional Inherited Members

- Protected Attributes inherited from QuantLib::LineSearchBasedMethod
LineSearchlineSearch_
 line search More...
 

Detailed Description

Multi-dimensional Conjugate Gradient class.

Fletcher-Reeves-Polak-Ribiere algorithm adapted from Numerical Recipes in C, 2nd edition.

User has to provide line-search method and optimization end criteria. Search direction $ d_i = - f'(x_i) + c_i*d_{i-1} $ where $ c_i = ||f'(x_i)||^2/||f'(x_{i-1})||^2 $ and $ d_1 = - f'(x_1) $

Definition at line 42 of file ConjugateGradient.hpp.

Constructor & Destructor Documentation

◆ ConjugateGradient()

QuantLib::ConjugateGradient::ConjugateGradient ( LineSearch lineSearch = NULL)
inline

Definition at line 44 of file ConjugateGradient.hpp.

References getUpdatedDirection().

Member Function Documentation

◆ getUpdatedDirection()

DynamicVector< RealType > QuantLib::ConjugateGradient::getUpdatedDirection ( const Problem P,
RealType  gold2,
const DynamicVector< RealType > &  gradient 
)
privatevirtual

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