QuantLib: ConjugateGradient Class Reference

A free/open-source library for quantitative finance Reference manual - version 1.20

Public Member Functions | List of all members
ConjugateGradient Class Reference
Math tools » Optimizers

Multi-dimensional Conjugate Gradient class. More...

`#include <ql/math/optimization/conjugategradient.hpp>`

Inheritance diagram for ConjugateGradient:
[legend]

## Public Member Functions
| ConjugateGradient (const ext::shared_ptr< LineSearch > &lineSearch=ext::shared_ptr< LineSearch >())
Public Member Functions inherited from LineSearchBasedMethod
| LineSearchBasedMethod (const ext::shared_ptr< LineSearch > &lSearch=ext::shared_ptr< LineSearch >())
virtual EndCriteria::Type | minimize (Problem &P, const EndCriteria &endCriteria)
| minimize the optimization problem P

## Additional Inherited Members
Protected Attributes inherited from LineSearchBasedMethod
ext::shared_ptr< LineSearch > | lineSearch_
| line search

## 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) \)

This optimization method requires the knowledge of the gradient of the cost function.