IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 31, 2004, 5:01:04 PM (22 years ago)
Author:
Paul Price
Message:

Standardised on /< as Doxygen comment for variable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/pslib/include/psFunctions.h

    r298 r344  
    1010    is not a Gaussian deviate.  The evaluated Gaussian is: \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f] */
    1111float
    12 psGaussian(float x,                     //!< Value at which to evaluate
    13            float mean,                  //!< Mean for the Gaussian
    14            float stddev                 //!< Standard deviation for the Gaussian
     12psGaussian(float x,                     ///< Value at which to evaluate
     13           float mean,                  ///< Mean for the Gaussian
     14           float stddev                 ///< Standard deviation for the Gaussian
    1515           );
    1616
     
    1919/** One-dimensional polynomial */
    2020typedef struct {
    21     int n;                              //!< Number of terms
    22     float *restrict coeff;              //!< Coefficients
    23     float *restrict coeffErr;           //!< Error in coefficients
    24     char *restrict mask;                //!< Coefficient mask
     21    int n;                              ///< Number of terms
     22    float *restrict coeff;              ///< Coefficients
     23    float *restrict coeffErr;           ///< Error in coefficients
     24    char *restrict mask;                ///< Coefficient mask
    2525} psPolynomial1D;
    2626
    2727/** Two-dimensional polynomial */
    2828typedef struct {
    29     int nX, nY;                         //!< Number of terms in x and y
    30     float *restrict *restrict coeff;    //!< Coefficients
    31     float *restrict *restrict coeffErr; //!< Error in coefficients
    32     char *restrict *restrict mask;      //!< Coefficients mask
     29    int nX, nY;                         ///< Number of terms in x and y
     30    float *restrict *restrict coeff;    ///< Coefficients
     31    float *restrict *restrict coeffErr; ///< Error in coefficients
     32    char *restrict *restrict mask;      ///< Coefficients mask
    3333} psPolynomial2D;
    3434
    3535/** Three-dimensional polynomial */
    3636typedef struct {
    37     int nX, nY, nZ;                     //!< Number of terms in x, y and z
    38     float *restrict *restrict *restrict coeff; //!< Coefficients
    39     float *restrict *restrict *restrict coeffErr; //!< Error in coefficients
    40     char *restrict *restrict *restrict mask; //!< Coefficients mask
     37    int nX, nY, nZ;                     ///< Number of terms in x, y and z
     38    float *restrict *restrict *restrict coeff; ///< Coefficients
     39    float *restrict *restrict *restrict coeffErr; ///< Error in coefficients
     40    char *restrict *restrict *restrict mask; ///< Coefficients mask
    4141} psPolynomial3D;
    4242
    4343/** Four-dimensional polynomial */
    4444typedef struct {
    45     int nW, nX, nY, nZ;                 //!< Number of terms in w, x, y and z
    46     float *restrict *restrict *restrict *restrict coeff; //!< Coefficients
    47     float *restrict *restrict *restrict *restrict coeffErr; //!< Error in coefficients
    48     char *restrict *restrict *restrict *restrict mask; //!< Coefficients mask
     45    int nW, nX, nY, nZ;                 ///< Number of terms in w, x, y and z
     46    float *restrict *restrict *restrict *restrict coeff; ///< Coefficients
     47    float *restrict *restrict *restrict *restrict coeffErr; ///< Error in coefficients
     48    char *restrict *restrict *restrict *restrict mask; ///< Coefficients mask
    4949} psPolynomial4D;
    5050
     
    5656
    5757/** Constructor */
    58 psPolynomial1D *psPolynomial1DAlloc(int n //!< Number of terms
    59                                     );
    60 /** Constructor */
    61 psPolynomial2D *psPolynomial2DAlloc(int nX, int nY //!< Number of terms in x and y
    62                                     );
    63 /** Constructor */
    64 psPolynomial3D *psPolynomial3DAlloc(int nX, int nY, int nZ //!< Number of terms in x, y and z
    65                                     );
    66 /** Constructor */
    67 psPolynomial4D *psPolynomial4DAlloc(int nW, int nX, int nY, int nZ //!< Number of terms in w, x, y and z
    68                                     );
    69 
    70 /** Destructor */
    71 void psPolynomial1DFree(psPolynomial1D *restrict myPoly //!< Polynomial to destroy
     58psPolynomial1D *psPolynomial1DAlloc(int n ///< Number of terms
     59                                    );
     60/** Constructor */
     61psPolynomial2D *psPolynomial2DAlloc(int nX, int nY ///< Number of terms in x and y
     62                                    );
     63/** Constructor */
     64psPolynomial3D *psPolynomial3DAlloc(int nX, int nY, int nZ ///< Number of terms in x, y and z
     65                                    );
     66/** Constructor */
     67psPolynomial4D *psPolynomial4DAlloc(int nW, int nX, int nY, int nZ ///< Number of terms in w, x, y and z
     68                                    );
     69
     70/** Destructor */
     71void psPolynomial1DFree(psPolynomial1D *restrict myPoly ///< Polynomial to destroy
    7272    );
    7373     
    7474/** Destructor */
    75 void psPolynomial2DFree(psPolynomial2D *restrict myPoly //!< Polynomial to destroy
    76     );
    77 /** Destructor */
    78 void psPolynomial3DFree(psPolynomial3D *restrict myPoly //!< Polynomial to destroy
    79     );
    80 /** Destructor */
    81 void psPolynomial4DFree(psPolynomial4D *restrict myPoly //!< Polynomial to destroy
     75void psPolynomial2DFree(psPolynomial2D *restrict myPoly ///< Polynomial to destroy
     76    );
     77/** Destructor */
     78void psPolynomial3DFree(psPolynomial3D *restrict myPoly ///< Polynomial to destroy
     79    );
     80/** Destructor */
     81void psPolynomial4DFree(psPolynomial4D *restrict myPoly ///< Polynomial to destroy
    8282    );
    8383
    8484/** Evaluate 1D polynomial */
    8585float
    86 psEvalPolynomial1D(float x,             //!< Value at which to evaluate
    87                    const psPolynomial1D *restrict myPoly //!< Coefficients for the polynomial
     86psEvalPolynomial1D(float x,             ///< Value at which to evaluate
     87                   const psPolynomial1D *restrict myPoly ///< Coefficients for the polynomial
    8888                   );
    8989
    9090/** Evaluate 2D polynomial */
    9191float
    92 psEvalPolynomial2D(float x,             //!< Value x at which to evaluate
    93                    float y,             //!< Value y at which to evaluate
    94                    const psPolynomial2D *restrict myPoly //!< Coefficients for the polynomial
     92psEvalPolynomial2D(float x,             ///< Value x at which to evaluate
     93                   float y,             ///< Value y at which to evaluate
     94                   const psPolynomial2D *restrict myPoly ///< Coefficients for the polynomial
    9595                   );
    9696
    9797/** Evaluate 3D polynomial */
    9898float
    99 psEvalPolynomial3D(float x,             //!< Value x at which to evaluate
    100                    float y,             //!< Value y at which to evaluate
    101                    float z,             //!< Value z at which to evaluate
    102                    const psPolynomial3D *restrict myPoly //!< Coefficients for the polynomial
     99psEvalPolynomial3D(float x,             ///< Value x at which to evaluate
     100                   float y,             ///< Value y at which to evaluate
     101                   float z,             ///< Value z at which to evaluate
     102                   const psPolynomial3D *restrict myPoly ///< Coefficients for the polynomial
    103103                   );
    104104
    105105/** Evaluate 4D polynomial */
    106106float
    107 psEvalPolynomial4D(float w,             //!< Value w at which to evaluate
    108                    float x,             //!< Value x at which to evaluate
    109                    float y,             //!< Value y at which to evaluate
    110                    float z,             //!< Value z at which to evaluate
    111                    const psPolynomial4D *restrict myPoly //!< Coefficients for the polynomial
     107psEvalPolynomial4D(float w,             ///< Value w at which to evaluate
     108                   float x,             ///< Value x at which to evaluate
     109                   float y,             ///< Value y at which to evaluate
     110                   float z,             ///< Value z at which to evaluate
     111                   const psPolynomial4D *restrict myPoly ///< Coefficients for the polynomial
    112112                   );
    113113
     
    120120/** Double-precision one-dimensional polynomial */
    121121typedef struct {
    122     int n;                              //!< Number of terms
    123     double *restrict coeff;             //!< Coefficients
    124     double *restrict coeffErr;          //!< Error in coefficients
    125     char *restrict mask;                //!< Coefficient mask
     122    int n;                              ///< Number of terms
     123    double *restrict coeff;             ///< Coefficients
     124    double *restrict coeffErr;          ///< Error in coefficients
     125    char *restrict mask;                ///< Coefficient mask
    126126} psDPolynomial1D;
    127127
    128128/** Double-precision two-dimensional polynomial */
    129129typedef struct {
    130     int nX, nY;                         //!< Number of terms in x and y
    131     double *restrict *restrict coeff;   //!< Coefficients
    132     double *restrict *restrict coeffErr; //!< Error in coefficients
    133     char *restrict *restrict mask;      //!< Coefficients mask
     130    int nX, nY;                         ///< Number of terms in x and y
     131    double *restrict *restrict coeff;   ///< Coefficients
     132    double *restrict *restrict coeffErr; ///< Error in coefficients
     133    char *restrict *restrict mask;      ///< Coefficients mask
    134134} psDPolynomial2D;
    135135
    136136/** Double-precision three-dimensional polynomial */
    137137typedef struct {
    138     int nX, nY, nZ;                     //!< Number of terms in x, y and z
    139     double *restrict *restrict *restrict coeff; //!< Coefficients
    140     double *restrict *restrict *restrict coeffErr; //!< Error in coefficients
    141     char *restrict *restrict *restrict mask; //!< Coefficient mask
     138    int nX, nY, nZ;                     ///< Number of terms in x, y and z
     139    double *restrict *restrict *restrict coeff; ///< Coefficients
     140    double *restrict *restrict *restrict coeffErr; ///< Error in coefficients
     141    char *restrict *restrict *restrict mask; ///< Coefficient mask
    142142} psDPolynomial3D;
    143143
    144144/** Double-precision four-dimensional polynomial */
    145145typedef struct {
    146     int nW, nX, nY, nZ;                 //!< Number of terms in w, x, y and z
    147     double *restrict *restrict *restrict *restrict coeff; //!< Coefficients
    148     double *restrict *restrict *restrict *restrict coeffErr; //!< Error in coefficients
    149     char *restrict *restrict *restrict *restrict mask; //!< Coefficients mask
     146    int nW, nX, nY, nZ;                 ///< Number of terms in w, x, y and z
     147    double *restrict *restrict *restrict *restrict coeff; ///< Coefficients
     148    double *restrict *restrict *restrict *restrict coeffErr; ///< Error in coefficients
     149    char *restrict *restrict *restrict *restrict mask; ///< Coefficients mask
    150150} psDPolynomial4D;
    151151
     
    156156
    157157/** Constructor */
    158 psDPolynomial1D *psDPolynomial1DAlloc(int n //!< Number of terms
    159     );
    160 /** Constructor */
    161 psDPolynomial2D *psDPolynomial2DAlloc(int nX, int nY //!< Number of terms in x and y
    162     );
    163 /** Constructor */
    164 psDPolynomial3D *psDPolynomial3DAlloc(int nX, int nY, int nZ //!< Number of terms in x, y and z
    165     );
    166 /** Constructor */
    167 psDPolynomial4D *psDPolynomial4DAlloc(int nW, int nX, int nY, int nZ //!< Number of terms in w, x, y and z
    168     );
    169 
    170 
    171 /** Destructor */
    172 void psDPolynomial1DFree(psDPolynomial1D *restrict myPoly //!< Polynomial to destroy
    173     );
    174 /** Destructor */
    175 void psDPolynomial2DFree(psDPolynomial2D *restrict myPoly //!< Polynomial to destroy
    176     );
    177 /** Destructor */
    178 void psDPolynomial3DFree(psDPolynomial3D *restrict myPoly //!< Polynomial to destroy
    179     );
    180 /** Destructor */
    181 void psDPolynomial4DFree(psDPolynomial4D *restrict myPoly //!< Polynomial to destroy
     158psDPolynomial1D *psDPolynomial1DAlloc(int n ///< Number of terms
     159    );
     160/** Constructor */
     161psDPolynomial2D *psDPolynomial2DAlloc(int nX, int nY ///< Number of terms in x and y
     162    );
     163/** Constructor */
     164psDPolynomial3D *psDPolynomial3DAlloc(int nX, int nY, int nZ ///< Number of terms in x, y and z
     165    );
     166/** Constructor */
     167psDPolynomial4D *psDPolynomial4DAlloc(int nW, int nX, int nY, int nZ ///< Number of terms in w, x, y and z
     168    );
     169
     170
     171/** Destructor */
     172void psDPolynomial1DFree(psDPolynomial1D *restrict myPoly ///< Polynomial to destroy
     173    );
     174/** Destructor */
     175void psDPolynomial2DFree(psDPolynomial2D *restrict myPoly ///< Polynomial to destroy
     176    );
     177/** Destructor */
     178void psDPolynomial3DFree(psDPolynomial3D *restrict myPoly ///< Polynomial to destroy
     179    );
     180/** Destructor */
     181void psDPolynomial4DFree(psDPolynomial4D *restrict myPoly ///< Polynomial to destroy
    182182    );
    183183
     
    185185/** Evaluate 1D polynomial (double precision) */
    186186double
    187 psEvalDPolynomial1D(double x,           //!< Value at which to evaluate
    188                     const psDPolynomial1D *restrict myPoly //!< Coefficients for the polynomial
     187psEvalDPolynomial1D(double x,           ///< Value at which to evaluate
     188                    const psDPolynomial1D *restrict myPoly ///< Coefficients for the polynomial
    189189                    );
    190190
    191191/** Evaluate 2D polynomial (double precision) */
    192192double
    193 psEvalDPolynomial2D(double x,           //!< Value x at which to evaluate
    194                     double y,           //!< Value y at which to evaluate
    195                     const psDPolynomial2D *restrict myPoly //!< Coefficients for the polynomial
     193psEvalDPolynomial2D(double x,           ///< Value x at which to evaluate
     194                    double y,           ///< Value y at which to evaluate
     195                    const psDPolynomial2D *restrict myPoly ///< Coefficients for the polynomial
    196196                    );
    197197
    198198/** Evaluate 3D polynomial (double precision) */
    199199double
    200 psEvalDPolynomial3D(double x,           //!< Value x at which to evaluate
    201                     double y,           //!< Value y at which to evaluate
    202                     double z,           //!< Value z at which to evaluate
    203                     const psDPolynomial3D *restrict myPoly //!< Coefficients for the polynomial
     200psEvalDPolynomial3D(double x,           ///< Value x at which to evaluate
     201                    double y,           ///< Value y at which to evaluate
     202                    double z,           ///< Value z at which to evaluate
     203                    const psDPolynomial3D *restrict myPoly ///< Coefficients for the polynomial
    204204                    );
    205205
    206206/** Evaluate 4D polynomial (double precision) */
    207207double
    208 psEvalDPolynomial4D(double w,           //!< Value w at which to evaluate
    209                     double x,           //!< Value x at which to evaluate
    210                     double y,           //!< Value y at which to evaluate
    211                     double z,           //!< Value z at which to evaluate
    212                     const psDPolynomial4D *restrict myPoly //!< Coefficients for the polynomial
     208psEvalDPolynomial4D(double w,           ///< Value w at which to evaluate
     209                    double x,           ///< Value x at which to evaluate
     210                    double y,           ///< Value y at which to evaluate
     211                    double z,           ///< Value z at which to evaluate
     212                    const psDPolynomial4D *restrict myPoly ///< Coefficients for the polynomial
    213213                    );
    214214
Note: See TracChangeset for help on using the changeset viewer.