Index: trunk/psLib/src/math/psSpline.h
===================================================================
--- trunk/psLib/src/math/psSpline.h	(revision 4330)
+++ trunk/psLib/src/math/psSpline.h	(revision 4405)
@@ -12,6 +12,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-21 03:01:37 $
+ *  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-28 00:53:53 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -67,5 +67,6 @@
     PS_POLYNOMIAL_ORD,                 ///< Ordinary Polynomial
     PS_POLYNOMIAL_CHEB                 ///< Chebyshev Polynomial
-} psPolynomialType;
+}
+psPolynomialType;
 
 /** One-dimensional polynomial */
@@ -73,5 +74,5 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 n;                             ///< Number of terms
+    psS32 n;                           ///< Number of terms
     psF32 *coeff;                      ///< Coefficients
     psF32 *coeffErr;                   ///< Error in coefficients
@@ -84,6 +85,6 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nX;                            ///< Number of terms in x
-    psS32 nY;                            ///< Number of terms in y
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
     psF32 **coeff;                     ///< Coefficients
     psF32 **coeffErr;                  ///< Error in coefficients
@@ -96,7 +97,7 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nX;                            ///< Number of terms in x
-    psS32 nY;                            ///< Number of terms in y
-    psS32 nZ;                            ///< Number of terms in z
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
+    psS32 nZ;                          ///< Number of terms in z
     psF32 ***coeff;                    ///< Coefficients
     psF32 ***coeffErr;                 ///< Error in coefficients
@@ -109,8 +110,8 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nW;                            ///< Number of terms in w
-    psS32 nX;                            ///< Number of terms in x
-    psS32 nY;                            ///< Number of terms in y
-    psS32 nZ;                            ///< Number of terms in z
+    psS32 nW;                          ///< Number of terms in w
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
+    psS32 nZ;                          ///< Number of terms in z
     psF32 ****coeff;                   ///< Coefficients
     psF32 ****coeffErr;                ///< Error in coefficients
@@ -125,5 +126,5 @@
  */
 psPolynomial1D* psPolynomial1DAlloc(
-    psS32 n,                            ///< Number of terms
+    psS32 n,                           ///< Number of terms
     psPolynomialType type              ///< Polynomial Type
 );
@@ -134,6 +135,6 @@
  */
 psPolynomial2D* psPolynomial2DAlloc(
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
     psPolynomialType type              ///< Polynomial Type
 );
@@ -144,7 +145,7 @@
  */
 psPolynomial3D* psPolynomial3DAlloc(
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
-    psS32 nZ,                           ///< Number of terms in z
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
+    psS32 nZ,                          ///< Number of terms in z
     psPolynomialType type              ///< Polynomial Type
 );
@@ -155,8 +156,8 @@
  */
 psPolynomial4D* psPolynomial4DAlloc(
-    psS32 nW,                           ///< Number of terms in w
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
-    psS32 nZ,                           ///< Number of terms in z
+    psS32 nW,                          ///< Number of terms in w
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
+    psS32 nZ,                          ///< Number of terms in z
     psPolynomialType type              ///< Polynomial Type
 );
