Mercurial > cgi-bin > hgwebdir.cgi > VMS > C_Libraries > Histogram
diff Histogram.h @ 6:a2388fae93ff
Merge addInterval version with VMS__malloc version
| author | SeanHalle |
|---|---|
| date | Thu, 11 Nov 2010 05:45:08 -0800 |
| parents | 13b8591dd045 06128e387cfa |
| children | fa6a281bd854 |
line diff
1.1 --- a/Histogram.h Thu Nov 11 05:37:07 2010 -0800 1.2 +++ b/Histogram.h Thu Nov 11 05:45:08 2010 -0800 1.3 @@ -6,6 +6,7 @@ 1.4 * 1.5 */ 1.6 1.7 +#include "../VMS_primitive_data_types.h" 1.8 1.9 #ifndef _HISTOGRAM_H 1.10 #define _HISTOGRAM_H 1.11 @@ -20,6 +21,26 @@ 1.12 } 1.13 Histogram; 1.14 1.15 +typedef struct 1.16 + { 1.17 + float32 startOfRange; 1.18 + float32 endOfRange; 1.19 + int numBins; 1.20 + float32 binWidth; 1.21 + int *bins; 1.22 + } 1.23 +FloatHist; 1.24 + 1.25 +typedef struct 1.26 + { 1.27 + float64 startOfRange; 1.28 + float64 endOfRange; 1.29 + int numBins; 1.30 + float64 binWidth; 1.31 + int *bins; 1.32 + } 1.33 +DblHist; 1.34 + 1.35 Histogram * 1.36 makeHistogram( int32 numBins, int32 startOfRange, int32 endOfRange ); 1.37 1.38 @@ -32,5 +53,24 @@ 1.39 void 1.40 printHist( Histogram *hist ); 1.41 1.42 +FloatHist * 1.43 +makeFloatHistogram( int numBins, float32 startOfRange, float32 binWidth ); 1.44 + 1.45 +void 1.46 +addToFloatHist( float32 value, FloatHist *hist ); 1.47 + 1.48 +void 1.49 +printFloatHist( FloatHist *hist ); 1.50 + 1.51 + 1.52 +DblHist * 1.53 +makeDblHistogram( int numBins, float64 startOfRange, float64 binWidth ); 1.54 + 1.55 +void 1.56 +addToDblHist( float64 value, DblHist *hist ); 1.57 + 1.58 +void 1.59 +printDblHist( DblHist *hist ); 1.60 + 1.61 #endif /* _HISTOGRAM_H */ 1.62
