Changeset 1426 for trunk/psLib/src/math/psSpline.h
- Timestamp:
- Aug 9, 2004, 12:44:25 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psSpline.h (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psSpline.h
r1407 r1426 13 13 * @author George Gusciora, MHPCC 14 14 * 15 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $16 * @date $Date: 2004-08-0 7 00:06:06$15 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2004-08-09 22:44:25 $ 17 17 * 18 18 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 34 34 evaluated Gaussian is: \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f] */ 35 35 36 float psGaussian(float x, // /< Value at which to evaluate37 float mean, // /< Mean for the Gaussian38 float stddev, // /< Standard deviation for the Gaussian39 bool normal // /< Indicates whether result should be normalized36 float psGaussian(float x, ///< Value at which to evaluate 37 float mean, ///< Mean for the Gaussian 38 float stddev, ///< Standard deviation for the Gaussian 39 bool normal ///< Indicates whether result should be normalized 40 40 ); 41 41 42 42 /** Produce a vector of random numbers from a Gaussian distribution with 43 43 the specified mean and sigma */ 44 psVector *psGaussianDev(float mean, // /< The mean of the Gaussian45 float sigma, // /< The sigma of the Gaussian46 int Npts); // /< The size of the vector44 psVector *psGaussianDev(float mean, ///< The mean of the Gaussian 45 float sigma, ///< The sigma of the Gaussian 46 int Npts); ///< The size of the vector 47 47 48 48 /** One-dimensional polynomial */ 49 49 typedef struct 50 50 { 51 int n; // /< Number of terms52 float *coeff; // /< Coefficients53 float *coeffErr; // /< Error in coefficients54 char *mask; // /< Coefficient mask51 int n; ///< Number of terms 52 float *coeff; ///< Coefficients 53 float *coeffErr; ///< Error in coefficients 54 char *mask; ///< Coefficient mask 55 55 } 56 56 psPolynomial1D; … … 60 60 { 61 61 int nX, 62 nY; // /< Number of terms in x and y63 float **coeff; // /< Coefficients64 float **coeffErr; // /< Error in coefficients65 char **mask; // /< Coefficients mask62 nY; ///< Number of terms in x and y 63 float **coeff; ///< Coefficients 64 float **coeffErr; ///< Error in coefficients 65 char **mask; ///< Coefficients mask 66 66 } 67 67 psPolynomial2D; … … 72 72 int nX, 73 73 nY, 74 nZ; // /< Number of terms in x, y and z75 float ***coeff; // /< Coefficients76 float ***coeffErr; // /< Error in coefficients77 char ***mask; // /< Coefficients mask74 nZ; ///< Number of terms in x, y and z 75 float ***coeff; ///< Coefficients 76 float ***coeffErr; ///< Error in coefficients 77 char ***mask; ///< Coefficients mask 78 78 } 79 79 psPolynomial3D; … … 85 85 nX, 86 86 nY, 87 nZ; // /< Number of terms in w, x, y and z88 float ****coeff; // /< Coefficients89 float ****coeffErr; // /< Error in coefficients90 char ****mask; // /< Coefficients mask87 nZ; ///< Number of terms in w, x, y and z 88 float ****coeff; ///< Coefficients 89 float ****coeffErr; ///< Error in coefficients 90 char ****mask; ///< Coefficients mask 91 91 } 92 92 psPolynomial4D; … … 95 95 96 96 /** Constructor */ 97 psPolynomial1D *psPolynomial1DAlloc(int n // /< Number of terms98 ); 99 100 /** Constructor */ 101 psPolynomial2D *psPolynomial2DAlloc(int nX, int nY // /< Number of terms in x and y102 ); 103 104 /** Constructor */ 105 psPolynomial3D *psPolynomial3DAlloc(int nX, int nY, int nZ // /< Number of terms in x, y and z106 ); 107 108 /** Constructor */ 109 psPolynomial4D *psPolynomial4DAlloc(int nW, int nX, int nY, int nZ // /< Number of terms in w, x, y and97 psPolynomial1D *psPolynomial1DAlloc(int n ///< Number of terms 98 ); 99 100 /** Constructor */ 101 psPolynomial2D *psPolynomial2DAlloc(int nX, int nY ///< Number of terms in x and y 102 ); 103 104 /** Constructor */ 105 psPolynomial3D *psPolynomial3DAlloc(int nX, int nY, int nZ ///< Number of terms in x, y and z 106 ); 107 108 /** Constructor */ 109 psPolynomial4D *psPolynomial4DAlloc(int nW, int nX, int nY, int nZ ///< Number of terms in w, x, y and 110 110 // z 111 111 ); 112 112 113 113 /** Evaluate 1D polynomial */ 114 float psPolynomial1DEval(float x, // /< Value at which to evaluate115 const psPolynomial1D * myPoly // /< Coefficients for the polynomial114 float psPolynomial1DEval(float x, ///< Value at which to evaluate 115 const psPolynomial1D * myPoly ///< Coefficients for the polynomial 116 116 ); 117 117 118 118 /** Evaluate 2D polynomial */ 119 float psPolynomial2DEval(float x, // /< Value x at which to evaluate120 float y, // /< Value y at which to evaluate121 const psPolynomial2D * myPoly // /< Coefficients for the polynomial119 float psPolynomial2DEval(float x, ///< Value x at which to evaluate 120 float y, ///< Value y at which to evaluate 121 const psPolynomial2D * myPoly ///< Coefficients for the polynomial 122 122 ); 123 123 124 124 /** Evaluate 3D polynomial */ 125 float psPolynomial3DEval(float x, // /< Value x at which to evaluate126 float y, // /< Value y at which to evaluate127 float z, // /< Value z at which to evaluate128 const psPolynomial3D * myPoly // /< Coefficients for the polynomial125 float psPolynomial3DEval(float x, ///< Value x at which to evaluate 126 float y, ///< Value y at which to evaluate 127 float z, ///< Value z at which to evaluate 128 const psPolynomial3D * myPoly ///< Coefficients for the polynomial 129 129 ); 130 130 131 131 /** Evaluate 4D polynomial */ 132 float psPolynomial4DEval(float w, // /< Value w at which to evaluate133 float x, // /< Value x at which to evaluate134 float y, // /< Value y at which to evaluate135 float z, // /< Value z at which to evaluate136 const psPolynomial4D * myPoly // /< Coefficients for the polynomial132 float psPolynomial4DEval(float w, ///< Value w at which to evaluate 133 float x, ///< Value x at which to evaluate 134 float y, ///< Value y at which to evaluate 135 float z, ///< Value z at which to evaluate 136 const psPolynomial4D * myPoly ///< Coefficients for the polynomial 137 137 ); 138 138 … … 144 144 typedef struct 145 145 { 146 int n; // /< Number of terms147 double *coeff; // /< Coefficients148 double *coeffErr; // /< Error in coefficients149 char *mask; // /< Coefficient mask146 int n; ///< Number of terms 147 double *coeff; ///< Coefficients 148 double *coeffErr; ///< Error in coefficients 149 char *mask; ///< Coefficient mask 150 150 } 151 151 psDPolynomial1D; … … 155 155 { 156 156 int nX, 157 nY; // /< Number of terms in x and y158 double **coeff; // /< Coefficients159 double **coeffErr; // /< Error in coefficients160 char **mask; // /< Coefficients mask157 nY; ///< Number of terms in x and y 158 double **coeff; ///< Coefficients 159 double **coeffErr; ///< Error in coefficients 160 char **mask; ///< Coefficients mask 161 161 } 162 162 psDPolynomial2D; … … 167 167 int nX, 168 168 nY, 169 nZ; // /< Number of terms in x, y and z170 double ***coeff; // /< Coefficients171 double ***coeffErr; // /< Error in coefficients172 char ***mask; // /< Coefficient mask169 nZ; ///< Number of terms in x, y and z 170 double ***coeff; ///< Coefficients 171 double ***coeffErr; ///< Error in coefficients 172 char ***mask; ///< Coefficient mask 173 173 } 174 174 psDPolynomial3D; … … 180 180 nX, 181 181 nY, 182 nZ; // /< Number of terms in w, x, y and z183 double ****coeff; // /< Coefficients184 double ****coeffErr; // /< Error in coefficients185 char ****mask; // /< Coefficients mask182 nZ; ///< Number of terms in w, x, y and z 183 double ****coeff; ///< Coefficients 184 double ****coeffErr; ///< Error in coefficients 185 char ****mask; ///< Coefficients mask 186 186 } 187 187 psDPolynomial4D; 188 188 189 189 /** Constructor */ 190 psDPolynomial1D *psDPolynomial1DAlloc(int n // /< Number of terms191 ); 192 193 /** Constructor */ 194 psDPolynomial2D *psDPolynomial2DAlloc(int nX, int nY // /< Number of terms in x and y195 ); 196 197 /** Constructor */ 198 psDPolynomial3D *psDPolynomial3DAlloc(int nX, int nY, int nZ // /< Number of terms in x, y and z199 ); 200 201 /** Constructor */ 202 psDPolynomial4D *psDPolynomial4DAlloc(int nW, int nX, int nY, int nZ // /< Number of terms in w, x, y and190 psDPolynomial1D *psDPolynomial1DAlloc(int n ///< Number of terms 191 ); 192 193 /** Constructor */ 194 psDPolynomial2D *psDPolynomial2DAlloc(int nX, int nY ///< Number of terms in x and y 195 ); 196 197 /** Constructor */ 198 psDPolynomial3D *psDPolynomial3DAlloc(int nX, int nY, int nZ ///< Number of terms in x, y and z 199 ); 200 201 /** Constructor */ 202 psDPolynomial4D *psDPolynomial4DAlloc(int nW, int nX, int nY, int nZ ///< Number of terms in w, x, y and 203 203 // z 204 204 ); 205 205 206 206 /** Evaluate 1D polynomial (double precision) */ 207 double psDPolynomial1DEval(double x, // /< Value at which to evaluate208 const psDPolynomial1D * myPoly // /< Coefficients for the polynomial207 double psDPolynomial1DEval(double x, ///< Value at which to evaluate 208 const psDPolynomial1D * myPoly ///< Coefficients for the polynomial 209 209 ); 210 210 211 211 /** Evaluate 2D polynomial (double precision) */ 212 double psDPolynomial2DEval(double x, // /< Value x at which to evaluate213 double y, // /< Value y at which to evaluate214 const psDPolynomial2D * myPoly // /< Coefficients for the polynomial212 double psDPolynomial2DEval(double x, ///< Value x at which to evaluate 213 double y, ///< Value y at which to evaluate 214 const psDPolynomial2D * myPoly ///< Coefficients for the polynomial 215 215 ); 216 216 217 217 /** Evaluate 3D polynomial (double precision) */ 218 double psDPolynomial3DEval(double x, // /< Value x at which to evaluate219 double y, // /< Value y at which to evaluate220 double z, // /< Value z at which to evaluate221 const psDPolynomial3D * myPoly // /< Coefficients for the polynomial218 double psDPolynomial3DEval(double x, ///< Value x at which to evaluate 219 double y, ///< Value y at which to evaluate 220 double z, ///< Value z at which to evaluate 221 const psDPolynomial3D * myPoly ///< Coefficients for the polynomial 222 222 ); 223 223 224 224 /** Evaluate 4D polynomial (double precision) */ 225 double psDPolynomial4DEval(double w, // /< Value w at which to evaluate226 double x, // /< Value x at which to evaluate227 double y, // /< Value y at which to evaluate228 double z, // /< Value z at which to evaluate229 const psDPolynomial4D * myPoly // /< Coefficients for the polynomial225 double psDPolynomial4DEval(double w, ///< Value w at which to evaluate 226 double x, ///< Value x at which to evaluate 227 double y, ///< Value y at which to evaluate 228 double z, ///< Value z at which to evaluate 229 const psDPolynomial4D * myPoly ///< Coefficients for the polynomial 230 230 ); 231 231
Note:
See TracChangeset
for help on using the changeset viewer.
