There are two ways to access histogram bins, either by specifying an @math{x} coordinate or by using the bin-index directly. The functions for accessing the histogram through @math{x} coordinates use a binary search to identify the bin which covers the appropriate range.
If x lies in the valid range of the histogram then the function
returns zero to indicate success. If x is less than the lower
limit of the histogram then the function returns GSL_EDOM
, and
none of bins are modified. Similarly, if the value of x is greater
than or equal to the upper limit of the histogram then the function
returns GSL_EDOM
, and none of the bins are modified. The error
handler is not called, however, since it is often necessary to compute
histogram for a small range of a larger dataset, ignoring the values
outside the range of interest.
gsl_histogram_increment
but increases
the value of the appropriate bin in the histogram h by the
floating-point number weight.
GSL_EDOM
and the function returns 0.
GSL_EDOM
.
gsl_histogram
struct directly.