Mercurial > cgi-bin > hgwebdir.cgi > VMS > C_Libraries > Histogram
comparison DblHist.c @ 17:530cf0046063
changed brch tag filename
| author | Me@portablequad |
|---|---|
| date | Mon, 13 Feb 2012 10:33:05 -0800 |
| parents | 32489b8b763c |
| children | cd8275f62ee1 5d1597d9b24a |
comparison
equal
deleted
inserted
replaced
| 5:2399bbf3bb6d | 6:75b14137c463 |
|---|---|
| 26 makeDblHistogram( int32 numBins, float64 startOfRange, float64 binWidth ) | 26 makeDblHistogram( int32 numBins, float64 startOfRange, float64 binWidth ) |
| 27 { | 27 { |
| 28 DblHist *hist; | 28 DblHist *hist; |
| 29 int i; | 29 int i; |
| 30 | 30 |
| 31 hist = VMS__malloc( sizeof(DblHist) ); | 31 hist = VMS_int__malloc( sizeof(DblHist) ); |
| 32 hist->bins = VMS__malloc( numBins * sizeof(int) ); | 32 hist->bins = VMS_int__malloc( numBins * sizeof(int) ); |
| 33 | 33 |
| 34 hist->numBins = numBins; | 34 hist->numBins = numBins; |
| 35 hist->binWidth = binWidth; | 35 hist->binWidth = binWidth; |
| 36 hist->endOfRange = startOfRange + hist->binWidth * numBins; | 36 hist->endOfRange = startOfRange + hist->binWidth * numBins; |
| 37 hist->startOfRange = startOfRange; | 37 hist->startOfRange = startOfRange; |
| 100 | 100 |
| 101 | 101 |
| 102 void | 102 void |
| 103 freeDblHist( DblHist *hist ) | 103 freeDblHist( DblHist *hist ) |
| 104 { | 104 { |
| 105 VMS__free( hist->bins ); | 105 VMS_int__free( hist->bins ); |
| 106 VMS__free( hist ); | 106 VMS_int__free( hist ); |
| 107 } | 107 } |
