probability-0.2.5.2: Probabilistic Functional Programming

PortabilityMulti-parameter type class with functional dependency
Safe HaskellSafe
LanguageHaskell98

Numeric.Probability.Object

Description

Abstract interface to probabilistic objects like random generators and probability distributions. It allows to use the same code both for computing complete distributions and for generating random values according to the distribution. The latter one is of course more efficient and may be used for approximation of the distribution by simulation.

Maybe a better name is Experiment.

Synopsis

Documentation

class Monad obj => C prob obj | obj -> prob where Source #

Minimal complete definition

fromFrequencies

Methods

fromFrequencies :: [(a, prob)] -> obj a Source #

Instances
C Double T Source # 
Instance details

Defined in Numeric.Probability.Object

Methods

fromFrequencies :: [(a, Double)] -> T a Source #

Fractional prob => C prob (T prob) Source # 
Instance details

Defined in Numeric.Probability.Object

Methods

fromFrequencies :: [(a, prob)] -> T prob a Source #

type Spread obj a = [a] -> obj a Source #

shape :: (C prob obj, Fractional prob) => (prob -> prob) -> Spread obj a Source #

linear :: (C prob obj, Fractional prob) => Spread obj a Source #

uniform :: (C prob obj, Fractional prob) => Spread obj a Source #

negExp :: (C prob obj, Floating prob) => Spread obj a Source #

normal :: (C prob obj, Floating prob) => Spread obj a Source #

enum :: (C prob obj, Floating prob) => [Int] -> Spread obj a Source #

relative :: (C prob obj, Floating prob) => [prob] -> Spread obj a Source #

Give a list of frequencies, they do not need to sum up to 1.