#include <Cheb.h>
Inherits Base.
Inherited by Differ, Integr, and Interp.
Inheritance diagram for Cheb:

Public Types | |
| enum | CTYPE { INTERPOLATE = 0, DIFFERENTIATE, INTEGRATE, CTYPE_CNT } |
| CTYPE_CNT | |
| DIFFERENTIATE | |
| INTEGRATE | |
| INTERPOLATE = 0 | |
Public Member Functions | |
| yType | eval (xType x) const throw (ChebErr) |
| const yType * | getArray (void) const |
| xType | getBound (enum Base::BOUND iBnd) const |
| int | getCount (void) const |
| xType | getError (void) const |
| yType | getParameter (int iDeg) const |
| enum Cheb< xType, yType >::CTYPE | getType (void) const |
| operator const yType * (void) const | |
Static Public Attributes | |
| static const int | POINT_MAX = 50 |
| static const int | POINT_MIN = 1 |
Protected Member Functions | |
| Cheb (const Cheb &ch) | |
| Cheb (const yType *const arCn, xType x1, xType x2, int nCount, int iArr) | |
| Cheb (yType(*pFn)(xType), xType x1, xType x2, int nCount) | |
| Cheb (yType(*pFn)(xType), xType x1, xType x2, xType dEps) | |
| virtual void | putCoefs (yType *ut, const yType *up, int cnt)=0 |
| bool | trunCoefs (const yType *ut, int nCount) |
| bool | trunCoefs (const yType *ut, xType dEps) |
| ~Cheb (void) | |
Protected Attributes | |
| yType * | aC |
| enum Cheb< xType, yType >::CTYPE | cTyp |
| int | nData |
| xType | xBnd [Base::BOUND_CNT] |
| yType | yOffset |
Object instantiation of this class should be made only through classes which inherit this class.
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.
See the cited References to obtain more information on the mathematical theory applied here.
| enum CTYPE |
| Cheb | ( | yType(*)(xType) | pFn, | |
| xType | x1, | |||
| xType | x2, | |||
| xType | dEps | |||
| ) | [protected] |
Constructor initializes a Chebyshev polynomial interpolation object from the specified function pFn within the specified interval x1 to x2.
| pFn | a pointer 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) |
yType fn(xType x); | Cheb | ( | yType(*)(xType) | pFn, | |
| xType | x1, | |||
| xType | x2, | |||
| int | nCount | |||
| ) | [protected] |
Constructor initializes a Chebyshev polynomial interpolation object from the specified function pFn within the specified interval x1 to x2.
| pFn | a pointer 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 |
yType fn(xType x); | Cheb | ( | const yType *const | arCn, | |
| xType | x1, | |||
| xType | x2, | |||
| int | nCount, | |||
| int | iArr | |||
| ) | [protected] |
Constructor initializes a Chebyshev polynomial interpolation object from the specified coefficient array arCn within the specified interval x1 to x2.
| arCn | a pointer to an array of 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 | |
| iArr | array size increment/decrement |
Copy constructor initializes a function interpolation object from the specified existing interpolation object.
| ch | a reference to a function interpolation object |
| ~Cheb | ( | void | ) | [protected] |
Destructor frees allocated memory.
| yType eval | ( | xType | x | ) | const throw (ChebErr) |
Function evaluates the Chebyshev polynomial at point x.
| x | independent variable at which to evaluate the interpolation (x units) |
| ChebErr | type of object thrown
|
| const yType* getArray | ( | void | ) | const |
Function returns a pointer to the Chebyshev polynomial coefficient array.
| xType getBound | ( | enum Base::BOUND | iBnd | ) | const |
Function returns the user-specified bound of the interpolation range.
| iBnd | boundary index |
| int getCount | ( | void | ) | const |
Function returns the number of coefficients used in the interpolation polynomial.
| xType getError | ( | void | ) | const |
Function returns an error estimate of the polynomial interpolation based on the value of the truncation coefficient in the series.
| yType getParameter | ( | int | iDeg | ) | const |
Function returns the coefficient value of the monomial with the specified degree.
| iDeg | coefficient index |
Function returns the value of an enumeration indicating the type of the interpolation evaluation.
| operator const yType * | ( | void | ) | const |
Conversion function returns a pointer to the Chebyshev coefficient array of values of the interpolation object.
const yType *ch; | virtual void putCoefs | ( | yType * | ut, | |
| const yType * | up, | |||
| int | cnt | |||
| ) | [protected, pure virtual] |
Virtual function transfers specified interpolation polynomial coefficient array up to specified array ut with transformation as required.
| up | a pointer to Chebyshev polynomial coefficients (y units) | |
| ut | a pointer to calculated Chebyshev polynomial coefficients transformed as required (variable units) | |
| cnt | polynomial coefficient count |
| bool trunCoefs | ( | const yType * | ut, | |
| int | nCount | |||
| ) | [protected] |
Function shortens the array (ut) of polynomial coefficients based on the coefficient count nCount.
| ut | a pointer to an array of Chebyshev polynomial coefficients (variable units) | |
| nCount | coefficient count of interpolation polynomial |
| bool trunCoefs | ( | const yType * | ut, | |
| xType | dEps | |||
| ) | [protected] |
Function shortens the array (ut) of polynomial coefficients based on the error condition dEps.
| ut | a pointer to an array of Chebyshev polynomial coefficients (variable units) | |
| dEps | required absolute error of interpolation (|y| units) |
yType* aC [protected] |
pointer to a Chebyshev coefficient array (variable units)
int nData [protected] |
Chebyshev coefficient array count
const int POINT_MAX = 50 [static] |
default maximum calculation polynomial coefficient count
const int POINT_MIN = 1 [static] |
minimum calculation polynomial coefficient count
xType xBnd[Base::BOUND_CNT] [protected] |
evaluation bounds (x units)
yType yOffset [protected] |
conversion offset from -1:1 Chebyshev interval (variable units)
1.4.7