NNurb Class Template Reference

Class template interpolates multi-dimensional data with non-uniform rational Bezier splines (NURBS). More...

#include <NIntp.h>

Inherits NIntp< xType, yType >.

Inheritance diagram for NNurb:

Inheritance graph
[legend]
List of all members.

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
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
 NNurb (const xType *const *arXn, const yType *arYn, const xType *const *arKn, const int *arNn, const int *arOn, int nDimen)
 NNurb (const xType *const *arXn, const yType *arYn, const int *arNn, const int *arOn, int nDimen)
 NNurb (const xType *const *arXn, const yType *arYn, const int *arNn, int nDimen)
 NNurb (const NIntp< xType, yType > &ni)
 NNurb (const NNurb< xType, yType > &ni)
NNurb< xType, yType > * reduce (NNurb< xType, yType > *&np, yType *&arYm, xType x0)
 ~NNurb (void)

Detailed Description

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

Class template interpolates multi-dimensional data with non-uniform rational Bezier splines (NURBS).

This class implements arrays of single-dimension interpolation polynomial (calc::Nurb) objects for multi-dimensional interpolation tables. All of the data capabilities and restrictions inherent in interpolation polynomial (calc::Nurb) objects carry through to multi-dimensional polynomial interpolations.

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_NIntp.txt.


Constructor & Destructor Documentation

NNurb ( const NNurb< xType, yType > &  ni  ) 

Copy constructor initializes an n-Dimension polynomial interpolation object from the specified existing interpolation object.

Parameters:
ni a reference to an n-Dimension polynomial interpolation object

NNurb ( const NIntp< xType, yType > &  ni  ) 

Copy constructor initializes an n-Dimension polynomial interpolation object from the specified existing interpolation object.

Parameters:
ni a reference to an n-Dimension polynomial interpolation object

~NNurb ( void   ) 

Destructor frees allocated memory.

NNurb ( const xType *const *  arXn,
const yType *  arYn,
const int *  arNn,
int  nDimen 
)

Constructor initializes an n-Dimension polynomial interpolation object using the default polynomial point count.

Parameters:
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
nDimen number of dimensions
Remarks:
  • The specified interpolation table dimension nDimen must be greater than zero.
  • All entries in the data counts by dimension array arNn must be greater than zero, and correspond to the point count of the independent interpolation array arXn.
  • For the default polynomial point count used in interpolation, see Nurb::Nurb().

NNurb ( const xType *const *  arXn,
const yType *  arYn,
const int *  arNn,
const int *  arOn,
int  nDimen 
)

Constructor initializes an n-Dimension polynomial interpolation object with the specified polynomial point count by dimension array.

Parameters:
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 n-Dimension polynomial point count by dimension array
nDimen number of dimensions
Remarks:
  • The specified interpolation table dimension nDimen must be greater than zero.
  • All entries in the data counts by dimension array arNn must be greater than zero, and correspond to the point count of the independent interpolation array arXn.
  • The polynomial point count for each dimension is constant.
  • For restrictions on the polynomial point count used in interpolation, see Nurb::Nurb().

NNurb ( const xType *const *  arXn,
const yType *  arYn,
const xType *const *  arKn,
const int *  arNn,
const int *  arOn,
int  nDimen 
)

Constructor initializes an n-Dimension polynomial interpolation object with the specified polynomial point count by dimension array.

Parameters:
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)
arKn a pointer to an n-Dimension knot vector interpolation array (scaled x units)
arNn a pointer to an array containing data counts by dimension for the specified arrays arXn and arYn
arOn a pointer to an n-Dimension polynomial point count by dimension array
nDimen number of dimensions
Remarks:
  • The specified interpolation table dimension nDimen must be greater than zero.
  • All entries in the data counts by dimension array arNn must be greater than zero, and correspond to the point count of the independent interpolation array arXn.
  • The polynomial point count for each dimension is constant.
  • For restrictions on the polynomial point count used in interpolation, see Nurb::Nurb().
  • The values in the knot vector array arKn are scaled between 0 and 1. The lowest domain value of the interpolation object corresponds to a 0 scaled value of the knot vector arKn; the highest domain value corresponds to 1.
  • The number of values in the knot vector array arKn equals the data count of the interpolation object, plus the polynomial data count used in polynomial calculations.
  • The user-supplied knot vector values stored in the interpolation object are altered during calls to NNurb::update().


Member Function Documentation

int * copyArrayN ( enum NIntp< xType, yType >::VTYPE  vType,
int *  array 
) const [virtual]

Virtual function copies discrete count values contained in an identified object array to the specified pointer.

