ganeti

Safe HaskellSafe-Infered

Ganeti.Utils.Statistics

Description

Utility functions for statistical accumulation.

Synopsis

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.

Constructors

SumStatistics Double 
StdDevStatistics Double Double Double 

Instances

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.