Construct a callable piecewise-linear CDF from a pair of arrays.
Take a pair of arrays in the format returned by fold_intervals and make a callable cumulative distribution function on the interval (0,1).
- breaksarray of floats of length N
The boundaries of successive intervals.
- totalsarray of floats of length N-1
The weight for each interval.
A cumulative distribution function corresponding to the piecewise-constant probability distribution given by breaks, weights