IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 29, 2005, 3:14:13 PM (21 years ago)
Author:
drobbin
Message:

Implemented psMemCheckType functions and tests. Some testing remains unfinished.

File:
1 edited

Legend:

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

    r4620 r4898  
    1414 *      stats->binsize
    1515 *
    16  *  @version $Revision: 1.138 $ $Name: not supported by cvs2svn $
    17  *  @date $Date: 2005-07-27 19:55:16 $
     16 *  @version $Revision: 1.139 $ $Name: not supported by cvs2svn $
     17 *  @date $Date: 2005-08-30 01:14:13 $
    1818 *
    1919 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    17531753static void histogramFree(psHistogram* myHist);
    17541754
     1755static void statsFree(psStats *newStruct)
     1756{
     1757    // There are non dynamic allocated items
     1758}
     1759
    17551760/******************************************************************************
    17561761    psStatsAlloc(): This routine must create a new psStats data structure.
     
    17611766
    17621767    newStruct = (psStats* ) psAlloc(sizeof(psStats));
     1768    psMemSetDeallocator(newStruct, (psFreeFunc)statsFree);
    17631769    newStruct->sampleMean = NAN;
    17641770    newStruct->sampleMedian = NAN;
     
    17871793}
    17881794
     1795
     1796bool psMemCheckStats(psPtr ptr)
     1797{
     1798    return ( psMemGetDeallocator(ptr) == (psFreeFunc)statsFree );
     1799}
     1800
     1801
     1802
    17891803/******************************************************************************
    17901804psHistogramAlloc(lower, upper, n): allocate a uniform histogram structure
     
    18851899    psFree(myHist->nums);
    18861900}
     1901
     1902
     1903bool psMemCheckHistogram(psPtr ptr)
     1904{
     1905    return ( psMemGetDeallocator(ptr) == (psFreeFunc)histogramFree );
     1906}
     1907
     1908
    18871909
    18881910/*****************************************************************************
Note: See TracChangeset for help on using the changeset viewer.