Interp Class Template Reference

Class template generates interpolation data of known functions using Chebyshev polynomials. More...

#include <Cheb.h>

Inherits Cheb< xType, yType >.

Inheritance diagram for Interp:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Interp (const Cheb< xType, yType > &ch)
 Interp (const Interp< xType, yType > &ch)
 Interp (const yType *arCn, xType x1, xType x2, int nCount)
 Interp (yType(&rFn)(xType), xType x1, xType x2, int nCount)
 Interp (yType(&rFn)(xType), xType x1, xType x2, xType dEps)
 ~Interp (void)

Detailed Description

template<typename xType, typename yType>
class calc::Interp< xType, yType >

Class template generates interpolation data of known functions using Chebyshev polynomials.

To develop an interpolation polynomial, a continuous single-valued function, over a specific domain and range, is passed to this object's constructor. In initialization, the user-supplied function is evaluated to determine interpolation coefficients of Chebyshev polynomials. These polynomials coefficients are stored, and approximate the user-supplied function. When this object is evaluated after instantiation, an approximation of a user-supplied function is made with no access to the user-supplied function.

The declaration typename <xType> specifies the form of independent variables used in interpolation calculations. The declaration typename <yType> specifies the form of solution variables used in interpolation calculations. In general, the <yType> variables should be the equal or superset of the <xType> variables.

Author
efgeorge
Date
2006/07/18 01:45:34
Revision
1.2
Examples:

example_Cheb.txt.


Constructor & Destructor Documentation

Interp ( yType(&)(xType)  rFn,
xType  x1,
xType  x2,
xType  dEps 
)

Constructor initializes a Chebyshev polynomial interpolation object from the specified function rFn within the specified interval x1 to x2 and at the specified tolerance dEps.

Parameters:
rFn a reference to an evaluation function to be interpolated
x1 interpolation lower bound (x units)
x2 interpolation upper bound (x units)
dEps required absolute error of interpolation (y units)
Remarks:
  • The interpolation bounds x1 and x2 cannot be equal.
  • The specified function rFn(x) returns a value from which interpolation parameters are calculated given an independent variable value between x1 and x2.
  • The function rFn(x) accepts a single independent value (x units).
  • The function rFn(x) returns a single value at the specified point (y units).
  • rFn(x) declaration: yType fn(xType x);
  • The error parameter dEps must have a value greater than zero.
  • The parameter dEps is in absolute units of the function return value (y units).

Interp ( yType(&)(xType)  rFn,
xType  x1,
xType  x2,
int  nCount 
)

Constructor initializes a Chebyshev polynomial interpolation object from the specified function rFn within the specified interval x1 to x2 with the specified coefficient count nCount.

Parameters:
rFn a reference to an evaluation function to be interpolated
x1 interpolation lower bound (x units)
x2 interpolation upper bound (x units)
nCount coefficient count of interpolation polynomial
Remarks:
  • The interpolation bounds x1 and x2 cannot be equal.
  • The specified function rFn(x) returns a value from which interpolation parameters are calculated given an independent variable value between x1 and x2.
  • The function rFn(x) accepts a single independent value (x units).
  • The function rFn(x) returns a single value at the specified point (y units).
  • rFn(x) declaration: yType fn(xType x);
  • The coefficient count nCount must have a value greater than or equal to Cheb::POINT_MIN.

Interp ( const yType *  arCn,
xType  x1,
xType  x2,
int  nCount 
)

Constructor initializes a Chebyshev polynomial interpolation object from the specified coefficient array arCn within the specified interval x1 to x2.

Parameters:
arCn a pointer to nCount Chebyshev polynomial coefficients (y units)
x1 interpolation lower bound (x units)
x2 interpolation upper bound (x units)
nCount coefficient count of the interpolation polynomial
Remarks:
  • The interpolation bounds x1 and x2 cannot be equal.
  • The coefficient count nCount must have a value greater than or equal to Cheb::POINT_MIN.

Interp ( const Interp< xType, yType > &  ch  ) 

Copy constructor initializes a function interpolation object from the specified existing interpolation object.

Parameters:
ch a reference to a function interpolation object
Remarks:
An information copy is made of the interpolation object.

Interp ( const Cheb< xType, yType > &  ch  ) 

Copy constructor initializes a function interpolation object from the specified existing interpolation object.

Parameters:
ch a reference to a function interpolation object
Remarks:
An information copy is made of the interpolation object.

~Interp ( void   ) 

Destructor frees allocated memory.


The documentation for this class was generated from the following files:
Generated on Wed Jul 19 09:24:10 2006 for CalcLib by  doxygen 1.4.7