ProjectedCostFunction Class Reference

Parameterized cost function. More...

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

Inheritance diagram for ProjectedCostFunction:

Public Member Functions

 ProjectedCostFunction (const CostFunction &costFunction, const Array &parametersValues, const std::vector< bool > &parametersFreedoms)
 
virtual Disposable< Arrayproject (const Array &parameters) const
 returns the subset of free parameters corresponding
 
virtual Disposable< Arrayinclude (const Array &projectedParameters) const
 returns whole set of parameters corresponding to the set
 
CostFunction interface
virtual Real value (const Array &freeParameters) const
 method to overload to compute the cost function value in x
 
virtual Disposable< Arrayvalues (const Array &freeParameters) const
 method to overload to compute the cost function values in x
 
- Public Member Functions inherited from CostFunction
virtual void gradient (Array &grad, const Array &x) const
 method to overload to compute grad_f, the first derivative of
 
virtual Real valueAndGradient (Array &grad, const Array &x) const
 method to overload to compute grad_f, the first derivative of
 
virtual Real finiteDifferenceEpsilon () const
 Default epsilon for finite difference method :
 

Detailed Description

Parameterized cost function.

This class creates a proxy cost function which can depend on any arbitrary subset of parameters (the other being fixed)