Changeset 1985 for trunk/psLib/src/dataManip/psFunctions.c
- Timestamp:
- Oct 6, 2004, 12:27:06 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/dataManip/psFunctions.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/dataManip/psFunctions.c
r1982 r1985 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.5 0$ $Name: not supported by cvs2svn $10 * @date $Date: 2004-10-06 2 1:30:53$9 * @version $Revision: 1.51 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2004-10-06 22:27:06 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 2065 2065 2066 2066 XXX: SDR is silent about data types. PS_TYPE_F32 is implemented. 2067 2068 XXX: The spline eval functions require input and output to be F32. however 2069 the spline fit functions require F32 and F64. 2067 2070 *****************************************************************************/ 2068 2071 float psSpline1DEval(const psSpline1D *spline, … … 2090 2093 } 2091 2094 2095 // XXX: The spline eval functions require input and output to be F32. 2096 // however the spline fit functions require F32 and F64. 2092 2097 psVector *psSpline1DEvalVector(const psVector *x, 2093 2098 const psSpline1D *spline) … … 2097 2102 2098 2103 tmpVector = psVectorAlloc(x->n, PS_TYPE_F32); 2099 for (i=0;i<x->n;i++) { 2100 tmpVector->data.F32[i] = psSpline1DEval(spline, x->data.F32[i]); 2104 if (x->type.type == PS_TYPE_F32) { 2105 for (i=0;i<x->n;i++) { 2106 tmpVector->data.F32[i] = psSpline1DEval(spline, x->data.F32[i]); 2107 } 2108 } else if (x->type.type == PS_TYPE_F64) { 2109 for (i=0;i<x->n;i++) { 2110 tmpVector->data.F32[i] = psSpline1DEval(spline, (float) x->data.F64[i]); 2111 } 2112 } else { 2113 psError(__func__, "Unknown data type.\n"); 2114 return(NULL); 2101 2115 } 2102 2116
Note:
See TracChangeset
for help on using the changeset viewer.
