IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 9, 2005, 9:26:48 AM (21 years ago)
Author:
drobbin
Message:

* empty log message *

File:
1 edited

Legend:

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

    r4162 r4190  
    1212 *  @author GLG, MHPCC
    1313 *
    14  *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-06-08 23:40:45 $
     14 *  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-06-09 19:26:48 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4545    psF32 mean,                        ///< Mean for the Gaussian
    4646    psF32 stddev,                      ///< Standard deviation for the Gaussian
    47     psBool normal                        ///< Indicates whether result should be normalized
     47    psBool normal                      ///< Indicates whether result should be normalized
    4848);
    4949
     
    5757    psF32 mean,                        ///< The mean of the Gaussian
    5858    psF32 sigma,                       ///< The sigma of the Gaussian
    59     psS32 Npts                           ///< The size of the vector
    60 );
    61 
     59    psS32 Npts                         ///< The size of the vector
     60);
     61
     62/** Polynomial Type.
     63 *
     64 *  Enumeration for Polynomial types.
     65 */
    6266typedef enum {
    6367    PS_POLYNOMIAL_ORD,                 ///< Ordinary Polynomial
     
    121125 */
    122126psPolynomial1D* psPolynomial1DAlloc(
     127    psS32 n,                            ///< Number of terms
     128    psPolynomialType type              ///< Polynomial Type
     129);
     130
     131/** Allocates a 2-D polynomial structure
     132 *
     133 *  @return  psPolynomial2D*    new 2-D polynomial struct
     134 */
     135psPolynomial2D* psPolynomial2DAlloc(
     136    psS32 nX,                           ///< Number of terms in x
     137    psS32 nY,                           ///< Number of terms in y
     138    psPolynomialType type              ///< Polynomial Type
     139);
     140
     141/** Allocates a 3-D polynomial structure
     142 *
     143 *  @return  psPolynomial3D*    new 3-D polynomial struct
     144 */
     145psPolynomial3D* psPolynomial3DAlloc(
     146    psS32 nX,                           ///< Number of terms in x
     147    psS32 nY,                           ///< Number of terms in y
     148    psS32 nZ,                           ///< Number of terms in z
     149    psPolynomialType type              ///< Polynomial Type
     150);
     151
     152/** Allocates a 4-D polynomial structure
     153 *
     154 *  @return  psPolynomial4D*    new 4-D polynomial struct
     155 */
     156psPolynomial4D* psPolynomial4DAlloc(
     157    psS32 nW,                           ///< Number of terms in w
     158    psS32 nX,                           ///< Number of terms in x
     159    psS32 nY,                           ///< Number of terms in y
     160    psS32 nZ,                           ///< Number of terms in z
     161    psPolynomialType type              ///< Polynomial Type
     162);
     163
     164/** Evaluates a 1-D polynomial at specific coordinates.
     165 *
     166 *  @return psF32    result of polynomial at given location
     167 */
     168psF32 psPolynomial1DEval(
     169    const psPolynomial1D* myPoly,      ///< Coefficients for the polynomial
     170    psF32 x                            ///< location at which to evaluate
     171);
     172
     173/** Evaluates a 2-D polynomial at specific coordinates.
     174 *
     175 *  @return psF32    result of polynomial at given location
     176 */
     177psF32 psPolynomial2DEval(
     178    const psPolynomial2D* myPoly,      ///< Coefficients for the polynomial
     179    psF32 x,                            ///< x location at which to evaluate
     180    psF32 y                             ///< y location at which to evaluate
     181);
     182
     183/** Evaluates a 3-D polynomial at specific coordinates.
     184 *
     185 *  @return psF32    result of polynomial at given location
     186 */
     187psF32 psPolynomial3DEval(
     188    const psPolynomial3D* myPoly,      ///< Coefficients for the polynomial
     189    psF32 x,                            ///< x location at which to evaluate
     190    psF32 y,                            ///< y location at which to evaluate
     191    psF32 z                             ///< z location at which to evaluate
     192);
     193
     194/** Evaluates a 4-D polynomial at specific coordinates.
     195 *
     196 *  @return psF32    result of polynomial at given location
     197 */
     198psF32 psPolynomial4DEval(
     199    const psPolynomial4D* myPoly,      ///< Coefficients for the polynomial
     200    psF32 w,                            ///< w location at which to evaluate
     201    psF32 x,                            ///< x location at which to evaluate
     202    psF32 y,                            ///< y location at which to evaluate
     203    psF32 z                             ///< z location at which to evaluate
     204);
     205
     206/** Evaluates a 1-D polynomial at specific sets of coordinates
     207 * 
     208 *  @return psVector*    results of polynomials at given locations
     209 */
     210psVector *psPolynomial1DEvalVector(
     211    const psPolynomial1D *myPoly,      ///< Coefficients for the polynomial
     212    const psVector *x                   ///< x locations at which to evaluate
     213);
     214
     215/** Evaluates a 2-D polynomial at specific sets of coordinates
     216 * 
     217 *  @return psVector*    results of polynomial at given locations
     218 */
     219psVector *psPolynomial2DEvalVector(
     220    const psPolynomial2D *myPoly,      ///< Coefficients for the polynomial
     221    const psVector *x,                  ///< x locations at which to evaluate
     222    const psVector *y                   ///< y locations at which to evaluate
     223);
     224
     225/** Evaluates a 3-D polynomial at specific sets of coordinates
     226 * 
     227 *  @return psVector*    results of polynomial at given locations
     228 */
     229psVector *psPolynomial3DEvalVector(
     230    const psPolynomial3D *myPoly,      ///< Coefficients for the polynomial
     231    const psVector *x,                  ///< x locations at which to evaluate
     232    const psVector *y,                  ///< y locations at which to evaluate
     233    const psVector *z                   ///< z locations at which to evaluate
     234);
     235
     236/** Evaluates a 4-D polynomial at specific sets of coordinates
     237 * 
     238 *  @return psVector*    results of polynomial at given locations
     239 */
     240psVector *psPolynomial4DEvalVector(
     241    const psPolynomial4D *myPoly,      ///< Coefficients for the polynomial
     242    const psVector *w,                  ///< w locations at which to evaluate
     243    const psVector *x,                  ///< x locations at which to evaluate
     244    const psVector *y,                  ///< y locations at which to evaluate
     245    const psVector *z                   ///< z locations at which to evaluate
     246);
     247
     248/*****************************************************************************/
     249
     250/* Double-precision polynomials, mainly for use in astrometry */
     251
     252/** Double-precision one-dimensional polynomial */
     253typedef struct
     254{
     255    psPolynomialType type;             ///< Polynomial type
     256    psS32 n;                            ///< Number of terms
     257    psF64 *coeff;                      ///< Coefficients
     258    psF64 *coeffErr;                   ///< Error in coefficients
     259    psU8 *mask;                        ///< Coefficient mask
     260}
     261psDPolynomial1D;
     262
     263/** Double-precision two-dimensional polynomial */
     264typedef struct
     265{
     266    psPolynomialType type;             ///< Polynomial type
     267    psS32 nX;                           ///< Number of terms in x
     268    psS32 nY;                           ///< Number of terms in y
     269    psF64 **coeff;                     ///< Coefficients
     270    psF64 **coeffErr;                  ///< Error in coefficients
     271    psU8 **mask;                       ///< Coefficients mask
     272}
     273psDPolynomial2D;
     274
     275/** Double-precision three-dimensional polynomial */
     276typedef struct
     277{
     278    psPolynomialType type;             ///< Polynomial type
     279    psS32 nX;                           ///< Number of terms in x
     280    psS32 nY;                           ///< Number of terms in y
     281    psS32 nZ;                           ///< Number of terms in z
     282    psF64 ***coeff;                    ///< Coefficients
     283    psF64 ***coeffErr;                 ///< Error in coefficients
     284    psU8 ***mask;                      ///< Coefficient mask
     285}
     286psDPolynomial3D;
     287
     288/** Double-precision four-dimensional polynomial */
     289typedef struct
     290{
     291    psPolynomialType type;             ///< Polynomial type
     292    psS32 nW;                           ///< Number of terms in w
     293    psS32 nX;                           ///< Number of terms in x
     294    psS32 nY;                           ///< Number of terms in y
     295    psS32 nZ;                           ///< Number of terms in z
     296    psF64 ****coeff;                   ///< Coefficients
     297    psF64 ****coeffErr;                ///< Error in coefficients
     298    psU8 ****mask;                     ///< Coefficients mask
     299}
     300psDPolynomial4D;
     301
     302/** Allocates a double-precision 1-D polynomial structure with n terms
     303 *
     304 *  @return  psPolynomial1D*    new double-precision 1-D polynomial struct
     305 */
     306psDPolynomial1D* psDPolynomial1DAlloc(
    123307    psS32 n,                              ///< Number of terms
    124     psPolynomialType type               ///< Polynomial Type
    125 );
    126 
    127 /** Allocates a 2-D polynomial structure
    128  *
    129  *  @return  psPolynomial2D*    new 2-D polynomial struct
    130  */
    131 psPolynomial2D* psPolynomial2DAlloc(
    132     psS32 nX,                            ///< Number of terms in x
    133     psS32 nY,                            ///< Number of terms in y
    134     psPolynomialType type              ///< Polynomial Type
    135 );
    136 
    137 /** Allocates a 3-D polynomial structure
    138  *
    139  *  @return  psPolynomial3D*    new 3-D polynomial struct
    140  */
    141 psPolynomial3D* psPolynomial3DAlloc(
    142     psS32 nX,                            ///< Number of terms in x
    143     psS32 nY,                            ///< Number of terms in y
    144     psS32 nZ,                            ///< Number of terms in z
    145     psPolynomialType type              ///< Polynomial Type
    146 );
    147 
    148 /** Allocates a 4-D polynomial structure
    149  *
    150  *  @return  psPolynomial4D*    new 4-D polynomial struct
    151  */
    152 psPolynomial4D* psPolynomial4DAlloc(
    153     psS32 nW,                            ///< Number of terms in w
    154     psS32 nX,                            ///< Number of terms in x
    155     psS32 nY,                            ///< Number of terms in y
    156     psS32 nZ,                            ///< Number of terms in z
    157     psPolynomialType type              ///< Polynomial Type
    158 );
    159 
    160 /** Evaluates a 1-D polynomial at specific coordinates.
    161  *
    162  *  @return psF32    result of polynomial at given location
    163  */
    164 psF32 psPolynomial1DEval(
    165     const psPolynomial1D* myPoly,       ///< Coefficients for the polynomial
    166     psF32 x                           ///< location at which to evaluate
    167 );
    168 
    169 /** Evaluates a 2-D polynomial at specific coordinates.
    170  *
    171  *  @return psF32    result of polynomial at given location
    172  */
    173 psF32 psPolynomial2DEval(
    174     const psPolynomial2D* myPoly,       ///< Coefficients for the polynomial
    175     psF32 x,                           ///< x location at which to evaluate
    176     psF32 y                           ///< y location at which to evaluate
    177 );
    178 
    179 /** Evaluates a 3-D polynomial at specific coordinates.
    180  *
    181  *  @return psF32    result of polynomial at given location
    182  */
    183 psF32 psPolynomial3DEval(
    184     const psPolynomial3D* myPoly,       ///< Coefficients for the polynomial
    185     psF32 x,                           ///< x location at which to evaluate
    186     psF32 y,                           ///< y location at which to evaluate
    187     psF32 z                           ///< z location at which to evaluate
    188 );
    189 
    190 /** Evaluates a 4-D polynomial at specific coordinates.
    191  *
    192  *  @return psF32    result of polynomial at given location
    193  */
    194 psF32 psPolynomial4DEval(
    195     const psPolynomial4D* myPoly,       ///< Coefficients for the polynomial
    196     psF32 w,                           ///< w location at which to evaluate
    197     psF32 x,                           ///< x location at which to evaluate
    198     psF32 y,                           ///< y location at which to evaluate
    199     psF32 z                           ///< z location at which to evaluate
    200 );
    201 
    202 psVector *psPolynomial1DEvalVector(
    203     const psPolynomial1D *myPoly,   ///< Coefficients for the polynomial
    204     const psVector *x             ///< x locations at which to evaluate
    205 );
    206 
    207 psVector *psPolynomial2DEvalVector(
    208     const psPolynomial2D *myPoly,   ///< Coefficients for the polynomial
    209     const psVector *x,             ///< x locations at which to evaluate
    210     const psVector *y             ///< y locations at which to evaluate
    211 );
    212 
    213 psVector *psPolynomial3DEvalVector(
    214     const psPolynomial3D *myPoly,   ///< Coefficients for the polynomial
    215     const psVector *x,             ///< x locations at which to evaluate
    216     const psVector *y,             ///< y locations at which to evaluate
    217     const psVector *z             ///< z locations at which to evaluate
    218 );
    219 
    220 psVector *psPolynomial4DEvalVector(
    221     const psPolynomial4D *myPoly,   ///< Coefficients for the polynomial
    222     const psVector *w,             ///< w locations at which to evaluate
    223     const psVector *x,             ///< x locations at which to evaluate
    224     const psVector *y,             ///< y locations at which to evaluate
    225     const psVector *z             ///< z locations at which to evaluate
    226 );
    227 
    228 /*****************************************************************************/
    229 
    230 /* Double-precision polynomials, mainly for use in astrometry */
    231 
    232 /** Double-precision one-dimensional polynomial */
    233 typedef struct
    234 {
    235     psPolynomialType type;             ///< Polynomial type
    236     psS32 n;                             ///< Number of terms
    237     psF64 *coeff;                     ///< Coefficients
    238     psF64 *coeffErr;                  ///< Error in coefficients
    239     psU8 *mask;                        ///< Coefficient mask
    240 }
    241 psDPolynomial1D;
    242 
    243 /** Double-precision two-dimensional polynomial */
    244 typedef struct
    245 {
    246     psPolynomialType type;             ///< Polynomial type
    247     psS32 nX;                            ///< Number of terms in x
    248     psS32 nY;                            ///< Number of terms in y
    249     psF64 **coeff;                    ///< Coefficients
    250     psF64 **coeffErr;                 ///< Error in coefficients
    251     psU8 **mask;                       ///< Coefficients mask
    252 }
    253 psDPolynomial2D;
    254 
    255 /** Double-precision three-dimensional polynomial */
    256 typedef struct
    257 {
    258     psPolynomialType type;             ///< Polynomial type
    259     psS32 nX;                            ///< Number of terms in x
    260     psS32 nY;                            ///< Number of terms in y
    261     psS32 nZ;                            ///< Number of terms in z
    262     psF64 ***coeff;                   ///< Coefficients
    263     psF64 ***coeffErr;                ///< Error in coefficients
    264     psU8 ***mask;                      ///< Coefficient mask
    265 }
    266 psDPolynomial3D;
    267 
    268 /** Double-precision four-dimensional polynomial */
    269 typedef struct
    270 {
    271     psPolynomialType type;             ///< Polynomial type
    272     psS32 nW;                            ///< Number of terms in w
    273     psS32 nX;                            ///< Number of terms in x
    274     psS32 nY;                            ///< Number of terms in y
    275     psS32 nZ;                            ///< Number of terms in z
    276     psF64 ****coeff;                  ///< Coefficients
    277     psF64 ****coeffErr;               ///< Error in coefficients
    278     psU8 ****mask;                     ///< Coefficients mask
    279 }
    280 psDPolynomial4D;
    281 
    282 /** Allocates a double-precision 1-D polynomial structure with n terms
    283  *
    284  *  @return  psPolynomial1D*    new double-precision 1-D polynomial struct
    285  */
    286 psDPolynomial1D* psDPolynomial1DAlloc(
    287     psS32 n,                             ///< Number of terms
    288     psPolynomialType type              ///< Polynomial Type
     308    psPolynomialType type                ///< Polynomial Type
    289309);
    290310
     
    294314 */
    295315psDPolynomial2D* psDPolynomial2DAlloc(
    296     psS32 nX,                            ///< Number of terms in x
    297     psS32 nY,                            ///< Number of terms in y
     316    psS32 nX,                           ///< Number of terms in x
     317    psS32 nY,                           ///< Number of terms in y
    298318    psPolynomialType type              ///< Polynomial Type
    299319);
     
    304324 */
    305325psDPolynomial3D* psDPolynomial3DAlloc(
    306     psS32 nX,                            ///< Number of terms in x
    307     psS32 nY,                            ///< Number of terms in y
    308     psS32 nZ,                            ///< Number of terms in z
     326    psS32 nX,                           ///< Number of terms in x
     327    psS32 nY,                           ///< Number of terms in y
     328    psS32 nZ,                           ///< Number of terms in z
    309329    psPolynomialType type              ///< Polynomial Type
    310330);
     
    315335 */
    316336psDPolynomial4D* psDPolynomial4DAlloc(
    317     psS32 nW,                            ///< Number of terms in w
    318     psS32 nX,                            ///< Number of terms in x
    319     psS32 nY,                            ///< Number of terms in y
    320     psS32 nZ,                            ///< Number of terms in z
     337    psS32 nW,                           ///< Number of terms in w
     338    psS32 nX,                           ///< Number of terms in x
     339    psS32 nY,                           ///< Number of terms in y
     340    psS32 nZ,                           ///< Number of terms in z
    321341    psPolynomialType type              ///< Polynomial Type
    322342);
     
    327347 */
    328348psF64 psDPolynomial1DEval(
    329     const psDPolynomial1D* myPoly,      ///< Coefficients for the polynomial
    330     psF64 x                          ///< Value at which to evaluate
     349    const psDPolynomial1D* myPoly,     ///< Coefficients for the polynomial
     350    psF64 x                             ///< Value at which to evaluate
    331351);
    332352
     
    336356 */
    337357psF64 psDPolynomial2DEval(
    338     const psDPolynomial2D* myPoly,       ///< Coefficients for the polynomial
    339     psF64 x,                           ///< Value x at which to evaluate
    340     psF64 y            ///< Value y at which to evaluate
     358    const psDPolynomial2D* myPoly,      ///< Coefficients for the polynomial
     359    psF64 x,                             ///< Value x at which to evaluate
     360    psF64 y                              ///< Value y at which to evaluate
    341361);
    342362
     
    346366 */
    347367psF64 psDPolynomial3DEval(
    348     const psDPolynomial3D* myPoly,      ///< Coefficients for the polynomial
    349     psF64 x,                          ///< Value x at which to evaluate
    350     psF64 y,                          ///< Value y at which to evaluate
    351     psF64 z     ///< Value z at which to evaluate
     368    const psDPolynomial3D* myPoly,     ///< Coefficients for the polynomial
     369    psF64 x,                            ///< Value x at which to evaluate
     370    psF64 y,                            ///< Value y at which to evaluate
     371    psF64 z                             ///< Value z at which to evaluate
    352372);
    353373
     
    357377 */
    358378psF64 psDPolynomial4DEval(
    359     const psDPolynomial4D* myPoly,      ///< Coefficients for the polynomial
    360     psF64 w,                          ///< Value w at which to evaluate
    361     psF64 x,                          ///< Value x at which to evaluate
    362     psF64 y,                          ///< Value y at which to evaluate
    363     psF64 z     ///< Value z at which to evaluate
    364 );
    365 
     379    const psDPolynomial4D* myPoly,     ///< Coefficients for the polynomial
     380    psF64 w,                            ///< Value w at which to evaluate
     381    psF64 x,                            ///< Value x at which to evaluate
     382    psF64 y,                            ///< Value y at which to evaluate
     383    psF64 z                             ///< Value z at which to evaluate
     384);
     385
     386/** Evaluates a double-precision 1-D polynomial at specific sets of coordinates.
     387 * 
     388 *  @return psVector*    results of polynomial at given locations
     389 */
    366390psVector *psDPolynomial1DEvalVector(
    367     const psDPolynomial1D *myPoly, ///< Coefficients for the polynomial
    368     const psVector *x             ///< x locations at which to evaluate
    369 );
    370 
     391    const psDPolynomial1D *myPoly,     ///< Coefficients for the polynomial
     392    const psVector *x                   ///< x locations at which to evaluate
     393);
     394
     395/** Evaluates a double-precision 2-D polynomial at specific sets of coordinates.
     396 * 
     397 *  @return psVector*    results of polynomial at given locations
     398 */
    371399psVector *psDPolynomial2DEvalVector(
    372     const psDPolynomial2D *myPoly,  ///< Coefficients for the polynomial
    373     const psVector *x,             ///< x locations at which to evaluate
    374     const psVector *y             ///< y locations at which to evaluate
    375 );
    376 
     400    const psDPolynomial2D *myPoly,     ///< Coefficients for the polynomial
     401    const psVector *x,                  ///< x locations at which to evaluate
     402    const psVector *y                   ///< y locations at which to evaluate
     403);
     404
     405/** Evaluates a double-precision 3-D polynomial at specific sets of coordinates.
     406 * 
     407 *  @return psVector*    results of polynomial at given locations
     408 */
    377409psVector *psDPolynomial3DEvalVector(
    378     const psDPolynomial3D *myPoly,  ///< Coefficients for the polynomial
    379     const psVector *x,             ///< x locations at which to evaluate
    380     const psVector *y,             ///< y locations at which to evaluate
    381     const psVector *z             ///< z locations at which to evaluate
    382 );
    383 
     410    const psDPolynomial3D *myPoly,     ///< Coefficients for the polynomial
     411    const psVector *x,                  ///< x locations at which to evaluate
     412    const psVector *y,                  ///< y locations at which to evaluate
     413    const psVector *z                   ///< z locations at which to evaluate
     414);
     415
     416/** Evaluates a double-precision 4-D polynomial at specific sets of coordinates.
     417 * 
     418 *  @return psVector*    results of polynomial at given locations
     419 */
    384420psVector *psDPolynomial4DEvalVector(
    385     const psDPolynomial4D *myPoly,  ///< Coefficients for the polynomial
    386     const psVector *w,             ///< w locations at which to evaluate
    387     const psVector *x,             ///< x locations at which to evaluate
    388     const psVector *y,             ///< y locations at which to evaluate
    389     const psVector *z             ///< z locations at which to evaluate
    390 );
    391 
    392 
    393 
    394 typedef struct
    395 {
    396     psS32 n;                       ///< The number of spline polynomials
    397     psPolynomial1D **spline;       ///< An array of n pointers to the spline polynomials
    398     psF32 *p_psDeriv2;             ///< For cubic splines, the second derivative at each domain point.  Size is n+1.
    399     psF32 *domains;                ///< The boundaries between each spline piece.  Size is n+1.
    400     psVector *knots;               ///< The boundaries between each spline piece.  Size is n+1.
     421    const psDPolynomial4D *myPoly,     ///< Coefficients for the polynomial
     422    const psVector *w,                  ///< w locations at which to evaluate
     423    const psVector *x,                  ///< x locations at which to evaluate
     424    const psVector *y,                  ///< y locations at which to evaluate
     425    const psVector *z                   ///< z locations at which to evaluate
     426);
     427
     428/** One-Dimensional Spline */
     429typedef struct
     430{
     431    psS32 n;                            ///< The number of spline polynomials
     432    psPolynomial1D **spline;           ///< An array of n pointers to the spline polynomials
     433    psF32 *p_psDeriv2;                 ///< For cubic splines, the second derivative at each domain point.  Size is n+1.
     434    psF32 *domains;                    ///< The boundaries between each spline piece.  Size is n+1.
     435    psVector *knots;                   ///< The boundaries between each spline piece.  Size is n+1.
    401436}
    402437psSpline1D;
    403438
    404 psSpline1D *psSpline1DAlloc(psS32 n,
    405                             psS32 order,
    406                             psF32 min,
    407                             psF32 max);
    408 
    409 psSpline1D *psSpline1DAllocGeneric(const psVector *bounds,
    410                                    psS32 order);
    411 
     439/** Allocates a psSpline1D structure
     440 * 
     441 *  Allocator for psSpline1D where the bounds are implicitly specified through specifying
     442 *  min and max values along with the number of splines.
     443 *
     444 *  @return psSpline1D*    new 1-D spline struct
     445 */
     446psSpline1D *psSpline1DAlloc(psS32 n,             ///< Number of spline polynomials
     447                            psS32 order,         ///< Order of spline polynomials
     448                            psF32 min,           ///< Lower boundary value of spline polynomials
     449                            psF32 max);          ///< Upper boundary value of spline polynomials
     450
     451/** Allocates a psSpline1D structure
     452 * 
     453 *  Allocator for psSpline1D where the bounds are explicitly specified.
     454 *
     455 *  @return psSpline1D*    new 1-D spline struct
     456 */
     457psSpline1D *psSpline1DAllocGeneric(const psVector *bounds,   ///< Bounds for spline polynomials
     458                                   psS32 order);             ///< Order of spline polynomials
     459
     460/** Evaluates 1-D spline polynomials at a specific coordinate.
     461 * 
     462 *  @return psF32    result of spline polynomials evaluated at given location
     463 */
    412464psF32 psSpline1DEval(
    413     const psSpline1D *spline,
    414     psF32 x
    415 );
    416 
     465    const psSpline1D *spline,          ///< Coefficients for spline polynomials
     466    psF32 x                            ///< location at which to evaluate
     467);
     468
     469/** Evaluates 1-D spline polynomials at a set of specific coordinates.
     470 * 
     471 *  @return psVector*    results of spline polynomials evaluated at given locations
     472 */
    417473psVector *psSpline1DEvalVector(
    418     const psSpline1D *spline,
    419     const psVector *x
    420 );
    421 
    422 psS32 p_psVectorBinDisect(psVector *bins,
    423                           psScalar *x);
    424 
    425 psScalar *p_psVectorInterpolate(psVector *domain,
    426                                 psVector *range,
    427                                 psS32 order,
    428                                 psScalar *x);
     474    const psSpline1D *spline,          ///< Coefficients of spline polynomials
     475    const psVector *x                  ///< locations at which to evaluate
     476);
     477
     478/** Performs a binary disection on a given vector.
     479 *  Searches through an array of data for a specified value.
     480 * 
     481 *  @return psS32    corresponding index number of specified value
     482 */
     483psS32 p_psVectorBinDisect(psVector *bins,        ///< Array of non-decreasing values
     484                          psScalar *x);          ///< Target value to find
     485
     486/** Interpolates a series of data points for evaluation at a specific coordinate.  Uses a
     487 *  Lagrange interpolation method.
     488 *
     489 *  @return psScalar*    Lagrange interpolation value at given location
     490 */
     491psScalar *p_psVectorInterpolate(psVector *domain,     ///< Domain (x coords) for interpolation
     492                                psVector *range,      ///< Range (y coords) for interpolation
     493                                psS32 order,          ///< Order of interpolation function
     494                                psScalar *x);         ///< Location at which to evaluate
    429495
    430496#if 0
Note: See TracChangeset for help on using the changeset viewer.