#include <NIntp.h>
Inherits Base.
Inherited by NCube, NNurb, and NPoly.
Inheritance diagram for NIntp:

Public Types | |
| DEPENDENT | |
| DERIVATIVE | |
| DIMENSION | |
| HI_INDEX | |
| INDEPENDENT = 0 | |
| KNOT | |
| ORDER | |
| POLYGON | |
| enum | VTYPE { INDEPENDENT = 0, KNOT, DEPENDENT, DERIVATIVE, POLYGON, ORDER, DIMENSION, HI_INDEX, VTYPE_CNT } |
| VTYPE_CNT | |
Public Member Functions | |
| virtual int * | copyArrayN (enum NIntp< xType, yType >::VTYPE vType, int *array) const |
| virtual xType ** | copyArrayX (enum NIntp< xType, yType >::VTYPE vType, xType **array) const |
| virtual yType * | copyArrayY (enum NIntp< xType, yType >::VTYPE vType, yType *array) const |
| yType | eval (const xType *vXn) throw (IntpErr) |
| virtual const int * | getArrayN (enum NIntp< xType, yType >::VTYPE vType) const |
| virtual const xType *const * | getArrayX (enum NIntp< xType, yType >::VTYPE vType) const |
| virtual int | getCount (enum NIntp< xType, yType >::VTYPE vType) const |
| enum Intp< xType, yType >::CTYPE | getMethod (void) const |
| bool | isBounded (const xType *vXn) const |
| bool | isIncreasing (int iDimen) const |
| operator const Intp (void) const | |
| bool | update (const xType *const *arXn, const yType *arYn) |
| bool | update (void) |
Protected Member Functions | |
| virtual yType | evaln (Intp< xType, yType > **aIi, const xType *vXn, int iDim)=0 throw (IntpErr) |
| NIntp (const NIntp< xType, yType > &ni) | |
| NIntp (const xType *const *arXn, const yType *arYn, const int *arNn, const int *arOn, int nDimen) | |
| void | reducen (yType *aYm, Intp< xType, yType > **aIi, xType x0, int iDim) throw (IntpErr) |
| virtual bool | specUpdate (void) |
| ~NIntp (void) | |
Protected Attributes | |
| int * | aDa |
| Intp< xType, yType > ** | aIn |
| int * | aMn |
| int * | aNn |
| int * | aOn |
| xType ** | aXn |
| bool * | bInc |
| enum Intp< xType, yType >::CTYPE | cTyp |
| int | mData |
| int | nData |
| int | nDim |
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 VTYPE |
Enumeration indicates the variable index and unit type consistent with the interpolation method used.
| INDEPENDENT | index of an independent variable (x units) <xType> |
| KNOT | index of a knot vector variable implemented in a calc::Nurb object (scaled x units) <xType> |
| DEPENDENT | index of a dependent variable (y units) <yType> |
| DERIVATIVE | index of a second derivative variable implemented in a calc::Cube object (y/x2 units) <yType> |
| POLYGON | index of a control polygon variable implemented in a calc::Nurb object (y units) <yType> |
| ORDER | index of a polynomial control point count (polynomial order + 1) by dimension variable |
| DIMENSION | index of a dimension count variable |
| HI_INDEX | index of a greatest array index (data count minus 1) by dimension variable |
| VTYPE_CNT | variable type index count |
| NIntp | ( | const xType *const * | arXn, | |
| const yType * | arYn, | |||
| const int * | arNn, | |||
| const int * | arOn, | |||
| int | nDimen | |||
| ) | [protected] |
Constructor initializes an n-Dimension interpolation object.
| arXn | a pointer to an n-Dimension independent value interpolation array (x units) | |
| arYn | a pointer to an n-Dimension dependent value interpolation array (y units) | |
| arNn | a pointer to an array containing data counts by dimension for the specified arrays arXn and arYn | |
| arOn | a pointer to an array containing polynomial control point counts by dimension for interpolation evaluation | |
| nDimen | number of dimensions |
Copy constructor initializes an n-Dimension interpolation object from the specified existing interpolation object.
| ni | a reference to an n-Dimension interpolation object |
| ~NIntp | ( | void | ) | [protected] |
Destructor frees allocated memory.
Virtual function copies discrete count values contained in an identified object array to the specified pointer.
| vType | variable index indentifying the type of data | |
| array | a pointer to a copy of the object's data array (varying units) |
Virtual function copies the object's array that contains independent data points for each dimension to the specified pointer.
| vType | variable index indentifying the type of data | |
| array | a pointer to a copy of the object's independent data array (x units) |
Virtual function copies values contained in an identified object array to the specified pointer.
| vType | variable index indentifying the type of data | |
| array | a pointer to a copy of the object's data array (varying units) |
| yType eval | ( | const xType * | vXn | ) | throw (IntpErr) |
Function interpolates the object's n-Dimension cubic spline data at the specified evaluation point vXn.
| vXn | a pointer to an n-Dimension independent value evaluation vector array (x units) |
| IntpErr | type of object thrown
|
| virtual yType evaln | ( | Intp< xType, yType > ** | aIi, | |
| const xType * | vXn, | |||
| int | iDim | |||
| ) | throw (IntpErr) [protected, pure virtual] |
Virtual function requires a function in derived classes to recursively uses interpolation to evaluate the specified i-Dimension Intp array aIi at independent value vXn[i].
| aIi | a pointer to a first dimension spline interpolation object array for the recursive i-Dimension iDim | |
| vXn | a pointer to an n-Dimension independent value evaluation vector array (x units) | |
| iDim | recursive number of dimensions |
| IntpErr | type of object thrown
|
Virtual function returns the pointer of the identified object discrete value array.
| vType | variable index indentifying the array type |
Virtual function returns the pointer of the identified object array.
| vType | variable index indentifying the array type |
Virtual function determines the number of values contained in the object's identified array.
| vType | variable index indentifying the type of data |
| enum Intp< xType, yType >::CTYPE getMethod | ( | void | ) | const |
Function returns an enumeration index indicating the calculation method used in the multi-dimensional interpolation evaluation.
| bool isBounded | ( | const xType * | vXn | ) | const |
Function determines if the specified evaluation vector vXn is within the interpolation table's interpolation limits.
| vXn | a pointer to an n-Dimension independent value evaluation vector array (x units) |
| bool isIncreasing | ( | int | iDimen | ) | const |
Function returns the ascending status of the independent data for a given dimension index iDimen.
| iDimen | dimension index |
| operator const Intp | ( | void | ) | const |
Conversion function returns a pointer to the calc::Intp pointer array of objects of the multi-dimensional interpolation object.
const Intp<xType,yType> *const *ni; | void reducen | ( | yType * | aYm, | |
| Intp< xType, yType > ** | aIi, | |||
| xType | x0, | |||
| int | iDim | |||
| ) | throw (IntpErr) [protected] |
Function recursively reduces the interpolation table by one dimension. The first dimension is evaluated at the specified value x0.
| aIi | a pointer to a first dimension interpolation object array for the recursive i-Dimension iDim | |
| x0 | interpolation value for first dimension reduction (x units) | |
| iDim | recursive number of dimensions | |
| aYm | a pointer to the calculated reduced dimension interpolation array evaluated at x0 (y units) |
| IntpErr | type of object thrown
|
| virtual bool specUpdate | ( | void | ) | [protected, virtual] |
Virtual function implements class specific tasks to prepare the interpolation object for interpolation evaluations.
| bool update | ( | const xType *const * | arXn, | |
| const yType * | arYn | |||
| ) |
Overloaded function updates values of the interpolation object's independent and dependent data arrays and prepares interpolation object for evaluation.
| arXn | a pointer to an n-Dimension independent value interpolation array (x units) | |
| arYn | a pointer to an n-Dimension dependent value interpolation array (y units) |
| bool update | ( | void | ) |
Overloaded function prepares the interpolation object for interpolation evaluations.
int* aDa [protected] |
pointer to an n-Dimension array locator array
pointer to a first dimension polynomial interpolation object array
int* aMn [protected] |
pointer to an n-Dimension data count minus one (highest array index per dimension) array
int* aNn [protected] |
pointer to an n-Dimension data count by dimension array
int* aOn [protected] |
pointer to an n-Dimension polynomial control point count (order + one) array
xType** aXn [protected] |
pointer to an n-Dimension independent interpolation array (x units)
bool* bInc [protected] |
pointer to an n-Dimension independent data increasing flags array
int mData [protected] |
first dimension interpolation object count
int nData [protected] |
total data point count
int nDim [protected] |
dimension count
1.4.7