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
KernelInterpolation2DImpl< I1, I2, M, Kernel > Class Template Reference

#include <kernelinterpolation2d.hpp>

+ Inheritance diagram for KernelInterpolation2DImpl< I1, I2, M, Kernel >:
+ Collaboration diagram for KernelInterpolation2DImpl< I1, I2, M, Kernel >:

Public Member Functions

 KernelInterpolation2DImpl (const I1 &xBegin, const I1 &xEnd, const I2 &yBegin, const I2 &yEnd, const M &zData, Kernel kernel)
 
void calculate () override
 
Real value (Real x1, Real x2) const override
 
void setInverseResultPrecision (Real invPrec)
 
- Public Member Functions inherited from Interpolation2D::templateImpl< I1, I2, M >
 templateImpl (const I1 &xBegin, const I1 &xEnd, const I2 &yBegin, const I2 &yEnd, const M &zData)
 
Real xMin () const override
 
Real xMax () const override
 
std::vector< RealxValues () const override
 
Real yMin () const override
 
Real yMax () const override
 
std::vector< RealyValues () const override
 
const MatrixzData () const override
 
bool isInRange (Real x, Real y) const override
 
- Public Member Functions inherited from Interpolation2D::Impl
virtual ~Impl ()=default
 
virtual void calculate ()=0
 
virtual Real xMin () const =0
 
virtual Real xMax () const =0
 
virtual std::vector< RealxValues () const =0
 
virtual Size locateX (Real x) const =0
 
virtual Real yMin () const =0
 
virtual Real yMax () const =0
 
virtual std::vector< RealyValues () const =0
 
virtual Size locateY (Real y) const =0
 
virtual const MatrixzData () const =0
 
virtual bool isInRange (Real x, Real y) const =0
 
virtual Real value (Real x, Real y) const =0
 

Private Member Functions

Real kernelAbs (const Array &X, const Array &Y) const
 
Real gammaFunc (const Array &X) const
 
void updateAlphaVec ()
 

Private Attributes

Size xSize_
 
Size ySize_
 
Size xySize_
 
Real invPrec_ = 1.0e-10
 
Array alphaVec_
 
Array yVec_
 
Matrix M_
 
Kernel kernel_
 

Additional Inherited Members

- Protected Member Functions inherited from Interpolation2D::templateImpl< I1, I2, M >
Size locateX (Real x) const override
 
Size locateY (Real y) const override
 
- Protected Attributes inherited from Interpolation2D::templateImpl< I1, I2, M >
I1 xBegin_
 
I1 xEnd_
 
I2 yBegin_
 
I2 yEnd_
 
const M & zData_
 

Detailed Description

template<class I1, class I2, class M, class Kernel>
class QuantLib::detail::KernelInterpolation2DImpl< I1, I2, M, Kernel >

Definition at line 56 of file kernelinterpolation2d.hpp.

Constructor & Destructor Documentation

◆ KernelInterpolation2DImpl()

KernelInterpolation2DImpl ( const I1 &  xBegin,
const I1 &  xEnd,
const I2 &  yBegin,
const I2 &  yEnd,
const M &  zData,
Kernel  kernel 
)

Definition at line 60 of file kernelinterpolation2d.hpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ calculate()

void calculate ( )
overridevirtual

Implements Interpolation2D::Impl.

Definition at line 76 of file kernelinterpolation2d.hpp.

+ Here is the call graph for this function:

◆ value()

Real value ( Real  x1,
Real  x2 
) const
overridevirtual

Implements Interpolation2D::Impl.

Definition at line 78 of file kernelinterpolation2d.hpp.

+ Here is the call graph for this function:

◆ setInverseResultPrecision()

void setInverseResultPrecision ( Real  invPrec)

Definition at line 102 of file kernelinterpolation2d.hpp.

◆ kernelAbs()

Real kernelAbs ( const Array X,
const Array Y 
) const
private

Definition at line 109 of file kernelinterpolation2d.hpp.

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

◆ gammaFunc()

Real gammaFunc ( const Array X) const
private

Definition at line 113 of file kernelinterpolation2d.hpp.

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

◆ updateAlphaVec()

void updateAlphaVec ( )
private

Definition at line 129 of file kernelinterpolation2d.hpp.

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

Member Data Documentation

◆ xSize_

Size xSize_
private

Definition at line 174 of file kernelinterpolation2d.hpp.

◆ ySize_

Size ySize_
private

Definition at line 174 of file kernelinterpolation2d.hpp.

◆ xySize_

Size xySize_
private

Definition at line 174 of file kernelinterpolation2d.hpp.

◆ invPrec_

Real invPrec_ = 1.0e-10
private

Definition at line 175 of file kernelinterpolation2d.hpp.

◆ alphaVec_

Array alphaVec_
private

Definition at line 176 of file kernelinterpolation2d.hpp.

◆ yVec_

Array yVec_
private

Definition at line 176 of file kernelinterpolation2d.hpp.

◆ M_

Matrix M_
private

Definition at line 177 of file kernelinterpolation2d.hpp.

◆ kernel_

Kernel kernel_
private

Definition at line 178 of file kernelinterpolation2d.hpp.