QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | List of all members
AbcdInterpolation Class Reference

Abcd interpolation between discrete points. More...

#include <abcdinterpolation.hpp>

+ Inheritance diagram for AbcdInterpolation:
+ Collaboration diagram for AbcdInterpolation:

Public Member Functions

template<class I1 , class I2 >
 AbcdInterpolation (const I1 &xBegin, const I1 &xEnd, const I2 &yBegin, Real a=-0.06, Real b=0.17, Real c=0.54, Real d=0.17, bool aIsFixed=false, bool bIsFixed=false, bool cIsFixed=false, bool dIsFixed=false, bool vegaWeighted=false, const ext::shared_ptr< EndCriteria > &endCriteria=ext::shared_ptr< EndCriteria >(), const ext::shared_ptr< OptimizationMethod > &optMethod=ext::shared_ptr< OptimizationMethod >())
 
- Public Member Functions inherited from Interpolation
 Interpolation ()=default
 
 ~Interpolation () override=default
 
bool empty () const
 
Real operator() (Real x, bool allowExtrapolation=false) const
 
Real primitive (Real x, bool allowExtrapolation=false) const
 
Real derivative (Real x, bool allowExtrapolation=false) const
 
Real secondDerivative (Real x, bool allowExtrapolation=false) const
 
Real xMin () const
 
Real xMax () const
 
bool isInRange (Real x) const
 
void update ()
 
- Public Member Functions inherited from Extrapolator
 Extrapolator ()=default
 
virtual ~Extrapolator ()=default
 
void enableExtrapolation (bool b=true)
 enable extrapolation in subsequent calls More...
 
void disableExtrapolation (bool b=true)
 disable extrapolation in subsequent calls More...
 
bool allowsExtrapolation () const
 tells whether extrapolation is enabled More...
 

Inspectors

Real a () const
 
Real b () const
 
Real c () const
 
Real d () const
 
std::vector< Realk () const
 
Real rmsError () const
 
Real maxError () const
 
EndCriteria::Type endCriteria ()
 
template<class I1 >
Real k (Time t, const I1 &xBegin, const I1 &xEnd) const
 
const detail::AbcdCoeffHoldercoeffs () const
 

Additional Inherited Members

- Protected Member Functions inherited from Interpolation
void checkRange (Real x, bool extrapolate) const
 
- Protected Attributes inherited from Interpolation
ext::shared_ptr< Implimpl_
 

Detailed Description

Abcd interpolation between discrete points.

Warning:
See the Interpolation class for information about the required lifetime of the underlying data.

Definition at line 157 of file abcdinterpolation.hpp.

Constructor & Destructor Documentation

◆ AbcdInterpolation()

AbcdInterpolation ( const I1 &  xBegin,
const I1 &  xEnd,
const I2 &  yBegin,
Real  a = -0.06,
Real  b = 0.17,
Real  c = 0.54,
Real  d = 0.17,
bool  aIsFixed = false,
bool  bIsFixed = false,
bool  cIsFixed = false,
bool  dIsFixed = false,
bool  vegaWeighted = false,
const ext::shared_ptr< EndCriteria > &  endCriteria = ext::shared_ptr<EndCriteria>(),
const ext::shared_ptr< OptimizationMethod > &  optMethod = ext::shared_ptr<OptimizationMethod>() 
)

Constructor

Definition at line 161 of file abcdinterpolation.hpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ a()

Real a ( ) const

Definition at line 190 of file abcdinterpolation.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ b()

Real b ( ) const

Definition at line 191 of file abcdinterpolation.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ c()

Real c ( ) const

Definition at line 192 of file abcdinterpolation.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ d()

Real d ( ) const

Definition at line 193 of file abcdinterpolation.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ k() [1/2]

std::vector< Real > k ( ) const

Definition at line 194 of file abcdinterpolation.hpp.

+ Here is the call graph for this function:

◆ rmsError()

Real rmsError ( ) const

Definition at line 195 of file abcdinterpolation.hpp.

+ Here is the call graph for this function:

◆ maxError()

Real maxError ( ) const

Definition at line 196 of file abcdinterpolation.hpp.

+ Here is the call graph for this function:

◆ endCriteria()

EndCriteria::Type endCriteria ( )

Definition at line 197 of file abcdinterpolation.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ k() [2/2]

Real k ( Time  t,
const I1 &  xBegin,
const I1 &  xEnd 
) const

Definition at line 199 of file abcdinterpolation.hpp.

+ Here is the call graph for this function:

◆ coeffs()

const detail::AbcdCoeffHolder & coeffs ( ) const
private

Definition at line 204 of file abcdinterpolation.hpp.

+ Here is the caller graph for this function: