annotate Histogram.h @ 20:cd8275f62ee1

added pure C brch
author Me@portablequad
date Mon, 13 Feb 2012 12:57:42 -0800
parents 32489b8b763c
children
rev   line source
Me@14 1 /*
Me@14 2 * Copyright 2010 OpenSourceStewardshipFoundation.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 #ifndef _HISTOGRAM_H
Me@14 10 #define _HISTOGRAM_H
Me@14 11
Me@14 12 typedef struct
Me@14 13 {
Me@14 14 char *name;
Me@14 15 int32 startOfRange;
Me@14 16 int32 endOfRange;
Me@14 17 int32 numBins;
Me@14 18 int32 binWidth;
Me@14 19 int32 *bins;
Me@14 20 }
Me@14 21 Histogram;
Me@14 22
Me@14 23 typedef struct
Me@14 24 {
Me@14 25 float32 startOfRange;
Me@14 26 float32 endOfRange;
Me@14 27 int32 numBins;
Me@14 28 float32 binWidth;
Me@14 29 int32 *bins;
Me@14 30 }
Me@14 31 FloatHist;
Me@14 32
Me@14 33 typedef struct
Me@14 34 {
Me@14 35 float64 startOfRange;
Me@14 36 float64 endOfRange;
Me@14 37 int32 numBins;
Me@14 38 float64 binWidth;
Me@14 39 int32 *bins;
Me@14 40 }
Me@14 41 DblHist;
Me@14 42
Me@14 43 Histogram *
Me@14 44 makeHistogram( int32 numBins, int32 startOfRange, int32 endOfRange );
Me@14 45
Me@14 46 Histogram *
Me@14 47 makeFixedBinHist( int32 numBins, int32 startOfRange, int32 binWidth,
Me@14 48 char *name );
Me@14 49
Me@14 50 Histogram *
Me@14 51 makeFixedBinHistExt( int32 numBins, int32 startOfRange, int32 binWidth,
Me@14 52 char *name );
Me@14 53
Me@14 54 void inline
Me@14 55 addToHist( int32 value, Histogram *hist );
Me@14 56
Me@14 57 void inline
Me@14 58 addIntervalToHist( uint32 startIntvl, uint32 endIntvl, Histogram *hist );
Me@14 59
Me@14 60 void inline
Me@14 61 subIntervalFromHist( int32 startIntvl, int32 endIntvl, Histogram *hist );
Me@14 62
Me@14 63 void
Me@14 64 saveHistToFile(Histogram *hist);
Me@14 65
Me@14 66 void
Me@14 67 printHist( Histogram *hist );
Me@14 68
Me@14 69 FloatHist *
Me@14 70 makeFloatHistogram( int numBins, float32 startOfRange, float32 binWidth );
Me@14 71
Me@14 72 void
Me@14 73 addToFloatHist( float32 value, FloatHist *hist );
Me@14 74
Me@14 75 void
Me@14 76 printFloatHist( FloatHist *hist );
Me@14 77
Me@14 78 void
Me@14 79 freeHistExt( Histogram *hist );
Me@14 80
Me@14 81 void
Me@14 82 freeHist( Histogram *hist );
Me@14 83
Me@14 84 DblHist *
Me@14 85 makeDblHistogram( int numBins, float64 startOfRange, float64 binWidth );
Me@14 86
Me@14 87 void
Me@14 88 addToDblHist( float64 value, DblHist *hist );
Me@14 89
Me@14 90 void
Me@14 91 printDblHist( DblHist *hist );
Me@14 92
Me@14 93 void
Me@14 94 freeDblHist( DblHist *hist );
Me@14 95
Me@14 96 #endif /* _HISTOGRAM_H */
Me@14 97