Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
CubicFlat Class Reference

Cubic interpolation and flat extrapolation factory and traits. More...

#include <qle/math/flatextrapolation.hpp>

+ Collaboration diagram for CubicFlat:

Public Member Functions

 CubicFlat (QuantLib::CubicInterpolation::DerivativeApprox da=QuantLib::CubicInterpolation::Kruger, bool monotonic=false, QuantLib::CubicInterpolation::BoundaryCondition leftCondition=QuantLib::CubicInterpolation::SecondDerivative, QuantLib::Real leftConditionValue=0.0, QuantLib::CubicInterpolation::BoundaryCondition rightCondition=QuantLib::CubicInterpolation::SecondDerivative, QuantLib::Real rightConditionValue=0.0)
 
template<class I1 , class I2 >
Interpolation interpolate (const I1 &xBegin, const I1 &xEnd, const I2 &yBegin) const
 

Static Public Attributes

static const bool global = true
 
static const Size requiredPoints = 2
 

Private Attributes

QuantLib::CubicInterpolation::DerivativeApprox da_
 
bool monotonic_
 
QuantLib::CubicInterpolation::BoundaryCondition leftType_
 
QuantLib::CubicInterpolation::BoundaryCondition rightType_
 
QuantLib::Real leftValue_
 
QuantLib::Real rightValue_
 

Detailed Description

Cubic interpolation and flat extrapolation factory and traits.

Definition at line 127 of file flatextrapolation.hpp.

Constructor & Destructor Documentation

◆ CubicFlat()

CubicFlat ( QuantLib::CubicInterpolation::DerivativeApprox  da = QuantLib::CubicInterpolation::Kruger,
bool  monotonic = false,
QuantLib::CubicInterpolation::BoundaryCondition  leftCondition = QuantLib::CubicInterpolation::SecondDerivative,
QuantLib::Real  leftConditionValue = 0.0,
QuantLib::CubicInterpolation::BoundaryCondition  rightCondition = QuantLib::CubicInterpolation::SecondDerivative,
QuantLib::Real  rightConditionValue = 0.0 
)

Definition at line 129 of file flatextrapolation.hpp.

136 : da_(da), monotonic_(monotonic), leftType_(leftCondition), rightType_(rightCondition),
137 leftValue_(leftConditionValue), rightValue_(rightConditionValue) {}
QuantLib::CubicInterpolation::DerivativeApprox da_
QuantLib::Real rightValue_
QuantLib::CubicInterpolation::BoundaryCondition leftType_
QuantLib::CubicInterpolation::BoundaryCondition rightType_

Member Function Documentation

◆ interpolate()

Interpolation interpolate ( const I1 &  xBegin,
const I1 &  xEnd,
const I2 &  yBegin 
) const

Definition at line 139 of file flatextrapolation.hpp.

139 {
140 return FlatExtrapolation(QuantLib::ext::make_shared<CubicInterpolation>(
141 xBegin, xEnd, yBegin, da_, monotonic_, leftType_, leftValue_, rightType_, rightValue_));
142 }

Member Data Documentation

◆ global

const bool global = true
static

Definition at line 144 of file flatextrapolation.hpp.

◆ requiredPoints

const Size requiredPoints = 2
static

Definition at line 145 of file flatextrapolation.hpp.

◆ da_

QuantLib::CubicInterpolation::DerivativeApprox da_
private

Definition at line 148 of file flatextrapolation.hpp.

◆ monotonic_

bool monotonic_
private

Definition at line 149 of file flatextrapolation.hpp.

◆ leftType_

QuantLib::CubicInterpolation::BoundaryCondition leftType_
private

Definition at line 150 of file flatextrapolation.hpp.

◆ rightType_

QuantLib::CubicInterpolation::BoundaryCondition rightType_
private

Definition at line 151 of file flatextrapolation.hpp.

◆ leftValue_

QuantLib::Real leftValue_
private

Definition at line 152 of file flatextrapolation.hpp.

◆ rightValue_

QuantLib::Real rightValue_
private

Definition at line 153 of file flatextrapolation.hpp.