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

#include <chebyshevinterpolation.hpp>

+ Inheritance diagram for ChebyshevInterpolation:
+ Collaboration diagram for ChebyshevInterpolation:

Public Types

enum  PointsType { FirstKind , SecondKind }
 

Public Member Functions

 ChebyshevInterpolation (const Array &y, PointsType pointsType=SecondKind)
 
 ChebyshevInterpolation (Size n, const ext::function< Real(Real)> &f, PointsType pointsType=SecondKind)
 
void updateY (const Array &y)
 
Array nodes () const
 
- 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...
 

Static Public Member Functions

static Array nodes (Size n, PointsType pointsType)
 

Private Attributes

const Array x_
 
Array y_
 
ext::shared_ptr< LagrangeInterpolationlagrangeInterp_
 

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

References: S.A. Sarra: Chebyshev Interpolation: An Interactive Tour, https://www.maa.org/sites/default/files/images/upload_library/4/vol6/Sarra/Chebyshev.html

Definition at line 40 of file chebyshevinterpolation.hpp.

Member Enumeration Documentation

◆ PointsType

enum PointsType
Enumerator
FirstKind 
SecondKind 

Definition at line 42 of file chebyshevinterpolation.hpp.

Constructor & Destructor Documentation

◆ ChebyshevInterpolation() [1/2]

ChebyshevInterpolation ( const Array y,
PointsType  pointsType = SecondKind 
)
explicit

Definition at line 33 of file chebyshevinterpolation.cpp.

◆ ChebyshevInterpolation() [2/2]

ChebyshevInterpolation ( Size  n,
const ext::function< Real(Real)> &  f,
PointsType  pointsType = SecondKind 
)

Definition at line 45 of file chebyshevinterpolation.cpp.

Member Function Documentation

◆ updateY()

void updateY ( const Array y)

Definition at line 76 of file chebyshevinterpolation.cpp.

+ Here is the call graph for this function:

◆ nodes() [1/2]

Array nodes ( ) const

Definition at line 54 of file chebyshevinterpolation.cpp.

◆ nodes() [2/2]

Array nodes ( Size  n,
PointsType  pointsType 
)
static

Definition at line 58 of file chebyshevinterpolation.cpp.

Member Data Documentation

◆ x_

const Array x_
private

Definition at line 56 of file chebyshevinterpolation.hpp.

◆ y_

Array y_
private

Definition at line 57 of file chebyshevinterpolation.hpp.

◆ lagrangeInterp_

ext::shared_ptr<LagrangeInterpolation> lagrangeInterp_
private

Definition at line 58 of file chebyshevinterpolation.hpp.