module Bindings.Gsl.Polynomials 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
import Bindings.Gsl.ComplexNumbers
foreign import ccall "gsl_poly_eval" c'gsl_poly_eval
:: Ptr CDouble -> CInt -> CInt -> CDouble -> IO CDouble
foreign import ccall "&gsl_poly_eval" p'gsl_poly_eval
:: FunPtr (Ptr CDouble -> CInt -> CInt -> CDouble -> IO CDouble)
foreign import ccall "gsl_poly_dd_taylor" c'gsl_poly_dd_taylor
:: Ptr CDouble -> CDouble -> Ptr CDouble -> Ptr CDouble -> CSize -> Ptr CDouble -> IO CInt
foreign import ccall "&gsl_poly_dd_taylor" p'gsl_poly_dd_taylor
:: FunPtr (Ptr CDouble -> CDouble -> Ptr CDouble -> Ptr CDouble -> CSize -> Ptr CDouble -> IO CInt)
foreign import ccall "gsl_poly_solve_quadratic" c'gsl_poly_solve_quadratic
:: CDouble -> CDouble -> CDouble -> Ptr CDouble -> Ptr CDouble -> IO CInt
foreign import ccall "&gsl_poly_solve_quadratic" p'gsl_poly_solve_quadratic
:: FunPtr (CDouble -> CDouble -> CDouble -> Ptr CDouble -> Ptr CDouble -> IO CInt)
foreign import ccall "gsl_poly_complex_solve_quadratic" c'gsl_poly_complex_solve_quadratic
:: CDouble -> CDouble -> CDouble -> Ptr C'gsl_complex -> Ptr C'gsl_complex -> IO CInt
foreign import ccall "&gsl_poly_complex_solve_quadratic" p'gsl_poly_complex_solve_quadratic
:: FunPtr (CDouble -> CDouble -> CDouble -> Ptr C'gsl_complex -> Ptr C'gsl_complex -> IO CInt)
foreign import ccall "gsl_poly_solve_cubic" c'gsl_poly_solve_cubic
:: CDouble -> CDouble -> CDouble -> Ptr CDouble -> Ptr CDouble -> Ptr CDouble -> IO CInt
foreign import ccall "&gsl_poly_solve_cubic" p'gsl_poly_solve_cubic
:: FunPtr (CDouble -> CDouble -> CDouble -> Ptr CDouble -> Ptr CDouble -> Ptr CDouble -> IO CInt)
foreign import ccall "gsl_poly_complex_solve_cubic" c'gsl_poly_complex_solve_cubic
:: CDouble -> CDouble -> CDouble -> Ptr C'gsl_complex -> Ptr C'gsl_complex -> Ptr C'gsl_complex -> IO CInt
foreign import ccall "&gsl_poly_complex_solve_cubic" p'gsl_poly_complex_solve_cubic
:: FunPtr (CDouble -> CDouble -> CDouble -> Ptr C'gsl_complex -> Ptr C'gsl_complex -> Ptr C'gsl_complex -> IO CInt)
data C'gsl_poly_complex_workspace = C'gsl_poly_complex_workspace{
c'gsl_poly_complex_workspace'nc :: CSize
,
c'gsl_poly_complex_workspace'matrix :: Ptr CDouble
} deriving (Eq,Show)
instance Storable C'gsl_poly_complex_workspace where
sizeOf _ = 8
alignment = sizeOf
peek p = do
v0 <- peekByteOff p 0
v1 <- peekByteOff p 4
return $ C'gsl_poly_complex_workspace v0 v1
poke p (C'gsl_poly_complex_workspace v0 v1) = do
pokeByteOff p 0 v0
pokeByteOff p 4 v1
return ()
foreign import ccall "gsl_poly_complex_workspace_alloc" c'gsl_poly_complex_workspace_alloc
:: CSize -> IO (Ptr C'gsl_poly_complex_workspace)
foreign import ccall "&gsl_poly_complex_workspace_alloc" p'gsl_poly_complex_workspace_alloc
:: FunPtr (CSize -> IO (Ptr C'gsl_poly_complex_workspace))
foreign import ccall "gsl_poly_complex_workspace_free" c'gsl_poly_complex_workspace_free
:: Ptr C'gsl_poly_complex_workspace -> IO ()
foreign import ccall "&gsl_poly_complex_workspace_free" p'gsl_poly_complex_workspace_free
:: FunPtr (Ptr C'gsl_poly_complex_workspace -> IO ())
foreign import ccall "gsl_poly_complex_solve" c'gsl_poly_complex_solve
:: Ptr CDouble -> CSize -> Ptr C'gsl_poly_complex_workspace -> C'gsl_complex_packed_ptr -> IO CInt
foreign import ccall "&gsl_poly_complex_solve" p'gsl_poly_complex_solve
:: FunPtr (Ptr CDouble -> CSize -> Ptr C'gsl_poly_complex_workspace -> C'gsl_complex_packed_ptr -> IO CInt)