| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A histogram is defined by the following struct,
size_t n
double * range
double * bin
bin[i] corresponds to range[i] <= x < range[i+1] |
Here is a diagram of the correspondence between ranges and bins on the number-line for x,
[ bin[0] )[ bin[1] )[ bin[2] )[ bin[3] )[ bin[5] )
---|---------|---------|---------|---------|---------|--- x
r[0] r[1] r[2] r[3] r[4] r[5]
|
[" denotes an inclusive lower bound
(
r <= x), and the round parentheses ")" on the right-hand
side denote an exclusive upper bound (x < r). Thus any samples
which fall on the upper end of the histogram are excluded. If you want
to include this value for the last bin you will need to add an extra bin
to your histogram.
The gsl_histogram struct and its associated functions are defined
in the header file `gsl_histogram.h'.