IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 27, 2005, 1:19:47 PM (21 years ago)
Author:
gusciora
Message:

Incorporates new prototypes for the spline functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psSpline.h

    r5066 r5155  
    1010 *  @author GLG, MHPCC
    1111 *
    12  *  @version $Revision: 1.56 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-09-19 19:53:13 $
     12 *  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-09-27 23:16:59 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3939    psVector *knots;                   ///< The boundaries between each spline piece.  Size is n+1.
    4040    psF32 *p_psDeriv2;                 ///< For cubic splines, the second derivative at each domain point.  Size is n+1.
    41     psF32 *p_psDomains;                ///< The boundaries between each spline piece.  Size is n+1.
    4241}
    4342psSpline1D;
     
    4544/** Allocates a psSpline1D structure
    4645 *
    47  *  Allocator for psSpline1D where the bounds are implicitly specified through specifying
    48  *  min and max values along with the number of splines.
     46 *  Allocator for psSpline1D.
    4947 *
    5048 *  @return psSpline1D*    new 1-D spline struct
    5149 */
    52 psSpline1D *psSpline1DAlloc(
    53     unsigned int n,                    ///< Number of spline polynomials
    54     unsigned int order,                ///< Order of spline polynomials
    55     float min,                         ///< Lower boundary value of spline polynomials
    56     float max                          ///< Upper boundary value of spline polynomials
    57 );
    58 
    59 /** Allocates a psSpline1D structure
    60  *
    61  *  Allocator for psSpline1D where the bounds are explicitly specified.
    62  *
    63  *  @return psSpline1D*    new 1-D spline struct
    64  */
    65 psSpline1D *psSpline1DAllocGeneric(
    66     const psVector *bounds,            ///< Bounds for spline polynomials
    67     unsigned int order                 ///< Order of spline polynomials
    68 );
     50psSpline1D *psSpline1DAlloc();
    6951
    7052/** Evaluates 1-D spline polynomials at a specific coordinate.
     
    8668);
    8769
     70/** Derive a one-dimensional spline fit.
     71 *
     72 *  Given a psSpline1D data structure and a set of x,y vectors, this routine
     73 *  generates the linear splines which satisfy those data points.
     74 *
     75 *  @return psSpline1D*:  the calculated one-dimensional splines
     76 */
     77psSpline1D *psVectorFitSpline1D(
     78    const psVector* x,                 ///< Ordinates (or NULL to just use the indices)
     79    const psVector* y                  ///< Coordinates
     80);
     81
     82/** Checks the type of a particular pointer.
     83 *
     84 *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
     85 *
     86 *  @return bool:       True if the pointer matches a psSpline1D structure, false otherwise.
     87 */
     88bool psMemCheckSpline1D(
     89    psPtr ptr                          ///< the pointer whose type to check
     90);
     91
    8892/** Performs a binary disection on a given vector.
    8993 *  Searches through an array of data for a specified value.
     
    9195 *  @return psS32    corresponding index number of specified value
    9296 */
    93 unsigned int p_psVectorBinDisect(
     97psS32 p_psVectorBinDisect(
    9498    psVector *bins,                    ///< Array of non-decreasing values
    9599    psScalar *x                        ///< Target value to find
     
    104108    psVector *domain,                  ///< Domain (x coords) for interpolation
    105109    psVector *range,                   ///< Range (y coords) for interpolation
    106     unsigned int order,                ///< Order of interpolation function
     110    psS32 order,                       ///< Order of interpolation function
    107111    psScalar *x                        ///< Location at which to evaluate
    108 );
    109 
    110 /** Checks the type of a particular pointer.
    111  *
    112  *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
    113  *
    114  *  @return bool:       True if the pointer matches a psSpline1D structure, false otherwise.
    115  */
    116 bool psMemCheckSpline1D(
    117     psPtr ptr                          ///< the pointer whose type to check
    118 );
    119 
    120 /** Derive a one-dimensional spline fit.
    121  *
    122  *  Given a psSpline1D data structure and a set of x,y vectors, this routine
    123  *  generates the linear splines which satisfy those data points.
    124  *
    125  *  @return psSpline1D*:  the calculated one-dimensional splines
    126  */
    127 psSpline1D *psVectorFitSpline1D(
    128     psSpline1D *spline,                ///< The spline which will be generated.
    129     const psVector* x,                 ///< Ordinates (or NULL to just use the indices)
    130     const psVector* y,                 ///< Coordinates
    131     const psVector* yErr               ///< Errors in coordinates, or NULL
    132 );
    133 
    134 psSpline1D *psVectorFitSpline1DNEW(
    135     const psVector* x,                 ///< Ordinates (or NULL to just use the indices)
    136     const psVector* y,                 ///< Coordinates
    137     unsigned int nKnots                ///< Number of Knots
    138112);
    139113
Note: See TracChangeset for help on using the changeset viewer.