Index: trunk/psLib/src/math/psPolynomial.h
===================================================================
--- trunk/psLib/src/math/psPolynomial.h	(revision 1342)
+++ trunk/psLib/src/math/psPolynomial.h	(revision 1382)
@@ -1,23 +1,26 @@
 /** @file psFunctions.h
- *  \brief Standard Mathematical Functions.
- *  \ingroup Stats
- *
- *  This file will hold the prototypes for procedures which allocate, free,
- *  and evaluate various polynomials.  Those polynomial structures are also
- *  defined here.
- *
- *  @ingroup Stats
- *
- *  @author Someone at IfA
- *  @author George Gusciora, MHPCC
- *
- *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-29 23:34:24 $
- *
- *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
- */
+*  \brief Standard Mathematical Functions.
+*  \ingroup Stats
+*
+*  This file will hold the prototypes for procedures which allocate, free,
+*  and evaluate various polynomials.  Those polynomial structures are also
+*  defined here.
+*
+*  @ingroup Stats
+*
+*  @author Someone at IfA
+*  @author George Gusciora, MHPCC
+*
+*  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-08-04 22:11:09 $
+*
+*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+*/
 
 #if !defined(PS_FUNCTIONS_H)
 #define PS_FUNCTIONS_H
+
+#include <stdbool.h>
+
 #include "psVector.h"
 
@@ -31,59 +34,59 @@
 
 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
+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
-
-
-
-
-
+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;
 
 /** Two-dimensional polynomial */
 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, nY;    ///< Number of terms in x and y
+        float **coeff;   ///< Coefficients
+        float **coeffErr;   ///< Error in coefficients
+        char **mask;   ///< Coefficients mask
+    }
 psPolynomial2D;
 
 /** Three-dimensional polynomial */
 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, nY, nZ;   ///< Number of terms in x, y and z
+        float ***coeff;    ///< Coefficients
+        float ***coeffErr;    ///< Error in coefficients
+        char ***mask;    ///< Coefficients mask
+    }
 psPolynomial3D;
 
 /** Four-dimensional polynomial */
 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, nX, nY, nZ;   ///< Number of terms in w, x, y and z
+        float ****coeff;    ///< Coefficients
+        float ****coeffErr;   ///< Error in coefficients
+        char ****mask;    ///< Coefficients mask
+    }
 psPolynomial4D;
 
@@ -92,46 +95,46 @@
 
 /** 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
-                                   );
-
+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
-                  );
-
+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
-                  );
-
+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
-                  );
-
+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
-                  );
-
+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
+                  );
+                  
 /*****************************************************************************/
 
@@ -140,85 +143,85 @@
 /** Double-precision one-dimensional polynomial */
 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;
 
 /** Double-precision two-dimensional polynomial */
 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, nY;    ///< Number of terms in x and y
+        double **coeff;   ///< Coefficients
+        double **coeffErr;    ///< Error in coefficients
+        char **mask;   ///< Coefficients mask
+    }
 psDPolynomial2D;
 
 /** Double-precision three-dimensional polynomial */
 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, nY, nZ;   ///< Number of terms in x, y and z
+        double ***coeff;   ///< Coefficients
+        double ***coeffErr;   ///< Error in coefficients
+        char ***mask;    ///< Coefficient mask
+    }
 psDPolynomial3D;
 
 /** Double-precision four-dimensional polynomial */
 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, nX, nY, nZ;   ///< Number of terms in w, x, y and 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
-                                     );
-
+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
-                   );
-
+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
-                   );
-
+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
-                   );
-
+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
-                   );
-
+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
 
