histogram-fill-0.2.0: Library for histograms creation.

Stabilityexperimental
MaintainerAlexey Khudyakov <alexey.skladnoy@gmail.com>

Data.Histogram.ST

Contents

Description

Mutable histograms.

Synopsis

Mutable histograms

data MHistogram s bin a Source

Mutable histogram.

newMHistogram :: (Bin bin, Unbox a) => a -> bin -> ST s (MHistogram s bin a)Source

Create new mutable histogram. All bins are set to zero element as passed to function.

fillOne :: Num a => MHistogram s bin a -> BinValue bin -> ST s ()Source

Put one value into histogram

fillOneW :: Num a => MHistogram s bin a -> (BinValue bin, a) -> ST s ()Source

Put one value into histogram with weight

fillMonoid :: Monoid a => MHistogram s bin a -> (BinValue bin, a) -> ST s ()Source

Put one monoidal element

freezeHist :: MHistogram s bin a -> ST s (Histogram bin a)Source

Create immutable histogram from mutable one. This operation involve copying.