IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3502


Ignore:
Timestamp:
Mar 24, 2005, 1:57:13 PM (21 years ago)
Author:
evanalst
Message:

Update vector sample mean test cases to include range and weighted mean.

Location:
trunk/psLib/test/dataManip
Files:
3 edited

Legend:

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

    r2780 r3502  
    1 /*****************************************************************************
    2     This routine must ensure that PS_STAT_SAMPLE_MEAN is correctly computed
    3     by the procedure psArrayStats().
    4  *****************************************************************************/
    5 #include <stdio.h>
     1/** @file  tst_psStats00.c
     2*
     3*  @brief Contains tests for psVectorStats with sample mean calculations
     4*
     5*  @author George Gusciora, MHPCC
     6*
     7*  @version $Revision: 1.16 $  $Name: not supported by cvs2svn $
     8*  @date $Date: 2005-03-24 23:57:13 $
     9*
     10*  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     11*/
     12
    613#include "pslib.h"
    714#include "psTest.h"
    8 #define N 10
    9 
    10 psS32 main()
    11 {
    12     psStats *myStats    = NULL;
    13     psS32 testStatus      = true;
    14     psS32 globalTestStatus = true;
    15     psS32 i               = 0;
    16     psVector *myVector  = NULL;
    17     psVector *maskVector= NULL;
    18     float mean          = 0.0;
    19     float realMeanNoMask   = 0.0;
    20     float realMeanWithMask = 0.0;
    21     psS32 count           = 0;
    22     psS32 currentId       = psMemGetId();
    23     psS32 memLeaks        = 0;
     15
     16#define ERROR_TOL  0.0001
     17#define N 15
     18
     19static psS32 testStatsSampleMeanF32(void);
     20static psS32 testStatsSampleMeanS8(void);
     21static psS32 testStatsSampleMeanU16(void);
     22static psS32 testStatsSampleMeanF64(void);
     23
     24testDescription tests[] = {
     25                              {testStatsSampleMeanF32, 512, "psVectorStats",0,false},
     26                              {testStatsSampleMeanS8, 512, "psVectorStats",0,false},
     27                              {testStatsSampleMeanU16, 512, "psVectorStats",0,false},
     28                              {testStatsSampleMeanF64, 512, "psVectorStats",0,false},
     29                              {NULL}
     30                          };
     31
     32static psF32 samplesF32[N] = { 1.1, 2.2, -3.3, 4.4, 5.5, -6.6, 7.7, 8.8, -9.9, 10.0,
     33                               11.01, -12.02, 13.03, 14.04, -15.05 };
     34static psS8  samplesS8[N]  = {1, 2, -3, 4, 5, -6, 7, 8, -9, 10, 11, -12, 13, 14, -15};
     35static psU16 samplesU16[N] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
     36static psF64 samplesF64[N] = { 1.1, 2.2, -3.3, 4.4, 5.5, -6.6, 7.7, 8.8, -9.9, 10.0,
     37                               11.01, -12.02, 13.03, 14.04, -15.05 };
     38static psF32 errorsF32[N] = { -0.10,  0.11, -0.12,  0.13, -0.14,  0.15, -0.16,  0.17,
     39                              -0.18,  0.19, -0.20,  0.21, -0.22,  0.23, -0.24 };
     40
     41static psF64 expectedMeanNoMaskF32              =  2.060667;
     42static psF64 expectedMeanWithMaskF32            =  2.123846;
     43static psF64 expectedMeanNoMaskS8               =  2.000000;
     44static psF64 expectedMeanNoMaskU16              =  8.000000;
     45static psF64 expectedMeanNoMaskF64              =  2.060667;
     46static psF64 expectedMeanRangeNoMaskF32         =  0.137500;
     47static psF64 expectedMeanRangeWithMaskF32       = -0.366667;
     48static psF64 expectedWeightMeanNoMaskF32        =  1.807210;
     49static psF64 expectedWeightMeanWithMaskF32      =  1.890217;
     50static psF64 expectedWeightMeanNoMaskRangeF32   =  0.640952;
     51static psF64 expectedWeightMeanWithMaskRangeF32 =  0.046574;
     52
     53psS32 main(psS32 argc, char* argv[] )
     54{
     55    psLogSetLevel(PS_LOG_INFO);
     56
     57    return ( ! runTestSuite(stderr, "psVectorStats",tests,argc,argv) );
     58}
     59
     60psS32 testStatsSampleMeanF32(void)
     61{
     62    psStats*  myStats    = NULL;
     63    psVector* myVector   = NULL;
     64    psVector* maskVector = NULL;
     65    psVector* myErrors   = NULL;
     66    psF64     mean       = 0.0;
    2467
    2568    /*************************************************************************/
     
    2972    myVector = psVectorAlloc(N, PS_TYPE_F32);
    3073    myVector->n = N;
     74    myErrors = psVectorAlloc(N, PS_TYPE_F32);
     75    myErrors->n = N;
    3176    maskVector = psVectorAlloc(N, PS_TYPE_U8);
    3277    maskVector->n = N;
    3378
    3479    mean = 0.0;
    35     realMeanWithMask = 0.0;
    3680    // Set the appropriate values for the vector data.
    37     for (i=0;i<N;i++) {
    38         myVector->data.F32[i] = (float) i;
     81    for (psS32 i = 0; i < N; i++) {
     82        myVector->data.F32[i] =  samplesF32[i];
     83        myErrors->data.F32[i] =  errorsF32[i];
    3984    }
    4085
    4186    // Set the mask vector and calculate the expected maximum.
    42     for (i=0;i<N;i++) {
    43         realMeanNoMask+= myVector->data.F32[i];
    44 
    45         if (i < (N/2)) {
     87    for (psS32 i = 0; i < N; i++) {
     88
     89        if (i > 1) {
    4690            maskVector->data.U8[i] = 0;
    47             realMeanWithMask+= myVector->data.F32[i];
    48             count++;
    4991        } else {
    5092            maskVector->data.U8[i] = 1;
     
    5294    }
    5395
    54 
    55     realMeanNoMask /= (float) N;
    56     realMeanWithMask /= (float) count;
    57 
    5896    /*************************************************************************/
    5997    /*  Call psVectorStats() with no vector mask.                    */
    6098    /*************************************************************************/
    61     printPositiveTestHeader(stdout,
    62                             "psStats functions",
    63                             "PS_STAT_SAMPLE_MEAN: no vector mask");
    64 
    65     myStats = psVectorStats(myStats, myVector, NULL, NULL, 0);
    66     mean = myStats->sampleMean;
    67 
    68     printf("Called psVectorStats() on a vector with no elements masked.\n");
    69     printf("The expected mean was %f; the calculated mean was %f\n", realMeanNoMask, mean);
    70     if (mean == realMeanNoMask) {
    71         testStatus = true;
    72     } else {
    73         testStatus = false;
    74         globalTestStatus = false;
    75     }
    76     printFooter(stdout,
    77                 "psVector functions",
    78                 "PS_STAT_SAMPLE_MEAN: no vector mask",
    79                 testStatus);
     99    myStats = psVectorStats(myStats, myVector, NULL, NULL, 0);
     100    mean = myStats->sampleMean;
     101    // Verify return value is as expected
     102    if ( fabs(mean - expectedMeanNoMaskF32) > ERROR_TOL ) {
     103        psError(PS_ERR_UNKNOWN,true,"Returned value %f not as expected %f",
     104                mean, expectedMeanNoMaskF32);
     105        return 1;
     106    }
     107
     108    // Invoke psVectorStats with no vector mask and error vector
     109    myStats = psVectorStats(myStats, myVector, myErrors, NULL, 0);
     110    mean = myStats->sampleMean;
     111    // Verify return value is as expected
     112    if ( fabs(mean - expectedWeightMeanNoMaskF32) > ERROR_TOL ) {
     113        psError(PS_ERR_UNKNOWN,true,"Returned value %f not as expected %f",
     114                mean, expectedWeightMeanNoMaskF32);
     115        return 10;
     116    }
     117
     118    // Invoke psVectorStats with no vector mask and data range
     119    myStats->min = -10.0;
     120    myStats->max =   8.0;
     121    myStats->options = PS_STAT_SAMPLE_MEAN | PS_STAT_USE_RANGE;
     122    myStats = psVectorStats(myStats, myVector, NULL, NULL, 0);
     123    mean = myStats->sampleMean;
     124    // Verify return value is as expected
     125    if ( fabs(mean - expectedMeanRangeNoMaskF32) > ERROR_TOL ) {
     126        psError(PS_ERR_UNKNOWN,true,"Return value %f not as expected %f",
     127                mean, expectedMeanRangeNoMaskF32);
     128        return 2;
     129    }
     130
     131    // Invoke psVectorStats with no vector mask, errors and data range
     132    myStats = psVectorStats(myStats, myVector, myErrors, NULL, 0);
     133    mean = myStats->sampleMean;
     134    // Verify return value is as expected
     135    if ( fabs(mean - expectedWeightMeanNoMaskRangeF32) > ERROR_TOL) {
     136        psError(PS_ERR_UNKNOWN,true,"Return value %f not as expected %f",
     137                mean, expectedWeightMeanNoMaskRangeF32);
     138        return 20;
     139    }
     140    myStats->options = PS_STAT_SAMPLE_MEAN;
    80141
    81142    /*************************************************************************/
    82143    /*  Call psVectorStats() with vector mask=1.                             */
    83144    /*************************************************************************/
    84     printPositiveTestHeader(stdout,
    85                             "psStats functions",
    86                             "PS_STAT_SAMPLE_MEAN: with vector mask=1");
    87 
    88145    myStats = psVectorStats(myStats, myVector, NULL, maskVector, 1);
    89146    mean = myStats->sampleMean;
    90     printf("Called psVectorStats() on a vector with last N/2 elements masked.\n");
    91     printf("The expected mean was %f; the calculated mean was %f\n", realMeanWithMask, mean);
    92     if (mean == realMeanWithMask) {
    93         testStatus = true;
    94     } else {
    95         testStatus = false;
    96         globalTestStatus = false;
    97     }
    98 
    99     printFooter(stdout,
    100                 "psVector functions",
    101                 "PS_STAT_SAMPLE_MEAN: with vector mask=1",
    102                 testStatus);
     147    if ( fabs(mean - expectedMeanWithMaskF32) > ERROR_TOL ) {
     148        psError(PS_ERR_UNKNOWN,true,"Returned value %f not as expected %f",
     149                mean, expectedMeanWithMaskF32);
     150        return 3;
     151    }
     152
     153    // Invoke psVectorStats with vector mask and error vector
     154    myStats = psVectorStats(myStats, myVector, myErrors, maskVector, 1);
     155    mean = myStats->sampleMean;
     156    if ( fabs(mean - expectedWeightMeanWithMaskF32) > ERROR_TOL ) {
     157        psError(PS_ERR_UNKNOWN,true,"Returned value %f not as expected %f",
     158                mean, expectedWeightMeanWithMaskF32);
     159        return 30;
     160    }
     161
     162    // Invoke psVectorStats with vector mask and data range
     163    myStats->options = PS_STAT_SAMPLE_MEAN | PS_STAT_USE_RANGE;
     164    myStats = psVectorStats(myStats, myVector, NULL, maskVector, 1);
     165    mean = myStats->sampleMean;
     166    // Verify return value is as expected
     167    if ( fabs(mean - expectedMeanRangeWithMaskF32) > ERROR_TOL ) {
     168        psError(PS_ERR_UNKNOWN,true,"Return value %f not as expected %f",
     169                mean, expectedMeanRangeWithMaskF32);
     170        return 4;
     171    }
     172
     173    // Invoke psVectorStats with vector mask, errors, and data range
     174    myStats = psVectorStats(myStats, myVector, myErrors, maskVector, 1);
     175    mean = myStats->sampleMean;
     176    // Verify return value is as expected
     177    if ( fabs(mean - expectedWeightMeanWithMaskRangeF32) > ERROR_TOL ) {
     178        psError(PS_ERR_UNKNOWN,true,"Return value %f not as expected %f",
     179                mean, expectedWeightMeanWithMaskRangeF32);
     180        return 40;
     181    }
     182    myStats->options = PS_STAT_SAMPLE_MEAN;
    103183
    104184    /*************************************************************************/
    105185    /*  Call psVectorStats() with vector mask=2.                             */
    106186    /*************************************************************************/
    107     printPositiveTestHeader(stdout,
    108                             "psStats functions",
    109                             "PS_STAT_SAMPLE_MEAN: with vector mask=2");
    110 
    111187    // Set the mask vector and calculate the expected maximum.
    112188    // Set the mask vector.
    113     for (i=0;i<N;i++) {
     189    for (psS32 i = 0; i < N; i++) {
    114190        if (maskVector->data.U8[i] == 1) {
    115191            maskVector->data.U8[i] = 2;
    116192        }
    117193    }
    118 
    119194    myStats = psVectorStats(myStats, myVector, NULL, maskVector, 2);
    120195    mean = myStats->sampleMean;
    121     printf("Called psVectorStats() on a vector with last N/2 elements masked.\n");
    122     printf("The expected mean was %f; the calculated mean was %f\n", realMeanWithMask, mean);
    123     if (mean == realMeanWithMask) {
    124         testStatus = true;
    125     } else {
    126         testStatus = false;
    127         globalTestStatus = false;
    128     }
    129 
    130     printFooter(stdout,
    131                 "psVector functions",
    132                 "PS_STAT_SAMPLE_MEAN: with vector mask=2",
    133                 testStatus);
     196    if (fabs(mean - expectedMeanWithMaskF32) > ERROR_TOL )  {
     197        psError(PS_ERR_UNKNOWN,true,"Returned value %f not as expected %f",
     198                mean,expectedMeanWithMaskF32);
     199        return 5;
     200    }
    134201
    135202    /*************************************************************************/
    136203    /*  Call psVectorStats() with vector mask=3.                             */
    137204    /*************************************************************************/
    138     printPositiveTestHeader(stdout,
    139                             "psStats functions",
    140                             "PS_STAT_SAMPLE_MEAN: with vector mask=3");
    141 
    142205    // Set the mask vector and calculate the expected maximum.
    143206    // Set the mask vector.
    144     for (i=0;i<N;i++) {
     207    for (psS32 i = 0; i < N; i++) {
    145208        if (maskVector->data.U8[i] == 2) {
    146209            maskVector->data.U8[i] = 3;
    147210        }
    148211    }
    149 
    150     myStats = psVectorStats(myStats, myVector, NULL, maskVector, 3);
    151     mean = myStats->sampleMean;
    152     printf("Called psVectorStats() on a vector with last N/2 elements masked.\n");
    153     printf("The expected mean was %f; the calculated mean was %f\n", realMeanWithMask, mean);
    154     if (mean == realMeanWithMask) {
    155         testStatus = true;
    156     } else {
    157         testStatus = false;
    158         globalTestStatus = false;
    159     }
    160 
    161     printFooter(stdout,
    162                 "psVector functions",
    163                 "PS_STAT_SAMPLE_MEAN: with vector mask=3",
    164                 testStatus);
     212    myStats = psVectorStats(myStats, myVector, NULL, maskVector, 4);
     213    mean = myStats->sampleMean;
     214    if (fabs(mean - expectedMeanNoMaskF32) > ERROR_TOL ) {
     215        psError(PS_ERR_UNKNOWN,true,"Return value %f not as expected %f",
     216                mean,expectedMeanNoMaskF32);
     217        return 6;
     218    }
     219
     220    // Mask all values and verify return is NAN
     221    for(psS32 i = 0; i < N; i++) {
     222        maskVector->data.U8[i] = 1;
     223    }
     224    psLogMsg(__func__,PS_LOG_INFO,"Following should generate warning message");
     225    myStats = psVectorStats(myStats, myVector, NULL, maskVector, 1);
     226    mean = myStats->sampleMean;
     227    if( !isnan(mean) ) {
     228        psError(PS_ERR_UNKNOWN,true,"Did not return NAN with all values masked");
     229        return 7;
     230    }
    165231
    166232    /*************************************************************************/
    167233    /*  Call psVectorStats() with NULL inputs.                               */
    168234    /*************************************************************************/
    169 
    170     printPositiveTestHeader(stdout,
    171                             "psStats functions",
    172                             "PS_STAT_SAMPLE_MEAN: NULL inputs");
    173 
    174235    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message.");
    175236    if( psVectorStats(myStats, NULL, NULL, NULL, 0) != myStats ) {
    176237        psError(PS_ERR_UNKNOWN,true,"psVectorStats did not return stats when input NULL");
    177         return 10;
     238        return 8;
    178239    }
    179240    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message.");
     
    181242    if ( myStats2 != NULL ) {
    182243        psError(PS_ERR_UNKNOWN,true,"psVectorStats did not return NULL");
    183         return 20;
    184     }
    185     printFooter(stdout,
    186                 "psVector functions",
    187                 "PS_STAT_SAMPLE_MEAN: NULL inputs",
    188                 testStatus);
     244        return 9;
     245    }
    189246
    190247    /*************************************************************************/
    191248    /*  Deallocate data structures                                           */
    192249    /*************************************************************************/
    193     printPositiveTestHeader(stdout,
    194                             "psStats functions",
    195                             "psStats(): deallocating memory");
    196 
    197250    psFree(myStats);
    198251    psFree(myVector);
     252    psFree(myErrors);
    199253    psFree(maskVector);
    200 
    201     psMemCheckCorruption(1);
    202     memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
    203     if (0 != memLeaks) {
    204         psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
    205     }
    206254    psFree(myStats2);
    207255
    208     printFooter(stdout,
    209                 "psVector functions",
    210                 "psStats(): deallocating memory",
    211                 testStatus);
    212 
    213     return (!globalTestStatus);
    214 }
     256    return 0;
     257}
     258
     259psS32 testStatsSampleMeanS8(void)
     260{
     261    psStats*  myStats  = NULL;
     262    psVector* myVector = NULL;
     263    psF64     mean     = 0.0;
     264
     265    /*************************************************************************/
     266    /*  Allocate and initialize data structures                      */
     267    /*************************************************************************/
     268    myStats = psStatsAlloc(PS_STAT_SAMPLE_MEAN);
     269    myVector = psVectorAlloc(N, PS_TYPE_S8);
     270    myVector->n = N;
     271
     272    mean = 0.0;
     273    // Set the appropriate values for the vector data.
     274    for (psS32 i = 0; i < N; i++) {
     275        myVector->data.S8[i] =  samplesS8[i];
     276    }
     277
     278    /*************************************************************************/
     279    /*  Call psVectorStats() with no vector mask.                    */
     280    /*************************************************************************/
     281    myStats = psVectorStats(myStats, myVector, NULL, NULL, 0);
     282    mean = myStats->sampleMean;
     283    // Verify return value is as expected
     284    if ( fabs(mean - expectedMeanNoMaskS8) > ERROR_TOL ) {
     285        psError(PS_ERR_UNKNOWN,true,"Returned value %f not as expected %f",
     286                mean, expectedMeanNoMaskS8);
     287        return 1;
     288    }
     289
     290    /*************************************************************************/
     291    /*  Deallocate data structures                                           */
     292    /*************************************************************************/
     293    psFree(myStats);
     294    psFree(myVector);
     295
     296    return 0;
     297}
     298
     299psS32 testStatsSampleMeanU16(void)
     300{
     301    psStats*  myStats  = NULL;
     302    psVector* myVector = NULL;
     303    psF64     mean     = 0.0;
     304
     305    /*************************************************************************/
     306    /*  Allocate and initialize data structures                      */
     307    /*************************************************************************/
     308    myStats = psStatsAlloc(PS_STAT_SAMPLE_MEAN);
     309    myVector = psVectorAlloc(N, PS_TYPE_U16);
     310    myVector->n = N;
     311
     312    mean = 0.0;
     313    // Set the appropriate values for the vector data.
     314    for (psS32 i = 0; i < N; i++) {
     315        myVector->data.U16[i] =  samplesU16[i];
     316    }
     317
     318    /*************************************************************************/
     319    /*  Call psVectorStats() with no vector mask.                    */
     320    /*************************************************************************/
     321    myStats = psVectorStats(myStats, myVector, NULL, NULL, 0);
     322    mean = myStats->sampleMean;
     323    // Verify return value is as expected
     324    if ( fabs(mean - expectedMeanNoMaskU16) > ERROR_TOL ) {
     325        psError(PS_ERR_UNKNOWN,true,"Returned value %f not as expected %f",
     326                mean, expectedMeanNoMaskU16);
     327        return 1;
     328    }
     329
     330    /*************************************************************************/
     331    /*  Deallocate data structures                                           */
     332    /*************************************************************************/
     333    psFree(myStats);
     334    psFree(myVector);
     335
     336    return 0;
     337}
     338
     339psS32 testStatsSampleMeanF64(void)
     340{
     341    psStats*  myStats  = NULL;
     342    psVector* myVector = NULL;
     343    psF64     mean     = 0.0;
     344
     345    /*************************************************************************/
     346    /*  Allocate and initialize data structures                      */
     347    /*************************************************************************/
     348    myStats = psStatsAlloc(PS_STAT_SAMPLE_MEAN);
     349    myVector = psVectorAlloc(N, PS_TYPE_F64);
     350    myVector->n = N;
     351
     352    mean = 0.0;
     353    // Set the appropriate values for the vector data.
     354    for (psS32 i = 0; i < N; i++) {
     355        myVector->data.F64[i] =  samplesF64[i];
     356    }
     357
     358    /*************************************************************************/
     359    /*  Call psVectorStats() with no vector mask.                    */
     360    /*************************************************************************/
     361    myStats = psVectorStats(myStats, myVector, NULL, NULL, 0);
     362    mean = myStats->sampleMean;
     363    // Verify return value is as expected
     364    if ( fabs(mean - expectedMeanNoMaskF64) > ERROR_TOL ) {
     365        psError(PS_ERR_UNKNOWN,true,"Returned value %f not as expected %f",
     366                mean, expectedMeanNoMaskF64);
     367        return 1;
     368    }
     369
     370    /*************************************************************************/
     371    /*  Deallocate data structures                                           */
     372    /*************************************************************************/
     373    psFree(myStats);
     374    psFree(myVector);
     375
     376    return 0;
     377}
     378
  • trunk/psLib/test/dataManip/verified/tst_psStats00.stderr

    r3127 r3502  
    1 <DATE><TIME>|<HOST>|I|main
     1/***************************** TESTPOINT ******************************************\
     2*             TestFile: tst_psStats00.c                                            *
     3*            TestPoint: psVectorStats{psVectorStats}                               *
     4*             TestType: Positive                                                   *
     5\**********************************************************************************/
     6
     7<DATE><TIME>|<HOST>|I|testStatsSampleMeanF32
     8    Following should generate warning message
     9<DATE><TIME>|<HOST>|W|psVectorStats
     10    WARNING: psVectorStats(): p_psVectorSampleMean() returned an error.
     11<DATE><TIME>|<HOST>|I|testStatsSampleMeanF32
    212    Following should generate an error message.
    313<DATE><TIME>|<HOST>|E|psVectorStats (FILE:LINENO)
    414    Unallowable operation: psVector in or its data is NULL.
    5 <DATE><TIME>|<HOST>|I|main
     15<DATE><TIME>|<HOST>|I|testStatsSampleMeanF32
    616    Following should generate an error message.
    717<DATE><TIME>|<HOST>|E|psVectorStats (FILE:LINENO)
    818    Unallowable operation: stats is NULL.
     19
     20---> TESTPOINT PASSED (psVectorStats{psVectorStats} | tst_psStats00.c)
     21
     22/***************************** TESTPOINT ******************************************\
     23*             TestFile: tst_psStats00.c                                            *
     24*            TestPoint: psVectorStats{psVectorStats}                               *
     25*             TestType: Positive                                                   *
     26\**********************************************************************************/
     27
     28
     29---> TESTPOINT PASSED (psVectorStats{psVectorStats} | tst_psStats00.c)
     30
     31/***************************** TESTPOINT ******************************************\
     32*             TestFile: tst_psStats00.c                                            *
     33*            TestPoint: psVectorStats{psVectorStats}                               *
     34*             TestType: Positive                                                   *
     35\**********************************************************************************/
     36
     37
     38---> TESTPOINT PASSED (psVectorStats{psVectorStats} | tst_psStats00.c)
     39
     40/***************************** TESTPOINT ******************************************\
     41*             TestFile: tst_psStats00.c                                            *
     42*            TestPoint: psVectorStats{psVectorStats}                               *
     43*             TestType: Positive                                                   *
     44\**********************************************************************************/
     45
     46
     47---> TESTPOINT PASSED (psVectorStats{psVectorStats} | tst_psStats00.c)
     48
  • trunk/psLib/test/dataManip/verified/tst_psStats00.stdout

    r1034 r3502  
    1 /***************************** TESTPOINT ******************************************\
    2 *             TestFile: tst_psStats00.c                                            *
    3 *            TestPoint: psStats functions{PS_STAT_SAMPLE_MEAN: no vector mask}     *
    4 *             TestType: Positive                                                   *
    5 \**********************************************************************************/
    6 
    7 Called psVectorStats() on a vector with no elements masked.
    8 The expected mean was 4.500000; the calculated mean was 4.500000
    9 
    10 ---> TESTPOINT PASSED (psVector functions{PS_STAT_SAMPLE_MEAN: no vector mask} | tst_psStats00.c)
    11 
    12 /***************************** TESTPOINT ******************************************\
    13 *             TestFile: tst_psStats00.c                                            *
    14 *            TestPoint: psStats functions{PS_STAT_SAMPLE_MEAN: with vector mask=1} *
    15 *             TestType: Positive                                                   *
    16 \**********************************************************************************/
    17 
    18 Called psVectorStats() on a vector with last N/2 elements masked.
    19 The expected mean was 2.000000; the calculated mean was 2.000000
    20 
    21 ---> TESTPOINT PASSED (psVector functions{PS_STAT_SAMPLE_MEAN: with vector mask=1} | tst_psStats00.c)
    22 
    23 /***************************** TESTPOINT ******************************************\
    24 *             TestFile: tst_psStats00.c                                            *
    25 *            TestPoint: psStats functions{PS_STAT_SAMPLE_MEAN: with vector mask=2} *
    26 *             TestType: Positive                                                   *
    27 \**********************************************************************************/
    28 
    29 Called psVectorStats() on a vector with last N/2 elements masked.
    30 The expected mean was 2.000000; the calculated mean was 2.000000
    31 
    32 ---> TESTPOINT PASSED (psVector functions{PS_STAT_SAMPLE_MEAN: with vector mask=2} | tst_psStats00.c)
    33 
    34 /***************************** TESTPOINT ******************************************\
    35 *             TestFile: tst_psStats00.c                                            *
    36 *            TestPoint: psStats functions{PS_STAT_SAMPLE_MEAN: with vector mask=3} *
    37 *             TestType: Positive                                                   *
    38 \**********************************************************************************/
    39 
    40 Called psVectorStats() on a vector with last N/2 elements masked.
    41 The expected mean was 2.000000; the calculated mean was 2.000000
    42 
    43 ---> TESTPOINT PASSED (psVector functions{PS_STAT_SAMPLE_MEAN: with vector mask=3} | tst_psStats00.c)
    44 
    45 /***************************** TESTPOINT ******************************************\
    46 *             TestFile: tst_psStats00.c                                            *
    47 *            TestPoint: psStats functions{PS_STAT_SAMPLE_MEAN: NULL inputs}        *
    48 *             TestType: Positive                                                   *
    49 \**********************************************************************************/
    50 
    51 
    52 ---> TESTPOINT PASSED (psVector functions{PS_STAT_SAMPLE_MEAN: NULL inputs} | tst_psStats00.c)
    53 
    54 /***************************** TESTPOINT ******************************************\
    55 *             TestFile: tst_psStats00.c                                            *
    56 *            TestPoint: psStats functions{psStats(): deallocating memory}          *
    57 *             TestType: Positive                                                   *
    58 \**********************************************************************************/
    59 
    60 
    61 ---> TESTPOINT PASSED (psVector functions{psStats(): deallocating memory} | tst_psStats00.c)
    62 
Note: See TracChangeset for help on using the changeset viewer.