copilot-libraries-4.7.1: Libraries for the Copilot language.

Copyright | (c) 2011 National Institute of Aerospace / Galois Inc.
Safe Haskell | Safe-Inferred
Language | Haskell2010

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

- max :: (Typed a, Ord a) => Int -> Stream a -> Stream a
- min :: (Typed a, Ord a) => Int -> Stream a -> Stream a
- sum :: (Typed a, Num a, Eq a) => Int -> Stream a -> Stream a
- mean :: (Typed a, Eq a, Fractional a) => Int -> Stream a -> Stream a
- meanNow :: (Typed a, Integral a) => [Stream a] -> Stream a

# Documentation

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

Maximum value.

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

Minimum value.

sum :: (Typed a, Num a, Eq a) => Int -> Stream a -> Stream a Source #

Summation.

mean :: (Typed a, Eq a, Fractional a) => Int -> Stream a -> Stream a Source #

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 a Source #

Mean value over the current set of streams passed in.