annotate Histogram.h @ 34:8166ea441cb5

changed headers and PR_int__malloc to PR__malloc
author Sean Halle <seanhalle@yahoo.com>
date Tue, 23 Jul 2013 07:32:47 -0700
parents bd0983657058
children
rev   line source
Me@14 1 /*
seanhalle@31 2 * Copyright 2010 OpenSourceResearchInstitute.org
Me@14 3 * Licensed under GNU General Public License version 2
Me@14 4 *
Me@14 5 * Author: seanhalle@yahoo.com
Me@14 6 *
Me@14 7 */
Me@14 8
Me@14 9
Me@14 10 #ifndef _HISTOGRAM_H
Me@14 11 #define _HISTOGRAM_H
Me@14 12
seanhalle@34 13 #include "PR__common_includes/PR__primitive_data_types.h"
seanhalle@34 14
seanhalle@34 15
Me@14 16 typedef struct
Me@14 17 {
Me@14 18 char *name;
Me@14 19 int32 startOfRange;
Me@14 20 int32 endOfRange;
Me@14 21 int32 numBins;
Me@14 22 int32 binWidth;
Me@14 23 int32 *bins;
Me@14 24 }
Me@14 25 Histogram;
Me@14 26
Me@14 27 typedef struct
Me@14 28 {
Me@14 29 float32 startOfRange;
Me@14 30 float32 endOfRange;
Me@14 31 int32 numBins;
Me@14 32 float32 binWidth;
Me@14 33 int32 *bins;
Me@14 34 }
Me@14 35 FloatHist;
Me@14 36
Me@14 37 typedef struct
Me@14 38 {
Me@14 39 float64 startOfRange;
Me@14 40 float64 endOfRange;
Me@14 41 int32 numBins;
Me@14 42 float64 binWidth;
Me@14 43 int32 *bins;
Me@14 44 }
Me@14 45 DblHist;
Me@14 46
Me@14 47 Histogram *
Me@14 48 makeHistogram( int32 numBins, int32 startOfRange, int32 endOfRange );
Me@14 49
Me@14 50 Histogram *
Me@14 51 makeFixedBinHist( int32 numBins, int32 startOfRange, int32 binWidth,
Me@14 52 char *name );
Me@14 53
Me@14 54 Histogram *
Me@14 55 makeFixedBinHistExt( int32 numBins, int32 startOfRange, int32 binWidth,
Me@14 56 char *name );
Me@14 57
Me@14 58 void inline
Me@14 59 addToHist( int32 value, Histogram *hist );
Me@14 60
Me@14 61 void inline
Me@14 62 addIntervalToHist( uint32 startIntvl, uint32 endIntvl, Histogram *hist );
Me@14 63
Me@14 64 void inline
Me@14 65 subIntervalFromHist( int32 startIntvl, int32 endIntvl, Histogram *hist );
Me@14 66
Me@14 67 void
Me@14 68 saveHistToFile(Histogram *hist);
Me@14 69
Me@14 70 void
Me@14 71 printHist( Histogram *hist );
Me@14 72
Me@14 73 FloatHist *
Me@14 74 makeFloatHistogram( int numBins, float32 startOfRange, float32 binWidth );
Me@14 75
Me@14 76 void
Me@14 77 addToFloatHist( float32 value, FloatHist *hist );
Me@14 78
Me@14 79 void
Me@14 80 printFloatHist( FloatHist *hist );
Me@14 81
Me@14 82 void
Me@14 83 freeHistExt( Histogram *hist );
Me@14 84
Me@14 85 void
Me@14 86 freeHist( Histogram *hist );
Me@14 87
Me@14 88 DblHist *
Me@14 89 makeDblHistogram( int numBins, float64 startOfRange, float64 binWidth );
Me@14 90
Me@14 91 void
Me@14 92 addToDblHist( float64 value, DblHist *hist );
Me@14 93
Me@14 94 void
Me@14 95 printDblHist( DblHist *hist );
Me@14 96
Me@14 97 void
Me@14 98 freeDblHist( DblHist *hist );
Me@14 99
Me@14 100 #endif /* _HISTOGRAM_H */
Me@14 101