@@ -164,42 +165,42 @@
 /** Evaluates a 1-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
- */
-psF32 psPolynomial1DEval(
-    const psPolynomial1D* myPoly,      ///< Coefficients for the polynomial
-    psF32 x                            ///< location at which to evaluate
+ *  @return psF64    result of polynomial at given location
+ */
+psF64 psPolynomial1DEval(
+    const psPolynomial1D* poly,        ///< Coefficients for the polynomial
+    psF64 x                            ///< location at which to evaluate
 );
 
 /** Evaluates a 2-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
- */
-psF32 psPolynomial2DEval(
-    const psPolynomial2D* myPoly,      ///< Coefficients for the polynomial
-    psF32 x,                            ///< x location at which to evaluate
-    psF32 y                             ///< y location at which to evaluate
+ *  @return psF64    result of polynomial at given location
+ */
+psF64 psPolynomial2DEval(
+    const psPolynomial2D* poly,         ///< Coefficients for the polynomial
+    psF64 x,                            ///< x location at which to evaluate
+    psF64 y                             ///< y location at which to evaluate
 );
 
 /** Evaluates a 3-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
- */
-psF32 psPolynomial3DEval(
-    const psPolynomial3D* myPoly,      ///< Coefficients for the polynomial
-    psF32 x,                            ///< x location at which to evaluate
-    psF32 y,                            ///< y location at which to evaluate
-    psF32 z                             ///< z location at which to evaluate
+ *  @return psF64    result of polynomial at given location
+ */
+psF64 psPolynomial3DEval(
+    const psPolynomial3D* poly,        ///< Coefficients for the polynomial
+    psF64 x,                           ///< x location at which to evaluate
+    psF64 y,                           ///< y location at which to evaluate
+    psF64 z                            ///< z location at which to evaluate
 );
 
 /** Evaluates a 4-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
- */
-psF32 psPolynomial4DEval(
-    const psPolynomial4D* myPoly,      ///< Coefficients for the polynomial
-    psF32 w,                            ///< w location at which to evaluate
-    psF32 x,                            ///< x location at which to evaluate
-    psF32 y,                            ///< y location at which to evaluate
-    psF32 z                             ///< z location at which to evaluate
+ *  @return psF64    result of polynomial at given location
+ */
+psF64 psPolynomial4DEval(
+    const psPolynomial4D* poly,        ///< Coefficients for the polynomial
+    psF64 x,                           ///< x location at which to evaluate
+    psF64 y,                           ///< y location at which to evaluate
+    psF64 z,                           ///< z location at which to evaluate
+    psF64 t                            ///< t location at which to evaluate
 );
 
@@ -209,6 +210,6 @@
  */
 psVector *psPolynomial1DEvalVector(
-    const psPolynomial1D *myPoly,      ///< Coefficients for the polynomial
-    const psVector *x                   ///< x locations at which to evaluate
+    const psPolynomial1D *poly,        ///< Coefficients for the polynomial
+    const psVector *x                  ///< x locations at which to evaluate
 );
 
@@ -218,7 +219,7 @@
  */
 psVector *psPolynomial2DEvalVector(
-    const psPolynomial2D *poly,         ///< Coefficients for the polynomial
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y                   ///< y locations at which to evaluate
+    const psPolynomial2D *poly,        ///< Coefficients for the polynomial
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y                  ///< y locations at which to evaluate
 );
 
@@ -228,8 +229,8 @@
  */
 psVector *psPolynomial3DEvalVector(
-    const psPolynomial3D *myPoly,      ///< Coefficients for the polynomial
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y,                  ///< y locations at which to evaluate
-    const psVector *z                   ///< z locations at which to evaluate
+    const psPolynomial3D *poly,        ///< Coefficients for the polynomial
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y,                 ///< y locations at which to evaluate
+    const psVector *z                  ///< z locations at which to evaluate
 );
 
@@ -239,9 +240,9 @@
  */
 psVector *psPolynomial4DEvalVector(
-    const psPolynomial4D *myPoly,      ///< Coefficients for the polynomial
-    const psVector *w,                  ///< w locations at which to evaluate
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y,                  ///< y locations at which to evaluate
-    const psVector *z                   ///< z locations at which to evaluate
+    const psPolynomial4D *poly,        ///< Coefficients for the polynomial
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y,                 ///< y locations at which to evaluate
+    const psVector *z,                 ///< z locations at which to evaluate
+    const psVector *t                  ///< t locations at which to evaluate
 );
 
@@ -254,5 +255,5 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 n;                            ///< Number of terms
+    psS32 n;                           ///< Number of terms
     psF64 *coeff;                      ///< Coefficients
     psF64 *coeffErr;                   ///< Error in coefficients
@@ -265,6 +266,6 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nX;                           ///< Number of terms in x
-    psS32 nY;                           ///< Number of terms in y
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
     psF64 **coeff;                     ///< Coefficients
     psF64 **coeffErr;                  ///< Error in coefficients
@@ -277,7 +278,7 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nX;                           ///< Number of terms in x
-    psS32 nY;                           ///< Number of terms in y
-    psS32 nZ;                           ///< Number of terms in z
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
+    psS32 nZ;                          ///< Number of terms in z
     psF64 ***coeff;                    ///< Coefficients
     psF64 ***coeffErr;                 ///< Error in coefficients
@@ -290,8 +291,8 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nW;                           ///< Number of terms in w
-    psS32 nX;                           ///< Number of terms in x
-    psS32 nY;                           ///< Number of terms in y
-    psS32 nZ;                           ///< Number of terms in z
+    psS32 nW;                          ///< Number of terms in w
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
+    psS32 nZ;                          ///< Number of terms in z
     psF64 ****coeff;                   ///< Coefficients
     psF64 ****coeffErr;                ///< Error in coefficients
@@ -305,6 +306,6 @@
  */
 psDPolynomial1D* psDPolynomial1DAlloc(
-    psS32 n,                              ///< Number of terms
-    psPolynomialType type                ///< Polynomial Type
+    psS32 n,                           ///< Number of terms
+    psPolynomialType type              ///< Polynomial Type
 );
 
@@ -314,6 +315,6 @@
  */
 psDPolynomial2D* psDPolynomial2DAlloc(
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
     psPolynomialType type              ///< Polynomial Type
 );
@@ -324,7 +325,7 @@
  */
 psDPolynomial3D* psDPolynomial3DAlloc(
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
-    psS32 nZ,                           ///< Number of terms in z
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
+    psS32 nZ,                          ///< Number of terms in z
     psPolynomialType type              ///< Polynomial Type
 );
@@ -335,8 +336,8 @@
  */
 psDPolynomial4D* psDPolynomial4DAlloc(
-    psS32 nW,                           ///< Number of terms in w
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
-    psS32 nZ,                           ///< Number of terms in z
+    psS32 nW,                          ///< Number of terms in w
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
+    psS32 nZ,                          ///< Number of terms in z
     psPolynomialType type              ///< Polynomial Type
 );
@@ -348,5 +349,5 @@
 psF64 psDPolynomial1DEval(
     const psDPolynomial1D* myPoly,     ///< Coefficients for the polynomial
-    psF64 x                             ///< Value at which to evaluate
+    psF64 x                            ///< Value at which to evaluate
 );
 
@@ -357,29 +358,29 @@
 psF64 psDPolynomial2DEval(
     const psDPolynomial2D* myPoly,      ///< Coefficients for the polynomial
-    psF64 x,                             ///< Value x at which to evaluate
-    psF64 y                              ///< Value y at which to evaluate
+    psF64 x,                            ///< Value x at which to evaluate
+    psF64 y                             ///< Value y at which to evaluate
 );
 
 /** Evaluates a double-precision 3-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
+ *  @return psF64    result of polynomial at given location
  */
 psF64 psDPolynomial3DEval(
     const psDPolynomial3D* myPoly,     ///< Coefficients for the polynomial
-    psF64 x,                            ///< Value x at which to evaluate
-    psF64 y,                            ///< Value y at which to evaluate
-    psF64 z                             ///< Value z at which to evaluate
+    psF64 x,                           ///< Value x at which to evaluate
+    psF64 y,                           ///< Value y at which to evaluate
+    psF64 z                            ///< Value z at which to evaluate
 );
 
 /** Evaluates a double-precision 4-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
+ *  @return psF64    result of polynomial at given location
  */
 psF64 psDPolynomial4DEval(
     const psDPolynomial4D* myPoly,     ///< Coefficients for the polynomial
-    psF64 w,                            ///< Value w at which to evaluate
-    psF64 x,                            ///< Value x at which to evaluate
-    psF64 y,                            ///< Value y at which to evaluate
-    psF64 z                             ///< Value z at which to evaluate
+    psF64 w,                           ///< Value w at which to evaluate
+    psF64 x,                           ///< Value x at which to evaluate
+    psF64 y,                           ///< Value y at which to evaluate
+    psF64 z                            ///< Value z at which to evaluate
 );
 
@@ -390,5 +391,5 @@
 psVector *psDPolynomial1DEvalVector(
     const psDPolynomial1D *myPoly,     ///< Coefficients for the polynomial
-    const psVector *x                   ///< x locations at which to evaluate
+    const psVector *x                  ///< x locations at which to evaluate
 );
 
@@ -399,6 +400,6 @@
 psVector *psDPolynomial2DEvalVector(
     const psDPolynomial2D *myPoly,     ///< Coefficients for the polynomial
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y                   ///< y locations at which to evaluate
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y                  ///< y locations at which to evaluate
 );
 
@@ -409,7 +410,7 @@
 psVector *psDPolynomial3DEvalVector(
     const psDPolynomial3D *myPoly,     ///< Coefficients for the polynomial
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y,                  ///< y locations at which to evaluate
-    const psVector *z                   ///< z locations at which to evaluate
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y,                 ///< y locations at which to evaluate
+    const psVector *z                  ///< z locations at which to evaluate
 );
 
@@ -420,8 +421,8 @@
 psVector *psDPolynomial4DEvalVector(
     const psDPolynomial4D *myPoly,     ///< Coefficients for the polynomial
-    const psVector *w,                  ///< w locations at which to evaluate
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y,                  ///< y locations at which to evaluate
-    const psVector *z                   ///< z locations at which to evaluate
+    const psVector *w,                 ///< w locations at which to evaluate
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y,                 ///< y locations at which to evaluate
+    const psVector *z                  ///< z locations at which to evaluate
 );
 
@@ -429,5 +430,5 @@
 typedef struct
 {
-    psS32 n;                            ///< The number of spline polynomials
+    psS32 n;                           ///< The number of spline polynomials
     psPolynomial1D **spline;           ///< An array of n pointers to the spline polynomials
     psF32 *p_psDeriv2;                 ///< For cubic splines, the second derivative at each domain point.  Size is n+1.
@@ -444,8 +445,10 @@
  *  @return psSpline1D*    new 1-D spline struct
  */
-psSpline1D *psSpline1DAlloc(int n,               ///< Number of spline polynomials
-                            int order,           ///< Order of spline polynomials
-                            float min,           ///< Lower boundary value of spline polynomials
-                            float max);          ///< Upper boundary value of spline polynomials
+psSpline1D *psSpline1DAlloc(
+    int n,                             ///< Number of spline polynomials
+    int order,                         ///< Order of spline polynomials
+    float min,                         ///< Lower boundary value of spline polynomials
+    float max                          ///< Upper boundary value of spline polynomials
+);
 
 /** Allocates a psSpline1D structure
@@ -455,6 +458,8 @@
  *  @return psSpline1D*    new 1-D spline struct
  */
-psSpline1D *psSpline1DAllocGeneric(const psVector *bounds,   ///< Bounds for spline polynomials
-                                   int order);               ///< Order of spline polynomials
+psSpline1D *psSpline1DAllocGeneric(
+    const psVector *bounds,            ///< Bounds for spline polynomials
+    int order                          ///< Order of spline polynomials
+);
 
 /** Evaluates 1-D spline polynomials at a specific coordinate.
@@ -481,6 +486,8 @@
  *  @return psS32    corresponding index number of specified value
  */
-psS32 p_psVectorBinDisect(psVector *bins,        ///< Array of non-decreasing values
-                          psScalar *x);          ///< Target value to find
+psS32 p_psVectorBinDisect(
+    psVector *bins,                    ///< Array of non-decreasing values
+    psScalar *x                        ///< Target value to find
+);
 
 /** Interpolates a series of data points for evaluation at a specific coordinate.  Uses a
@@ -489,8 +496,10 @@
  *  @return psScalar*    Lagrange interpolation value at given location
  */
-psScalar *p_psVectorInterpolate(psVector *domain,     ///< Domain (x coords) for interpolation
-                                psVector *range,      ///< Range (y coords) for interpolation
-                                psS32 order,          ///< Order of interpolation function
-                                psScalar *x);         ///< Location at which to evaluate
+psScalar *p_psVectorInterpolate(
+    psVector *domain,                  ///< Domain (x coords) for interpolation
+    psVector *range,                   ///< Range (y coords) for interpolation
+    psS32 order,                       ///< Order of interpolation function
+    psScalar *x                        ///< Location at which to evaluate
+);
 
 #if 0
