Index: trunk/psLib/src/math/psSpline.h
===================================================================
--- trunk/psLib/src/math/psSpline.h	(revision 1441)
+++ trunk/psLib/src/math/psSpline.h	(revision 1464)
@@ -13,6 +13,6 @@
 *  @author George Gusciora, MHPCC
 *
-*  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-08-09 23:40:55 $
+*  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-08-11 02:35:58 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -31,26 +31,37 @@
 
 /** Evaluate a non-normalized Gaussian with the given mean and sigma at the
-    given coordianate.  Note that this is not a Gaussian deviate.  The
-    evaluated Gaussian is: \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f] */
-
-float psGaussian(float x,       ///< Value at which to evaluate
-                 float mean,    ///< Mean for the Gaussian
-                 float stddev,  ///< Standard deviation for the Gaussian
-                 bool normal    ///< Indicates whether result should be normalized
-                );
+ *  given coordianate.  
+ *
+ *  Note that this is not a Gaussian deviate.  The evaluated Gaussian is: 
+ *        \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f] 
+ *
+ *  @return float      value on the gaussian curve given the input parameters
+ */
+float psGaussian(
+    float x,                           ///< Value at which to evaluate
+    float mean,                        ///< Mean for the Gaussian
+    float stddev,                      ///< Standard deviation for the Gaussian
+    bool normal                        ///< Indicates whether result should be normalized
+);
 
 /** Produce a vector of random numbers from a Gaussian distribution with
-    the specified mean and sigma */
-psVector* psGaussianDev(float mean,     ///< The mean of the Gaussian
-                        float sigma,    ///< The sigma of the Gaussian
-                        int Npts);      ///< The size of the vector
+ *  the specified mean and sigma 
+ *  
+ *  @return psVector*    vector of random numbers
+ *  
+ */
+psVector* psGaussianDev(
+    float mean,                        ///< The mean of the Gaussian
+    float sigma,                       ///< The sigma of the Gaussian
+    int Npts                           ///< The size of the vector
+);
 
 /** One-dimensional polynomial */
 typedef struct
 {
-    int n;                      ///< Number of terms
-    float *coeff;               ///< Coefficients
-    float *coeffErr;            ///< Error in coefficients
-    char *mask;                 ///< Coefficient mask
+    int n;                             ///< Number of terms
+    float *coeff;                      ///< Coefficients
+    float *coeffErr;                   ///< Error in coefficients
+    char *mask;                        ///< Coefficient mask
 }
 psPolynomial1D;
@@ -59,9 +70,9 @@
 typedef struct
 {
-    int nX,
-    nY;                       ///< Number of terms in x and y
-    float **coeff;              ///< Coefficients
-    float **coeffErr;           ///< Error in coefficients
-    char **mask;                ///< Coefficients mask
+    int nX;                            ///< Number of terms in x
+    int nY;                            ///< Number of terms in y
+    float **coeff;                     ///< Coefficients
+    float **coeffErr;                  ///< Error in coefficients
+    char **mask;                       ///< Coefficients mask
 }
 psPolynomial2D;
@@ -70,10 +81,10 @@
 typedef struct
 {
-    int nX,
-    nY,
-    nZ;                       ///< Number of terms in x, y and z
-    float ***coeff;             ///< Coefficients
-    float ***coeffErr;          ///< Error in coefficients
-    char ***mask;               ///< Coefficients mask
+    int nX;                            ///< Number of terms in x
+    int nY;                            ///< Number of terms in y
+    int nZ;                            ///< Number of terms in z
+    float ***coeff;                    ///< Coefficients
+    float ***coeffErr;                 ///< Error in coefficients
+    char ***mask;                      ///< Coefficients mask
 }
 psPolynomial3D;
@@ -82,58 +93,94 @@
 typedef struct
 {
-    int nW,
-    nX,
-    nY,
-    nZ;                       ///< Number of terms in w, x, y and z
-    float ****coeff;            ///< Coefficients
-    float ****coeffErr;         ///< Error in coefficients
-    char ****mask;              ///< Coefficients mask
+    int nW;                            ///< Number of terms in w
+    int nX;                            ///< Number of terms in x
+    int nY;                            ///< Number of terms in y
+    int nZ;                            ///< Number of terms in z
+    float ****coeff;                   ///< Coefficients
+    float ****coeffErr;                ///< Error in coefficients
+    char ****mask;                     ///< Coefficients mask
 }
 psPolynomial4D;
 
