QuantLib: LineSearch Class Reference

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

- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes | List of all members
LineSearch Class Referenceabstract

Base class for line search. More...

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

Inheritance diagram for LineSearch:
[legend]

## Public Member Functions
| LineSearch (Real=0.0)
| Default constructor.
virtual | ~LineSearch ()
| Destructor.
const Array & | lastX ()
| return last x value
Real | lastFunctionValue ()
| return last cost function value
const Array & | lastGradient ()
| return last gradient
Real | lastGradientNorm2 ()
| return square norm of last gradient
bool | succeed ()
virtual Real | operator() (Problem &P, EndCriteria::Type &ecType, const EndCriteria &, const Real t_ini)=0
| Perform line search.
Real | update (Array &params, const Array &direction, Real beta, const Constraint &constraint)
const Array & | searchDirection () const
| current value of the search direction
Array & | searchDirection ()

## Protected Attributes
Array | searchDirection_
| current values of the search direction
Array | xtd_
| new x and its gradient
Array | gradient_
Real | qt_
| cost function value and gradient norm corresponding to xtd_
Real | qpt_
bool | succeed_
| flag to know if linesearch succeed

## Detailed Description

Base class for line search.