Module reservoirs::utils[][src]

Basic utility functions, largely reinventing the wheel.

Functions

cdf

Estimate the cumulative distribution function (CDF) of a vector of observations.

cdf_bin

Estimate the cumulative distribution function (CDF) of a vector of observations x, binned into bins number of obs to preserve memory on large vectors.

mean

Calculate the mean of a slice of f64 values.

median

Calculate the median of a slice of f64 values.

quantile

Calculate the value of the CDF of obs at a given threshold thresh. Called by quantiles.

quantiles

Calculate the quantiles for a box-and-whisker plot (2.5%, 25%, 50%, 75%, 97.5%).