IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 7, 2004, 8:04:10 PM (22 years ago)
Author:
gusciora
Message:

...

File:
1 edited

Legend:

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

    r1464 r1721  
    1 
    21/** @file psFunctions.h
    32*  \brief Standard Mathematical Functions.
     
    1312*  @author George Gusciora, MHPCC
    1413*
    15 *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
    16 *  @date $Date: 2004-08-11 02:35:58 $
     14*  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
     15*  @date $Date: 2004-09-08 06:04:10 $
    1716*
    1817*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5756);
    5857
     58typedef enum {
     59    PS_POLYNOMIAL_ORD,                 ///< Ordinary Polynomial
     60    PS_POLYNOMIAL_CHEB                 ///< Chebyshev Polynomial
     61} psPolynomialType;
     62
    5963/** One-dimensional polynomial */
    6064typedef struct
    6165{
     66    psPolynomialType type;             ///< Polynomial type
    6267    int n;                             ///< Number of terms
    6368    float *coeff;                      ///< Coefficients
     
    7075typedef struct
    7176{
     77    psPolynomialType type;             ///< Polynomial type
    7278    int nX;                            ///< Number of terms in x
    7379    int nY;                            ///< Number of terms in y
     
    8187typedef struct
    8288{
     89    psPolynomialType type;             ///< Polynomial type
    8390    int nX;                            ///< Number of terms in x
    8491    int nY;                            ///< Number of terms in y
     
    93100typedef struct
    94101{
     102    psPolynomialType type;             ///< Polynomial type
    95103    int nW;                            ///< Number of terms in w
    96104    int nX;                            ///< Number of terms in x
     
    109117 */
    110118psPolynomial1D* psPolynomial1DAlloc(
    111     int n                              ///< Number of terms
     119    int n,                              ///< Number of terms
     120    psPolynomialType type               ///< Polynomial Type
    112121);
    113122
     
    118127psPolynomial2D* psPolynomial2DAlloc(
    119128    int nX,                            ///< Number of terms in x
    120     int nY                             ///< Number of terms in y
     129    int nY,                            ///< Number of terms in y
     130    psPolynomialType type              ///< Polynomial Type
    121131);
    122132
     
    128138    int nX,                            ///< Number of terms in x
    129139    int nY,                            ///< Number of terms in y
    130     int nZ                             ///< Number of terms in z
     140    int nZ,                            ///< Number of terms in z
     141    psPolynomialType type              ///< Polynomial Type
    131142);
    132143
     
    139150    int nX,                            ///< Number of terms in x
    140151    int nY,                            ///< Number of terms in y
    141     int nZ                             ///< Number of terms in z
     152    int nZ,                            ///< Number of terms in z
     153    psPolynomialType type              ///< Polynomial Type
    142154);
    143155
     
    184196);
    185197
     198psVector *psPolynomial1DEvalVector(const psVector *x,             ///< x locations at which to evaluate
     199                                   const psPolynomial1D *myPoly   ///< Coefficients for the polynomial
     200                                  );
     201
     202psVector *psPolynomial2DEvalVector(const psVector *x,             ///< x locations at which to evaluate
     203                                   const psVector *y,             ///< y locations at which to evaluate
     204                                   const psPolynomial2D *myPoly   ///< Coefficients for the polynomial
     205                                  );
     206
     207psVector *psPolynomial3DEvalVector(const psVector *x,             ///< x locations at which to evaluate
     208                                   const psVector *y,             ///< y locations at which to evaluate
     209                                   const psVector *z,             ///< z locations at which to evaluate
     210                                   const psPolynomial3D *myPoly   ///< Coefficients for the polynomial
     211                                  );
     212
     213psVector *psPolynomial4DEvalVector(const psVector *w,             ///< w locations at which to evaluate
     214                                   const psVector *x,             ///< x locations at which to evaluate
     215                                   const psVector *y,             ///< y locations at which to evaluate
     216                                   const psVector *z,             ///< z locations at which to evaluate
     217                                   const psPolynomial4D *myPoly   ///< Coefficients for the polynomial
     218                                  );
     219
    186220/*****************************************************************************/
    187221
     
    191225typedef struct
    192226{
     227    psPolynomialType type;             ///< Polynomial type
    193228    int n;                             ///< Number of terms
    194229    double *coeff;                     ///< Coefficients
     
    201236typedef struct
    202237{
     238    psPolynomialType type;             ///< Polynomial type
    203239    int nX;                            ///< Number of terms in x
    204240    int nY;                            ///< Number of terms in y
     
    212248typedef struct
    213249{
     250    psPolynomialType type;             ///< Polynomial type
    214251    int nX;                            ///< Number of terms in x
    215252    int nY;                            ///< Number of terms in y
     
    224261typedef struct
    225262{
     263    psPolynomialType type;             ///< Polynomial type
    226264    int nW;                            ///< Number of terms in w
    227265    int nX;                            ///< Number of terms in x
     
    239277 */
    240278psDPolynomial1D* psDPolynomial1DAlloc(
    241     int n                              ///< Number of terms
     279    int n,                             ///< Number of terms
     280    psPolynomialType type              ///< Polynomial Type
    242281);
    243282
     
    248287psDPolynomial2D* psDPolynomial2DAlloc(
    249288    int nX,                            ///< Number of terms in x
    250     int nY                             ///< Number of terms in y
     289    int nY,                            ///< Number of terms in y
     290    psPolynomialType type              ///< Polynomial Type
    251291);
    252292
     
    258298    int nX,                            ///< Number of terms in x
    259299    int nY,                            ///< Number of terms in y
    260     int nZ                             ///< Number of terms in z
     300    int nZ,                            ///< Number of terms in z
     301    psPolynomialType type              ///< Polynomial Type
    261302);
    262303
     
    269310    int nX,                            ///< Number of terms in x
    270311    int nY,                            ///< Number of terms in y
    271     int nZ                             ///< Number of terms in z
     312    int nZ,                            ///< Number of terms in z
     313    psPolynomialType type              ///< Polynomial Type
    272314);
    273315
     
    314356);
    315357
     358psVector *psDPolynomial1DEvalVector(const psVector *x,             ///< x locations at which to evaluate
     359                                    const psDPolynomial1D *myPoly  ///< Coefficients for the polynomial
     360                                   );
     361
     362psVector *psDPolynomial2DEvalVector(const psVector *x,             ///< x locations at which to evaluate
     363                                    const psVector *y,             ///< y locations at which to evaluate
     364                                    const psDPolynomial2D *myPoly  ///< Coefficients for the polynomial
     365                                   );
     366
     367psVector *psDPolynomial3DEvalVector(const psVector *x,             ///< x locations at which to evaluate
     368                                    const psVector *y,             ///< y locations at which to evaluate
     369                                    const psVector *z,             ///< z locations at which to evaluate
     370                                    const psDPolynomial3D *myPoly  ///< Coefficients for the polynomial
     371                                   );
     372
     373psVector *psDPolynomial4DEvalVector(const psVector *w,             ///< w locations at which to evaluate
     374                                    const psVector *x,             ///< x locations at which to evaluate
     375                                    const psVector *y,             ///< y locations at which to evaluate
     376                                    const psVector *z,             ///< z locations at which to evaluate
     377                                    const psDPolynomial4D *myPoly  ///< Coefficients for the polynomial
     378                                   );
     379
     380
     381
     382typedef struct
     383{
     384    int n;
     385    psPolynomial1D **spline;
     386    float *domains;
     387}
     388psSpline1D;
     389
     390psSpline1D *psSpline1DAlloc(int n,
     391                            int order,
     392                            float min,
     393                            float max);
     394
     395psSpline1D *psSpline1DAllocGeneric(const psVector *bounds,
     396                                   int order);
     397
     398float psSpline1DEval(const psSpline1D *spline,
     399                     float x);
     400
     401psVector *psSpline1DEvalVector(const psVector *x,
     402                               const psSpline1D *spline);
     403
    316404/* \} */// End of MathGroup Functions
    317405
Note: See TracChangeset for help on using the changeset viewer.