PARTONS/NumA++  
Numerical Analysis C++ routines
Public Member Functions | List of all members
NumA::Chebyshev Class Reference

Chebyshev expansion class. More...

Public Member Functions

 Chebyshev (unsigned int N=50)
 Default Constructor with the order N of the expansion. More...
 
virtual ~Chebyshev ()
 Default destructor. More...
 
unsigned int getN () const
 Get the order N of the expansion. More...
 
void setN (unsigned int n)
 Set the order N of the expansion/. More...
 
const NumA::VectorDgetRoots () const
 
const NumA::MatrixDgetValuesToCoeffsMatrix () const
 Interpolation matrix. More...
 
const NumA::MatrixDgetCoeffsToValuesMatrix () const
 
NumA::MatrixD getCoeffsToValuesMatrix (const NumA::VectorD &points) const
 
NumA::VectorD getCoeffsToValueVector (double x) const
 
NumA::MatrixD getValuesToValuesMatrix (const NumA::VectorD &points) const
 Interpolation matrix. More...
 
NumA::VectorD getValuesToValueVector (double x) const
 

Detailed Description

Chebyshev expansion class.

Interpolation \( f(x) = \sum_{i=0}^{N-1} c_i T_i \left( x \right) \) for \( x \in \left[ -1, 1 \right] \) , where \( N \) is the order of the expansion.

TODO: \( x \in \) any interval.

Constructor & Destructor Documentation

◆ Chebyshev()

NumA::Chebyshev::Chebyshev ( unsigned int  N = 50)

Default Constructor with the order N of the expansion.

Parameters
NOrder of the expansion.

◆ ~Chebyshev()

NumA::Chebyshev::~Chebyshev ( )
virtual

Default destructor.

Member Function Documentation

◆ getCoeffsToValuesMatrix() [1/2]

const NumA::MatrixD & NumA::Chebyshev::getCoeffsToValuesMatrix ( ) const
Returns
Matrix which gives a vector of the values on Chebyshev nodes when applied to a vector of coefficients for the expansion.

◆ getCoeffsToValuesMatrix() [2/2]

NumA::MatrixD NumA::Chebyshev::getCoeffsToValuesMatrix ( const NumA::VectorD points) const
Parameters
pointsPoints where to evaluate the expansion.
Returns
Matrix which gives a vector of the values on given points when applied to a vector of coefficients for the expansion.

◆ getCoeffsToValueVector()

NumA::VectorD NumA::Chebyshev::getCoeffsToValueVector ( double  x) const
Parameters
xPoint where the expansion is evaluated.
Returns
Vector which gives the Chebyshev expansion on x when a scalar product is taken with a vector of coefficients for the expansion.

◆ getN()

unsigned int NumA::Chebyshev::getN ( ) const

Get the order N of the expansion.

Returns
N unsigned int

◆ getRoots()

const NumA::VectorD & NumA::Chebyshev::getRoots ( ) const

◆ getValuesToCoeffsMatrix()

const NumA::MatrixD & NumA::Chebyshev::getValuesToCoeffsMatrix ( ) const

Interpolation matrix.

Returns
Matrix which gives a vector of the coefficients for the expansion when applied to a vector of values on Chebyshev nodes.

◆ getValuesToValuesMatrix()

NumA::MatrixD NumA::Chebyshev::getValuesToValuesMatrix ( const NumA::VectorD points) const

Interpolation matrix.

Parameters
pointsPoints where to evaluate the expansion.
Returns
Matrix which gives a vector of values on given points when applied to a vector of values on Chebyshev nodes.

◆ getValuesToValueVector()

NumA::VectorD NumA::Chebyshev::getValuesToValueVector ( double  x) const
Parameters
xPoint where the expansion is evaluated.
Returns
Vector which gives the Chebyshev expansion on x when a scalar product is taken with a vector of values on Chebyshev nodes.

◆ setN()

void NumA::Chebyshev::setN ( unsigned int  n)

Set the order N of the expansion/.

Parameters
nunsigned int

The documentation for this class was generated from the following files: