#include <Intp.h>
Inherits Intp< xType, yType >.
Inheritance diagram for Poly:

Public Member Functions | |
| virtual yType | eval (xType x) throw (IntpErr) |
| xType | getError (void) const |
| Poly (const Intp< xType, yType > &in) | |
| Poly (const Poly< xType, yType > &po) | |
| Poly (const xType *arX, const yType *arY, int nCount, int nPoints=DEF_POINTS) | |
| bool | setCount (int nPoints) |
| ~Poly (void) | |
Static Public Attributes | |
| static const int | DEF_POINTS = 4 |
In instantiation, an object is supplied with a one-dimensional set of independent variable and corresponding dependent variable data tables with a specific domain and range. The dependent data must be defined at every independent data point, continuous, and single-valued. When the interpolation object is evaluated within the data table domain, an interpolation value is calculated and returned. Fixed degree polynomials of a user-specified number are used for interpolation. A polynomial curve is calculated to fit sequential data points. The data point count of the curve is based on the order of the polynomial.
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.
| Poly | ( | const xType * | arX, | |
| const yType * | arY, | |||
| int | nCount, | |||
| int | nPoints = DEF_POINTS | |||
| ) |
Constructor initializes a polynomial interpolation object.
| arX | a pointer to an independent value interpolation array (x units) | |
| arY | a pointer to a dependent value interpolation array (y units) | |
| nCount | data count for the specified arrays arX and arY | |
| nPoints | data point count of polynomials used in interpolation evaluations (optional) |
Copy constructor initializes a polynomial interpolation object from the specified existing polynomial interpolation object.
| po | a reference to a polynomial interpolation object |
Copy constructor initializes a polynomial interpolation object from the specified existing interpolation object.
| in | a reference to an interpolation object |
| ~Poly | ( | void | ) |
Destructor frees allocated memory.
| yType eval | ( | xType | x | ) | throw (IntpErr) [virtual] |
Virtual function interpolates the dependent data at the specified independent data value.
| x | an independent value interpolation point (x units) |
| IntpErr | type of object thrown
|
Implements Intp.
| xType getError | ( | void | ) | const |
Function returns an error estimate to the last polynomial evaluation made through a call to Poly::eval().
| bool setCount | ( | int | nPoints | ) |
Function sets the number of data points used in polynomial interpolation evaluations.
| nPoints | the point count of interpolation polynomials |
const int DEF_POINTS = 4 [static] |
default interpolation polynomial data point count
Reimplemented from Intp.
1.4.7