package binning
A datastructure to accumulate values in bins
Install
Dune Dependency
Authors
Maintainers
Sources
binning-v0.0.0.tbz
sha256=786fb172db1b73b950e6914e52d27cae3356ff4ea0ca0c0b003abbc9cf187ff7
sha512=27f449c32a308cf03318a2ccbcefaeafd6730c8f8c80d91038ea4f8fd34721a564fa9b2d1c12b7dae989a4076f2b3c97cc8dc36046405703fe0ba152e6ef10ad
Description
This library is useful for counting elements by categories, constructing relations and transposing them. Binning are constructed from streams of values. A binning can be seen as a generalized histogram: values are mapped to bins, and each bin keeps a summary value that is updated when an element is added (like a count, the list of elements, their mean, etc).
Published: 11 Oct 2020
README
Binning
A tiny library to count objects (for histograms) or sort them by category (build an association or relation). Here is a typical use:
let histogram xs =
List.to_seq xs
|> Binning.counts
|> List.of_seq
(* val histogram : 'a list -> ('a * int) list = <fun> *)
Installation
opam install binning
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page