htestu-0.1.1.2: A library for testing correctness of pseudo random number generators in Haskell.

Safe HaskellSafe
LanguageHaskell2010

Test.HTestU.Wrapping

Synopsis

Documentation

type Battery = Ptr UniformGenerator -> BatteryResult Source #

Battery takes a wrapped generator and produces p-values as a result of its testing

type WrappedCallback = FunPtr Callback Source #

Wrapped Callback function for calling from C

c_createGenerator :: WrappedCallback -> IO (Ptr UniformGenerator) Source #

C function allocating a PRNG on C side, given a callback wrapping it

c_deleteGenerator :: Ptr UniformGenerator -> IO () Source #

Complimentary deallocating function to c_createGenerator

genToWrappedCallback :: RandomGen g => (g -> RandomStream) -> g -> IO WrappedCallback Source #

Wraps the given RandomGen into a C callback

streamToWrappedCallback :: RandomStream -> IO WrappedCallback Source #

Wraps an stream of numbers into a C callback

randomStreamActionToWrappedCallback :: IO RandomStream -> IO WrappedCallback Source #

Wraps an stream of numbers produced by a stream of numbers into a C callback