QuantLib_Problem man page

Problem — Constrained optimization problem.

Synopsis

#include <ql/math/optimization/problem.hpp>

Public Member Functions

Problem (CostFunction &costFunction, Constraint &constraint, const Array &initialValue=Array())
default constructor
void reset ()

Real value (const Array &x)
call cost function computation and increment evaluation counter
Disposable< Array > values (const Array &x)
call cost values computation and increment evaluation counter
void gradient (Array &grad_f, const Array &x)
call cost function gradient computation and increment
Real valueAndGradient (Array &grad_f, const Array &x)
call cost function computation and it gradient
Constraint & constraint () const
Constraint.
CostFunction & costFunction () const
Cost function.
void setCurrentValue (const Array &currentValue)

const Array & currentValue () const
current value of the local minimum
void setFunctionValue (Real functionValue)

Real functionValue () const
value of cost function
void setGradientNormValue (Real squaredNorm)

Real gradientNormValue () const
value of cost function gradient norm
Integer functionEvaluation () const
number of evaluation of cost function
Integer gradientEvaluation () const
number of evaluation of cost function gradient

Protected Attributes

CostFunction & costFunction_
Unconstrained cost function.
Constraint & constraint_
Constraint.
Array currentValue_
current value of the local minimum
Real functionValue_
function and gradient norm values at the curentValue_ (i.e. the last step)
Real squaredNorm_

Integer functionEvaluation_
number of evaluation of cost function and its gradient
Integer gradientEvaluation_

Detailed Description

Constrained optimization problem.

Warning

The passed CostFunction and Constraint instances are stored by reference. The user of this class must make sure that they are not destroyed before the Problem instance.

Member Function Documentation

void reset ()

Warning

it does not reset the current minumum to any initial value

Author

Generated automatically by Doxygen for QuantLib from the source code.

Referenced By

currentValue(3), currentValue_(3), functionEvaluation(3), functionEvaluation_(3), functionValue(3), functionValue_(3), gradientEvaluation(3), gradientEvaluation_(3), gradientNormValue(3), Problem(3), setCurrentValue(3), setFunctionValue(3), setGradientNormValue(3) and squaredNorm_(3) are aliases of QuantLib_Problem(3).

Fri Sep 23 2016 Version 1.8.1 QuantLib