IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 5, 2004, 1:14:15 PM (22 years ago)
Author:
gusciora
Message:

Improved the CHECK macros in psConstants.h.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psMinimize.c

    r1963 r1964  
    99 *  @author George Gusciora, MHPCC
    1010 *
    11  *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-10-05 22:47:21 $
     11 *  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-10-05 23:14:15 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    8080}
    8181
    82 /******************************************************************************
    83 VectorNormalizeGen(): this routine returns a psVector with "x" elements.  The
    84 values of the vector will be scaled uniformly between -1.0 and 1.0.
    85  
    86 XXX: use a static vector.
    87 *****************************************************************************/
    88 psVector* VectorNormalizeGen(int x)
    89 {
    90     int i = 0;
    91     psVector *tmp = NULL;
    92 
    93     tmp = psVectorAlloc(x, PS_TYPE_F32);
    94     for (i = 0; i < x; i++) {
    95         tmp->data.F32[i] = (((float)2 * i) / ((float)x)) - 1.0;
    96     }
    97 
    98     return (tmp);
    99 }
    100 
    10182/*****************************************************************************
    10283CalculateSecondDerivs(): Given a set of x/y vectors corresponding to a
     
    10788here defined to be 0.0.  They can be modified via ypo and yp1.
    10889 
     90This routine assumes that vectors x and y are of the appropriate types/sizes
     91(F32).
     92 
    10993XXX: This algorithm is derived from the Numerical Recipes.
    110 XXX: use recyvled vectors for internal data.
     94XXX: use recycled vectors for internal data.
     95XXX: do an F64 version?
    11196 *****************************************************************************/
    11297float *CalculateSecondDerivs(const psVector* restrict x,        ///< Ordinates (or NULL to just use the indices)
     
    179164evalSpline() which computes the interpolated value based on the cubic spline
    180165polynomials which are stored in psSpline1D.
     166 
     167XXX: check types/sizes
     168XXX: This is F32 only
    181169 *****************************************************************************/
    182170float p_psNRSpline1DEval(psSpline1D *spline,
     
    236224 
    237225XXX: usage of yErr is not specified in IfA documentation.
    238 XXX: Must do: if yErr==NULL, set all errors equal.
    239  
    240226XXX: Is the x argument redundant?  What do we do if the x argument is
    241  supplied, but does not equal the domains specified in mySpline?
    242  
     227supplied, but does not equal the domains specified in mySpline?
    243228XXX: can psSpline be NULL?
    244  
    245 XXX: Implemented in F32 only, must add F64.
    246229 *****************************************************************************/
    247230psSpline1D *psVectorFitSpline1D(psSpline1D *mySpline,              ///< The spline which will be generated.
     
    655638coefficients of that polynomial.
    656639 
    657 XXX:
    658 yErr is currently ignored.
    659  
    660 XXX:
    661 Use private name?
     640XXX: yErr is currently ignored.
     641 
     642XXX: Use private name?
    662643*****************************************************************************/
    663644psPolynomial1D *p_psVectorFitPolynomial1DCheby(psPolynomial1D* myPoly,
     
    737718 
    738719XXX: Use private name?
     720XXX: Use recycled vectors.
    739721 *****************************************************************************/
    740722psPolynomial1D* p_psVectorFitPolynomial1DOrd(psPolynomial1D* myPoly,
     
    761743    // printf("(x, y, yErr) is (%f, %f, %f)\n", x->data.F64[i], y->data.F64[i], yErr->data.F64[i]);
    762744    // }
    763 
    764     // XXX: Some of these are redundant.
    765     PS_CHECK_NULL_1DPOLY(myPoly);
    766     PS_CHECK_NULL_VECTOR(y);
    767     PS_CHECK_EMPTY_VECTOR(y);
    768     PS_CHECK_EMPTY_VECTOR(x);
    769     PS_CHECK_NULL_VECTOR(yErr);
    770     PS_CHECK_EMPTY_VECTOR(yErr);
    771     PS_CHECK_VECTOR_SIZE_EQUAL(x, y);
    772     PS_CHECK_VECTOR_SIZE_EQUAL(y, yErr);
    773745
    774746    A = psImageAlloc(polyOrder, polyOrder, PS_TYPE_F64);
     
    949921increases, or x is too large.  If thst does not work, expand in the other
    950922direction.
     923 
     924XXX: This is F32 only
    951925 *****************************************************************************/
    952926psVector *p_psDetermineBracket(psVector *params,
     
    11281102XXX: This routine is not very efficient in terms of total evaluations of the
    11291103function.
     1104XXX: This is F32 only
    11301105 *****************************************************************************/
    11311106float p_psLineMin(psMinimization *min,
     
    15011476This functions uses global variables to receive the function pointer, the
    15021477data values, and the data errors.
     1478XXX: This is F32 only
    15031479 *****************************************************************************/
    15041480float myPowellChi2Func(const psVector *params,
Note: See TracChangeset for help on using the changeset viewer.