package biocaml
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=fae219e66db06f81f3fd7d9e44717ccf2d6d85701adb12004ab4ae6d3359dd2d
    
    
  sha512=f6abd60dac2e02777be81ce3b5acdc0db23b3fa06731f5b2d0b32e6ecc9305fe64f407bbd95a3a9488b14d0a7ac7c41c73a7e18c329a8f18febfc8fd50eccbc6
    
    
  doc/biocaml.unix/Biocaml_unix/Histogram/index.html
Module Biocaml_unix.HistogramSource
Histograms with polymorphic bin types.
A histogram is a list of bins, each with a count. Bin i is defined by a lower limit lo(i) and an upper limit hi(i). It is inclusive of the lower limit and exclusive of the upper limit. For all i, hi(i) = lo(i+1). By convention the first bin is numbered 0. The count of a bin is a floating point number, allowing fractional values if necessary.
The type of a histogram whose bin limits are of type 'a.
make cmp bins returns a new histogram from the given bins, all initialized to a count of 0.0. The bins must be provided as a list of the boundaries dividing them. The list [v0; v1; ...; vn] of length n+1 represents the n bins [v0, v1), [v1, v2), ..., [vn-1, vn), where cmp is used as the comparison function. Returns None if bins are not monotonically increasing, or if length of bins is less than 2.
Return a list of all bin/count pairs. Answer will be in ascending order by the bin limits.
bin hist i returns the ith bin of hist. Raise Invalid_argument if an invalid bin number is requested.
count hist i returns the count the ith bin. Raise Invalid_argument if an invalid bin number is requested.
increment delt hist x increments the count of the bin containing x by delt (default is 1.0). The histogram is unaltered if x not in any bin. This is not considered an error because it is often necessary to calculate a histogram for a subset of a larger data set.
find_bin_index hist x returns the index of the bin in hist containing x. Return None if x is outside the histogram's range.
in_range hist x is true if x greater than or equal to minimum hist and strictly less than maximum hist.
Histograms With Float Bins
make_uniform min max n returns a histogram with n bins uniformly dividing up the range from min to max. Bins will be inclusive of the lower limit and exclusive of the upper limit, i.e. value of min will fall into lowest bin and value of max will fall outside the range of the histogram. Raise Failure if min not strictly less than max or if n not greater than 0.