QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
#include <chebyshevinterpolation.hpp>
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< LagrangeInterpolation > | lagrangeInterp_ |
Additional Inherited Members | |
Protected Member Functions inherited from Interpolation | |
void | checkRange (Real x, bool extrapolate) const |
Protected Attributes inherited from Interpolation | |
ext::shared_ptr< Impl > | impl_ |
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.
enum PointsType |
Enumerator | |
---|---|
FirstKind | |
SecondKind |
Definition at line 42 of file chebyshevinterpolation.hpp.
|
explicit |
Definition at line 33 of file chebyshevinterpolation.cpp.
ChebyshevInterpolation | ( | Size | n, |
const ext::function< Real(Real)> & | f, | ||
PointsType | pointsType = SecondKind |
||
) |
Definition at line 45 of file chebyshevinterpolation.cpp.
void updateY | ( | const Array & | y | ) |
Array nodes | ( | ) | const |
Definition at line 54 of file chebyshevinterpolation.cpp.
|
static |
Definition at line 58 of file chebyshevinterpolation.cpp.
|
private |
Definition at line 56 of file chebyshevinterpolation.hpp.
|
private |
Definition at line 57 of file chebyshevinterpolation.hpp.
|
private |
Definition at line 58 of file chebyshevinterpolation.hpp.