|Maintainer||Alexey Khudyakov <email@example.com>|
- data HistogramST s bin a where
- newHistogramST :: (Bin bin, UA a) => a -> bin -> ST s (HistogramST s bin a)
- fillOne :: Num a => HistogramST s bin a -> BinValue bin -> ST s ()
- fillOneW :: Num a => HistogramST s bin a -> (BinValue bin, a) -> ST s ()
- fillMonoid :: Monoid a => HistogramST s bin a -> (BinValue bin, a) -> ST s ()
- freezeHist :: HistogramST s bin a -> ST s (Histogram bin a)
- class Accumulator h where
- data Accum s a b where
- accumList :: [ST s (Accum s a b)] -> ST s (Accum s a b)
- accumHist :: Bin bin => (a -> HistogramST s bin val -> ST s ()) -> (Histogram bin val -> b) -> HistogramST s bin val -> ST s (Accum s a b)
- fillHistograms :: Monoid b => (forall s. ST s (Accum s a b)) -> [a] -> b
Create new mutable histogram. All bins are set to zero element as passed to function.
Put one value into histogram
Put one value into histogram with weight
Put one monoidal element
Create immutable histogram from mutable one. This operation involve copying.
This is class with accumulation semantics. It's used to fill many histogram at once. It accept values of type a and return data of type b.
Put one element into accumulator
Extract data from historam
Abstract wrapper for histograms.
Accumulator for arbitrary
HistogramST based histogram