QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | Private Types | Private Attributes | List of all members
PenaltyFunction< Curve > Class Template Reference

#include <localbootstrap.hpp>

+ Inheritance diagram for PenaltyFunction< Curve >:
+ Collaboration diagram for PenaltyFunction< Curve >:

Public Member Functions

 PenaltyFunction (Curve *curve, Size initialIndex, helper_iterator rateHelpersStart, helper_iterator rateHelpersEnd)
 
Real value (const Array &x) const override
 method to overload to compute the cost function value in x More...
 
Array values (const Array &x) const override
 method to overload to compute the cost function values in x More...
 
- Public Member Functions inherited from CostFunction
virtual ~CostFunction ()=default
 
virtual Real value (const Array &x) const
 method to overload to compute the cost function value in x More...
 
virtual Array values (const Array &x) const =0
 method to overload to compute the cost function values in x More...
 
virtual void gradient (Array &grad, const Array &x) const
 method to overload to compute grad_f, the first derivative of More...
 
virtual Real valueAndGradient (Array &grad, const Array &x) const
 method to overload to compute grad_f, the first derivative of More...
 
virtual void jacobian (Matrix &jac, const Array &x) const
 method to overload to compute J_f, the jacobian of More...
 
virtual Array valuesAndJacobian (Matrix &jac, const Array &x) const
 method to overload to compute J_f, the jacobian of More...
 
virtual Real finiteDifferenceEpsilon () const
 Default epsilon for finite difference method : More...
 

Private Types

typedef Curve::traits_type Traits
 
typedef Traits::helper helper
 
typedef std::vector< ext::shared_ptr< helper > >::const_iterator helper_iterator
 

Private Attributes

Curve * curve_
 
Size initialIndex_
 
Size localisation_
 
helper_iterator rateHelpersStart_
 
helper_iterator rateHelpersEnd_
 

Detailed Description

template<class Curve>
class QuantLib::PenaltyFunction< Curve >

Definition at line 40 of file localbootstrap.hpp.

Member Typedef Documentation

◆ Traits

typedef Curve::traits_type Traits
private

Definition at line 41 of file localbootstrap.hpp.

◆ helper

typedef Traits::helper helper
private

Definition at line 42 of file localbootstrap.hpp.

◆ helper_iterator

typedef std::vector<ext::shared_ptr<helper>>::const_iterator helper_iterator
private

Definition at line 45 of file localbootstrap.hpp.

Constructor & Destructor Documentation

◆ PenaltyFunction()

PenaltyFunction ( Curve *  curve,
Size  initialIndex,
helper_iterator  rateHelpersStart,
helper_iterator  rateHelpersEnd 
)

Definition at line 47 of file localbootstrap.hpp.

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.

Definition at line 253 of file localbootstrap.hpp.

+ Here is the call graph for this function:

◆ values()

Array values ( const Array x) const
overridevirtual

method to overload to compute the cost function values in x

Implements CostFunction.

Definition at line 275 of file localbootstrap.hpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ curve_

Curve* curve_
private

Definition at line 59 of file localbootstrap.hpp.

◆ initialIndex_

Size initialIndex_
private

Definition at line 60 of file localbootstrap.hpp.

◆ localisation_

Size localisation_
private

Definition at line 61 of file localbootstrap.hpp.

◆ rateHelpersStart_

helper_iterator rateHelpersStart_
private

Definition at line 62 of file localbootstrap.hpp.

◆ rateHelpersEnd_

helper_iterator rateHelpersEnd_
private

Definition at line 63 of file localbootstrap.hpp.