26#ifndef quantlib_optimization_problem_h
27#define quantlib_optimization_problem_h
31#include "optimization/StatusFunction.hpp"
88 void setGradientNormValue(RealType squaredNorm) {
89 squaredNorm_ = squaredNorm;
132 ++gradientEvaluation_;
139 ++gradientEvaluation_;
Abstract optimization method class.
Optimization objective function class.
Dynamically-sized vector class.
Objective function abstract class for optimization problem.
virtual RealType value(const DynamicVector< RealType > &x)=0
method to overload to compute the objective function value in x
virtual RealType valueAndGradient(DynamicVector< RealType > &grad, const DynamicVector< RealType > &x)
method to overload to compute grad_f, the first derivative
virtual void gradient(DynamicVector< RealType > &grad, const DynamicVector< RealType > &x)
method to overload to compute grad_f, the first derivative of
Constrained optimization problem.
ObjectiveFunction & objectiveFunction() const
Objective function.
void gradient(DynamicVector< RealType > &grad_f, const DynamicVector< RealType > &x)
call objective function gradient computation and increment
int gradientEvaluation() const
number of evaluation of objective function gradient
Constraint & constraint_
Constraint.
DynamicVector< RealType > currentValue_
current value of the local minimum
int functionEvaluation() const
number of evaluation of objective function
RealType functionValue() const
value of objective function
RealType value(const DynamicVector< RealType > &x)
call objective function computation and increment evaluation counter
ObjectiveFunction & objectiveFunction_
Unconstrained objective function.
Problem(ObjectiveFunction &objectiveFunction, Constraint &constraint, OpenMD::StatusFunction &statFunc, const DynamicVector< RealType > &initialValue=DynamicVector< RealType >())
default constructor
int functionEvaluation_
number of evaluation of objective function and its gradient
RealType gradientNormValue() const
value of objective function gradient norm
Constraint & constraint() const
Constraint.
StatusFunction & statusFunction_
status function
RealType functionValue_
function and gradient norm values at the curentValue_ (i.e. the last step)
RealType valueAndGradient(DynamicVector< RealType > &grad_f, const DynamicVector< RealType > &x)
call objective function computation and it gradient
const DynamicVector< RealType > & currentValue() const
current value of the local minimum