82 LR_bin *ptr = (
void *) NULL;
91 if (!(ptr->
bdrs = (
double *) calloc(n,
sizeof(
double))))
94 if (!(ptr->
bins = (
long *) calloc(n,
sizeof(
long))))
100 free((
void *) ptr->
bdrs);
104 return (
void *) NULL;
118 free((
void *) (*b)->bins);
119 free((
void *) (*b)->bdrs);
140 if (b->
n < b->
nn + 1) {
145 for (
int i = 0, i1 = 1; i <= b->
nn; i++,i1++) {
184 while (i <= b->nn - 1) {
#define LRerr_TooManyValues
int LR_bin_rm(LR_bin **b)
LR_bin_rm(LR_bin **b) - remove binning object.
int LR_bin_add(LR_bin *b, double x)
LR_bin_add(LR_bin *b, double x) - collect value to be binned.
#define LRerr_InvalidRange
LR_bin * LR_bin_new(int n)
LR_bin_new(LR_data_type d, int n) - create new binning object.
the binning object - for tallying results
The LibRan common header file.
#define LRerr_InvalidInputValue
int LR_bin_set(LR_bin *b, double x)
LR_bin_set(LR_bin *b, double x) - add bin boundary.