IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 19, 2005, 3:21:13 PM (21 years ago)
Author:
drobbin
Message:

changed psPolynomial fxns to use F64 and removed psDPoly fxns

File:
1 edited

Legend:

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

    r4568 r4581  
    1212 *  @author GLG, MHPCC
    1313 *
    14  *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-07-16 00:06:32 $
     14 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-07-20 01:21:13 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7474{
    7575    psPolynomialType type;             ///< Polynomial type
    76     psElemType ctype;                  ///< Polynomial precision
    7776    int n;                             ///< Number of terms
    78     psF32 *coeff;                      ///< Coefficients
    79     psF32 *coeffErr;                   ///< Error in coefficients
     77    psF64 *coeff;                      ///< Coefficients
     78    psF64 *coeffErr;                   ///< Error in coefficients
    8079    char *mask;                        ///< Coefficient mask
    8180}
     
    8685{
    8786    psPolynomialType type;             ///< Polynomial type
    88     psElemType ctype;                  ///< Polynomial precision
    8987    int nX;                            ///< Number of terms in x
    9088    int nY;                            ///< Number of terms in y
    91     psF32 **coeff;                     ///< Coefficients
    92     psF32 **coeffErr;                  ///< Error in coefficients
     89    psF64 **coeff;                     ///< Coefficients
     90    psF64 **coeffErr;                  ///< Error in coefficients
    9391    char **mask;                       ///< Coefficients mask
    9492}
     
    9997{
    10098    psPolynomialType type;             ///< Polynomial type
    101     psElemType ctype;                  ///< Polynomial precision
    10299    int nX;                           ///< Number of terms in x
    103100    int nY;                            ///< Number of terms in y
    104101    int nZ;                           ///< Number of terms in z
    105     psF32 ***coeff;                    ///< Coefficients
    106     psF32 ***coeffErr;                 ///< Error in coefficients
     102    psF64 ***coeff;                    ///< Coefficients
     103    psF64 ***coeffErr;                 ///< Error in coefficients
    107104    char ***mask;                      ///< Coefficients mask
    108105}
     
    113110{
    114111    psPolynomialType type;             ///< Polynomial type
    115     psElemType ctype;                  ///< Polynomial precision
    116112    int nX;                            ///< Number of terms in x
    117113    int nY;                            ///< Number of terms in y
    118114    int nZ;                            ///< Number of terms in z
    119115    int nT;                            ///< Number of terms in t
    120     psF32 ****coeff;                   ///< Coefficients
    121     psF32 ****coeffErr;                ///< Error in coefficients
     116    psF64 ****coeff;                   ///< Coefficients
     117    psF64 ****coeffErr;                ///< Error in coefficients
    122118    char ****mask;                     ///< Coefficients mask
    123119}
     
    251247);
    252248
    253 /*****************************************************************************/
    254 
    255 /* Double-precision polynomials, mainly for use in astrometry */
    256 
    257 /** Double-precision one-dimensional polynomial */
    258 typedef struct
    259 {
    260     psPolynomialType type;             ///< Polynomial type
    261     int n;                             ///< Number of terms
    262     psF64 *coeff;                      ///< Coefficients
    263     psF64 *coeffErr;                   ///< Error in coefficients
    264     char *mask;                        ///< Coefficient mask
    265 }
    266 psDPolynomial1D;
    267 
    268 /** Double-precision two-dimensional polynomial */
    269 typedef struct
    270 {
    271     psPolynomialType type;             ///< Polynomial type
    272     int nX;                            ///< Number of terms in x
    273     int nY;                            ///< Number of terms in y
    274     psF64 **coeff;                     ///< Coefficients
    275     psF64 **coeffErr;                  ///< Error in coefficients
    276     char **mask;                       ///< Coefficients mask
    277 }
    278 psDPolynomial2D;
    279 
    280 /** Double-precision three-dimensional polynomial */
    281 typedef struct
    282 {
    283     psPolynomialType type;             ///< Polynomial type
    284     int nX;                            ///< Number of terms in x
    285     int nY;                            ///< Number of terms in y
    286     int nZ;                            ///< Number of terms in z
    287     psF64 ***coeff;                    ///< Coefficients
    288     psF64 ***coeffErr;                 ///< Error in coefficients
    289     char ***mask;                      ///< Coefficient mask
    290 }
    291 psDPolynomial3D;
    292 
    293 /** Double-precision four-dimensional polynomial */
    294 typedef struct
    295 {
    296     psPolynomialType type;             ///< Polynomial type
    297     int nX;                            ///< Number of terms in w
    298     int nY;                            ///< Number of terms in x
    299     int nZ;                            ///< Number of terms in y
    300     int nT;                            ///< Number of terms in z
    301     psF64 ****coeff;                   ///< Coefficients
    302     psF64 ****coeffErr;                ///< Error in coefficients
    303     char ****mask;                     ///< Coefficients mask
    304 }
    305 psDPolynomial4D;
    306 
    307 /** Allocates a double-precision 1-D polynomial structure with n terms
    308  *
    309  *  @return  psPolynomial1D*    new double-precision 1-D polynomial struct
    310  */
    311 psDPolynomial1D* psDPolynomial1DAlloc(
    312     int n,                             ///< Number of terms
    313     psPolynomialType type              ///< Polynomial Type
    314 );
    315 
    316 /** Allocates a double-precision 2-D polynomial structure
    317  *
    318  *  @return  psPolynomial2D*    new double-precision 2-D polynomial struct
    319  */
    320 psDPolynomial2D* psDPolynomial2DAlloc(
    321     int nX,                            ///< Number of terms in x
    322     int nY,                            ///< Number of terms in y
    323     psPolynomialType type              ///< Polynomial Type
    324 );
    325 
    326 /** Allocates a double-precision 3-D polynomial structure
    327  *
    328  *  @return  psPolynomial3D*    new double-precision 3-D polynomial struct
    329  */
    330 psDPolynomial3D* psDPolynomial3DAlloc(
    331     int nX,                            ///< Number of terms in x
    332     int nY,                            ///< Number of terms in y
    333     int nZ,                            ///< Number of terms in z
    334     psPolynomialType type              ///< Polynomial Type
    335 );
    336 
    337 /** Allocates a double-precision 4-D polynomial structure
    338  *
    339  *  @return  psPolynomial4D*    new double-precision 4-D polynomial struct
    340  */
    341 psDPolynomial4D* psDPolynomial4DAlloc(
    342     int nX,                            ///< Number of terms in w
    343     int nY,                            ///< Number of terms in x
    344     int nZ,                            ///< Number of terms in y
    345     int nT,                            ///< Number of terms in z
    346     psPolynomialType type              ///< Polynomial Type
    347 );
    348 
    349 /** Evaluates a double-precision 1-D polynomial at specific coordinates.
    350  *
    351  *  @return psF32    result of polynomial at given location
    352  */
    353 psF64 psDPolynomial1DEval(
    354     const psDPolynomial1D* poly,     ///< Coefficients for the polynomial
    355     psF64 x                            ///< Value at which to evaluate
    356 );
    357 
    358 /** Evaluates a double-precision 2-D polynomial at specific coordinates.
    359  *
    360  *  @return psF32    result of polynomial at given location
    361  */
    362 psF64 psDPolynomial2DEval(
    363     const psDPolynomial2D* poly,      ///< Coefficients for the polynomial
    364     psF64 x,                            ///< Value x at which to evaluate
    365     psF64 y                             ///< Value y at which to evaluate
    366 );
    367 
    368 /** Evaluates a double-precision 3-D polynomial at specific coordinates.
    369  *
    370  *  @return psF64    result of polynomial at given location
    371  */
    372 psF64 psDPolynomial3DEval(
    373     const psDPolynomial3D* poly,     ///< Coefficients for the polynomial
    374     psF64 x,                           ///< Value x at which to evaluate
    375     psF64 y,                           ///< Value y at which to evaluate
    376     psF64 z                            ///< Value z at which to evaluate
    377 );
    378 
    379 /** Evaluates a double-precision 4-D polynomial at specific coordinates.
    380  *
    381  *  @return psF64    result of polynomial at given location
    382  */
    383 psF64 psDPolynomial4DEval(
    384     const psDPolynomial4D* poly,     ///< Coefficients for the polynomial
    385     psF64 x,                           ///< Value w at which to evaluate
    386     psF64 y,                           ///< Value x at which to evaluate
    387     psF64 z,                           ///< Value y at which to evaluate
    388     psF64 t                            ///< Value z at which to evaluate
    389 );
    390 
    391 /** Evaluates a double-precision 1-D polynomial at specific sets of coordinates.
    392  *
    393  *  @return psVector*    results of polynomial at given locations
    394  */
    395 psVector *psDPolynomial1DEvalVector(
    396     const psDPolynomial1D *poly,     ///< Coefficients for the polynomial
    397     const psVector *x                  ///< x locations at which to evaluate
    398 );
    399 
    400 /** Evaluates a double-precision 2-D polynomial at specific sets of coordinates.
    401  *
    402  *  @return psVector*    results of polynomial at given locations
    403  */
    404 psVector *psDPolynomial2DEvalVector(
    405     const psDPolynomial2D *poly,     ///< Coefficients for the polynomial
    406     const psVector *x,                 ///< x locations at which to evaluate
    407     const psVector *y                  ///< y locations at which to evaluate
    408 );
    409 
    410 /** Evaluates a double-precision 3-D polynomial at specific sets of coordinates.
    411  *
    412  *  @return psVector*    results of polynomial at given locations
    413  */
    414 psVector *psDPolynomial3DEvalVector(
    415     const psDPolynomial3D *poly,     ///< Coefficients for the polynomial
    416     const psVector *x,                 ///< x locations at which to evaluate
    417     const psVector *y,                 ///< y locations at which to evaluate
    418     const psVector *z                  ///< z locations at which to evaluate
    419 );
    420 
    421 /** Evaluates a double-precision 4-D polynomial at specific sets of coordinates.
    422  *
    423  *  @return psVector*    results of polynomial at given locations
    424  */
    425 psVector *psDPolynomial4DEvalVector(
    426     const psDPolynomial4D *poly,     ///< Coefficients for the polynomial
    427     const psVector *x,                 ///< w locations at which to evaluate
    428     const psVector *y,                 ///< x locations at which to evaluate
    429     const psVector *z,                 ///< y locations at which to evaluate
    430     const psVector *t                  ///< z locations at which to evaluate
    431 );
    432249
    433250/** One-Dimensional Spline */
Note: See TracChangeset for help on using the changeset viewer.