The inform_dist API could stand to have a few additional functions.
Proposed API
// Accumulate observations from an array of events and return the number of observations made.
EXPORT size_t inform_dist_accumulate(inform_dist *dist, size_t *events, size_t n);
Example Usage
inform_dist *dist = inform_dist_alloc(2);
size_t events[5] = {0,1,1,0,1,0};
size_t n = inform_dist_accumulate(dist, events, 5);
if (n != 5)
{
fprintf(stderr, "invalid event at index %ld\n", n);
}
The
inform_dist
API could stand to have a few additional functions.Proposed API
Example Usage