{-# INCLUDE <bindings.dsl.h> #-}
{-# INCLUDE <gsl/gsl_qrng.h> #-}
{-# LINE 1 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}

{-# LINE 2 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}

{-# LINE 3 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}

-- | <http://www.gnu.org/software/gsl/manual/html_node/Quasi_002dRandom-Sequences.html>

module Bindings.Gsl.QuasiRandomSequences where
import Foreign.Ptr (Ptr,FunPtr,plusPtr)
import Foreign.Ptr (wordPtrToPtr,castPtrToFunPtr)
import Foreign.Storable
import Foreign.C.Types
import Foreign.C.String (CString,CStringLen,CWString,CWStringLen)
import Foreign.Marshal.Array (peekArray,pokeArray)
import Data.Int
import Data.Word

{-# LINE 8 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}

data C'gsl_qrng_type = C'gsl_qrng_type{
{-# LINE 10 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}

  c'gsl_qrng_type'name :: CString
{-# LINE 11 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}
,
  c'gsl_qrng_type'max_dimension :: CUInt
{-# LINE 12 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}
,
  c'gsl_qrng_type'state_size :: FunPtr (CUInt -> IO CSize)
{-# LINE 13 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}
,
  c'gsl_qrng_type'init_state :: FunPtr (Ptr () -> CUInt -> IO CInt)
{-# LINE 14 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}
,
  c'gsl_qrng_type'get :: FunPtr (Ptr () -> CUInt -> Ptr CDouble -> IO CInt)
{-# LINE 15 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}

 } deriving (Eq,Show)
instance Storable C'gsl_qrng_type where
  sizeOf _ = 20
  alignment = sizeOf
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 4
    v2 <- peekByteOff p 8
    v3 <- peekByteOff p 12
    v4 <- peekByteOff p 16
    return $ C'gsl_qrng_type v0 v1 v2 v3 v4
  poke p (C'gsl_qrng_type v0 v1 v2 v3 v4) = do
    pokeByteOff p 0 v0
    pokeByteOff p 4 v1
    pokeByteOff p 8 v2
    pokeByteOff p 12 v3
    pokeByteOff p 16 v4
    return ()

{-# LINE 16 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}

data C'gsl_qrng = C'gsl_qrng{
{-# LINE 18 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}

  c'gsl_qrng'type :: Ptr C'gsl_qrng_type
{-# LINE 19 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}
,
  c'gsl_qrng'dimension :: CUInt
{-# LINE 20 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}
,
  c'gsl_qrng'state_size :: CSize
{-# LINE 21 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}
,
  c'gsl_qrng'state :: Ptr ()
{-# LINE 22 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}

 } deriving (Eq,Show)
instance Storable C'gsl_qrng where
  sizeOf _ = 16
  alignment = sizeOf
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 4
    v2 <- peekByteOff p 8
    v3 <- peekByteOff p 12
    return $ C'gsl_qrng v0 v1 v2 v3
  poke p (C'gsl_qrng v0 v1 v2 v3) = do
    pokeByteOff p 0 v0
    pokeByteOff p 4 v1
    pokeByteOff p 8 v2
    pokeByteOff p 12 v3
    return ()

{-# LINE 23 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}

foreign import ccall "&gsl_qrng_niederreiter_2" p'gsl_qrng_niederreiter_2
  :: Ptr (Ptr gsl_qrng_type)

{-# LINE 25 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}
foreign import ccall "&gsl_qrng_sobol" p'gsl_qrng_sobol
  :: Ptr (Ptr gsl_qrng_type)

{-# LINE 26 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}
foreign import ccall "&gsl_qrng_halton" p'gsl_qrng_halton
  :: Ptr (Ptr gsl_qrng_type)

{-# LINE 27 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}
foreign import ccall "&gsl_qrng_reversehalton" p'gsl_qrng_reversehalton
  :: Ptr (Ptr gsl_qrng_type)

{-# LINE 28 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}

foreign import ccall "gsl_qrng_alloc" c'gsl_qrng_alloc
  :: Ptr C'gsl_qrng_type -> CUInt -> IO (Ptr C'gsl_qrng)
foreign import ccall "&gsl_qrng_alloc" p'gsl_qrng_alloc
  :: FunPtr (Ptr C'gsl_qrng_type -> CUInt -> IO (Ptr C'gsl_qrng))

{-# LINE 30 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}
foreign import ccall "gsl_qrng_memcpy" c'gsl_qrng_memcpy
  :: Ptr C'gsl_qrng -> Ptr C'gsl_qrng -> IO CInt
foreign import ccall "&gsl_qrng_memcpy" p'gsl_qrng_memcpy
  :: FunPtr (Ptr C'gsl_qrng -> Ptr C'gsl_qrng -> IO CInt)

{-# LINE 31 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}
foreign import ccall "gsl_qrng_clone" c'gsl_qrng_clone
  :: Ptr C'gsl_qrng -> IO (Ptr C'gsl_qrng)
foreign import ccall "&gsl_qrng_clone" p'gsl_qrng_clone
  :: FunPtr (Ptr C'gsl_qrng -> IO (Ptr C'gsl_qrng))

{-# LINE 32 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}
foreign import ccall "gsl_qrng_free" c'gsl_qrng_free
  :: Ptr C'gsl_qrng -> IO ()
foreign import ccall "&gsl_qrng_free" p'gsl_qrng_free
  :: FunPtr (Ptr C'gsl_qrng -> IO ())

{-# LINE 33 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}
foreign import ccall "gsl_qrng_init" c'gsl_qrng_init
  :: Ptr C'gsl_qrng -> IO ()
foreign import ccall "&gsl_qrng_init" p'gsl_qrng_init
  :: FunPtr (Ptr C'gsl_qrng -> IO ())

{-# LINE 34 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}
foreign import ccall "gsl_qrng_name" c'gsl_qrng_name
  :: Ptr C'gsl_qrng -> IO CString
foreign import ccall "&gsl_qrng_name" p'gsl_qrng_name
  :: FunPtr (Ptr C'gsl_qrng -> IO CString)

{-# LINE 35 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}
foreign import ccall "gsl_qrng_size" c'gsl_qrng_size
  :: Ptr C'gsl_qrng -> IO CSize
foreign import ccall "&gsl_qrng_size" p'gsl_qrng_size
  :: FunPtr (Ptr C'gsl_qrng -> IO CSize)

{-# LINE 36 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}
foreign import ccall "gsl_qrng_state" c'gsl_qrng_state
  :: Ptr C'gsl_qrng -> IO (Ptr ())
foreign import ccall "&gsl_qrng_state" p'gsl_qrng_state
  :: FunPtr (Ptr C'gsl_qrng -> IO (Ptr ()))

{-# LINE 37 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}
foreign import ccall "gsl_qrng_get" c'gsl_qrng_get
  :: Ptr C'gsl_qrng -> Ptr CDouble -> IO CInt
foreign import ccall "&gsl_qrng_get" p'gsl_qrng_get
  :: FunPtr (Ptr C'gsl_qrng -> Ptr CDouble -> IO CInt)

{-# LINE 38 "src/Bindings/Gsl/QuasiRandomSequences.hsc" #-}