-/** Functions **************************************************************/
-
-/** Constructor */
-psPolynomial1D* psPolynomial1DAlloc(int n       ///< Number of terms
-                                   );
-
-/** Constructor */
-psPolynomial2D* psPolynomial2DAlloc(int nX, int nY      ///< Number of terms in x and y
-                                   );
-
-/** Constructor */
-psPolynomial3D* psPolynomial3DAlloc(int nX, int nY, int nZ      ///< Number of terms in x, y and z
-                                   );
-
-/** Constructor */
-psPolynomial4D* psPolynomial4DAlloc(int nW, int nX, int nY, int nZ      ///< Number of terms in w, x, y and
-                                    // z
-                                   );
-
-/** Evaluate 1D polynomial */
-float psPolynomial1DEval(float x,       ///< Value at which to evaluate
-                         const psPolynomial1D* myPoly  ///< Coefficients for the polynomial
-                        );
-
-/** Evaluate 2D polynomial */
-float psPolynomial2DEval(float x,       ///< Value x at which to evaluate
-                         float y,       ///< Value y at which to evaluate
-                         const psPolynomial2D* myPoly  ///< Coefficients for the polynomial
-                        );
-
-/** Evaluate 3D polynomial */
-float psPolynomial3DEval(float x,       ///< Value x at which to evaluate
-                         float y,       ///< Value y at which to evaluate
-                         float z,       ///< Value z at which to evaluate
-                         const psPolynomial3D* myPoly  ///< Coefficients for the polynomial
-                        );
-
-/** Evaluate 4D polynomial */
-float psPolynomial4DEval(float w,       ///< Value w at which to evaluate
-                         float x,       ///< Value x at which to evaluate
-                         float y,       ///< Value y at which to evaluate
-                         float z,       ///< Value z at which to evaluate
-                         const psPolynomial4D* myPoly  ///< Coefficients for the polynomial
-                        );
+
+/** Allocates a psPolynomial1D structure with n terms
+ *
+ *  @return  psPolynomial1D*    new 1-D polynomial struct
+ */
+psPolynomial1D* psPolynomial1DAlloc(
+    int n                              ///< Number of terms
+);
+
+/** Allocates a 2-D polynomial structure
+ *
+ *  @return  psPolynomial2D*    new 2-D polynomial struct
+ */
+psPolynomial2D* psPolynomial2DAlloc(
+    int nX,                            ///< Number of terms in x
+    int nY                             ///< Number of terms in y
+);
+
+/** Allocates a 3-D polynomial structure
+ *
+ *  @return  psPolynomial3D*    new 3-D polynomial struct
+ */
+psPolynomial3D* psPolynomial3DAlloc(
+    int nX,                            ///< Number of terms in x
+    int nY,                            ///< Number of terms in y
+    int nZ                             ///< Number of terms in z
+);
+
+/** Allocates a 4-D polynomial structure
+ *
+ *  @return  psPolynomial4D*    new 4-D polynomial struct
+ */
+psPolynomial4D* psPolynomial4DAlloc(
+    int nW,                            ///< Number of terms in w
+    int nX,                            ///< Number of terms in x
+    int nY,                            ///< Number of terms in y
+    int nZ                             ///< Number of terms in z
+);
+
+/** Evaluates a 1-D polynomial at specific coordinates.
+ *
+ *  @return float    result of polynomial at given location
+ */
+float psPolynomial1DEval(
+    float x,                           ///< location at which to evaluate
+    const psPolynomial1D* myPoly       ///< Coefficients for the polynomial
+);
+
+/** Evaluates a 2-D polynomial at specific coordinates.
+ *
+ *  @return float    result of polynomial at given location
+ */
+float psPolynomial2DEval(
+    float x,                           ///< x location at which to evaluate
+    float y,                           ///< y location at which to evaluate
+    const psPolynomial2D* myPoly       ///< Coefficients for the polynomial
+);
+
+/** Evaluates a 3-D polynomial at specific coordinates.
+ *
+ *  @return float    result of polynomial at given location
+ */
+float psPolynomial3DEval(
+    float x,                           ///< x location at which to evaluate
+    float y,                           ///< y location at which to evaluate
+    float z,                           ///< z location at which to evaluate
+    const psPolynomial3D* myPoly       ///< Coefficients for the polynomial
+);
+
+/** Evaluates a 4-D polynomial at specific coordinates.
+ *
+ *  @return float    result of polynomial at given location
+ */
+float psPolynomial4DEval(
+    float w,                           ///< w location at which to evaluate
+    float x,                           ///< x location at which to evaluate
+    float y,                           ///< y location at which to evaluate
+    float z,                           ///< z location at which to evaluate
+    const psPolynomial4D* myPoly       ///< Coefficients for the polynomial
+);
 
 /*****************************************************************************/
