QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Constrained optimization problem. More...
#include <problem.hpp>
Public Member Functions | |
Problem (CostFunction &costFunction, Constraint &constraint, Array initialValue=Array()) | |
default constructor More... | |
void | reset () |
Real | value (const Array &x) |
call cost function computation and increment evaluation counter More... | |
Array | values (const Array &x) |
call cost values computation and increment evaluation counter More... | |
void | gradient (Array &grad_f, const Array &x) |
call cost function gradient computation and increment More... | |
Real | valueAndGradient (Array &grad_f, const Array &x) |
call cost function computation and it gradient More... | |
Constraint & | constraint () const |
Constraint. More... | |
CostFunction & | costFunction () const |
Cost function. More... | |
void | setCurrentValue (const Array ¤tValue) |
const Array & | currentValue () const |
current value of the local minimum More... | |
void | setFunctionValue (Real functionValue) |
Real | functionValue () const |
value of cost function More... | |
void | setGradientNormValue (Real squaredNorm) |
Real | gradientNormValue () const |
value of cost function gradient norm More... | |
Integer | functionEvaluation () const |
number of evaluation of cost function More... | |
Integer | gradientEvaluation () const |
number of evaluation of cost function gradient More... | |
Protected Attributes | |
CostFunction & | costFunction_ |
Unconstrained cost function. More... | |
Constraint & | constraint_ |
Constraint. More... | |
Array | currentValue_ |
current value of the local minimum More... | |
Real | functionValue_ |
function and gradient norm values at the currentValue_ (i.e. the last step) More... | |
Real | squaredNorm_ |
Integer | functionEvaluation_ |
number of evaluation of cost function and its gradient More... | |
Integer | gradientEvaluation_ |
Constrained optimization problem.
Definition at line 42 of file problem.hpp.
Problem | ( | CostFunction & | costFunction, |
Constraint & | constraint, | ||
Array | initialValue = Array() |
||
) |
default constructor
Definition at line 45 of file problem.hpp.
void reset | ( | ) |
Definition at line 139 of file problem.hpp.
call cost function computation and increment evaluation counter
Definition at line 116 of file problem.hpp.
call cost values computation and increment evaluation counter
Definition at line 121 of file problem.hpp.
call cost function gradient computation and increment
Definition at line 126 of file problem.hpp.
call cost function computation and it gradient
Definition at line 132 of file problem.hpp.
Constraint & constraint | ( | ) | const |
CostFunction & costFunction | ( | ) | const |
Cost function.
Definition at line 74 of file problem.hpp.
void setCurrentValue | ( | const Array & | currentValue | ) |
Definition at line 76 of file problem.hpp.
const Array & currentValue | ( | ) | const |
current value of the local minimum
Definition at line 81 of file problem.hpp.
void setFunctionValue | ( | Real | functionValue | ) |
Definition at line 83 of file problem.hpp.
Real functionValue | ( | ) | const |
value of cost function
Definition at line 88 of file problem.hpp.
void setGradientNormValue | ( | Real | squaredNorm | ) |
Real gradientNormValue | ( | ) | const |
value of cost function gradient norm
Definition at line 94 of file problem.hpp.
Integer functionEvaluation | ( | ) | const |
number of evaluation of cost function
Definition at line 97 of file problem.hpp.
Integer gradientEvaluation | ( | ) | const |
number of evaluation of cost function gradient
Definition at line 100 of file problem.hpp.
|
protected |
Unconstrained cost function.
Definition at line 104 of file problem.hpp.
|
protected |
Definition at line 106 of file problem.hpp.
|
protected |
current value of the local minimum
Definition at line 108 of file problem.hpp.
|
protected |
function and gradient norm values at the currentValue_ (i.e. the last step)
Definition at line 110 of file problem.hpp.
|
protected |
Definition at line 110 of file problem.hpp.
|
protected |
number of evaluation of cost function and its gradient
Definition at line 112 of file problem.hpp.
|
protected |
Definition at line 112 of file problem.hpp.