random-fu-0.0.2.1: Random number generationSource codeContentsIndex
Data.Random.Sample
Synopsis
class Sampleable d m t where
sampleFrom :: RandomSource m s => s -> d t -> m t
sample :: (Sampleable d m t, MonadRandom m) => d t -> m t
Documentation
class Sampleable d m t whereSource
A typeclass allowing Distributions and RVars to be sampled. Both may also be sampled via runRVar or runRVarT, but I find it psychologically pleasing to be able to sample both using this function.
Methods
sampleFrom :: RandomSource m s => s -> d t -> m tSource
Directly sample from a distribution or random variable, using the given source of entropy.
show/hide Instances
Lift m n => Sampleable (RVarT m) n t
sample :: (Sampleable d m t, MonadRandom m) => d t -> m tSource
Sample a distribution using the default source of entropy for the monad in which the sampling occurs.
Produced by Haddock version 2.4.2