/usr/share/doc/libghc-mersenne-random-pure64-doc/html/mersenne-random-pure64.txt is in libghc-mersenne-random-pure64-doc 0.2.0.4-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | -- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Generate high quality pseudorandom numbers purely using a Mersenne Twister
--
-- The Mersenne twister is a pseudorandom number generator developed by
-- Makoto Matsumoto and Takuji Nishimura that is based on a matrix linear
-- recurrence over a finite binary field. It provides for fast generation
-- of very high quality pseudorandom numbers. The source for the C code
-- can be found here:
--
-- <a>http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt64.html</a>
--
-- This library provides a purely functional binding to the 64 bit
-- classic mersenne twister, along with instances of RandomGen, so the
-- generator can be used with System.Random. The generator should
-- typically be a few times faster than the default StdGen (but a tad
-- slower than the impure 'mersenne-random' library based on SIMD
-- instructions and destructive state updates.
@package mersenne-random-pure64
@version 0.2.0.4
-- | 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.
module System.Random.Mersenne.Pure64.Base
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 ()
-- | length of an MT block
blockLen :: Int
-- | size of an MT block, in bytes
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)
-- | 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.
module System.Random.Mersenne.Pure64.MTBlock
data MTBlock
-- | create a new MT block, seeded with the given Word64 value
seedBlock :: Word64 -> MTBlock
-- | step: create a new MTBlock buffer from the previous one
nextBlock :: MTBlock -> MTBlock
-- | look up an element of an MT block
lookupBlock :: MTBlock -> Int -> Word64
-- | length of an MT block
blockLen :: Int
-- | MT's word mix function.
--
-- (MT applies this function to each Word64 from the buffer before
-- returning it)
mixWord64 :: Word64 -> Word64
-- | 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.
--
-- This generator may be used with System.Random, however, that is likely
-- to be slower than using it directly.
module System.Random.Mersenne.Pure64
-- | <a>PureMT</a>, a pure mersenne twister pseudo-random number generator
data PureMT
-- | Create a PureMT generator from a <a>Word64</a> seed.
pureMT :: Word64 -> PureMT
-- | Create a new PureMT generator, using the clocktime as the base for the
-- seed.
newPureMT :: IO PureMT
-- | Yield a new <a>Int</a> value from the generator, returning a new
-- generator and that <a>Int</a>. The full 64 bits will be used on a 64
-- bit machine.
randomInt :: PureMT -> (Int, PureMT)
-- | Yield a new <a>Word</a> value from the generator, returning a new
-- generator and that <a>Word</a>.
randomWord :: PureMT -> (Word, PureMT)
-- | Yield a new <a>Int64</a> value from the generator, returning a new
-- generator and that <a>Int64</a>.
randomInt64 :: PureMT -> (Int64, PureMT)
-- | Yield a new <a>Word64</a> value from the generator, returning a new
-- generator and that <a>Word64</a>.
randomWord64 :: PureMT -> (Word64, PureMT)
-- | Efficiently yield a new 53-bit precise <a>Double</a> value, and a new
-- generator.
randomDouble :: PureMT -> (Double, PureMT)
instance System.Random.RandomGen System.Random.Mersenne.Pure64.PureMT
instance GHC.Show.Show System.Random.Mersenne.Pure64.PureMT
|