Copyright | (c) 2012-2013 Michał Pałka |
---|---|
License | BSD3 |
Maintainer | [email protected] |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
System.Random.TF
Description
This module exports System.Random.TF.Gen and System.Random.TF.Init
modules without exporting the alternative RandomGen
class from System.Random.TF.Gen. To use this class and the Random
instances written for it, please import System.Random.TF.Gen and System.Random.TF.Instances
directly.
Documentation
The generator type
Instances
Read TFGen Source # | |
Show TFGen Source # | |
RandomGen TFGen Source # | |
Defined in System.Random.TF.Gen Methods next :: TFGen -> (Int, TFGen) # genWord8 :: TFGen -> (Word8, TFGen) # genWord16 :: TFGen -> (Word16, TFGen) # genWord32 :: TFGen -> (Word32, TFGen) # genWord64 :: TFGen -> (Word64, TFGen) # genWord32R :: Word32 -> TFGen -> (Word32, TFGen) # genWord64R :: Word64 -> TFGen -> (Word64, TFGen) # genShortByteString :: Int -> TFGen -> (ShortByteString, TFGen) # | |
RandomGen TFGen Source # | |
seedTFGen :: (Word64, Word64, Word64, Word64) -> TFGen Source #
Create a generator from a random seed.
Derive a new generator instance from the global RNG using split.
This is the default way of obtaining a new RNG instance.
Initial generator is seeded using mkSeedUnix
on UNIX,
and mkSeedTime
otherwise. This should be eventually
replaced with proper seeding.
mkTFGen :: Int -> TFGen Source #
Quick and dirty way of creating a deterministically seeded generator.