Changeset 4528 for trunk/psLib/src/dataManip/psFunctions.c
- Timestamp:
- Jul 8, 2005, 4:11:01 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/dataManip/psFunctions.c (modified) (20 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/dataManip/psFunctions.c
r4447 r4528 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.11 5$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-07-0 1 22:01:17$9 * @version $Revision: 1.116 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-07-09 02:11:01 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 280 280 Polynomial coefficients will be accessed in [w][x][y][z] fashion. 281 281 *****************************************************************************/ 282 static psF 32 ordPolynomial1DEval(psF32x, const psPolynomial1D* poly)282 static psF64 ordPolynomial1DEval(psF64 x, const psPolynomial1D* poly) 283 283 { 284 284 psS32 loop_x = 0; … … 310 310 // XXX: How does the mask vector effect Crenshaw's formula? 311 311 // XXX: We assume that x is scaled between -1.0 and 1.0; 312 static psF 32 chebPolynomial1DEval(psF32x, const psPolynomial1D* poly)312 static psF64 chebPolynomial1DEval(psF64 x, const psPolynomial1D* poly) 313 313 { 314 314 PS_ASSERT_FLOAT_WITHIN_RANGE(x, -1.0, 1.0, 0.0); … … 392 392 } 393 393 394 static psF 32 ordPolynomial2DEval(psF32x,395 psF 32y,394 static psF64 ordPolynomial2DEval(psF64 x, 395 psF64 y, 396 396 const psPolynomial2D* poly) 397 397 { … … 418 418 } 419 419 420 static psF 32 chebPolynomial2DEval(psF32 x, psF32y, const psPolynomial2D* poly)420 static psF64 chebPolynomial2DEval(psF64 x, psF64 y, const psPolynomial2D* poly) 421 421 { 422 422 PS_ASSERT_FLOAT_WITHIN_RANGE(x, -1.0, 1.0, 0.0); … … 455 455 } 456 456 457 static psF 32 ordPolynomial3DEval(psF32 x, psF32 y, psF32z, const psPolynomial3D* poly)457 static psF64 ordPolynomial3DEval(psF64 x, psF64 y, psF64 z, const psPolynomial3D* poly) 458 458 { 459 459 psS32 loop_x = 0; … … 483 483 } 484 484 485 static psF 32 chebPolynomial3DEval(psF32 x, psF32 y, psF32z, const psPolynomial3D* poly)485 static psF64 chebPolynomial3DEval(psF64 x, psF64 y, psF64 z, const psPolynomial3D* poly) 486 486 { 487 487 PS_ASSERT_FLOAT_WITHIN_RANGE(x, -1.0, 1.0, 0.0); … … 527 527 } 528 528 529 static psF 32 ordPolynomial4DEval(psF32 x, psF32 y, psF32 z, psF32t, const psPolynomial4D* poly)529 static psF64 ordPolynomial4DEval(psF64 x, psF64 y, psF64 z, psF64 t, const psPolynomial4D* poly) 530 530 { 531 531 psS32 loop_x = 0; … … 561 561 } 562 562 563 static psF 32 chebPolynomial4DEval(psF32 x, psF32 y, psF32 z, psF32t, const psPolynomial4D* poly)563 static psF64 chebPolynomial4DEval(psF64 x, psF64 y, psF64 z, psF64 t, const psPolynomial4D* poly) 564 564 { 565 565 PS_ASSERT_FLOAT_WITHIN_RANGE(x, -1.0, 1.0, 0.0); … … 1069 1069 This routine must allocate memory for the polynomial structures. 1070 1070 *****************************************************************************/ 1071 psPolynomial1D* psPolynomial1DAlloc( unsignedint n,1071 psPolynomial1D* psPolynomial1DAlloc(int n, 1072 1072 psPolynomialType type) 1073 1073 { … … 1094 1094 } 1095 1095 1096 psPolynomial2D* psPolynomial2DAlloc( unsigned int nX, unsignedint nY,1097 psPolynomialType type)1096 psPolynomial2D* psPolynomial2DAlloc( int nX, int nY, 1097 psPolynomialType type) 1098 1098 { 1099 1099 PS_ASSERT_INT_POSITIVE(nX, NULL); … … 1130 1130 } 1131 1131 1132 psPolynomial3D* psPolynomial3DAlloc( unsigned int nX, unsigned int nY, unsignedint nZ,1133 psPolynomialType type)1132 psPolynomial3D* psPolynomial3DAlloc( int nX, int nY, int nZ, 1133 psPolynomialType type) 1134 1134 { 1135 1135 PS_ASSERT_INT_POSITIVE(nX, NULL); … … 1176 1176 } 1177 1177 1178 psPolynomial4D* psPolynomial4DAlloc( unsigned int nX, unsigned int nY, unsigned int nZ, unsignedint nT,1179 psPolynomialType type)1178 psPolynomial4D* psPolynomial4DAlloc( int nX, int nY, int nZ, int nT, 1179 psPolynomialType type) 1180 1180 { 1181 1181 PS_ASSERT_INT_POSITIVE(nX, NULL); … … 1431 1431 1432 1432 1433 psDPolynomial1D* psDPolynomial1DAlloc( unsignedint n,1434 psPolynomialType type)1433 psDPolynomial1D* psDPolynomial1DAlloc( int n, 1434 psPolynomialType type) 1435 1435 { 1436 1436 PS_ASSERT_INT_POSITIVE(n, NULL); … … 1456 1456 } 1457 1457 1458 psDPolynomial2D* psDPolynomial2DAlloc( unsigned int nX, unsignedint nY,1459 psPolynomialType type)1458 psDPolynomial2D* psDPolynomial2DAlloc( int nX, int nY, 1459 psPolynomialType type) 1460 1460 { 1461 1461 PS_ASSERT_INT_POSITIVE(nX, NULL); … … 1492 1492 } 1493 1493 1494 psDPolynomial3D* psDPolynomial3DAlloc( unsigned int nX, unsigned int nY, unsignedint nZ,1495 psPolynomialType type)1494 psDPolynomial3D* psDPolynomial3DAlloc( int nX, int nY, int nZ, 1495 psPolynomialType type) 1496 1496 { 1497 1497 PS_ASSERT_INT_POSITIVE(nX, NULL); … … 1538 1538 } 1539 1539 1540 psDPolynomial4D* psDPolynomial4DAlloc( unsigned int nX, unsigned int nY, unsigned int nZ, unsignedint nT,1541 psPolynomialType type)1540 psDPolynomial4D* psDPolynomial4DAlloc( int nX, int nY, int nZ, int nT, 1541 psPolynomialType type) 1542 1542 { 1543 1543 PS_ASSERT_INT_POSITIVE(nX, NULL); … … 1822 1822 XXX: What should be the defualty type for knots be? psF32 is assumed. 1823 1823 *****************************************************************************/ 1824 psSpline1D *psSpline1DAlloc( unsignedint numSplines,1825 unsignedint order,1826 float min,1827 float max)1824 psSpline1D *psSpline1DAlloc( int numSplines, 1825 int order, 1826 float min, 1827 float max) 1828 1828 { 1829 1829 PS_ASSERT_INT_NONNEGATIVE(numSplines, NULL); … … 1867 1867 *****************************************************************************/ 1868 1868 psSpline1D *psSpline1DAllocGeneric(const psVector *bounds, 1869 unsignedint order)1869 int order) 1870 1870 { 1871 1871 PS_ASSERT_VECTOR_NON_NULL(bounds, NULL); … … 2045 2045 psScalar *p_psVectorInterpolate(psVector *domain, 2046 2046 psVector *range, 2047 unsignedint order,2047 int order, 2048 2048 psScalar *x) 2049 2049 {
Note:
See TracChangeset
for help on using the changeset viewer.