@@ -144,8 +191,8 @@
 typedef struct
 {
-    int n;                      ///< Number of terms
-    double *coeff;              ///< Coefficients
-    double *coeffErr;           ///< Error in coefficients
-    char *mask;                 ///< Coefficient mask
+    int n;                             ///< Number of terms
+    double *coeff;                     ///< Coefficients
+    double *coeffErr;                  ///< Error in coefficients
+    char *mask;                        ///< Coefficient mask
 }
 psDPolynomial1D;
@@ -154,9 +201,9 @@
 typedef struct
 {
-    int nX,
-    nY;                       ///< Number of terms in x and y
-    double **coeff;             ///< Coefficients
-    double **coeffErr;          ///< Error in coefficients
-    char **mask;                ///< Coefficients mask
+    int nX;                            ///< Number of terms in x
+    int nY;                            ///< Number of terms in y
+    double **coeff;                    ///< Coefficients
+    double **coeffErr;                 ///< Error in coefficients
+    char **mask;                       ///< Coefficients mask
 }
 psDPolynomial2D;
@@ -165,10 +212,10 @@
 typedef struct
 {
-    int nX,
-    nY,
-    nZ;                       ///< Number of terms in x, y and z
-    double ***coeff;            ///< Coefficients
-    double ***coeffErr;         ///< Error in coefficients
-    char ***mask;               ///< Coefficient mask
+    int nX;                            ///< Number of terms in x
+    int nY;                            ///< Number of terms in y
+    int nZ;                            ///< Number of terms in z
+    double ***coeff;                   ///< Coefficients
+    double ***coeffErr;                ///< Error in coefficients
+    char ***mask;                      ///< Coefficient mask
 }
 psDPolynomial3D;
@@ -177,56 +224,93 @@
 typedef struct
 {
-    int nW,
-    nX,
-    nY,
-    nZ;                       ///< Number of terms in w, x, y and z
-    double ****coeff;           ///< Coefficients
-    double ****coeffErr;        ///< Error in coefficients
-    char ****mask;              ///< Coefficients mask
+    int nW;                            ///< Number of terms in w
+    int nX;                            ///< Number of terms in x
+    int nY;                            ///< Number of terms in y
+    int nZ;                            ///< Number of terms in z
+    double ****coeff;                  ///< Coefficients
+    double ****coeffErr;               ///< Error in coefficients
+    char ****mask;                     ///< Coefficients mask
 }
 psDPolynomial4D;
 
