Stats.BinningSourceBinning finitely supported distributions
The type of binning specifications (shape of the grid, etc)
regular ~origin ~width ~truncate specifies a regular grid with cells aligned on origin and spaced by width. Cells are indexed, with the cell [origin, origin+width] having index 0. If truncate is equal to Some (l, r), the points outside of the (inclusive) [l, r] interval will be discarded.
from_measure spec mes bins the mesure on the grid specified by spec. After binning, the measure is supported by cell indices corresponding to the specification.
from_empirical spec arr bins the array on the grid specified by spec. After binning, the measure is supported by cell indices corresponding to the specification.
map_to_bin spec x maps x to its cell as specified by spec. Returns None if the point is out of the range of spec.