IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 9, 2004, 12:44:25 PM (22 years ago)
Author:
desonia
Message:

fixed some stupid indent-induced formating problems and added doxygen
comments.

File:
1 edited

Legend:

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

    r1407 r1426  
    1313*  @author George Gusciora, MHPCC
    1414*
    15 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
    16 *  @date $Date: 2004-08-07 00:06:06 $
     15*  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
     16*  @date $Date: 2004-08-09 22:44:25 $
    1717*
    1818*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3434    evaluated Gaussian is: \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f] */
    3535
    36 float psGaussian(float x,       // /< Value at which to evaluate
    37                  float mean,    // /< Mean for the Gaussian
    38                  float stddev,  // /< Standard deviation for the Gaussian
    39                  bool normal    // /< Indicates whether result should be normalized
     36float psGaussian(float x,       ///< Value at which to evaluate
     37                 float mean,    ///< Mean for the Gaussian
     38                 float stddev,  ///< Standard deviation for the Gaussian
     39                 bool normal    ///< Indicates whether result should be normalized
    4040                );
    4141
    4242/** Produce a vector of random numbers from a Gaussian distribution with
    4343    the specified mean and sigma */
    44 psVector *psGaussianDev(float mean,     // /< The mean of the Gaussian
    45                         float sigma,    // /< The sigma of the Gaussian
    46                         int Npts);      // /< The size of the vector
     44psVector *psGaussianDev(float mean,     ///< The mean of the Gaussian
     45                        float sigma,    ///< The sigma of the Gaussian
     46                        int Npts);      ///< The size of the vector
    4747
    4848/** One-dimensional polynomial */
    4949typedef struct
    5050{
    51     int n;                      // /< Number of terms
    52     float *coeff;               // /< Coefficients
    53     float *coeffErr;            // /< Error in coefficients
    54     char *mask;                 // /< Coefficient mask
     51    int n;                      ///< Number of terms
     52    float *coeff;               ///< Coefficients
     53    float *coeffErr;            ///< Error in coefficients
     54    char *mask;                 ///< Coefficient mask
    5555}
    5656psPolynomial1D;
     
    6060{
    6161    int nX,
    62     nY;                       // /< Number of terms in x and y
    63     float **coeff;              // /< Coefficients
    64     float **coeffErr;           // /< Error in coefficients
    65     char **mask;                // /< Coefficients mask
     62    nY;                       ///< Number of terms in x and y
     63    float **coeff;              ///< Coefficients
     64    float **coeffErr;           ///< Error in coefficients
     65    char **mask;                ///< Coefficients mask
    6666}
    6767psPolynomial2D;
     
    7272    int nX,
    7373    nY,
    74     nZ;                       // /< Number of terms in x, y and z
    75     float ***coeff;             // /< Coefficients
    76     float ***coeffErr;          // /< Error in coefficients
    77     char ***mask;               // /< Coefficients mask
     74    nZ;                       ///< Number of terms in x, y and z
     75    float ***coeff;             ///< Coefficients
     76    float ***coeffErr;          ///< Error in coefficients
     77    char ***mask;               ///< Coefficients mask
    7878}
    7979psPolynomial3D;
     
    8585    nX,
    8686    nY,
    87     nZ;                       // /< Number of terms in w, x, y and z
    88     float ****coeff;            // /< Coefficients
    89     float ****coeffErr;         // /< Error in coefficients
    90     char ****mask;              // /< Coefficients mask
     87    nZ;                       ///< Number of terms in w, x, y and z
     88    float ****coeff;            ///< Coefficients
     89    float ****coeffErr;         ///< Error in coefficients
     90    char ****mask;              ///< Coefficients mask
    9191}
    9292psPolynomial4D;
     
    9595
    9696/** Constructor */
    97 psPolynomial1D *psPolynomial1DAlloc(int n       // /< Number of terms
    98                                    );
    99 
    100 /** Constructor */
    101 psPolynomial2D *psPolynomial2DAlloc(int nX, int nY      // /< Number of terms in x and y
    102                                    );
    103 
    104 /** Constructor */
    105 psPolynomial3D *psPolynomial3DAlloc(int nX, int nY, int nZ      // /< Number of terms in x, y and z
    106                                    );
    107 
    108 /** Constructor */
    109 psPolynomial4D *psPolynomial4DAlloc(int nW, int nX, int nY, int nZ      // /< Number of terms in w, x, y and
     97psPolynomial1D *psPolynomial1DAlloc(int n       ///< Number of terms
     98                                   );
     99
     100/** Constructor */
     101psPolynomial2D *psPolynomial2DAlloc(int nX, int nY      ///< Number of terms in x and y
     102                                   );
     103
     104/** Constructor */
     105psPolynomial3D *psPolynomial3DAlloc(int nX, int nY, int nZ      ///< Number of terms in x, y and z
     106                                   );
     107
     108/** Constructor */
     109psPolynomial4D *psPolynomial4DAlloc(int nW, int nX, int nY, int nZ      ///< Number of terms in w, x, y and
    110110                                    // z
    111111                                   );
    112112
    113113/** Evaluate 1D polynomial */
    114 float psPolynomial1DEval(float x,       // /< Value at which to evaluate
    115                          const psPolynomial1D * myPoly  // /< Coefficients for the polynomial
     114float psPolynomial1DEval(float x,       ///< Value at which to evaluate
     115                         const psPolynomial1D * myPoly  ///< Coefficients for the polynomial
    116116                        );
    117117
    118118/** Evaluate 2D polynomial */
    119 float psPolynomial2DEval(float x,       // /< Value x at which to evaluate
    120                          float y,       // /< Value y at which to evaluate
    121                          const psPolynomial2D * myPoly  // /< Coefficients for the polynomial
     119float psPolynomial2DEval(float x,       ///< Value x at which to evaluate
     120                         float y,       ///< Value y at which to evaluate
     121                         const psPolynomial2D * myPoly  ///< Coefficients for the polynomial
    122122                        );
    123123
    124124/** Evaluate 3D polynomial */
    125 float psPolynomial3DEval(float x,       // /< Value x at which to evaluate
    126                          float y,       // /< Value y at which to evaluate
    127                          float z,       // /< Value z at which to evaluate
    128                          const psPolynomial3D * myPoly  // /< Coefficients for the polynomial
     125float psPolynomial3DEval(float x,       ///< Value x at which to evaluate
     126                         float y,       ///< Value y at which to evaluate
     127                         float z,       ///< Value z at which to evaluate
     128                         const psPolynomial3D * myPoly  ///< Coefficients for the polynomial
    129129                        );
    130130
    131131/** Evaluate 4D polynomial */
    132 float psPolynomial4DEval(float w,       // /< Value w at which to evaluate
    133                          float x,       // /< Value x at which to evaluate
    134                          float y,       // /< Value y at which to evaluate
    135                          float z,       // /< Value z at which to evaluate
    136                          const psPolynomial4D * myPoly  // /< Coefficients for the polynomial
     132float psPolynomial4DEval(float w,       ///< Value w at which to evaluate
     133                         float x,       ///< Value x at which to evaluate
     134                         float y,       ///< Value y at which to evaluate
     135                         float z,       ///< Value z at which to evaluate
     136                         const psPolynomial4D * myPoly  ///< Coefficients for the polynomial
    137137                        );
    138138
     
    144144typedef struct
    145145{
    146     int n;                      // /< Number of terms
    147     double *coeff;              // /< Coefficients
    148     double *coeffErr;           // /< Error in coefficients
    149     char *mask;                 // /< Coefficient mask
     146    int n;                      ///< Number of terms
     147    double *coeff;              ///< Coefficients
     148    double *coeffErr;           ///< Error in coefficients
     149    char *mask;                 ///< Coefficient mask
    150150}
    151151psDPolynomial1D;
     
    155155{
    156156    int nX,
    157     nY;                       // /< Number of terms in x and y
    158     double **coeff;             // /< Coefficients
    159     double **coeffErr;          // /< Error in coefficients
    160     char **mask;                // /< Coefficients mask
     157    nY;                       ///< Number of terms in x and y
     158    double **coeff;             ///< Coefficients
     159    double **coeffErr;          ///< Error in coefficients
     160    char **mask;                ///< Coefficients mask
    161161}
    162162psDPolynomial2D;
     
    167167    int nX,
    168168    nY,
    169     nZ;                       // /< Number of terms in x, y and z
    170     double ***coeff;            // /< Coefficients
    171     double ***coeffErr;         // /< Error in coefficients
    172     char ***mask;               // /< Coefficient mask
     169    nZ;                       ///< Number of terms in x, y and z
     170    double ***coeff;            ///< Coefficients
     171    double ***coeffErr;         ///< Error in coefficients
     172    char ***mask;               ///< Coefficient mask
    173173}
    174174psDPolynomial3D;
     
    180180    nX,
    181181    nY,
    182     nZ;                       // /< Number of terms in w, x, y and z
    183     double ****coeff;           // /< Coefficients
    184     double ****coeffErr;        // /< Error in coefficients
    185     char ****mask;              // /< Coefficients mask
     182    nZ;                       ///< Number of terms in w, x, y and z
     183    double ****coeff;           ///< Coefficients
     184    double ****coeffErr;        ///< Error in coefficients
     185    char ****mask;              ///< Coefficients mask
    186186}
    187187psDPolynomial4D;
    188188
    189189/** Constructor */
    190 psDPolynomial1D *psDPolynomial1DAlloc(int n     // /< Number of terms
    191                                      );
    192 
    193 /** Constructor */
    194 psDPolynomial2D *psDPolynomial2DAlloc(int nX, int nY    // /< Number of terms in x and y
    195                                      );
    196 
    197 /** Constructor */
    198 psDPolynomial3D *psDPolynomial3DAlloc(int nX, int nY, int nZ    // /< Number of terms in x, y and z
    199                                      );
    200 
    201 /** Constructor */
    202 psDPolynomial4D *psDPolynomial4DAlloc(int nW, int nX, int nY, int nZ    // /< Number of terms in w, x, y and
     190psDPolynomial1D *psDPolynomial1DAlloc(int n     ///< Number of terms
     191                                     );
     192
     193/** Constructor */
     194psDPolynomial2D *psDPolynomial2DAlloc(int nX, int nY    ///< Number of terms in x and y
     195                                     );
     196
     197/** Constructor */
     198psDPolynomial3D *psDPolynomial3DAlloc(int nX, int nY, int nZ    ///< Number of terms in x, y and z
     199                                     );
     200
     201/** Constructor */
     202psDPolynomial4D *psDPolynomial4DAlloc(int nW, int nX, int nY, int nZ    ///< Number of terms in w, x, y and
    203203                                      // z
    204204                                     );
    205205
    206206/** Evaluate 1D polynomial (double precision) */
    207 double psDPolynomial1DEval(double x,    // /< Value at which to evaluate
    208                            const psDPolynomial1D * myPoly       // /< Coefficients for the polynomial
     207double psDPolynomial1DEval(double x,    ///< Value at which to evaluate
     208                           const psDPolynomial1D * myPoly       ///< Coefficients for the polynomial
    209209                          );
    210210
    211211/** Evaluate 2D polynomial (double precision) */
    212 double psDPolynomial2DEval(double x,    // /< Value x at which to evaluate
    213                            double y,    // /< Value y at which to evaluate
    214                            const psDPolynomial2D * myPoly       // /< Coefficients for the polynomial
     212double psDPolynomial2DEval(double x,    ///< Value x at which to evaluate
     213                           double y,    ///< Value y at which to evaluate
     214                           const psDPolynomial2D * myPoly       ///< Coefficients for the polynomial
    215215                          );
    216216
    217217/** Evaluate 3D polynomial (double precision) */
    218 double psDPolynomial3DEval(double x,    // /< Value x at which to evaluate
    219                            double y,    // /< Value y at which to evaluate
    220                            double z,    // /< Value z at which to evaluate
    221                            const psDPolynomial3D * myPoly       // /< Coefficients for the polynomial
     218double psDPolynomial3DEval(double x,    ///< Value x at which to evaluate
     219                           double y,    ///< Value y at which to evaluate
     220                           double z,    ///< Value z at which to evaluate
     221                           const psDPolynomial3D * myPoly       ///< Coefficients for the polynomial
    222222                          );
    223223
    224224/** Evaluate 4D polynomial (double precision) */
    225 double psDPolynomial4DEval(double w,    // /< Value w at which to evaluate
    226                            double x,    // /< Value x at which to evaluate
    227                            double y,    // /< Value y at which to evaluate
    228                            double z,    // /< Value z at which to evaluate
    229                            const psDPolynomial4D * myPoly       // /< Coefficients for the polynomial
     225double psDPolynomial4DEval(double w,    ///< Value w at which to evaluate
     226                           double x,    ///< Value x at which to evaluate
     227                           double y,    ///< Value y at which to evaluate
     228                           double z,    ///< Value z at which to evaluate
     229                           const psDPolynomial4D * myPoly       ///< Coefficients for the polynomial
    230230                          );
    231231
Note: See TracChangeset for help on using the changeset viewer.