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

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

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

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

module Bindings.Gsl.ChebyshevApproximations 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/ChebyshevApproximations.hsc" #-}
import Bindings.Gsl.SpecialFunctions
import Bindings.Gsl.MathematicalFunctions

data C'gsl_cheb_series = C'gsl_cheb_series{
{-# LINE 12 "src/Bindings/Gsl/ChebyshevApproximations.hsc" #-}

  c'gsl_cheb_series'c :: Ptr CDouble
{-# LINE 13 "src/Bindings/Gsl/ChebyshevApproximations.hsc" #-}
,
  c'gsl_cheb_series'order :: CSize
{-# LINE 14 "src/Bindings/Gsl/ChebyshevApproximations.hsc" #-}
,
  c'gsl_cheb_series'a :: CDouble
{-# LINE 15 "src/Bindings/Gsl/ChebyshevApproximations.hsc" #-}
,
  c'gsl_cheb_series'b :: CDouble
{-# LINE 16 "src/Bindings/Gsl/ChebyshevApproximations.hsc" #-}
,
  c'gsl_cheb_series'order_sp :: CSize
{-# LINE 17 "src/Bindings/Gsl/ChebyshevApproximations.hsc" #-}
,
  c'gsl_cheb_series'f :: Ptr CDouble
{-# LINE 18 "src/Bindings/Gsl/ChebyshevApproximations.hsc" #-}

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

{-# LINE 19 "src/Bindings/Gsl/ChebyshevApproximations.hsc" #-}

foreign import ccall "gsl_cheb_alloc" c'gsl_cheb_alloc
  :: CSize -> IO (Ptr C'gsl_cheb_series)
foreign import ccall "&gsl_cheb_alloc" p'gsl_cheb_alloc
  :: FunPtr (CSize -> IO (Ptr C'gsl_cheb_series))

{-# LINE 21 "src/Bindings/Gsl/ChebyshevApproximations.hsc" #-}
foreign import ccall "gsl_cheb_free" c'gsl_cheb_free
  :: Ptr C'gsl_cheb_series -> IO ()
foreign import ccall "&gsl_cheb_free" p'gsl_cheb_free
  :: FunPtr (Ptr C'gsl_cheb_series -> IO ())

{-# LINE 22 "src/Bindings/Gsl/ChebyshevApproximations.hsc" #-}
foreign import ccall "gsl_cheb_init" c'gsl_cheb_init
  :: Ptr C'gsl_cheb_series -> Ptr C'gsl_function -> CDouble -> CDouble -> IO CInt
foreign import ccall "&gsl_cheb_init" p'gsl_cheb_init
  :: FunPtr (Ptr C'gsl_cheb_series -> Ptr C'gsl_function -> CDouble -> CDouble -> IO CInt)

{-# LINE 23 "src/Bindings/Gsl/ChebyshevApproximations.hsc" #-}
foreign import ccall "gsl_cheb_order" c'gsl_cheb_order
  :: Ptr C'gsl_cheb_series -> IO CSize
foreign import ccall "&gsl_cheb_order" p'gsl_cheb_order
  :: FunPtr (Ptr C'gsl_cheb_series -> IO CSize)

{-# LINE 24 "src/Bindings/Gsl/ChebyshevApproximations.hsc" #-}
foreign import ccall "gsl_cheb_size" c'gsl_cheb_size
  :: Ptr C'gsl_cheb_series -> IO CSize
foreign import ccall "&gsl_cheb_size" p'gsl_cheb_size
  :: FunPtr (Ptr C'gsl_cheb_series -> IO CSize)

{-# LINE 25 "src/Bindings/Gsl/ChebyshevApproximations.hsc" #-}
foreign import ccall "gsl_cheb_coeffs" c'gsl_cheb_coeffs
  :: Ptr C'gsl_cheb_series -> IO (Ptr CDouble)
foreign import ccall "&gsl_cheb_coeffs" p'gsl_cheb_coeffs
  :: FunPtr (Ptr C'gsl_cheb_series -> IO (Ptr CDouble))

{-# LINE 26 "src/Bindings/Gsl/ChebyshevApproximations.hsc" #-}
foreign import ccall "gsl_cheb_eval" c'gsl_cheb_eval
  :: Ptr C'gsl_cheb_series -> CDouble -> IO CDouble
foreign import ccall "&gsl_cheb_eval" p'gsl_cheb_eval
  :: FunPtr (Ptr C'gsl_cheb_series -> CDouble -> IO CDouble)

{-# LINE 27 "src/Bindings/Gsl/ChebyshevApproximations.hsc" #-}
foreign import ccall "gsl_cheb_eval_err" c'gsl_cheb_eval_err
  :: Ptr C'gsl_cheb_series -> CDouble -> Ptr CDouble -> Ptr CDouble -> IO CInt
foreign import ccall "&gsl_cheb_eval_err" p'gsl_cheb_eval_err
  :: FunPtr (Ptr C'gsl_cheb_series -> CDouble -> Ptr CDouble -> Ptr CDouble -> IO CInt)

{-# LINE 28 "src/Bindings/Gsl/ChebyshevApproximations.hsc" #-}
foreign import ccall "gsl_cheb_eval_n" c'gsl_cheb_eval_n
  :: Ptr C'gsl_cheb_series -> CSize -> CDouble -> IO CDouble
foreign import ccall "&gsl_cheb_eval_n" p'gsl_cheb_eval_n
  :: FunPtr (Ptr C'gsl_cheb_series -> CSize -> CDouble -> IO CDouble)

{-# LINE 29 "src/Bindings/Gsl/ChebyshevApproximations.hsc" #-}
foreign import ccall "gsl_cheb_eval_n_err" c'gsl_cheb_eval_n_err
  :: Ptr C'gsl_cheb_series -> CSize -> CDouble -> Ptr CDouble -> Ptr CDouble -> IO CInt
foreign import ccall "&gsl_cheb_eval_n_err" p'gsl_cheb_eval_n_err
  :: FunPtr (Ptr C'gsl_cheb_series -> CSize -> CDouble -> Ptr CDouble -> Ptr CDouble -> IO CInt)

{-# LINE 30 "src/Bindings/Gsl/ChebyshevApproximations.hsc" #-}
foreign import ccall "gsl_cheb_eval_mode" c'gsl_cheb_eval_mode
  :: Ptr C'gsl_cheb_series -> CDouble -> C'gsl_mode_t -> IO CDouble
foreign import ccall "&gsl_cheb_eval_mode" p'gsl_cheb_eval_mode
  :: FunPtr (Ptr C'gsl_cheb_series -> CDouble -> C'gsl_mode_t -> IO CDouble)

{-# LINE 31 "src/Bindings/Gsl/ChebyshevApproximations.hsc" #-}
foreign import ccall "gsl_cheb_eval_mode_e" c'gsl_cheb_eval_mode_e
  :: Ptr C'gsl_cheb_series -> CDouble -> C'gsl_mode_t -> Ptr CDouble -> Ptr CDouble -> IO CInt
foreign import ccall "&gsl_cheb_eval_mode_e" p'gsl_cheb_eval_mode_e
  :: FunPtr (Ptr C'gsl_cheb_series -> CDouble -> C'gsl_mode_t -> Ptr CDouble -> Ptr CDouble -> IO CInt)

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

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

{-# LINE 34 "src/Bindings/Gsl/ChebyshevApproximations.hsc" #-}