chalmers-lava2000-1.1.1: Hardware description librarySource codeContentsIndex
Lava.LavaRandom
Synopsis
type Rnd = StdGen
newRnd :: IO StdGen
next :: RandomGen g => g -> (Int, g)
split :: RandomGen g => g -> (g, g)
Documentation
type Rnd = StdGenSource
newRnd :: IO StdGenSource
next :: RandomGen g => g -> (Int, g)Source
The next operation returns an Int that is uniformly distributed in the range returned by genRange (including both end points), and a new generator.
split :: RandomGen g => g -> (g, g)Source
The split operation allows one to obtain two distinct random number generators. This is very useful in functional programs (for example, when passing a random number generator down to recursive calls), but very little work has been done on statistically robust implementations of split ([System.Random, System.Random] are the only examples we know of).
Produced by Haddock version 2.6.1