IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 8, 2005, 4:11:01 PM (21 years ago)
Author:
drobbin
Message:

updated fxns to match psLib SDRS rev. 15

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/dataManip/psFunctions.c

    r4447 r4528  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.115 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-07-01 22:01:17 $
     9 *  @version $Revision: 1.116 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-07-09 02:11:01 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    280280    Polynomial coefficients will be accessed in [w][x][y][z] fashion.
    281281 *****************************************************************************/
    282 static psF32 ordPolynomial1DEval(psF32 x, const psPolynomial1D* poly)
     282static psF64 ordPolynomial1DEval(psF64 x, const psPolynomial1D* poly)
    283283{
    284284    psS32 loop_x = 0;
     
    310310// XXX: How does the mask vector effect Crenshaw's formula?
    311311// XXX: We assume that x is scaled between -1.0 and 1.0;
    312 static psF32 chebPolynomial1DEval(psF32 x, const psPolynomial1D* poly)
     312static psF64 chebPolynomial1DEval(psF64 x, const psPolynomial1D* poly)
    313313{
    314314    PS_ASSERT_FLOAT_WITHIN_RANGE(x, -1.0, 1.0, 0.0);
     
    392392}
    393393
    394 static psF32 ordPolynomial2DEval(psF32 x,
    395                                  psF32 y,
     394static psF64 ordPolynomial2DEval(psF64 x,
     395                                 psF64 y,
    396396                                 const psPolynomial2D* poly)
    397397{
     
    418418}
    419419
    420 static psF32 chebPolynomial2DEval(psF32 x, psF32 y, const psPolynomial2D* poly)
     420static psF64 chebPolynomial2DEval(psF64 x, psF64 y, const psPolynomial2D* poly)
    421421{
    422422    PS_ASSERT_FLOAT_WITHIN_RANGE(x, -1.0, 1.0, 0.0);
     
    455455}
    456456
    457 static psF32 ordPolynomial3DEval(psF32 x, psF32 y, psF32 z, const psPolynomial3D* poly)
     457static psF64 ordPolynomial3DEval(psF64 x, psF64 y, psF64 z, const psPolynomial3D* poly)
    458458{
    459459    psS32 loop_x = 0;
     
    483483}
    484484
    485 static psF32 chebPolynomial3DEval(psF32 x, psF32 y, psF32 z, const psPolynomial3D* poly)
     485static psF64 chebPolynomial3DEval(psF64 x, psF64 y, psF64 z, const psPolynomial3D* poly)
    486486{
    487487    PS_ASSERT_FLOAT_WITHIN_RANGE(x, -1.0, 1.0, 0.0);
     
    527527}
    528528
    529 static psF32 ordPolynomial4DEval(psF32 x, psF32 y, psF32 z, psF32 t, const psPolynomial4D* poly)
     529static psF64 ordPolynomial4DEval(psF64 x, psF64 y, psF64 z, psF64 t, const psPolynomial4D* poly)
    530530{
    531531    psS32 loop_x = 0;
     
    561561}
    562562
    563 static psF32 chebPolynomial4DEval(psF32 x, psF32 y, psF32 z, psF32 t, const psPolynomial4D* poly)
     563static psF64 chebPolynomial4DEval(psF64 x, psF64 y, psF64 z, psF64 t, const psPolynomial4D* poly)
    564564{
    565565    PS_ASSERT_FLOAT_WITHIN_RANGE(x, -1.0, 1.0, 0.0);
     
    10691069    This routine must allocate memory for the polynomial structures.
    10701070 *****************************************************************************/
    1071 psPolynomial1D* psPolynomial1DAlloc(unsigned int n,
     1071psPolynomial1D* psPolynomial1DAlloc(int n,
    10721072                                    psPolynomialType type)
    10731073{
     
    10941094}
    10951095
    1096 psPolynomial2D* psPolynomial2DAlloc(unsigned int nX, unsigned int nY,
    1097                                     psPolynomialType type)
     1096psPolynomial2D* psPolynomial2DAlloc( int nX, int nY,
     1097                                     psPolynomialType type)
    10981098{
    10991099    PS_ASSERT_INT_POSITIVE(nX, NULL);
     
    11301130}
    11311131
    1132 psPolynomial3D* psPolynomial3DAlloc(unsigned int nX, unsigned int nY, unsigned int nZ,
    1133                                     psPolynomialType type)
     1132psPolynomial3D* psPolynomial3DAlloc( int nX,  int nY, int nZ,
     1133                                     psPolynomialType type)
    11341134{
    11351135    PS_ASSERT_INT_POSITIVE(nX, NULL);
     
    11761176}
    11771177
    1178 psPolynomial4D* psPolynomial4DAlloc(unsigned int nX, unsigned int nY, unsigned int nZ, unsigned int nT,
    1179                                     psPolynomialType type)
     1178psPolynomial4D* psPolynomial4DAlloc( int nX,  int nY,  int nZ, int nT,
     1179                                     psPolynomialType type)
    11801180{
    11811181    PS_ASSERT_INT_POSITIVE(nX, NULL);
     
    14311431
    14321432
    1433 psDPolynomial1D* psDPolynomial1DAlloc(unsigned int n,
    1434                                       psPolynomialType type)
     1433psDPolynomial1D* psDPolynomial1DAlloc( int n,
     1434                                       psPolynomialType type)
    14351435{
    14361436    PS_ASSERT_INT_POSITIVE(n, NULL);
     
    14561456}
    14571457
    1458 psDPolynomial2D* psDPolynomial2DAlloc(unsigned int nX, unsigned int nY,
    1459                                       psPolynomialType type)
     1458psDPolynomial2D* psDPolynomial2DAlloc( int nX, int nY,
     1459                                       psPolynomialType type)
    14601460{
    14611461    PS_ASSERT_INT_POSITIVE(nX, NULL);
     
    14921492}
    14931493
    1494 psDPolynomial3D* psDPolynomial3DAlloc(unsigned int nX, unsigned int nY, unsigned int nZ,
    1495                                       psPolynomialType type)
     1494psDPolynomial3D* psDPolynomial3DAlloc( int nX,  int nY, int nZ,
     1495                                       psPolynomialType type)
    14961496{
    14971497    PS_ASSERT_INT_POSITIVE(nX, NULL);
     
    15381538}
    15391539
    1540 psDPolynomial4D* psDPolynomial4DAlloc(unsigned int nX, unsigned int nY, unsigned int nZ, unsigned int nT,
    1541                                       psPolynomialType type)
     1540psDPolynomial4D* psDPolynomial4DAlloc( int nX,  int nY,  int nZ, int nT,
     1541                                       psPolynomialType type)
    15421542{
    15431543    PS_ASSERT_INT_POSITIVE(nX, NULL);
     
    18221822XXX: What should be the defualty type for knots be?  psF32 is assumed.
    18231823 *****************************************************************************/
    1824 psSpline1D *psSpline1DAlloc(unsigned int numSplines,
    1825                             unsigned int order,
    1826                             float min,
    1827                             float max)
     1824psSpline1D *psSpline1DAlloc( int numSplines,
     1825                            int order,
     1826                             float min,
     1827                             float max)
    18281828{
    18291829    PS_ASSERT_INT_NONNEGATIVE(numSplines, NULL);
     
    18671867 *****************************************************************************/
    18681868psSpline1D *psSpline1DAllocGeneric(const psVector *bounds,
    1869                                    unsigned int order)
     1869                                   int order)
    18701870{
    18711871    PS_ASSERT_VECTOR_NON_NULL(bounds, NULL);
     
    20452045psScalar *p_psVectorInterpolate(psVector *domain,
    20462046                                psVector *range,
    2047                                 unsigned int order,
     2047                                int order,
    20482048                                psScalar *x)
    20492049{
Note: See TracChangeset for help on using the changeset viewer.