mersenne-random-pure64-0.2.2.0: Generate high quality pseudorandom numbers purely using a Mersenne Twister

Copyright | Copyright (c) 2008 Don Stewart <dons@galois.com>
License | BSD3
Maintainer | Don Stewart <dons@galois.com>
Stability | experimental
Portability | CPP, FFI, EmptyDataDecls
Safe Haskell | None
Language | Haskell98

System.Random.Mersenne.Pure64.Base

Description

Tested with: GHC 6.8.3

A purely functional binding 64 bit binding to the classic mersenne twister random number generator. This is more flexible than the impure 'mersenne-random' library, at the cost of being a bit slower. This generator is however, many times faster than System.Random, and yields high quality randoms with a long period.

Synopsis

- data MTState
- type UInt64 = CULLong
- c_init_genrand64 :: Ptr MTState -> UInt64 -> IO ()
- c_genrand64_int64 :: Ptr MTState -> IO UInt64
- c_genrand64_real2 :: Ptr MTState -> IO CDouble
- sizeof_MTState :: Int
- c_mix_word64 :: Word64 -> Word64
- c_seed_genrand64_block :: Ptr a -> Word64 -> IO ()
- c_next_genrand64_block :: Ptr a -> Ptr a -> IO ()
- blockLen :: Int
- blockSize :: Int
- c_init_genrand64_unsafe :: UInt64 -> IO ()
- c_genrand64_int64_unsafe :: IO UInt64
- c_genrand64_real2_unsafe :: IO CDouble
- c_memcpy :: Ptr Word8 -> Ptr Word8 -> CSize -> IO (Ptr Word8)

# Documentation

data MTState Source #

type UInt64 = CULLong Source #

c_init_genrand64 :: Ptr MTState -> UInt64 -> IO () Source #

c_genrand64_int64 :: Ptr MTState -> IO UInt64 Source #

c_genrand64_real2 :: Ptr MTState -> IO CDouble Source #

sizeof_MTState :: Int Source #

c_mix_word64 :: Word64 -> Word64 Source #

c_seed_genrand64_block :: Ptr a -> Word64 -> IO () Source #

c_next_genrand64_block :: Ptr a -> Ptr a -> IO () Source #

blockLen :: Int Source #

length of an MT block

blockSize :: Int Source #

size of an MT block, in bytes

c_init_genrand64_unsafe :: UInt64 -> IO () Source #

c_genrand64_int64_unsafe :: IO UInt64 Source #

c_genrand64_real2_unsafe :: IO CDouble Source #

c_memcpy :: Ptr Word8 -> Ptr Word8 -> CSize -> IO (Ptr Word8) Source #