QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
Loading...
Searching...
No Matches
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 &parameterValues, const std::vector< bool > &fixParameters)
 ProjectedCostFunction (const CostFunction &costFunction, const Projection &projection)
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 void jacobian (Matrix &jac, const Array &x) const
 method to overload to compute J_f, the jacobian of
virtual Array valuesAndJacobian (Matrix &jac, const Array &x) const
 method to overload to compute J_f, the jacobian of
virtual Real finiteDifferenceEpsilon () const
 Default epsilon for finite difference method :

CostFunction interface

Real value (const Array &freeParameters) const override
 method to overload to compute the cost function value in x
Array values (const Array &freeParameters) const override
 method to overload to compute the cost function values in x

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)

Member Function Documentation

◆ value()

Real value ( const Array & x) const
overridevirtual

method to overload to compute the cost function value in x

Reimplemented from CostFunction.

◆ values()

Array values ( const Array & x) const
overridevirtual

method to overload to compute the cost function values in x

Implements CostFunction.