Safe Haskell | Safe-Infered |
---|

Utility functions for statistical accumulation.

- data Statistics
- = SumStatistics Double
- | StdDevStatistics Double Double Double

- getSumStatistics :: [Double] -> Statistics
- getStdDevStatistics :: [Double] -> Statistics
- getStatisticValue :: Statistics -> Double
- updateStatistics :: Statistics -> (Double, Double) -> Statistics

# Documentation

data Statistics Source

Abstract type of statistical accumulations. They behave as if the given statistics were computed on the list of values, but they allow a potentially more efficient update of a given value.

SumStatistics Double | |

StdDevStatistics Double Double Double |

Show Statistics |

getSumStatistics :: [Double] -> StatisticsSource

Get a statistics that sums up the values.

getStdDevStatistics :: [Double] -> StatisticsSource

Get a statistics for the standard deviation.

getStatisticValue :: Statistics -> DoubleSource

Obtain the value of a statistics.

updateStatistics :: Statistics -> (Double, Double) -> StatisticsSource

In a given statistics replace on value by another. This will only give meaningful results, if the original value was actually part of the statistics.