Safe HaskellNone

LSC.Entropy

Synopsis

Documentation

nonDeterministic :: PrimBase m => Maybe Handle -> (Gen (PrimState m) -> m a) -> IO a Source #

entropyVectorInt :: Int -> IO (Vector Int) Source #

entropyVector32 :: Int -> IO (Vector Word32) Source #

type Permutation = Vector Int Source #

randomPermutation :: PrimBase m => Int -> Gen (PrimState m) -> m Permutation Source #

This function does not reach all possible permutations for lists consisting of more than 969 elements. Any PRNGs possible states are bound by its possible seed values. In the case of MWC8222 the period is 2^8222 which allows for not more than 969! different states.

seed bits: 8222 maximum list length: 969

969! =~ 2^8222

Monotonicity of n! / (2^n):

desired seed bits: 256909 desired list length: 20000

20000! =~ 2^256909