copilot-libraries-0.2: A Haskell-embedded DSL for monitoring hard real-time distributed systems.

Copilot.Library.Statistics

Description

Basic bounded statistics. In the following, a bound n is given stating the number of periods over which to compute the statistic (n == 1 computes it only over the current period).

Synopsis

Documentation

max :: (Typed a, Ord a) => Int -> Stream a -> Stream aSource

Maximum value.

min :: (Typed a, Ord a) => Int -> Stream a -> Stream aSource

Minimum value.

sum :: (Typed a, Num a) => Int -> Stream a -> Stream aSource

Summation.

mean :: (Typed a, Fractional a) => Int -> Stream a -> Stream aSource

Mean value. n must not overflow for word size a for streams over which computation is peformed.

meanNow :: (Typed a, Integral a) => [Stream a] -> Stream aSource

Mean value over the current set of streams passed in.