Mercurial > cgi-bin > hgwebdir.cgi > VMS > C_Libraries > Histogram
view Histogram.h @ 3:3d35477a5121
This branch has replace malloc and free with VMS__malloc and VMS__free
| author | Me |
|---|---|
| date | Sun, 31 Oct 2010 20:22:29 -0700 |
| parents | dbb58ebfd690 |
| children | a2388fae93ff |
line source
1 /*
2 * Copyright 2010 OpenSourceStewardshipFoundation.org
3 * Licensed under GNU General Public License version 2
4 *
5 * Author: seanhalle@yahoo.com
6 *
7 */
9 #include "../VMS_primitive_data_types.h"
11 #ifndef _HISTOGRAM_H
12 #define _HISTOGRAM_H
14 typedef struct
15 {
16 int startOfRange;
17 int endOfRange;
18 int numBins;
19 int binWidth;
20 int *bins;
21 }
22 Histogram;
24 typedef struct
25 {
26 float32 startOfRange;
27 float32 endOfRange;
28 int numBins;
29 float32 binWidth;
30 int *bins;
31 }
32 FloatHist;
34 typedef struct
35 {
36 float64 startOfRange;
37 float64 endOfRange;
38 int numBins;
39 float64 binWidth;
40 int *bins;
41 }
42 DblHist;
44 Histogram *
45 makeHistogram( int numBins, int startOfRange, int endOfRange );
47 void
48 addToHist( int value, Histogram *hist );
50 void
51 printHist( Histogram *hist );
53 FloatHist *
54 makeFloatHistogram( int numBins, float32 startOfRange, float32 binWidth );
56 void
57 addToFloatHist( float32 value, FloatHist *hist );
59 void
60 printFloatHist( FloatHist *hist );
63 DblHist *
64 makeDblHistogram( int numBins, float64 startOfRange, float64 binWidth );
66 void
67 addToDblHist( float64 value, DblHist *hist );
69 void
70 printDblHist( DblHist *hist );
72 #endif /* _HISTOGRAM_H */
