aivika-4.5: A multi-method simulation library

CopyrightCopyright (c) 2009-2016, David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellSafe
LanguageHaskell2010

Simulation.Aivika.Generator

Description

Tested with: GHC 8.0.1

Below is defined a type class of the random number generator.

Synopsis

Documentation

data Generator Source #

Defines a random number generator.

Constructors

Generator 

Fields

data GeneratorType Source #

Defines a type of the random number generator.

Constructors

SimpleGenerator

The simple random number generator.

SimpleGeneratorWithSeed Int

The simple random number generator with the specified seed.

CustomGenerator (IO Generator)

The custom random number generator.

CustomGenerator01 (IO Double)

The custom random number generator by the specified uniform generator of numbers from 0 to 1.

type DiscretePDF a = [(a, Double)] Source #

A discrete probability density function.

newGenerator :: GeneratorType -> IO Generator Source #

Create a new random number generator by the specified type.

newRandomGenerator :: RandomGen g => g -> IO Generator Source #

Create a new random generator by the specified standard generator.

newRandomGenerator01 :: IO Double -> IO Generator Source #

Create a new random generator by the specified uniform generator of numbers from 0 to 1.