Changeset 751
- Timestamp:
- May 20, 2004, 3:09:20 PM (22 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 6 edited
-
dataManip/psFunctions.c (modified) (4 diffs)
-
dataManip/psFunctions.h (modified) (1 diff)
-
math/psPolynomial.c (modified) (4 diffs)
-
math/psPolynomial.h (modified) (1 diff)
-
math/psSpline.c (modified) (4 diffs)
-
math/psSpline.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/dataManip/psFunctions.c
r750 r751 16 16 #include "float.h" 17 17 #include <math.h> 18 #define PI 3.14 18 19 /***************************************************************************** 19 20 Evaluate a non-normalized Gaussian with the given mean and sigma at the … … 29 30 float tmp = 0.0; 30 31 31 if (no mal == true) {32 if (normal == 1) { 32 33 tmp = 1.0 / sqrtf(2.0 * PI * (stddev * stddev)); 33 34 return(tmp * exp(-((x-mean) * (x-mean)) / (2.0 * stddev * stddev))); … … 37 38 } 38 39 40 /* 39 41 psVector *psGaussianDev(float mean, 40 42 float sigma, … … 42 44 { 43 45 psVector *gauss = NULL; 44 46 45 47 gauss = psVectorAlloc(Npts, PS_TYPE_FLOAT); 46 48 } 49 */ 47 50 48 51 /***************************************************************************** -
trunk/psLib/src/dataManip/psFunctions.h
r750 r751 12 12 13 13 float 14 psGaussian(float x, ///< Value at which to evaluate 15 float mean, ///< Mean for the Gaussian 16 float stddev ///< Standard deviation for the Gaussian 14 psGaussian(float x, ///< Value at which to evaluate 15 float mean, ///< Mean for the Gaussian 16 float stddev, ///< Standard deviation for the Gaussian 17 int normal ///< Indicates whether result should be normalized 17 18 ); 18 19 -
trunk/psLib/src/math/psPolynomial.c
r750 r751 16 16 #include "float.h" 17 17 #include <math.h> 18 #define PI 3.14 18 19 /***************************************************************************** 19 20 Evaluate a non-normalized Gaussian with the given mean and sigma at the … … 29 30 float tmp = 0.0; 30 31 31 if (no mal == true) {32 if (normal == 1) { 32 33 tmp = 1.0 / sqrtf(2.0 * PI * (stddev * stddev)); 33 34 return(tmp * exp(-((x-mean) * (x-mean)) / (2.0 * stddev * stddev))); … … 37 38 } 38 39 40 /* 39 41 psVector *psGaussianDev(float mean, 40 42 float sigma, … … 42 44 { 43 45 psVector *gauss = NULL; 44 46 45 47 gauss = psVectorAlloc(Npts, PS_TYPE_FLOAT); 46 48 } 49 */ 47 50 48 51 /***************************************************************************** -
trunk/psLib/src/math/psPolynomial.h
r750 r751 12 12 13 13 float 14 psGaussian(float x, ///< Value at which to evaluate 15 float mean, ///< Mean for the Gaussian 16 float stddev ///< Standard deviation for the Gaussian 14 psGaussian(float x, ///< Value at which to evaluate 15 float mean, ///< Mean for the Gaussian 16 float stddev, ///< Standard deviation for the Gaussian 17 int normal ///< Indicates whether result should be normalized 17 18 ); 18 19 -
trunk/psLib/src/math/psSpline.c
r750 r751 16 16 #include "float.h" 17 17 #include <math.h> 18 #define PI 3.14 18 19 /***************************************************************************** 19 20 Evaluate a non-normalized Gaussian with the given mean and sigma at the … … 29 30 float tmp = 0.0; 30 31 31 if (no mal == true) {32 if (normal == 1) { 32 33 tmp = 1.0 / sqrtf(2.0 * PI * (stddev * stddev)); 33 34 return(tmp * exp(-((x-mean) * (x-mean)) / (2.0 * stddev * stddev))); … … 37 38 } 38 39 40 /* 39 41 psVector *psGaussianDev(float mean, 40 42 float sigma, … … 42 44 { 43 45 psVector *gauss = NULL; 44 46 45 47 gauss = psVectorAlloc(Npts, PS_TYPE_FLOAT); 46 48 } 49 */ 47 50 48 51 /***************************************************************************** -
trunk/psLib/src/math/psSpline.h
r750 r751 12 12 13 13 float 14 psGaussian(float x, ///< Value at which to evaluate 15 float mean, ///< Mean for the Gaussian 16 float stddev ///< Standard deviation for the Gaussian 14 psGaussian(float x, ///< Value at which to evaluate 15 float mean, ///< Mean for the Gaussian 16 float stddev, ///< Standard deviation for the Gaussian 17 int normal ///< Indicates whether result should be normalized 17 18 ); 18 19
Note:
See TracChangeset
for help on using the changeset viewer.
