CFL
Public Member Functions | List of all members

Standard concrete class for numerical approximation. More...

#include <cfl/Approx.hpp>

Public Member Functions

 Approx (IApprox *pNewP=0)
 
Function approximate (const std::valarray< double > &rValues) const
 
const std::valarray< double > & arg () const
 
void assign (double dLeft, double dRight)
 

Detailed Description

This is the standard class for different approximation schemes. It is implemented by a dynamically allocated object derived from the interface class IApprox.

See also
IApprox and NApprox

Constructor & Destructor Documentation

cfl::Approx::Approx ( IApprox pNewP = 0)
explicit

A constructor.

Parameters
pNewPA dynamically allocated implementation of IApprox.

Member Function Documentation

Function cfl::Approx::approximate ( const std::valarray< double > &  rValues) const

Recovers a one-dimensional function by using its values at the nodes of the approximation scheme.

Parameters
rValuesValues of the function at the nodes of the approximation scheme.
Returns
The result of numerical approximation of the function.
const std::valarray<double>& cfl::Approx::arg ( ) const

Returns the nodes of the approximation scheme, that is, the arguments where an approximated function should be evaluated. For example, in the case of Chebyshev approximation this function returns zeros of Chebyshev polynomials.

Returns
The nodes of the approximation scheme.
void cfl::Approx::assign ( double  dLeft,
double  dRight 
)

Constructs an approximation scheme on the interval [dLeft, dRight].

Parameters
dLeftThe left point of the interval.
dRightThe right point of the interval.

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