-/** Constructor */
-psDPolynomial1D* psDPolynomial1DAlloc(int n     ///< Number of terms
-                                     );
-
-/** Constructor */
-psDPolynomial2D* psDPolynomial2DAlloc(int nX, int nY    ///< Number of terms in x and y
-                                     );
-
-/** Constructor */
-psDPolynomial3D* psDPolynomial3DAlloc(int nX, int nY, int nZ    ///< Number of terms in x, y and z
-                                     );
-
-/** Constructor */
-psDPolynomial4D* psDPolynomial4DAlloc(int nW, int nX, int nY, int nZ    ///< Number of terms in w, x, y and
-                                      // z
-                                     );
-
-/** Evaluate 1D polynomial (double precision) */
-double psDPolynomial1DEval(double x,    ///< Value at which to evaluate
-                           const psDPolynomial1D* myPoly       ///< Coefficients for the polynomial
-                          );
-
-/** Evaluate 2D polynomial (double precision) */
-double psDPolynomial2DEval(double x,    ///< Value x at which to evaluate
-                           double y,    ///< Value y at which to evaluate
-                           const psDPolynomial2D* myPoly       ///< Coefficients for the polynomial
-                          );
-
-/** Evaluate 3D polynomial (double precision) */
-double psDPolynomial3DEval(double x,    ///< Value x at which to evaluate
-                           double y,    ///< Value y at which to evaluate
-                           double z,    ///< Value z at which to evaluate
-                           const psDPolynomial3D* myPoly       ///< Coefficients for the polynomial
-                          );
-
-/** Evaluate 4D polynomial (double precision) */
-double psDPolynomial4DEval(double w,    ///< Value w at which to evaluate
-                           double x,    ///< Value x at which to evaluate
-                           double y,    ///< Value y at which to evaluate
-                           double z,    ///< Value z at which to evaluate
-                           const psDPolynomial4D* myPoly       ///< Coefficients for the polynomial
-                          );
+/** Allocates a double-precision 1-D polynomial structure with n terms
+ *
+ *  @return  psPolynomial1D*    new double-precision 1-D polynomial struct
+ */
+psDPolynomial1D* psDPolynomial1DAlloc(
+    int n                              ///< Number of terms
+);
+
+/** Allocates a double-precision 2-D polynomial structure
+ *
+ *  @return  psPolynomial2D*    new double-precision 2-D polynomial struct
+ */
+psDPolynomial2D* psDPolynomial2DAlloc(
+    int nX,                            ///< Number of terms in x
+    int nY                             ///< Number of terms in y
+);
+
+/** Allocates a double-precision 3-D polynomial structure
+ *
+ *  @return  psPolynomial3D*    new double-precision 3-D polynomial struct
+ */
+psDPolynomial3D* psDPolynomial3DAlloc(
+    int nX,                            ///< Number of terms in x
+    int nY,                            ///< Number of terms in y
+    int nZ                             ///< Number of terms in z
+);
+
+/** Allocates a double-precision 4-D polynomial structure
+ *
+ *  @return  psPolynomial4D*    new double-precision 4-D polynomial struct
+ */
+psDPolynomial4D* psDPolynomial4DAlloc(
+    int nW,                            ///< Number of terms in w
+    int nX,                            ///< Number of terms in x
+    int nY,                            ///< Number of terms in y
+    int nZ                             ///< Number of terms in z
+);
+
+/** Evaluates a double-precision 1-D polynomial at specific coordinates.
+ *
+ *  @return float    result of polynomial at given location
+ */
+double psDPolynomial1DEval(
+    double x,                          ///< Value at which to evaluate
+    const psDPolynomial1D* myPoly      ///< Coefficients for the polynomial
+);
+
+/** Evaluates a double-precision 2-D polynomial at specific coordinates.
+ *
+ *  @return float    result of polynomial at given location
+ */
+double psDPolynomial2DEval(
+    double x,                           ///< Value x at which to evaluate
+    double y,                           ///< Value y at which to evaluate
+    const psDPolynomial2D* myPoly       ///< Coefficients for the polynomial
+);
+
+/** Evaluates a double-precision 3-D polynomial at specific coordinates.
+ *
+ *  @return float    result of polynomial at given location
+ */
+double psDPolynomial3DEval(
+    double x,                          ///< Value x at which to evaluate
+    double y,                          ///< Value y at which to evaluate
+    double z,                          ///< Value z at which to evaluate
+    const psDPolynomial3D* myPoly      ///< Coefficients for the polynomial
+);
+
+/** Evaluates a double-precision 4-D polynomial at specific coordinates.
+ *
+ *  @return float    result of polynomial at given location
+ */
+double psDPolynomial4DEval(
+    double w,                          ///< Value w at which to evaluate
+    double x,                          ///< Value x at which to evaluate
+    double y,                          ///< Value y at which to evaluate
+    double z,                          ///< Value z at which to evaluate
+    const psDPolynomial4D* myPoly      ///< Coefficients for the polynomial
+);
 
 /* \} */// End of MathGroup Functions
