IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2216


Ignore:
Timestamp:
Oct 27, 2004, 10:32:49 AM (22 years ago)
Author:
gusciora
Message:

I've been unifying the naming conventions for various macros that check
functions parameters for type, size, non-NULL ...

Location:
trunk/psLib/src
Files:
4 edited

Legend:

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

    r2215 r2216  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-10-27 20:29:12 $
     8 *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-10-27 20:32:49 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1515These constants are used by various functions in the psLib.
    1616 *****************************************************************************/
    17 #define DETERMINE_BRACKET_STEP_SIZE 0.10
    18 #define MAX_LMM_ITERATIONS 100
    19 #define MAX_MINIMIZE_ITERATIONS 100
    20 #define LEFT_SPLINE_DERIV 0.0
    21 #define RIGHT_SPLINE_DERIV 0.0
     17#define PS_DETERMINE_BRACKET_STEP_SIZE 0.10
     18#define PS_MAX_LMM_ITERATIONS 100
     19#define PS_MAX_MINIMIZE_ITERATIONS 100
     20#define PS_LEFT_SPLINE_DERIV 0.0
     21#define PS_RIGHT_SPLINE_DERIV 0.0
    2222/*****************************************************************************
    2323These are common mathimatical constants used by various functions in the psLib.
    2424 *****************************************************************************/
    25 
    2625#define PS_ONE 1.0
     26
     27
     28
    2729/*****************************************************************************
    2830Macros which take a generic psLib type and determine if it is NULL, or has
     
    4042    return(RVAL); \
    4143}
     44
     45
    4246
    4347/*****************************************************************************
     
    158162
    159163
     164
    160165/*****************************************************************************
    161166    PS_POLY macros:
     
    167172} \
    168173
     174
     175
    169176/*****************************************************************************
    170177    PS_IMAGE macros:
     
    188195    return(RVAL); \
    189196}
     197
     198
     199
    190200/*****************************************************************************
    191201    PS_READOUT macros:
    192202 *****************************************************************************/
    193 /** Preprocessor macro to generate error on a NULL image */
    194203#define PS_READOUT_CHECK_NULL(NAME, RVAL) \
    195204if (NAME == NULL || NAME->image == NULL) { \
     
    198207}
    199208
     209
     210
    200211/*****************************************************************************
    201212    Misc. macros:
  • trunk/psLib/src/dataManip/psMinimize.c

    r2215 r2216  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.69 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-10-27 20:29:12 $
     11 *  @version $Revision: 1.70 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-10-27 20:32:49 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    114114
    115115    // XXX: The second derivatives at the endpoints, undefined in the SDR,
    116     // are set in psConstants.h: LEFT_SPLINE_DERIV, RIGHT_SPLINE_DERIV.
     116    // are set in psConstants.h: PS_LEFT_SPLINE_DERIV, PS_RIGHT_SPLINE_DERIV.
    117117    derivs2[0] = -0.5;
    118     u[0]= (3.0/(X[1]-X[0])) * ((Y[1]-Y[0])/(X[1]-X[0]) - LEFT_SPLINE_DERIV);
     118    u[0]= (3.0/(X[1]-X[0])) * ((Y[1]-Y[0])/(X[1]-X[0]) - PS_LEFT_SPLINE_DERIV);
    119119
    120120    for (i=1;i<=(n-2);i++) {
     
    134134
    135135    qn = 0.5;
    136     u[n-1] = (3.0/(X[n-1]-X[n-2])) * (RIGHT_SPLINE_DERIV - (Y[n-1]-Y[n-2])/(X[n-1]-X[n-2]));
     136    u[n-1] = (3.0/(X[n-1]-X[n-2])) * (PS_RIGHT_SPLINE_DERIV - (Y[n-1]-Y[n-2])/(X[n-1]-X[n-2]));
    137137    derivs2[n-1] = (u[n-1] - (qn * u[n-2])) / ((qn * derivs2[n-2]) + 1.0);
    138138
     
    958958    float new_cDir = 0.0;
    959959    psVector *bracket = psVectorAlloc(3, PS_TYPE_F32);
    960     float stepSize = DETERMINE_BRACKET_STEP_SIZE;
     960    float stepSize = PS_DETERMINE_BRACKET_STEP_SIZE;
    961961    psVector *tmp = NULL;
    962962    psS32 i = 0;
  • trunk/psLib/src/math/psConstants.h

    r2215 r2216  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-10-27 20:29:12 $
     8 *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-10-27 20:32:49 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1515These constants are used by various functions in the psLib.
    1616 *****************************************************************************/
    17 #define DETERMINE_BRACKET_STEP_SIZE 0.10
    18 #define MAX_LMM_ITERATIONS 100
    19 #define MAX_MINIMIZE_ITERATIONS 100
    20 #define LEFT_SPLINE_DERIV 0.0
    21 #define RIGHT_SPLINE_DERIV 0.0
     17#define PS_DETERMINE_BRACKET_STEP_SIZE 0.10
     18#define PS_MAX_LMM_ITERATIONS 100
     19#define PS_MAX_MINIMIZE_ITERATIONS 100
     20#define PS_LEFT_SPLINE_DERIV 0.0
     21#define PS_RIGHT_SPLINE_DERIV 0.0
    2222/*****************************************************************************
    2323These are common mathimatical constants used by various functions in the psLib.
    2424 *****************************************************************************/
    25 
    2625#define PS_ONE 1.0
     26
     27
     28
    2729/*****************************************************************************
    2830Macros which take a generic psLib type and determine if it is NULL, or has
     
    4042    return(RVAL); \
    4143}
     44
     45
    4246
    4347/*****************************************************************************
     
    158162
    159163
     164
    160165/*****************************************************************************
    161166    PS_POLY macros:
     
    167172} \
    168173
     174
     175
    169176/*****************************************************************************
    170177    PS_IMAGE macros:
     
    188195    return(RVAL); \
    189196}
     197
     198
     199
    190200/*****************************************************************************
    191201    PS_READOUT macros:
    192202 *****************************************************************************/
    193 /** Preprocessor macro to generate error on a NULL image */
    194203#define PS_READOUT_CHECK_NULL(NAME, RVAL) \
    195204if (NAME == NULL || NAME->image == NULL) { \
     
    198207}
    199208
     209
     210
    200211/*****************************************************************************
    201212    Misc. macros:
  • trunk/psLib/src/math/psMinimize.c

    r2215 r2216  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.69 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-10-27 20:29:12 $
     11 *  @version $Revision: 1.70 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-10-27 20:32:49 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    114114
    115115    // XXX: The second derivatives at the endpoints, undefined in the SDR,
    116     // are set in psConstants.h: LEFT_SPLINE_DERIV, RIGHT_SPLINE_DERIV.
     116    // are set in psConstants.h: PS_LEFT_SPLINE_DERIV, PS_RIGHT_SPLINE_DERIV.
    117117    derivs2[0] = -0.5;
    118     u[0]= (3.0/(X[1]-X[0])) * ((Y[1]-Y[0])/(X[1]-X[0]) - LEFT_SPLINE_DERIV);
     118    u[0]= (3.0/(X[1]-X[0])) * ((Y[1]-Y[0])/(X[1]-X[0]) - PS_LEFT_SPLINE_DERIV);
    119119
    120120    for (i=1;i<=(n-2);i++) {
     
    134134
    135135    qn = 0.5;
    136     u[n-1] = (3.0/(X[n-1]-X[n-2])) * (RIGHT_SPLINE_DERIV - (Y[n-1]-Y[n-2])/(X[n-1]-X[n-2]));
     136    u[n-1] = (3.0/(X[n-1]-X[n-2])) * (PS_RIGHT_SPLINE_DERIV - (Y[n-1]-Y[n-2])/(X[n-1]-X[n-2]));
    137137    derivs2[n-1] = (u[n-1] - (qn * u[n-2])) / ((qn * derivs2[n-2]) + 1.0);
    138138
     
    958958    float new_cDir = 0.0;
    959959    psVector *bracket = psVectorAlloc(3, PS_TYPE_F32);
    960     float stepSize = DETERMINE_BRACKET_STEP_SIZE;
     960    float stepSize = PS_DETERMINE_BRACKET_STEP_SIZE;
    961961    psVector *tmp = NULL;
    962962    psS32 i = 0;
Note: See TracChangeset for help on using the changeset viewer.