Parameters:
vType variable index indentifying the type of data
array a pointer to a copy of the object's data array (varying units)
Returns:
the value of the pointer array
Remarks:
  • The data count of the object's array identified by vType is returned by a corresponding function call NIntp::getCount().
  • The pointer to the object's array identified by vType is returned by a corresponding function call NIntp::getArrayN().
  • The user-supplied pointer array should have sufficient allocated memory.
  • If the object is not initialized, a null pointer is returned.
  • If the object does not have the variable identified by vType, a null pointer is returned.
  • The units expressed in the values of array vary depending on the the variable index vType.

xType ** copyArrayX ( enum NIntp< xType, yType >::VTYPE  vType,
xType **  array 
) const [virtual]

Virtual function copies the object's array that contains independent data points for each dimension to the specified pointer.

Parameters:
vType variable index indentifying the type of data
array a pointer to a copy of the object's independent data array (x units)
Returns:
the value of the pointer array
Remarks:
  • The number of pointers in the array equals the number of dimensions in the interpolation table.
  • The number of values for each array pointer is stored in the data counts by dimension array (see NIntp::getArrayN()).
  • If the object is not initialized, a null pointer is returned.
  • If the object does not have the variable identified by vType, a null pointer is returned.
  • The units expressed in the values of array vary depending on the the variable index vType.

yType * copyArrayY ( enum NIntp< xType, yType >::VTYPE  vType,
yType *  array 
) const [virtual]

Virtual function copies values contained in an identified object array to the specified pointer.

Parameters:
vType variable index indentifying the type of data
array a pointer to a copy of the object's data array (varying units)
Returns:
the value of the pointer array
Remarks:
  • The data count of the object's array identified by vType is returned by a corresponding function call NIntp::getCount().
  • The user-supplied pointer array should have sufficient allocated memory.
  • If the object is not initialized, a null pointer is returned.
  • If the object does not have the variable identified by vType, a null pointer is returned.
  • The units expressed in the values of array vary depending on the the variable index vType.

const int * getArrayN ( enum NIntp< xType, yType >::VTYPE  vType  )  const [virtual]

Virtual function returns the pointer of the identified object discrete value array.

Parameters:
vType variable index indentifying the array type
Returns:
a pointer to the object's identified array (varying units)
Remarks:
  • The data count of the object's array identified by vType is returned by a corresponding function call NIntp::getCount().
  • The data contained in the object's array identified by vType can be copied to user-identified memory by a corresponding function call NIntp::copyArrayN().
  • If the object is not initialized, a null pointer is returned.
  • If the object does not have the variable identified by vType, a null pointer is returned.
  • The units expressed in the values of the returned array vary depending on the the variable index vType.

const xType *const * getArrayX ( enum NIntp< xType, yType >::VTYPE  vType  )  const [virtual]

Virtual function returns the pointer of the identified object array.

Parameters:
vType variable index indentifying the array type
Returns:
a pointer to the object's identified array (varying units)
Remarks:
  • The number of pointers in the array equals the number of dimensions in the interpolation table.
  • The number of values for each array pointer is stored in the data counts by dimension array.
  • The data contained in the object's array identified by vType can be copied to user-identified memory by a corresponding function call NIntp::copyArrayX().
  • If the object is not initialized, a null pointer is returned.
  • If the object does not have the variable identified by vType, a null pointer is returned.
  • The units expressed in the values of the returned array vary depending on the the variable index vType.

int getCount ( enum NIntp< xType, yType >::VTYPE  vType  )  const [virtual]

Virtual function determines the number of values contained in the object's identified array.

Parameters:
vType variable index indentifying the type of data
Returns:
the data count of the object's array
Remarks:
  • The pointer of the object's array identified by vType is returned by a corresponding function call NIntp::getArrayX() or NIntp::getArrayN().
  • If the object is not initialized, -1 is returned.
  • If the object does not have the variable identified by vType, -1 is returned.

calc::NNurb< xType, yType > * reduce ( NNurb< xType, yType > *&  np,
yType *&  arYm,
xType  x0 
)

Function reduces the object's interpolation table by one dimension.

Parameters:
x0 interpolation value to reduce the first dimension at (x units)
np a pointer reference to an uninitialized interpolation object to store the calculated data in
arYm a pointer reference to the calculated reduced dimension dependent interpolation array evaluated at x0 (y units)
Returns:
the value of the pointer np
Remarks:
  • If there is an error in the function execution, the function returns a null pointer.
  • The first dimension is evaluated at the specified value x0.
  • Memory is allocated to the pointers arYm and np.
  • The interpolation table is stored in the pointer arYm.
  • Reduced object data is stored in the pointer np.


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