aivika-0.4.2: A multi-paradigm simulation library

Stabilityexperimental
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Safe HaskellNone

Simulation.Aivika.Statistics

Description

Tested with: GHC 7.0.3

Represents statistics and results.

Synopsis

Documentation

data Statistics a Source

Represents statistics.

All functions with the statistics in this module are thread-safe. Therefore you can use them in experiments when parallel simulations execute simultaneously.

newStatistics :: MArray IOUArray a IO => IO (Statistics a)Source

Create new statistics.

addStatistics :: MArray IOUArray a IO => Statistics a -> a -> IO ()Source

Add data to the statistics. It is thread-safe.

statisticsData :: MArray IOUArray a IO => Statistics a -> IO (Array Int a)Source

Return the statistics data. It is thread-safe.

analyzeData :: Real a => Array Int a -> AnalysisResults aSource

Analyze data.

data AnalysisResults a Source

Represents the results of the statistic analysis.

Constructors

AnalysisResults 

Fields

resultsData :: Array Int a

Statistic data.

resultsMean :: Double

The average value.

resultsVariance :: Double

The variance.

resultsMin :: a

The minimum value.

resultsMax :: a

The maximum value.

Instances

showResults :: Show a => AnalysisResults a -> Int -> ShowSSource

Show the results of analysis with the specified indent.