Safe Haskell | Safe-Infered |
---|

Utility functions for statistical accumulation.

- type TagTagMap = Map (String, String) Int
- data Statistics
- = SumStatistics Double
- | StdDevStatistics Double Double Double
- | MapStatistics TagTagMap

- data AggregateComponent
- = SimpleNumber Double
- | SpreadValues TagTagMap

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

# Documentation

type TagTagMap = Map (String, String) IntSource

Type to store the number of instances for each exclusion and location pair. This is necessary to calculate second component of location score.

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 | |

MapStatistics TagTagMap |

Show Statistics |

data AggregateComponent Source

Abstract type of per-node statistics measures. The SimpleNumber is used to construct SumStatistics and StdDevStatistics while SpreadValues is used to construct MapStatistics.

SimpleNumber Double | |

SpreadValues TagTagMap |

getSumStatistics :: [AggregateComponent] -> StatisticsSource

Get a statistics that sums up the values.

getStdDevStatistics :: [AggregateComponent] -> StatisticsSource

Get a statistics for the standard deviation.

getMapStatistics :: [AggregateComponent] -> StatisticsSource

Get a statistics for the standard deviation.

getStatisticValue :: Statistics -> DoubleSource

Obtain the value of a statistics.

updateStatistics :: Statistics -> (AggregateComponent, AggregateComponent) -> 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.