IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3097


Ignore:
Timestamp:
Jan 26, 2005, 10:47:41 AM (21 years ago)
Author:
gusciora
Message:

Type checks of spline->knots.

Location:
trunk/psLib/src
Files:
5 edited

Legend:

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

    r3096 r3097  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.84 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-01-26 20:41:04 $
     9 *  @version $Revision: 1.85 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-01-26 20:47:41 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    18411841 
    18421842XXX: Ensure that domain[i+1] != domain[i]
     1843 
     1844XXX: What should be the defualty type for knots be?  psF32 is assumed.
    18431845 *****************************************************************************/
    18441846psSpline1D *psSpline1DAlloc(psS32 numSplines,
     
    18841886
    18851887/*****************************************************************************
     1888XXX: What should be the defualty type for knots be?  psF32 is assumed.
    18861889 *****************************************************************************/
    18871890psSpline1D *psSpline1DAllocGeneric(const psVector *bounds,
     
    21422145XXX: The spline eval functions require input and output to be F32.  however
    21432146     the spline fit functions require F32 and F64.
     2147 
     2148XXX: This only works if spline0>knots if psF32.  Must add support for psU32 and
     2149psF64.
    21442150 *****************************************************************************/
    21452151psF32 psSpline1DEval(
     
    21502156    PS_PTR_CHECK_NULL(spline, NAN);
    21512157    PS_INT_CHECK_NON_NEGATIVE(spline->n, NAN);
     2158    PS_VECTOR_CHECK_TYPE(spline->knots, PS_TYPE_F32, NAN);
    21522159
    21532160    psS32 binNum;
     
    21862193    PS_VECTOR_CHECK_NULL(x, NULL);
    21872194    PS_VECTOR_CHECK_TYPE_F32_OR_F64(x, NULL);
     2195    PS_VECTOR_CHECK_TYPE(spline->knots, PS_TYPE_F32, NULL);
    21882196
    21892197    psS32 i;
  • trunk/psLib/src/dataManip/psMinimize.c

    r3096 r3097  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.102 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-01-26 20:41:04 $
     11 *  @version $Revision: 1.103 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-01-26 20:47:41 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    162162 
    163163XXX: This is F32 only
     164 
     165XXX: spline->knots must be psF32
    164166 *****************************************************************************/
    165167/*
     
    177179    PS_VECTOR_CHECK_NULL(y, NAN);
    178180    PS_VECTOR_CHECK_TYPE(y, PS_TYPE_F32, NAN);
     181    PS_VECTOR_CHECK_TYPE(spline->knots, PS_TYPE_F32, NULL);
    179182 
    180183    psS32 n;
     
    244247XXX: What happens if X is NULL, then an index vector is generated for X, but
    245248that index vector lies outside the range vectors in mySpline?
     249 
     250XXX: Assumes mySpline->knots is psF32.  Must add psU32 and psF64.
    246251 *****************************************************************************/
    247252psSpline1D *psVectorFitSpline1D(psSpline1D *mySpline,              ///< The spline which will be generated.
     
    252257    PS_VECTOR_CHECK_NULL(y, NULL);
    253258    PS_VECTOR_CHECK_TYPE_F32_OR_F64(y, NULL);
     259    PS_VECTOR_CHECK_TYPE(mySpline->knots, PS_TYPE_F32, NULL);
    254260
    255261    psTrace(".psLib.dataManip.psVectorFitSpline1D", 4,
  • trunk/psLib/src/math/psMinimize.c

    r3096 r3097  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.102 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-01-26 20:41:04 $
     11 *  @version $Revision: 1.103 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-01-26 20:47:41 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    162162 
    163163XXX: This is F32 only
     164 
     165XXX: spline->knots must be psF32
    164166 *****************************************************************************/
    165167/*
     
    177179    PS_VECTOR_CHECK_NULL(y, NAN);
    178180    PS_VECTOR_CHECK_TYPE(y, PS_TYPE_F32, NAN);
     181    PS_VECTOR_CHECK_TYPE(spline->knots, PS_TYPE_F32, NULL);
    179182 
    180183    psS32 n;
     
    244247XXX: What happens if X is NULL, then an index vector is generated for X, but
    245248that index vector lies outside the range vectors in mySpline?
     249 
     250XXX: Assumes mySpline->knots is psF32.  Must add psU32 and psF64.
    246251 *****************************************************************************/
    247252psSpline1D *psVectorFitSpline1D(psSpline1D *mySpline,              ///< The spline which will be generated.
     
    252257    PS_VECTOR_CHECK_NULL(y, NULL);
    253258    PS_VECTOR_CHECK_TYPE_F32_OR_F64(y, NULL);
     259    PS_VECTOR_CHECK_TYPE(mySpline->knots, PS_TYPE_F32, NULL);
    254260
    255261    psTrace(".psLib.dataManip.psVectorFitSpline1D", 4,
  • trunk/psLib/src/math/psPolynomial.c

    r3096 r3097  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.84 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-01-26 20:41:04 $
     9 *  @version $Revision: 1.85 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-01-26 20:47:41 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    18411841 
    18421842XXX: Ensure that domain[i+1] != domain[i]
     1843 
     1844XXX: What should be the defualty type for knots be?  psF32 is assumed.
    18431845 *****************************************************************************/
    18441846psSpline1D *psSpline1DAlloc(psS32 numSplines,
     
    18841886
    18851887/*****************************************************************************
     1888XXX: What should be the defualty type for knots be?  psF32 is assumed.
    18861889 *****************************************************************************/
    18871890psSpline1D *psSpline1DAllocGeneric(const psVector *bounds,
     
    21422145XXX: The spline eval functions require input and output to be F32.  however
    21432146     the spline fit functions require F32 and F64.
     2147 
     2148XXX: This only works if spline0>knots if psF32.  Must add support for psU32 and
     2149psF64.
    21442150 *****************************************************************************/
    21452151psF32 psSpline1DEval(
     
    21502156    PS_PTR_CHECK_NULL(spline, NAN);
    21512157    PS_INT_CHECK_NON_NEGATIVE(spline->n, NAN);
     2158    PS_VECTOR_CHECK_TYPE(spline->knots, PS_TYPE_F32, NAN);
    21522159
    21532160    psS32 binNum;
     
    21862193    PS_VECTOR_CHECK_NULL(x, NULL);
    21872194    PS_VECTOR_CHECK_TYPE_F32_OR_F64(x, NULL);
     2195    PS_VECTOR_CHECK_TYPE(spline->knots, PS_TYPE_F32, NULL);
    21882196
    21892197    psS32 i;
  • trunk/psLib/src/math/psSpline.c

    r3096 r3097  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.84 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-01-26 20:41:04 $
     9 *  @version $Revision: 1.85 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-01-26 20:47:41 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    18411841 
    18421842XXX: Ensure that domain[i+1] != domain[i]
     1843 
     1844XXX: What should be the defualty type for knots be?  psF32 is assumed.
    18431845 *****************************************************************************/
    18441846psSpline1D *psSpline1DAlloc(psS32 numSplines,
     
    18841886
    18851887/*****************************************************************************
     1888XXX: What should be the defualty type for knots be?  psF32 is assumed.
    18861889 *****************************************************************************/
    18871890psSpline1D *psSpline1DAllocGeneric(const psVector *bounds,
     
    21422145XXX: The spline eval functions require input and output to be F32.  however
    21432146     the spline fit functions require F32 and F64.
     2147 
     2148XXX: This only works if spline0>knots if psF32.  Must add support for psU32 and
     2149psF64.
    21442150 *****************************************************************************/
    21452151psF32 psSpline1DEval(
     
    21502156    PS_PTR_CHECK_NULL(spline, NAN);
    21512157    PS_INT_CHECK_NON_NEGATIVE(spline->n, NAN);
     2158    PS_VECTOR_CHECK_TYPE(spline->knots, PS_TYPE_F32, NAN);
    21522159
    21532160    psS32 binNum;
     
    21862193    PS_VECTOR_CHECK_NULL(x, NULL);
    21872194    PS_VECTOR_CHECK_TYPE_F32_OR_F64(x, NULL);
     2195    PS_VECTOR_CHECK_TYPE(spline->knots, PS_TYPE_F32, NULL);
    21882196
    21892197    psS32 i;
Note: See TracChangeset for help on using the changeset viewer.