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

#include <cubicinterpolation.hpp>

+ Inheritance diagram for CubicInterpolationImpl< I1, I2 >:
+ Collaboration diagram for CubicInterpolationImpl< I1, I2 >:

Public Member Functions

 CubicInterpolationImpl (const I1 &xBegin, const I1 &xEnd, const I2 &yBegin, CubicInterpolation::DerivativeApprox da, bool monotonic, CubicInterpolation::BoundaryCondition leftCondition, Real leftConditionValue, CubicInterpolation::BoundaryCondition rightCondition, Real rightConditionValue)
 
void update () override
 
Real value (Real x) const override
 
Real primitive (Real x) const override
 
Real derivative (Real x) const override
 
Real secondDerivative (Real x) const override
 
- Public Member Functions inherited from CoefficientHolder
 CoefficientHolder (Size n)
 
virtual ~CoefficientHolder ()=default
 
- Public Member Functions inherited from Interpolation::templateImpl< I1, I2 >
 templateImpl (const I1 &xBegin, const I1 &xEnd, const I2 &yBegin, const int requiredPoints=2)
 
Real xMin () const override
 
Real xMax () const override
 
std::vector< RealxValues () const override
 
std::vector< RealyValues () const override
 
bool isInRange (Real x) const override
 
- Public Member Functions inherited from Interpolation::Impl
virtual ~Impl ()=default
 
virtual void update ()=0
 
virtual Real xMin () const =0
 
virtual Real xMax () const =0
 
virtual std::vector< RealxValues () const =0
 
virtual std::vector< RealyValues () const =0
 
virtual bool isInRange (Real) const =0
 
virtual Real value (Real) const =0
 
virtual Real primitive (Real) const =0
 
virtual Real derivative (Real) const =0
 
virtual Real secondDerivative (Real) const =0
 

Private Member Functions

Real cubicInterpolatingPolynomialDerivative (Real a, Real b, Real c, Real d, Real u, Real v, Real w, Real z, Real x) const
 

Private Attributes

CubicInterpolation::DerivativeApprox da_
 
bool monotonic_
 
CubicInterpolation::BoundaryCondition leftType_
 
CubicInterpolation::BoundaryCondition rightType_
 
Real leftValue_
 
Real rightValue_
 
Array tmp_
 
std::vector< Realdx_
 
std::vector< RealS_
 
TridiagonalOperator L_
 

Additional Inherited Members

- Public Attributes inherited from CoefficientHolder
Size n_
 
std::vector< RealprimitiveConst_
 
std::vector< Reala_
 
std::vector< Realb_
 
std::vector< Realc_
 
std::vector< boolmonotonicityAdjustments_
 
- Protected Member Functions inherited from Interpolation::templateImpl< I1, I2 >
Size locate (Real x) const
 
- Protected Attributes inherited from Interpolation::templateImpl< I1, I2 >
I1 xBegin_
 
I1 xEnd_
 
I2 yBegin_
 

Detailed Description

template<class I1, class I2>
class QuantLib::detail::CubicInterpolationImpl< I1, I2 >

Definition at line 363 of file cubicinterpolation.hpp.

Constructor & Destructor Documentation

◆ CubicInterpolationImpl()

CubicInterpolationImpl ( const I1 &  xBegin,
const I1 &  xEnd,
const I2 &  yBegin,
CubicInterpolation::DerivativeApprox  da,
bool  monotonic,
CubicInterpolation::BoundaryCondition  leftCondition,
Real  leftConditionValue,
CubicInterpolation::BoundaryCondition  rightCondition,
Real  rightConditionValue 
)

Definition at line 366 of file cubicinterpolation.hpp.

Member Function Documentation

◆ update()

void update ( )
overridevirtual

Implements Interpolation::Impl.

Definition at line 392 of file cubicinterpolation.hpp.

+ Here is the call graph for this function:

◆ value()

Real value ( Real  x) const
overridevirtual

Implements Interpolation::Impl.

Definition at line 758 of file cubicinterpolation.hpp.

+ Here is the call graph for this function:

◆ primitive()

Real primitive ( Real  x) const
overridevirtual

Implements Interpolation::Impl.

Definition at line 763 of file cubicinterpolation.hpp.

+ Here is the call graph for this function:

◆ derivative()

Real derivative ( Real  x) const
overridevirtual

Implements Interpolation::Impl.

Definition at line 770 of file cubicinterpolation.hpp.

+ Here is the call graph for this function:

◆ secondDerivative()

Real secondDerivative ( Real  x) const
overridevirtual

Implements Interpolation::Impl.

Definition at line 775 of file cubicinterpolation.hpp.

+ Here is the call graph for this function:

◆ cubicInterpolatingPolynomialDerivative()

Real cubicInterpolatingPolynomialDerivative ( Real  a,
Real  b,
Real  c,
Real  d,
Real  u,
Real  v,
Real  w,
Real  z,
Real  x 
) const
private

Definition at line 790 of file cubicinterpolation.hpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ da_

Definition at line 782 of file cubicinterpolation.hpp.

◆ monotonic_

bool monotonic_
private

Definition at line 783 of file cubicinterpolation.hpp.

◆ leftType_

Definition at line 784 of file cubicinterpolation.hpp.

◆ rightType_

Definition at line 784 of file cubicinterpolation.hpp.

◆ leftValue_

Real leftValue_
private

Definition at line 785 of file cubicinterpolation.hpp.

◆ rightValue_

Real rightValue_
private

Definition at line 785 of file cubicinterpolation.hpp.

◆ tmp_

Array tmp_
mutableprivate

Definition at line 786 of file cubicinterpolation.hpp.

◆ dx_

std::vector<Real> dx_
mutableprivate

Definition at line 787 of file cubicinterpolation.hpp.

◆ S_

std::vector<Real> S_
private

Definition at line 787 of file cubicinterpolation.hpp.

◆ L_

TridiagonalOperator L_
mutableprivate

Definition at line 788 of file cubicinterpolation.hpp.