Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- type Battery = Ptr UniformGenerator -> BatteryResult
- type WrappedCallback = FunPtr Callback
- c_createGenerator :: WrappedCallback -> IO (Ptr UniformGenerator)
- c_deleteGenerator :: Ptr UniformGenerator -> IO ()
- genToWrappedCallback :: RandomGen g => (g -> RandomStream) -> g -> IO WrappedCallback
- streamToWrappedCallback :: RandomStream -> IO WrappedCallback
- randomStreamActionToWrappedCallback :: IO RandomStream -> IO WrappedCallback
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