Changeset 1385 for trunk/psLib/src/math/psPolynomial.h
- Timestamp:
- Aug 4, 2004, 1:37:39 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psPolynomial.h (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psPolynomial.h
r1382 r1385 12 12 * @author George Gusciora, MHPCC 13 13 * 14 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08-04 2 2:11:09 $14 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-04 23:37:39 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 39 39 bool normal ///< Indicates whether result should be normalized 40 40 ); 41 42 41 42 43 43 /** Produce a vector of random numbers from a Gaussian distribution with 44 44 the specified mean and sigma */ … … 46 46 float sigma, ///< The sigma of the Gaussian 47 47 int Npts ); ///< The size of the vector 48 49 50 51 52 48 49 50 51 52 53 53 /** One-dimensional polynomial */ 54 54 typedef struct 55 {56 int n; ///< Number of terms57 float *coeff; ///< Coefficients58 float *coeffErr; ///< Error in coefficients59 char *mask; ///< Coefficient mask60 }55 { 56 int n; ///< Number of terms 57 float *coeff; ///< Coefficients 58 float *coeffErr; ///< Error in coefficients 59 char *mask; ///< Coefficient mask 60 } 61 61 psPolynomial1D; 62 62 63 63 /** Two-dimensional polynomial */ 64 64 typedef struct 65 {66 int nX, nY; ///< Number of terms in x and y67 float **coeff; ///< Coefficients68 float **coeffErr; ///< Error in coefficients69 char **mask; ///< Coefficients mask70 }65 { 66 int nX, nY; ///< Number of terms in x and y 67 float **coeff; ///< Coefficients 68 float **coeffErr; ///< Error in coefficients 69 char **mask; ///< Coefficients mask 70 } 71 71 psPolynomial2D; 72 72 73 73 /** Three-dimensional polynomial */ 74 74 typedef struct 75 {76 int nX, nY, nZ; ///< Number of terms in x, y and z77 float ***coeff; ///< Coefficients78 float ***coeffErr; ///< Error in coefficients79 char ***mask; ///< Coefficients mask80 }75 { 76 int nX, nY, nZ; ///< Number of terms in x, y and z 77 float ***coeff; ///< Coefficients 78 float ***coeffErr; ///< Error in coefficients 79 char ***mask; ///< Coefficients mask 80 } 81 81 psPolynomial3D; 82 82 83 83 /** Four-dimensional polynomial */ 84 84 typedef struct 85 {86 int nW, nX, nY, nZ; ///< Number of terms in w, x, y and z87 float ****coeff; ///< Coefficients88 float ****coeffErr; ///< Error in coefficients89 char ****mask; ///< Coefficients mask90 }85 { 86 int nW, nX, nY, nZ; ///< Number of terms in w, x, y and z 87 float ****coeff; ///< Coefficients 88 float ****coeffErr; ///< Error in coefficients 89 char ****mask; ///< Coefficients mask 90 } 91 91 psPolynomial4D; 92 92 … … 106 106 psPolynomial4D *psPolynomial4DAlloc( int nW, int nX, int nY, int nZ ///< Number of terms in w, x, y and z 107 107 ); 108 108 109 109 /** Evaluate 1D polynomial */ 110 110 float … … 112 112 const psPolynomial1D *myPoly ///< Coefficients for the polynomial 113 113 ); 114 114 115 115 /** Evaluate 2D polynomial */ 116 116 float … … 119 119 const psPolynomial2D *myPoly ///< Coefficients for the polynomial 120 120 ); 121 121 122 122 /** Evaluate 3D polynomial */ 123 123 float … … 127 127 const psPolynomial3D *myPoly ///< Coefficients for the polynomial 128 128 ); 129 129 130 130 /** Evaluate 4D polynomial */ 131 131 float … … 136 136 const psPolynomial4D *myPoly ///< Coefficients for the polynomial 137 137 ); 138 138 139 139 /*****************************************************************************/ 140 140 … … 143 143 /** Double-precision one-dimensional polynomial */ 144 144 typedef struct 145 {146 int n; ///< Number of terms147 double *coeff; ///< Coefficients148 double *coeffErr; ///< Error in coefficients149 char *mask; ///< Coefficient mask150 }145 { 146 int n; ///< Number of terms 147 double *coeff; ///< Coefficients 148 double *coeffErr; ///< Error in coefficients 149 char *mask; ///< Coefficient mask 150 } 151 151 psDPolynomial1D; 152 152 153 153 /** Double-precision two-dimensional polynomial */ 154 154 typedef struct 155 {156 int nX, nY; ///< Number of terms in x and y157 double **coeff; ///< Coefficients158 double **coeffErr; ///< Error in coefficients159 char **mask; ///< Coefficients mask160 }155 { 156 int nX, nY; ///< Number of terms in x and y 157 double **coeff; ///< Coefficients 158 double **coeffErr; ///< Error in coefficients 159 char **mask; ///< Coefficients mask 160 } 161 161 psDPolynomial2D; 162 162 163 163 /** Double-precision three-dimensional polynomial */ 164 164 typedef struct 165 {166 int nX, nY, nZ; ///< Number of terms in x, y and z167 double ***coeff; ///< Coefficients168 double ***coeffErr; ///< Error in coefficients169 char ***mask; ///< Coefficient mask170 }165 { 166 int nX, nY, nZ; ///< Number of terms in x, y and z 167 double ***coeff; ///< Coefficients 168 double ***coeffErr; ///< Error in coefficients 169 char ***mask; ///< Coefficient mask 170 } 171 171 psDPolynomial3D; 172 172 173 173 /** Double-precision four-dimensional polynomial */ 174 174 typedef struct 175 {176 int nW, nX, nY, nZ; ///< Number of terms in w, x, y and z177 double ****coeff; ///< Coefficients178 double ****coeffErr; ///< Error in coefficients179 char ****mask; ///< Coefficients mask180 }175 { 176 int nW, nX, nY, nZ; ///< Number of terms in w, x, y and z 177 double ****coeff; ///< Coefficients 178 double ****coeffErr; ///< Error in coefficients 179 char ****mask; ///< Coefficients mask 180 } 181 181 psDPolynomial4D; 182 182 … … 193 193 psDPolynomial4D *psDPolynomial4DAlloc( int nW, int nX, int nY, int nZ ///< Number of terms in w, x, y and z 194 194 ); 195 195 196 196 /** Evaluate 1D polynomial (double precision) */ 197 197 double … … 199 199 const psDPolynomial1D *myPoly ///< Coefficients for the polynomial 200 200 ); 201 201 202 202 /** Evaluate 2D polynomial (double precision) */ 203 203 double … … 206 206 const psDPolynomial2D *myPoly ///< Coefficients for the polynomial 207 207 ); 208 208 209 209 /** Evaluate 3D polynomial (double precision) */ 210 210 double … … 214 214 const psDPolynomial3D *myPoly ///< Coefficients for the polynomial 215 215 ); 216 216 217 217 /** Evaluate 4D polynomial (double precision) */ 218 218 double … … 223 223 const psDPolynomial4D *myPoly ///< Coefficients for the polynomial 224 224 ); 225 225 226 226 /* \} */ // End of MathGroup Functions 227 227
Note:
See TracChangeset
for help on using the changeset viewer.
