IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 17, 2006, 3:20:10 PM (20 years ago)
Author:
Paul Price
Message:

Updating stats tests, following update to psStats.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/math/tst_psStats00.c

    r6317 r7131  
    33*  @brief Contains tests for psVectorStats with sample mean calculations
    44*
    5 *  We extensively test the code with data type PS_TYPE_F32.  If these pass, we 
     5*  We extensively test the code with data type PS_TYPE_F32.  If these pass, we
    66*  do a much simpler test with data type PS_TYPE_U8, PS_TYPE_U16, PS_TYPE_F64.
    77*
     
    1010*
    1111*  @author GLG, MHPCC
    12 * 
    13 *  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
    14 *  @date $Date: 2006-02-03 01:34:11 $
     12*
     13*  @version $Revision: 1.7 $  $Name: not supported by cvs2svn $
     14*  @date $Date: 2006-05-18 01:20:10 $
    1515*
    1616*  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    8585psS32 testStatsSampleMeanF32(void)
    8686{
    87     psStats*  myStats    = NULL;
    88     psVector* myVector   = NULL;
    89     psVector* maskVector = NULL;
    90     psVector* myErrors   = NULL;
    91     psF64     mean       = 0.0;
    92 
    9387    /*************************************************************************/
    9488    /*  Allocate and initialize data structures                      */
    9589    /*************************************************************************/
    96     myStats = psStatsAlloc(PS_STAT_SAMPLE_MEAN);
    97     myVector = psVectorAlloc(N, PS_TYPE_F32);
     90    psStats *myStats = psStatsAlloc(PS_STAT_SAMPLE_MEAN);
     91    psVector *myVector = psVectorAlloc(N, PS_TYPE_F32);
    9892    myVector->n = N;
    99     myErrors = psVectorAlloc(N, PS_TYPE_F32);
     93    psVector *myErrors = psVectorAlloc(N, PS_TYPE_F32);
    10094    myErrors->n = N;
    101     maskVector = psVectorAlloc(N, PS_TYPE_U8);
     95    psVector *maskVector = psVectorAlloc(N, PS_TYPE_U8);
    10296    maskVector->n = N;
    10397
    104     mean = 0.0;
     98    psF64 mean = 0.0;
    10599    // Set the appropriate values for the vector data.
    106     for (psS32 i = 0; i < N; i++) {
     100    for (long i = 0; i < N; i++) {
    107101        myVector->data.F32[i] =  samplesF32[i];
    108102        myErrors->data.F32[i] =  errorsF32[i];
Note: See TracChangeset for help on using the changeset viewer.