packages feed

casadi-bindings-1.9.0.0: Casadi/Wrappers/Classes/Function.hs

{-# OPTIONS_GHC -Wall #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# Language ForeignFunctionInterface #-}
{-# Language FlexibleInstances #-}
{-# Language MultiParamTypeClasses #-}

module Casadi.Wrappers.Classes.Function
       (
         Function,
         FunctionClass(..),
         function,
         function_addMonitor,
         function_call,
         function_call',
         function_call'',
         function_call''',
         function_call'''',
         function_call''''',
         function_call'''''',
         function_call''''''',
         function_call'''''''',
         function_callDerivative,
         function_callDerivative',
         function_callDerivative'',
         function_callDerivative''',
         function_callDerivative'''',
         function_callDerivative''''',
         function_callDerivative'''''',
         function_callDerivative''''''',
         function_callDerivative'''''''',
         function_callParallel,
         function_checkInputs,
         function_checkNode,
         function_derivative,
         function_evaluate,
         function_fullJacobian,
         function_generateCode,
         function_generateCode',
         function_getInputScheme,
         function_getNumInputElements,
         function_getNumInputNonzeros,
         function_getNumOutputElements,
         function_getNumOutputNonzeros,
         function_getOutputScheme,
         function_getStat,
         function_gradient,
         function_gradient',
         function_gradient'',
         function_gradient''',
         function_gradient'''',
         function_gradient''''',
         function_gradient'''''',
         function_hessian,
         function_hessian',
         function_hessian'',
         function_hessian''',
         function_hessian'''',
         function_hessian''''',
         function_hessian'''''',
         function_inputScheme,
         function_jacSparsity,
         function_jacSparsity',
         function_jacSparsity'',
         function_jacSparsity''',
         function_jacSparsity'''',
         function_jacSparsity''''',
         function_jacSparsity'''''',
         function_jacSparsity''''''',
         function_jacSparsity'''''''',
         function_jacSparsity''''''''',
         function_jacSparsity'''''''''',
         function_jacSparsity''''''''''',
         function_jacSparsity'''''''''''',
         function_jacSparsity''''''''''''',
         function_jacSparsity'''''''''''''',
         function_jacobian,
         function_jacobian',
         function_jacobian'',
         function_jacobian''',
         function_jacobian'''',
         function_jacobian''''',
         function_jacobian'''''',
         function_jacobian''''''',
         function_jacobian'''''''',
         function_jacobian''''''''',
         function_jacobian'''''''''',
         function_jacobian''''''''''',
         function_jacobian'''''''''''',
         function_jacobian''''''''''''',
         function_jacobian'''''''''''''',
         function_operator_call,
         function_operator_call',
         function_operator_call'',
         function_outputScheme,
         function_removeMonitor,
         function_setDerivative,
         function_setFullJacobian,
         function_setInputScheme,
         function_setJacSparsity,
         function_setJacSparsity',
         function_setJacSparsity'',
         function_setJacSparsity''',
         function_setJacSparsity'''',
         function_setJacSparsity''''',
         function_setJacSparsity'''''',
         function_setJacSparsity''''''',
         function_setJacobian,
         function_setJacobian',
         function_setJacobian'',
         function_setJacobian''',
         function_setOutputScheme,
         function_solve,
         function_spCanEvaluate,
         function_spEvaluate,
         function_spInit,
         function_symbolicInput,
         function_symbolicInputSX,
         function_tangent,
         function_tangent',
         function_tangent'',
         function_tangent''',
         function_tangent'''',
         function_tangent''''',
         function_tangent'''''',
       ) where


import Prelude hiding ( Functor )

import Data.Vector ( Vector )
import Foreign.C.Types
import Foreign.Ptr ( Ptr )
import Foreign.ForeignPtr ( newForeignPtr )
import System.IO.Unsafe ( unsafePerformIO ) -- for show instances

import Casadi.Wrappers.Classes.PrintableObject
import Casadi.Wrappers.CToolsInstances ( )
import Casadi.Wrappers.Data
import Casadi.Wrappers.Enums
import Casadi.MarshalTypes ( CppVec, StdString' ) -- StdOstream'
import Casadi.Marshal ( Marshal(..), withMarshal )
import Casadi.WrapReturn ( WrapReturn(..) )

instance Show Function where
  show = unsafePerformIO . printableObject_getDescription
-- direct wrapper
foreign import ccall unsafe "CasADi__Function__inputScheme" c_CasADi__Function__inputScheme
  :: Ptr Function' -> IO (Ptr IOScheme')
casADi__Function__inputScheme
  :: Function -> IO IOScheme
casADi__Function__inputScheme x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__inputScheme x0' >>= wrapReturn

-- classy wrapper
{-|
> [INTERNAL]  Access input/output scheme.
-}
function_inputScheme :: FunctionClass a => a -> IO IOScheme
function_inputScheme x = casADi__Function__inputScheme (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__outputScheme" c_CasADi__Function__outputScheme
  :: Ptr Function' -> IO (Ptr IOScheme')
casADi__Function__outputScheme
  :: Function -> IO IOScheme
casADi__Function__outputScheme x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__outputScheme x0' >>= wrapReturn

-- classy wrapper
{-|
>[INTERNAL]  Access
>input/output scheme.
-}
function_outputScheme :: FunctionClass a => a -> IO IOScheme
function_outputScheme x = casADi__Function__outputScheme (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__getNumInputNonzeros" c_CasADi__Function__getNumInputNonzeros
  :: Ptr Function' -> IO CInt
casADi__Function__getNumInputNonzeros
  :: Function -> IO Int
casADi__Function__getNumInputNonzeros x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__getNumInputNonzeros x0' >>= wrapReturn

-- classy wrapper
{-|
>Get total number of nonzeros in all of the matrix-valued inputs.
-}
function_getNumInputNonzeros :: FunctionClass a => a -> IO Int
function_getNumInputNonzeros x = casADi__Function__getNumInputNonzeros (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__getNumOutputNonzeros" c_CasADi__Function__getNumOutputNonzeros
  :: Ptr Function' -> IO CInt
casADi__Function__getNumOutputNonzeros
  :: Function -> IO Int
casADi__Function__getNumOutputNonzeros x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__getNumOutputNonzeros x0' >>= wrapReturn

-- classy wrapper
{-|
>Get total number of nonzeros in all of the matrix-valued outputs.
-}
function_getNumOutputNonzeros :: FunctionClass a => a -> IO Int
function_getNumOutputNonzeros x = casADi__Function__getNumOutputNonzeros (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__getNumInputElements" c_CasADi__Function__getNumInputElements
  :: Ptr Function' -> IO CInt
casADi__Function__getNumInputElements
  :: Function -> IO Int
casADi__Function__getNumInputElements x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__getNumInputElements x0' >>= wrapReturn

-- classy wrapper
{-|
>Get total number of elements in all of the matrix-valued inputs.
-}
function_getNumInputElements :: FunctionClass a => a -> IO Int
function_getNumInputElements x = casADi__Function__getNumInputElements (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__getNumOutputElements" c_CasADi__Function__getNumOutputElements
  :: Ptr Function' -> IO CInt
casADi__Function__getNumOutputElements
  :: Function -> IO Int
casADi__Function__getNumOutputElements x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__getNumOutputElements x0' >>= wrapReturn

-- classy wrapper
{-|
>Get total number of elements in all of the matrix-valued outputs.
-}
function_getNumOutputElements :: FunctionClass a => a -> IO Int
function_getNumOutputElements x = casADi__Function__getNumOutputElements (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__setInputScheme" c_CasADi__Function__setInputScheme
  :: Ptr Function' -> Ptr IOScheme' -> IO ()
casADi__Function__setInputScheme
  :: Function -> IOScheme -> IO ()
casADi__Function__setInputScheme x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__setInputScheme x0' x1' >>= wrapReturn

-- classy wrapper
{-|
>Set input scheme.
-}
function_setInputScheme :: FunctionClass a => a -> IOScheme -> IO ()
function_setInputScheme x = casADi__Function__setInputScheme (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__setOutputScheme" c_CasADi__Function__setOutputScheme
  :: Ptr Function' -> Ptr IOScheme' -> IO ()
casADi__Function__setOutputScheme
  :: Function -> IOScheme -> IO ()
casADi__Function__setOutputScheme x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__setOutputScheme x0' x1' >>= wrapReturn

-- classy wrapper
{-|
>Set output scheme.
-}
function_setOutputScheme :: FunctionClass a => a -> IOScheme -> IO ()
function_setOutputScheme x = casADi__Function__setOutputScheme (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__getInputScheme" c_CasADi__Function__getInputScheme
  :: Ptr Function' -> IO (Ptr IOScheme')
casADi__Function__getInputScheme
  :: Function -> IO IOScheme
casADi__Function__getInputScheme x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__getInputScheme x0' >>= wrapReturn

-- classy wrapper
{-|
>Get input scheme.
-}
function_getInputScheme :: FunctionClass a => a -> IO IOScheme
function_getInputScheme x = casADi__Function__getInputScheme (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__getOutputScheme" c_CasADi__Function__getOutputScheme
  :: Ptr Function' -> IO (Ptr IOScheme')
casADi__Function__getOutputScheme
  :: Function -> IO IOScheme
casADi__Function__getOutputScheme x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__getOutputScheme x0' >>= wrapReturn

-- classy wrapper
{-|
>Get output scheme.
-}
function_getOutputScheme :: FunctionClass a => a -> IO IOScheme
function_getOutputScheme x = casADi__Function__getOutputScheme (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__evaluate" c_CasADi__Function__evaluate
  :: Ptr Function' -> IO ()
casADi__Function__evaluate
  :: Function -> IO ()
casADi__Function__evaluate x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__evaluate x0' >>= wrapReturn

-- classy wrapper
{-|
>Evaluate.
-}
function_evaluate :: FunctionClass a => a -> IO ()
function_evaluate x = casADi__Function__evaluate (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__solve" c_CasADi__Function__solve
  :: Ptr Function' -> IO ()
casADi__Function__solve
  :: Function -> IO ()
casADi__Function__solve x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__solve x0' >>= wrapReturn

-- classy wrapper
{-|
>the same as evaluate()
-}
function_solve :: FunctionClass a => a -> IO ()
function_solve x = casADi__Function__solve (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacobian" c_CasADi__Function__jacobian
  :: Ptr Function' -> CInt -> CInt -> CInt -> CInt -> IO (Ptr Function')
casADi__Function__jacobian
  :: Function -> Int -> Int -> Bool -> Bool -> IO Function
casADi__Function__jacobian x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  c_CasADi__Function__jacobian x0' x1' x2' x3' x4' >>= wrapReturn

-- classy wrapper
{-|
>Generate a Jacobian function of output oind with respect to input iind.
>
>Parameters:
>-----------
>
>iind:  The index of the input
>
>oind:  The index of the output
>
>The default behavior of this class is defined by the derived class. If
>compact is set to true, only the nonzeros of the input and output
>expressions are considered. If symmetric is set to true, the Jacobian being
>calculated is known to be symmetric (usually a Hessian), which can be
>exploited by the algorithm.
>
>The generated Jacobian has one more output than the calling function
>corresponding to the Jacobian and the same number of inputs.
-}
function_jacobian :: FunctionClass a => a -> Int -> Int -> Bool -> Bool -> IO Function
function_jacobian x = casADi__Function__jacobian (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacobian_TIC" c_CasADi__Function__jacobian_TIC
  :: Ptr Function' -> CInt -> CInt -> CInt -> IO (Ptr Function')
casADi__Function__jacobian'
  :: Function -> Int -> Int -> Bool -> IO Function
casADi__Function__jacobian' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__Function__jacobian_TIC x0' x1' x2' x3' >>= wrapReturn

-- classy wrapper
function_jacobian' :: FunctionClass a => a -> Int -> Int -> Bool -> IO Function
function_jacobian' x = casADi__Function__jacobian' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacobian_TIC_TIC" c_CasADi__Function__jacobian_TIC_TIC
  :: Ptr Function' -> CInt -> CInt -> IO (Ptr Function')
casADi__Function__jacobian''
  :: Function -> Int -> Int -> IO Function
casADi__Function__jacobian'' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__jacobian_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_jacobian'' :: FunctionClass a => a -> Int -> Int -> IO Function
function_jacobian'' x = casADi__Function__jacobian'' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacobian_TIC_TIC_TIC" c_CasADi__Function__jacobian_TIC_TIC_TIC
  :: Ptr Function' -> CInt -> IO (Ptr Function')
casADi__Function__jacobian'''
  :: Function -> Int -> IO Function
casADi__Function__jacobian''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__jacobian_TIC_TIC_TIC x0' x1' >>= wrapReturn

-- classy wrapper
function_jacobian''' :: FunctionClass a => a -> Int -> IO Function
function_jacobian''' x = casADi__Function__jacobian''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacobian_TIC_TIC_TIC_TIC" c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC
  :: Ptr Function' -> IO (Ptr Function')
casADi__Function__jacobian''''
  :: Function -> IO Function
casADi__Function__jacobian'''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC x0' >>= wrapReturn

-- classy wrapper
function_jacobian'''' :: FunctionClass a => a -> IO Function
function_jacobian'''' x = casADi__Function__jacobian'''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> CInt -> CInt -> CInt -> IO (Ptr Function')
casADi__Function__jacobian'''''
  :: Function -> String -> Int -> Bool -> Bool -> IO Function
casADi__Function__jacobian''''' x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' x4' >>= wrapReturn

-- classy wrapper
function_jacobian''''' :: FunctionClass a => a -> String -> Int -> Bool -> Bool -> IO Function
function_jacobian''''' x = casADi__Function__jacobian''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> CInt -> CInt -> IO (Ptr Function')
casADi__Function__jacobian''''''
  :: Function -> String -> Int -> Bool -> IO Function
casADi__Function__jacobian'''''' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' >>= wrapReturn

-- classy wrapper
function_jacobian'''''' :: FunctionClass a => a -> String -> Int -> Bool -> IO Function
function_jacobian'''''' x = casADi__Function__jacobian'''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> CInt -> IO (Ptr Function')
casADi__Function__jacobian'''''''
  :: Function -> String -> Int -> IO Function
casADi__Function__jacobian''''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_jacobian''''''' :: FunctionClass a => a -> String -> Int -> IO Function
function_jacobian''''''' x = casADi__Function__jacobian''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> IO (Ptr Function')
casADi__Function__jacobian''''''''
  :: Function -> String -> IO Function
casADi__Function__jacobian'''''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= wrapReturn

-- classy wrapper
function_jacobian'''''''' :: FunctionClass a => a -> String -> IO Function
function_jacobian'''''''' x = casADi__Function__jacobian'''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> CInt -> Ptr StdString' -> CInt -> CInt -> IO (Ptr Function')
casADi__Function__jacobian'''''''''
  :: Function -> Int -> String -> Bool -> Bool -> IO Function
casADi__Function__jacobian''''''''' x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' x4' >>= wrapReturn

-- classy wrapper
function_jacobian''''''''' :: FunctionClass a => a -> Int -> String -> Bool -> Bool -> IO Function
function_jacobian''''''''' x = casADi__Function__jacobian''''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> CInt -> Ptr StdString' -> CInt -> IO (Ptr Function')
casADi__Function__jacobian''''''''''
  :: Function -> Int -> String -> Bool -> IO Function
casADi__Function__jacobian'''''''''' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' >>= wrapReturn

-- classy wrapper
function_jacobian'''''''''' :: FunctionClass a => a -> Int -> String -> Bool -> IO Function
function_jacobian'''''''''' x = casADi__Function__jacobian'''''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> CInt -> Ptr StdString' -> IO (Ptr Function')
casADi__Function__jacobian'''''''''''
  :: Function -> Int -> String -> IO Function
casADi__Function__jacobian''''''''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_jacobian''''''''''' :: FunctionClass a => a -> Int -> String -> IO Function
function_jacobian''''''''''' x = casADi__Function__jacobian''''''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> Ptr StdString' -> CInt -> CInt -> IO (Ptr Function')
casADi__Function__jacobian''''''''''''
  :: Function -> String -> String -> Bool -> Bool -> IO Function
casADi__Function__jacobian'''''''''''' x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' x4' >>= wrapReturn

-- classy wrapper
function_jacobian'''''''''''' :: FunctionClass a => a -> String -> String -> Bool -> Bool -> IO Function
function_jacobian'''''''''''' x = casADi__Function__jacobian'''''''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> Ptr StdString' -> CInt -> IO (Ptr Function')
casADi__Function__jacobian'''''''''''''
  :: Function -> String -> String -> Bool -> IO Function
casADi__Function__jacobian''''''''''''' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' >>= wrapReturn

-- classy wrapper
function_jacobian''''''''''''' :: FunctionClass a => a -> String -> String -> Bool -> IO Function
function_jacobian''''''''''''' x = casADi__Function__jacobian''''''''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> Ptr StdString' -> IO (Ptr Function')
casADi__Function__jacobian''''''''''''''
  :: Function -> String -> String -> IO Function
casADi__Function__jacobian'''''''''''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__jacobian_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_jacobian'''''''''''''' :: FunctionClass a => a -> String -> String -> IO Function
function_jacobian'''''''''''''' x = casADi__Function__jacobian'''''''''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__setJacobian" c_CasADi__Function__setJacobian
  :: Ptr Function' -> Ptr Function' -> CInt -> CInt -> CInt -> IO ()
casADi__Function__setJacobian
  :: Function -> Function -> Int -> Int -> Bool -> IO ()
casADi__Function__setJacobian x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  c_CasADi__Function__setJacobian x0' x1' x2' x3' x4' >>= wrapReturn

-- classy wrapper
{-|
>Set the Jacobian function of output oind with respect to input iind NOTE:
>Does not take ownership, only weak references to the Jacobians are kept
>internally
-}
function_setJacobian :: FunctionClass a => a -> Function -> Int -> Int -> Bool -> IO ()
function_setJacobian x = casADi__Function__setJacobian (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__setJacobian_TIC" c_CasADi__Function__setJacobian_TIC
  :: Ptr Function' -> Ptr Function' -> CInt -> CInt -> IO ()
casADi__Function__setJacobian'
  :: Function -> Function -> Int -> Int -> IO ()
casADi__Function__setJacobian' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__Function__setJacobian_TIC x0' x1' x2' x3' >>= wrapReturn

-- classy wrapper
function_setJacobian' :: FunctionClass a => a -> Function -> Int -> Int -> IO ()
function_setJacobian' x = casADi__Function__setJacobian' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__setJacobian_TIC_TIC" c_CasADi__Function__setJacobian_TIC_TIC
  :: Ptr Function' -> Ptr Function' -> CInt -> IO ()
casADi__Function__setJacobian''
  :: Function -> Function -> Int -> IO ()
casADi__Function__setJacobian'' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__setJacobian_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_setJacobian'' :: FunctionClass a => a -> Function -> Int -> IO ()
function_setJacobian'' x = casADi__Function__setJacobian'' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__setJacobian_TIC_TIC_TIC" c_CasADi__Function__setJacobian_TIC_TIC_TIC
  :: Ptr Function' -> Ptr Function' -> IO ()
casADi__Function__setJacobian'''
  :: Function -> Function -> IO ()
casADi__Function__setJacobian''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__setJacobian_TIC_TIC_TIC x0' x1' >>= wrapReturn

-- classy wrapper
function_setJacobian''' :: FunctionClass a => a -> Function -> IO ()
function_setJacobian''' x = casADi__Function__setJacobian''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__gradient" c_CasADi__Function__gradient
  :: Ptr Function' -> CInt -> CInt -> IO (Ptr Function')
casADi__Function__gradient
  :: Function -> Int -> Int -> IO Function
casADi__Function__gradient x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__gradient x0' x1' x2' >>= wrapReturn

-- classy wrapper
{-|
>Generate a gradient function of output oind with respect to input iind.
>
>Parameters:
>-----------
>
>iind:  The index of the input
>
>oind:  The index of the output
>
>The default behavior of this class is defined by the derived class. Note
>that the output must be scalar. In other cases, use the Jacobian instead.
-}
function_gradient :: FunctionClass a => a -> Int -> Int -> IO Function
function_gradient x = casADi__Function__gradient (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__gradient_TIC" c_CasADi__Function__gradient_TIC
  :: Ptr Function' -> CInt -> IO (Ptr Function')
casADi__Function__gradient'
  :: Function -> Int -> IO Function
casADi__Function__gradient' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__gradient_TIC x0' x1' >>= wrapReturn

-- classy wrapper
function_gradient' :: FunctionClass a => a -> Int -> IO Function
function_gradient' x = casADi__Function__gradient' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__gradient_TIC_TIC" c_CasADi__Function__gradient_TIC_TIC
  :: Ptr Function' -> IO (Ptr Function')
casADi__Function__gradient''
  :: Function -> IO Function
casADi__Function__gradient'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__gradient_TIC_TIC x0' >>= wrapReturn

-- classy wrapper
function_gradient'' :: FunctionClass a => a -> IO Function
function_gradient'' x = casADi__Function__gradient'' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__gradient_TIC_TIC_TIC" c_CasADi__Function__gradient_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> CInt -> IO (Ptr Function')
casADi__Function__gradient'''
  :: Function -> String -> Int -> IO Function
casADi__Function__gradient''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__gradient_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_gradient''' :: FunctionClass a => a -> String -> Int -> IO Function
function_gradient''' x = casADi__Function__gradient''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__gradient_TIC_TIC_TIC_TIC" c_CasADi__Function__gradient_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> IO (Ptr Function')
casADi__Function__gradient''''
  :: Function -> String -> IO Function
casADi__Function__gradient'''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__gradient_TIC_TIC_TIC_TIC x0' x1' >>= wrapReturn

-- classy wrapper
function_gradient'''' :: FunctionClass a => a -> String -> IO Function
function_gradient'''' x = casADi__Function__gradient'''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__gradient_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__gradient_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> CInt -> Ptr StdString' -> IO (Ptr Function')
casADi__Function__gradient'''''
  :: Function -> Int -> String -> IO Function
casADi__Function__gradient''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__gradient_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_gradient''''' :: FunctionClass a => a -> Int -> String -> IO Function
function_gradient''''' x = casADi__Function__gradient''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__gradient_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__gradient_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> Ptr StdString' -> IO (Ptr Function')
casADi__Function__gradient''''''
  :: Function -> String -> String -> IO Function
casADi__Function__gradient'''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__gradient_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_gradient'''''' :: FunctionClass a => a -> String -> String -> IO Function
function_gradient'''''' x = casADi__Function__gradient'''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__tangent" c_CasADi__Function__tangent
  :: Ptr Function' -> CInt -> CInt -> IO (Ptr Function')
casADi__Function__tangent
  :: Function -> Int -> Int -> IO Function
casADi__Function__tangent x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__tangent x0' x1' x2' >>= wrapReturn

-- classy wrapper
{-|
>Generate a tangent function of output oind with respect to input iind.
>
>Parameters:
>-----------
>
>iind:  The index of the input
>
>oind:  The index of the output
>
>The default behavior of this class is defined by the derived class. Note
>that the input must be scalar. In other cases, use the Jacobian instead.
-}
function_tangent :: FunctionClass a => a -> Int -> Int -> IO Function
function_tangent x = casADi__Function__tangent (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__tangent_TIC" c_CasADi__Function__tangent_TIC
  :: Ptr Function' -> CInt -> IO (Ptr Function')
casADi__Function__tangent'
  :: Function -> Int -> IO Function
casADi__Function__tangent' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__tangent_TIC x0' x1' >>= wrapReturn

-- classy wrapper
function_tangent' :: FunctionClass a => a -> Int -> IO Function
function_tangent' x = casADi__Function__tangent' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__tangent_TIC_TIC" c_CasADi__Function__tangent_TIC_TIC
  :: Ptr Function' -> IO (Ptr Function')
casADi__Function__tangent''
  :: Function -> IO Function
casADi__Function__tangent'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__tangent_TIC_TIC x0' >>= wrapReturn

-- classy wrapper
function_tangent'' :: FunctionClass a => a -> IO Function
function_tangent'' x = casADi__Function__tangent'' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__tangent_TIC_TIC_TIC" c_CasADi__Function__tangent_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> CInt -> IO (Ptr Function')
casADi__Function__tangent'''
  :: Function -> String -> Int -> IO Function
casADi__Function__tangent''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__tangent_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_tangent''' :: FunctionClass a => a -> String -> Int -> IO Function
function_tangent''' x = casADi__Function__tangent''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__tangent_TIC_TIC_TIC_TIC" c_CasADi__Function__tangent_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> IO (Ptr Function')
casADi__Function__tangent''''
  :: Function -> String -> IO Function
casADi__Function__tangent'''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__tangent_TIC_TIC_TIC_TIC x0' x1' >>= wrapReturn

-- classy wrapper
function_tangent'''' :: FunctionClass a => a -> String -> IO Function
function_tangent'''' x = casADi__Function__tangent'''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__tangent_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__tangent_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> CInt -> Ptr StdString' -> IO (Ptr Function')
casADi__Function__tangent'''''
  :: Function -> Int -> String -> IO Function
casADi__Function__tangent''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__tangent_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_tangent''''' :: FunctionClass a => a -> Int -> String -> IO Function
function_tangent''''' x = casADi__Function__tangent''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__tangent_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__tangent_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> Ptr StdString' -> IO (Ptr Function')
casADi__Function__tangent''''''
  :: Function -> String -> String -> IO Function
casADi__Function__tangent'''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__tangent_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_tangent'''''' :: FunctionClass a => a -> String -> String -> IO Function
function_tangent'''''' x = casADi__Function__tangent'''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__hessian" c_CasADi__Function__hessian
  :: Ptr Function' -> CInt -> CInt -> IO (Ptr Function')
casADi__Function__hessian
  :: Function -> Int -> Int -> IO Function
casADi__Function__hessian x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__hessian x0' x1' x2' >>= wrapReturn

-- classy wrapper
{-|
>Generate a Hessian function of output oind with respect to input iind.
>
>Parameters:
>-----------
>
>iind:  The index of the input
>
>oind:  The index of the output
>
>The generated Hessian has two more outputs than the calling function
>corresponding to the Hessian and the gradients.
-}
function_hessian :: FunctionClass a => a -> Int -> Int -> IO Function
function_hessian x = casADi__Function__hessian (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__hessian_TIC" c_CasADi__Function__hessian_TIC
  :: Ptr Function' -> CInt -> IO (Ptr Function')
casADi__Function__hessian'
  :: Function -> Int -> IO Function
casADi__Function__hessian' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__hessian_TIC x0' x1' >>= wrapReturn

-- classy wrapper
function_hessian' :: FunctionClass a => a -> Int -> IO Function
function_hessian' x = casADi__Function__hessian' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__hessian_TIC_TIC" c_CasADi__Function__hessian_TIC_TIC
  :: Ptr Function' -> IO (Ptr Function')
casADi__Function__hessian''
  :: Function -> IO Function
casADi__Function__hessian'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__hessian_TIC_TIC x0' >>= wrapReturn

-- classy wrapper
function_hessian'' :: FunctionClass a => a -> IO Function
function_hessian'' x = casADi__Function__hessian'' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__hessian_TIC_TIC_TIC" c_CasADi__Function__hessian_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> CInt -> IO (Ptr Function')
casADi__Function__hessian'''
  :: Function -> String -> Int -> IO Function
casADi__Function__hessian''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__hessian_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_hessian''' :: FunctionClass a => a -> String -> Int -> IO Function
function_hessian''' x = casADi__Function__hessian''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__hessian_TIC_TIC_TIC_TIC" c_CasADi__Function__hessian_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> IO (Ptr Function')
casADi__Function__hessian''''
  :: Function -> String -> IO Function
casADi__Function__hessian'''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__hessian_TIC_TIC_TIC_TIC x0' x1' >>= wrapReturn

-- classy wrapper
function_hessian'''' :: FunctionClass a => a -> String -> IO Function
function_hessian'''' x = casADi__Function__hessian'''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__hessian_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__hessian_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> CInt -> Ptr StdString' -> IO (Ptr Function')
casADi__Function__hessian'''''
  :: Function -> Int -> String -> IO Function
casADi__Function__hessian''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__hessian_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_hessian''''' :: FunctionClass a => a -> Int -> String -> IO Function
function_hessian''''' x = casADi__Function__hessian''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__hessian_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__hessian_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> Ptr StdString' -> IO (Ptr Function')
casADi__Function__hessian''''''
  :: Function -> String -> String -> IO Function
casADi__Function__hessian'''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__hessian_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_hessian'''''' :: FunctionClass a => a -> String -> String -> IO Function
function_hessian'''''' x = casADi__Function__hessian'''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__fullJacobian" c_CasADi__Function__fullJacobian
  :: Ptr Function' -> IO (Ptr Function')
casADi__Function__fullJacobian
  :: Function -> IO Function
casADi__Function__fullJacobian x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__fullJacobian x0' >>= wrapReturn

-- classy wrapper
{-|
>Generate a Jacobian function of all the inputs elements with respect to all
>the output elements).
-}
function_fullJacobian :: FunctionClass a => a -> IO Function
function_fullJacobian x = casADi__Function__fullJacobian (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__setFullJacobian" c_CasADi__Function__setFullJacobian
  :: Ptr Function' -> Ptr Function' -> IO ()
casADi__Function__setFullJacobian
  :: Function -> Function -> IO ()
casADi__Function__setFullJacobian x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__setFullJacobian x0' x1' >>= wrapReturn

-- classy wrapper
{-|
>Set the Jacobian of all the input nonzeros with respect to all output
>nonzeros NOTE: Does not take ownership, only weak references to the Jacobian
>are kept internally
-}
function_setFullJacobian :: FunctionClass a => a -> Function -> IO ()
function_setFullJacobian x = casADi__Function__setFullJacobian (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__call" c_CasADi__Function__call
  :: Ptr Function' -> Ptr (CppVec (Ptr DMatrix')) -> CInt -> CInt -> IO (Ptr (CppVec (Ptr DMatrix')))
casADi__Function__call
  :: Function -> Vector DMatrix -> Bool -> Bool -> IO (Vector DMatrix)
casADi__Function__call x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__Function__call x0' x1' x2' x3' >>= wrapReturn

-- classy wrapper
{-|
>>  std::vector<DMatrix> CasADi::Function::call(const std::vector< DMatrix > &arg, bool always_inline=false, bool never_inline=false)
>
>>  std::vector<SX> CasADi::Function::call(const std::vector< SX > &arg, bool always_inline=false, bool never_inline=false)
>
>>  std::vector<MX> CasADi::Function::call(const std::vector< MX > &arg, bool always_inline=false, bool never_inline=false)
>------------------------------------------------------------------------
>
>Evaluate the function symbolically or numerically.
>
>>  std::vector<std::vector<MX> > CasADi::Function::call(const std::vector< std::vector< MX > > &arg, const Dictionary &paropt=Dictionary())
>
>>  void CasADi::Function::call(const MXVector &arg, MXVector &output_res, const MXVectorVector &fseed, MXVectorVector &output_fsens, const MXVectorVector &aseed, MXVectorVector &output_asens)
>
>>  std::vector<MX> CasADi::Function::call(const MX &arg)
>------------------------------------------------------------------------
>
>[DEPRECATED]
-}
function_call :: FunctionClass a => a -> Vector DMatrix -> Bool -> Bool -> IO (Vector DMatrix)
function_call x = casADi__Function__call (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__call_TIC" c_CasADi__Function__call_TIC
  :: Ptr Function' -> Ptr (CppVec (Ptr DMatrix')) -> CInt -> IO (Ptr (CppVec (Ptr DMatrix')))
casADi__Function__call'
  :: Function -> Vector DMatrix -> Bool -> IO (Vector DMatrix)
casADi__Function__call' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__call_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_call' :: FunctionClass a => a -> Vector DMatrix -> Bool -> IO (Vector DMatrix)
function_call' x = casADi__Function__call' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__call_TIC_TIC" c_CasADi__Function__call_TIC_TIC
  :: Ptr Function' -> Ptr (CppVec (Ptr DMatrix')) -> IO (Ptr (CppVec (Ptr DMatrix')))
casADi__Function__call''
  :: Function -> Vector DMatrix -> IO (Vector DMatrix)
casADi__Function__call'' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__call_TIC_TIC x0' x1' >>= wrapReturn

-- classy wrapper
function_call'' :: FunctionClass a => a -> Vector DMatrix -> IO (Vector DMatrix)
function_call'' x = casADi__Function__call'' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__call_TIC_TIC_TIC" c_CasADi__Function__call_TIC_TIC_TIC
  :: Ptr Function' -> Ptr (CppVec (Ptr SX')) -> CInt -> CInt -> IO (Ptr (CppVec (Ptr SX')))
casADi__Function__call'''
  :: Function -> Vector SX -> Bool -> Bool -> IO (Vector SX)
casADi__Function__call''' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__Function__call_TIC_TIC_TIC x0' x1' x2' x3' >>= wrapReturn

-- classy wrapper
function_call''' :: FunctionClass a => a -> Vector SX -> Bool -> Bool -> IO (Vector SX)
function_call''' x = casADi__Function__call''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__call_TIC_TIC_TIC_TIC" c_CasADi__Function__call_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr (CppVec (Ptr SX')) -> CInt -> IO (Ptr (CppVec (Ptr SX')))
casADi__Function__call''''
  :: Function -> Vector SX -> Bool -> IO (Vector SX)
casADi__Function__call'''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__call_TIC_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_call'''' :: FunctionClass a => a -> Vector SX -> Bool -> IO (Vector SX)
function_call'''' x = casADi__Function__call'''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__call_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__call_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr (CppVec (Ptr SX')) -> IO (Ptr (CppVec (Ptr SX')))
casADi__Function__call'''''
  :: Function -> Vector SX -> IO (Vector SX)
casADi__Function__call''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__call_TIC_TIC_TIC_TIC_TIC x0' x1' >>= wrapReturn

-- classy wrapper
function_call''''' :: FunctionClass a => a -> Vector SX -> IO (Vector SX)
function_call''''' x = casADi__Function__call''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__call_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__call_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr (CppVec (Ptr MX')) -> CInt -> CInt -> IO (Ptr (CppVec (Ptr MX')))
casADi__Function__call''''''
  :: Function -> Vector MX -> Bool -> Bool -> IO (Vector MX)
casADi__Function__call'''''' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__Function__call_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' >>= wrapReturn

-- classy wrapper
function_call'''''' :: FunctionClass a => a -> Vector MX -> Bool -> Bool -> IO (Vector MX)
function_call'''''' x = casADi__Function__call'''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__call_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__call_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr (CppVec (Ptr MX')) -> CInt -> IO (Ptr (CppVec (Ptr MX')))
casADi__Function__call'''''''
  :: Function -> Vector MX -> Bool -> IO (Vector MX)
casADi__Function__call''''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__call_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_call''''''' :: FunctionClass a => a -> Vector MX -> Bool -> IO (Vector MX)
function_call''''''' x = casADi__Function__call''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__call_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__call_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr (CppVec (Ptr MX')) -> IO (Ptr (CppVec (Ptr MX')))
casADi__Function__call''''''''
  :: Function -> Vector MX -> IO (Vector MX)
casADi__Function__call'''''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__call_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= wrapReturn

-- classy wrapper
function_call'''''''' :: FunctionClass a => a -> Vector MX -> IO (Vector MX)
function_call'''''''' x = casADi__Function__call'''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__operator_call" c_CasADi__Function__operator_call
  :: Ptr Function' -> Ptr (CppVec (Ptr DMatrix')) -> IO (Ptr (CppVec (Ptr DMatrix')))
casADi__Function__operator_call
  :: Function -> Vector DMatrix -> IO (Vector DMatrix)
casADi__Function__operator_call x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__operator_call x0' x1' >>= wrapReturn

-- classy wrapper
function_operator_call :: FunctionClass a => a -> Vector DMatrix -> IO (Vector DMatrix)
function_operator_call x = casADi__Function__operator_call (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__operator_call_TIC" c_CasADi__Function__operator_call_TIC
  :: Ptr Function' -> Ptr (CppVec (Ptr SX')) -> IO (Ptr (CppVec (Ptr SX')))
casADi__Function__operator_call'
  :: Function -> Vector SX -> IO (Vector SX)
casADi__Function__operator_call' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__operator_call_TIC x0' x1' >>= wrapReturn

-- classy wrapper
function_operator_call' :: FunctionClass a => a -> Vector SX -> IO (Vector SX)
function_operator_call' x = casADi__Function__operator_call' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__operator_call_TIC_TIC" c_CasADi__Function__operator_call_TIC_TIC
  :: Ptr Function' -> Ptr (CppVec (Ptr MX')) -> IO (Ptr (CppVec (Ptr MX')))
casADi__Function__operator_call''
  :: Function -> Vector MX -> IO (Vector MX)
casADi__Function__operator_call'' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__operator_call_TIC_TIC x0' x1' >>= wrapReturn

-- classy wrapper
function_operator_call'' :: FunctionClass a => a -> Vector MX -> IO (Vector MX)
function_operator_call'' x = casADi__Function__operator_call'' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__callDerivative" c_CasADi__Function__callDerivative
  :: Ptr Function' -> Ptr (CppVec (Ptr DMatrix')) -> Ptr (CppVec (Ptr DMatrix')) -> Ptr (CppVec (Ptr (CppVec (Ptr DMatrix')))) -> Ptr (CppVec (Ptr (CppVec (Ptr DMatrix')))) -> Ptr (CppVec (Ptr (CppVec (Ptr DMatrix')))) -> Ptr (CppVec (Ptr (CppVec (Ptr DMatrix')))) -> CInt -> CInt -> IO ()
casADi__Function__callDerivative
  :: Function -> Vector DMatrix -> Vector DMatrix -> Vector (Vector DMatrix) -> Vector (Vector DMatrix) -> Vector (Vector DMatrix) -> Vector (Vector DMatrix) -> Bool -> Bool -> IO ()
casADi__Function__callDerivative x0 x1 x2 x3 x4 x5 x6 x7 x8 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  withMarshal x5 $ \x5' ->
  withMarshal x6 $ \x6' ->
  withMarshal x7 $ \x7' ->
  withMarshal x8 $ \x8' ->
  c_CasADi__Function__callDerivative x0' x1' x2' x3' x4' x5' x6' x7' x8' >>= wrapReturn

-- classy wrapper
{-|
>[INTERNAL]
>Evaluate the function symbolically or numerically with directional
>derivatives The first two arguments are the nondifferentiated inputs and
>results of the evaluation, the next two arguments are a set of forward
>directional seeds and the resulting forward directional derivatives, the
>length of the vector being the number of forward directions. The next two
>arguments are a set of adjoint directional seeds and the resulting adjoint
>directional derivatives, the length of the vector being the number of
>adjoint directions.
-}
function_callDerivative :: FunctionClass a => a -> Vector DMatrix -> Vector DMatrix -> Vector (Vector DMatrix) -> Vector (Vector DMatrix) -> Vector (Vector DMatrix) -> Vector (Vector DMatrix) -> Bool -> Bool -> IO ()
function_callDerivative x = casADi__Function__callDerivative (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__callDerivative_TIC" c_CasADi__Function__callDerivative_TIC
  :: Ptr Function' -> Ptr (CppVec (Ptr DMatrix')) -> Ptr (CppVec (Ptr DMatrix')) -> Ptr (CppVec (Ptr (CppVec (Ptr DMatrix')))) -> Ptr (CppVec (Ptr (CppVec (Ptr DMatrix')))) -> Ptr (CppVec (Ptr (CppVec (Ptr DMatrix')))) -> Ptr (CppVec (Ptr (CppVec (Ptr DMatrix')))) -> CInt -> IO ()
casADi__Function__callDerivative'
  :: Function -> Vector DMatrix -> Vector DMatrix -> Vector (Vector DMatrix) -> Vector (Vector DMatrix) -> Vector (Vector DMatrix) -> Vector (Vector DMatrix) -> Bool -> IO ()
casADi__Function__callDerivative' x0 x1 x2 x3 x4 x5 x6 x7 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  withMarshal x5 $ \x5' ->
  withMarshal x6 $ \x6' ->
  withMarshal x7 $ \x7' ->
  c_CasADi__Function__callDerivative_TIC x0' x1' x2' x3' x4' x5' x6' x7' >>= wrapReturn

-- classy wrapper
function_callDerivative' :: FunctionClass a => a -> Vector DMatrix -> Vector DMatrix -> Vector (Vector DMatrix) -> Vector (Vector DMatrix) -> Vector (Vector DMatrix) -> Vector (Vector DMatrix) -> Bool -> IO ()
function_callDerivative' x = casADi__Function__callDerivative' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__callDerivative_TIC_TIC" c_CasADi__Function__callDerivative_TIC_TIC
  :: Ptr Function' -> Ptr (CppVec (Ptr DMatrix')) -> Ptr (CppVec (Ptr DMatrix')) -> Ptr (CppVec (Ptr (CppVec (Ptr DMatrix')))) -> Ptr (CppVec (Ptr (CppVec (Ptr DMatrix')))) -> Ptr (CppVec (Ptr (CppVec (Ptr DMatrix')))) -> Ptr (CppVec (Ptr (CppVec (Ptr DMatrix')))) -> IO ()
casADi__Function__callDerivative''
  :: Function -> Vector DMatrix -> Vector DMatrix -> Vector (Vector DMatrix) -> Vector (Vector DMatrix) -> Vector (Vector DMatrix) -> Vector (Vector DMatrix) -> IO ()
casADi__Function__callDerivative'' x0 x1 x2 x3 x4 x5 x6 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  withMarshal x5 $ \x5' ->
  withMarshal x6 $ \x6' ->
  c_CasADi__Function__callDerivative_TIC_TIC x0' x1' x2' x3' x4' x5' x6' >>= wrapReturn

-- classy wrapper
function_callDerivative'' :: FunctionClass a => a -> Vector DMatrix -> Vector DMatrix -> Vector (Vector DMatrix) -> Vector (Vector DMatrix) -> Vector (Vector DMatrix) -> Vector (Vector DMatrix) -> IO ()
function_callDerivative'' x = casADi__Function__callDerivative'' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__callDerivative_TIC_TIC_TIC" c_CasADi__Function__callDerivative_TIC_TIC_TIC
  :: Ptr Function' -> Ptr (CppVec (Ptr SX')) -> Ptr (CppVec (Ptr SX')) -> Ptr (CppVec (Ptr (CppVec (Ptr SX')))) -> Ptr (CppVec (Ptr (CppVec (Ptr SX')))) -> Ptr (CppVec (Ptr (CppVec (Ptr SX')))) -> Ptr (CppVec (Ptr (CppVec (Ptr SX')))) -> CInt -> CInt -> IO ()
casADi__Function__callDerivative'''
  :: Function -> Vector SX -> Vector SX -> Vector (Vector SX) -> Vector (Vector SX) -> Vector (Vector SX) -> Vector (Vector SX) -> Bool -> Bool -> IO ()
casADi__Function__callDerivative''' x0 x1 x2 x3 x4 x5 x6 x7 x8 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  withMarshal x5 $ \x5' ->
  withMarshal x6 $ \x6' ->
  withMarshal x7 $ \x7' ->
  withMarshal x8 $ \x8' ->
  c_CasADi__Function__callDerivative_TIC_TIC_TIC x0' x1' x2' x3' x4' x5' x6' x7' x8' >>= wrapReturn

-- classy wrapper
function_callDerivative''' :: FunctionClass a => a -> Vector SX -> Vector SX -> Vector (Vector SX) -> Vector (Vector SX) -> Vector (Vector SX) -> Vector (Vector SX) -> Bool -> Bool -> IO ()
function_callDerivative''' x = casADi__Function__callDerivative''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__callDerivative_TIC_TIC_TIC_TIC" c_CasADi__Function__callDerivative_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr (CppVec (Ptr SX')) -> Ptr (CppVec (Ptr SX')) -> Ptr (CppVec (Ptr (CppVec (Ptr SX')))) -> Ptr (CppVec (Ptr (CppVec (Ptr SX')))) -> Ptr (CppVec (Ptr (CppVec (Ptr SX')))) -> Ptr (CppVec (Ptr (CppVec (Ptr SX')))) -> CInt -> IO ()
casADi__Function__callDerivative''''
  :: Function -> Vector SX -> Vector SX -> Vector (Vector SX) -> Vector (Vector SX) -> Vector (Vector SX) -> Vector (Vector SX) -> Bool -> IO ()
casADi__Function__callDerivative'''' x0 x1 x2 x3 x4 x5 x6 x7 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  withMarshal x5 $ \x5' ->
  withMarshal x6 $ \x6' ->
  withMarshal x7 $ \x7' ->
  c_CasADi__Function__callDerivative_TIC_TIC_TIC_TIC x0' x1' x2' x3' x4' x5' x6' x7' >>= wrapReturn

-- classy wrapper
function_callDerivative'''' :: FunctionClass a => a -> Vector SX -> Vector SX -> Vector (Vector SX) -> Vector (Vector SX) -> Vector (Vector SX) -> Vector (Vector SX) -> Bool -> IO ()
function_callDerivative'''' x = casADi__Function__callDerivative'''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__callDerivative_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__callDerivative_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr (CppVec (Ptr SX')) -> Ptr (CppVec (Ptr SX')) -> Ptr (CppVec (Ptr (CppVec (Ptr SX')))) -> Ptr (CppVec (Ptr (CppVec (Ptr SX')))) -> Ptr (CppVec (Ptr (CppVec (Ptr SX')))) -> Ptr (CppVec (Ptr (CppVec (Ptr SX')))) -> IO ()
casADi__Function__callDerivative'''''
  :: Function -> Vector SX -> Vector SX -> Vector (Vector SX) -> Vector (Vector SX) -> Vector (Vector SX) -> Vector (Vector SX) -> IO ()
casADi__Function__callDerivative''''' x0 x1 x2 x3 x4 x5 x6 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  withMarshal x5 $ \x5' ->
  withMarshal x6 $ \x6' ->
  c_CasADi__Function__callDerivative_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' x4' x5' x6' >>= wrapReturn

-- classy wrapper
function_callDerivative''''' :: FunctionClass a => a -> Vector SX -> Vector SX -> Vector (Vector SX) -> Vector (Vector SX) -> Vector (Vector SX) -> Vector (Vector SX) -> IO ()
function_callDerivative''''' x = casADi__Function__callDerivative''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__callDerivative_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__callDerivative_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr (CppVec (Ptr MX')))) -> Ptr (CppVec (Ptr (CppVec (Ptr MX')))) -> Ptr (CppVec (Ptr (CppVec (Ptr MX')))) -> Ptr (CppVec (Ptr (CppVec (Ptr MX')))) -> CInt -> CInt -> IO ()
casADi__Function__callDerivative''''''
  :: Function -> Vector MX -> Vector MX -> Vector (Vector MX) -> Vector (Vector MX) -> Vector (Vector MX) -> Vector (Vector MX) -> Bool -> Bool -> IO ()
casADi__Function__callDerivative'''''' x0 x1 x2 x3 x4 x5 x6 x7 x8 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  withMarshal x5 $ \x5' ->
  withMarshal x6 $ \x6' ->
  withMarshal x7 $ \x7' ->
  withMarshal x8 $ \x8' ->
  c_CasADi__Function__callDerivative_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' x4' x5' x6' x7' x8' >>= wrapReturn

-- classy wrapper
function_callDerivative'''''' :: FunctionClass a => a -> Vector MX -> Vector MX -> Vector (Vector MX) -> Vector (Vector MX) -> Vector (Vector MX) -> Vector (Vector MX) -> Bool -> Bool -> IO ()
function_callDerivative'''''' x = casADi__Function__callDerivative'''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__callDerivative_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__callDerivative_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr (CppVec (Ptr MX')))) -> Ptr (CppVec (Ptr (CppVec (Ptr MX')))) -> Ptr (CppVec (Ptr (CppVec (Ptr MX')))) -> Ptr (CppVec (Ptr (CppVec (Ptr MX')))) -> CInt -> IO ()
casADi__Function__callDerivative'''''''
  :: Function -> Vector MX -> Vector MX -> Vector (Vector MX) -> Vector (Vector MX) -> Vector (Vector MX) -> Vector (Vector MX) -> Bool -> IO ()
casADi__Function__callDerivative''''''' x0 x1 x2 x3 x4 x5 x6 x7 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  withMarshal x5 $ \x5' ->
  withMarshal x6 $ \x6' ->
  withMarshal x7 $ \x7' ->
  c_CasADi__Function__callDerivative_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' x4' x5' x6' x7' >>= wrapReturn

-- classy wrapper
function_callDerivative''''''' :: FunctionClass a => a -> Vector MX -> Vector MX -> Vector (Vector MX) -> Vector (Vector MX) -> Vector (Vector MX) -> Vector (Vector MX) -> Bool -> IO ()
function_callDerivative''''''' x = casADi__Function__callDerivative''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__callDerivative_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__callDerivative_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr (CppVec (Ptr MX')))) -> Ptr (CppVec (Ptr (CppVec (Ptr MX')))) -> Ptr (CppVec (Ptr (CppVec (Ptr MX')))) -> Ptr (CppVec (Ptr (CppVec (Ptr MX')))) -> IO ()
casADi__Function__callDerivative''''''''
  :: Function -> Vector MX -> Vector MX -> Vector (Vector MX) -> Vector (Vector MX) -> Vector (Vector MX) -> Vector (Vector MX) -> IO ()
casADi__Function__callDerivative'''''''' x0 x1 x2 x3 x4 x5 x6 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  withMarshal x5 $ \x5' ->
  withMarshal x6 $ \x6' ->
  c_CasADi__Function__callDerivative_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' x4' x5' x6' >>= wrapReturn

-- classy wrapper
function_callDerivative'''''''' :: FunctionClass a => a -> Vector MX -> Vector MX -> Vector (Vector MX) -> Vector (Vector MX) -> Vector (Vector MX) -> Vector (Vector MX) -> IO ()
function_callDerivative'''''''' x = casADi__Function__callDerivative'''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__callParallel" c_CasADi__Function__callParallel
  :: Ptr Function' -> Ptr (CppVec (Ptr (CppVec (Ptr MX')))) -> IO (Ptr (CppVec (Ptr (CppVec (Ptr MX')))))
casADi__Function__callParallel
  :: Function -> Vector (Vector MX) -> IO (Vector (Vector MX))
casADi__Function__callParallel x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__callParallel x0' x1' >>= wrapReturn

-- classy wrapper
{-|
>Evaluate symbolically in parallel (matrix graph) paropt: Set of options to
>be passed to the Parallelizer.
-}
function_callParallel :: FunctionClass a => a -> Vector (Vector MX) -> IO (Vector (Vector MX))
function_callParallel x = casADi__Function__callParallel (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__derivative" c_CasADi__Function__derivative
  :: Ptr Function' -> CInt -> CInt -> IO (Ptr Function')
casADi__Function__derivative
  :: Function -> Int -> Int -> IO Function
casADi__Function__derivative x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__derivative x0' x1' x2' >>= wrapReturn

-- classy wrapper
{-|
>Get a function that calculates nfwd forward derivatives and nadj adjoint
>derivatives.
>
>Returns a function with (1+nfwd)*n_in+nadj*n_out inputs and (1+nfwd)*n_out +
>nadj*n_in outputs. The first n_in inputs corresponds to nondifferentiated
>inputs. The next nfwd*n_in inputs corresponds to forward seeds, one
>direction at a time and the last nadj*n_out inputs corresponds to adjoint
>seeds, one direction at a time. The first n_out outputs corresponds to
>nondifferentiated outputs. The next nfwd*n_out outputs corresponds to
>forward sensitivities, one direction at a time and the last nadj*n_in
>outputs corresponds to adjoint sensitivties, one direction at a time.
>
>(n_in = getNumInputs(), n_out = getNumOutputs())
>
>The functions returned are cached, meaning that if called multiple timed
>with the same value, then multiple references to the same function will be
>returned.
-}
function_derivative :: FunctionClass a => a -> Int -> Int -> IO Function
function_derivative x = casADi__Function__derivative (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__setDerivative" c_CasADi__Function__setDerivative
  :: Ptr Function' -> Ptr Function' -> CInt -> CInt -> IO ()
casADi__Function__setDerivative
  :: Function -> Function -> Int -> Int -> IO ()
casADi__Function__setDerivative x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__Function__setDerivative x0' x1' x2' x3' >>= wrapReturn

-- classy wrapper
{-|
>Set a function that calculates nfwd forward dedrivatives and nadj adjoint
>derivatives NOTE: Does not take ownership, only weak references to the
>derivatives are kept internally
-}
function_setDerivative :: FunctionClass a => a -> Function -> Int -> Int -> IO ()
function_setDerivative x = casADi__Function__setDerivative (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacSparsity" c_CasADi__Function__jacSparsity
  :: Ptr Function' -> CInt -> CInt -> CInt -> CInt -> IO (Ptr Sparsity')
casADi__Function__jacSparsity
  :: Function -> Int -> Int -> Bool -> Bool -> IO Sparsity
casADi__Function__jacSparsity x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  c_CasADi__Function__jacSparsity x0' x1' x2' x3' x4' >>= wrapReturn

-- classy wrapper
{-|
>Get, if necessary generate, the sparsity of a Jacobian block.
-}
function_jacSparsity :: FunctionClass a => a -> Int -> Int -> Bool -> Bool -> IO Sparsity
function_jacSparsity x = casADi__Function__jacSparsity (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacSparsity_TIC" c_CasADi__Function__jacSparsity_TIC
  :: Ptr Function' -> CInt -> CInt -> CInt -> IO (Ptr Sparsity')
casADi__Function__jacSparsity'
  :: Function -> Int -> Int -> Bool -> IO Sparsity
casADi__Function__jacSparsity' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__Function__jacSparsity_TIC x0' x1' x2' x3' >>= wrapReturn

-- classy wrapper
function_jacSparsity' :: FunctionClass a => a -> Int -> Int -> Bool -> IO Sparsity
function_jacSparsity' x = casADi__Function__jacSparsity' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacSparsity_TIC_TIC" c_CasADi__Function__jacSparsity_TIC_TIC
  :: Ptr Function' -> CInt -> CInt -> IO (Ptr Sparsity')
casADi__Function__jacSparsity''
  :: Function -> Int -> Int -> IO Sparsity
casADi__Function__jacSparsity'' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__jacSparsity_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_jacSparsity'' :: FunctionClass a => a -> Int -> Int -> IO Sparsity
function_jacSparsity'' x = casADi__Function__jacSparsity'' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacSparsity_TIC_TIC_TIC" c_CasADi__Function__jacSparsity_TIC_TIC_TIC
  :: Ptr Function' -> CInt -> IO (Ptr Sparsity')
casADi__Function__jacSparsity'''
  :: Function -> Int -> IO Sparsity
casADi__Function__jacSparsity''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__jacSparsity_TIC_TIC_TIC x0' x1' >>= wrapReturn

-- classy wrapper
function_jacSparsity''' :: FunctionClass a => a -> Int -> IO Sparsity
function_jacSparsity''' x = casADi__Function__jacSparsity''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC" c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC
  :: Ptr Function' -> IO (Ptr Sparsity')
casADi__Function__jacSparsity''''
  :: Function -> IO Sparsity
casADi__Function__jacSparsity'''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC x0' >>= wrapReturn

-- classy wrapper
function_jacSparsity'''' :: FunctionClass a => a -> IO Sparsity
function_jacSparsity'''' x = casADi__Function__jacSparsity'''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> CInt -> CInt -> CInt -> IO (Ptr Sparsity')
casADi__Function__jacSparsity'''''
  :: Function -> String -> Int -> Bool -> Bool -> IO Sparsity
casADi__Function__jacSparsity''''' x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' x4' >>= wrapReturn

-- classy wrapper
function_jacSparsity''''' :: FunctionClass a => a -> String -> Int -> Bool -> Bool -> IO Sparsity
function_jacSparsity''''' x = casADi__Function__jacSparsity''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> CInt -> CInt -> IO (Ptr Sparsity')
casADi__Function__jacSparsity''''''
  :: Function -> String -> Int -> Bool -> IO Sparsity
casADi__Function__jacSparsity'''''' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' >>= wrapReturn

-- classy wrapper
function_jacSparsity'''''' :: FunctionClass a => a -> String -> Int -> Bool -> IO Sparsity
function_jacSparsity'''''' x = casADi__Function__jacSparsity'''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> CInt -> IO (Ptr Sparsity')
casADi__Function__jacSparsity'''''''
  :: Function -> String -> Int -> IO Sparsity
casADi__Function__jacSparsity''''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_jacSparsity''''''' :: FunctionClass a => a -> String -> Int -> IO Sparsity
function_jacSparsity''''''' x = casADi__Function__jacSparsity''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> IO (Ptr Sparsity')
casADi__Function__jacSparsity''''''''
  :: Function -> String -> IO Sparsity
casADi__Function__jacSparsity'''''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= wrapReturn

-- classy wrapper
function_jacSparsity'''''''' :: FunctionClass a => a -> String -> IO Sparsity
function_jacSparsity'''''''' x = casADi__Function__jacSparsity'''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> CInt -> Ptr StdString' -> CInt -> CInt -> IO (Ptr Sparsity')
casADi__Function__jacSparsity'''''''''
  :: Function -> Int -> String -> Bool -> Bool -> IO Sparsity
casADi__Function__jacSparsity''''''''' x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' x4' >>= wrapReturn

-- classy wrapper
function_jacSparsity''''''''' :: FunctionClass a => a -> Int -> String -> Bool -> Bool -> IO Sparsity
function_jacSparsity''''''''' x = casADi__Function__jacSparsity''''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> CInt -> Ptr StdString' -> CInt -> IO (Ptr Sparsity')
casADi__Function__jacSparsity''''''''''
  :: Function -> Int -> String -> Bool -> IO Sparsity
casADi__Function__jacSparsity'''''''''' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' >>= wrapReturn

-- classy wrapper
function_jacSparsity'''''''''' :: FunctionClass a => a -> Int -> String -> Bool -> IO Sparsity
function_jacSparsity'''''''''' x = casADi__Function__jacSparsity'''''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> CInt -> Ptr StdString' -> IO (Ptr Sparsity')
casADi__Function__jacSparsity'''''''''''
  :: Function -> Int -> String -> IO Sparsity
casADi__Function__jacSparsity''''''''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_jacSparsity''''''''''' :: FunctionClass a => a -> Int -> String -> IO Sparsity
function_jacSparsity''''''''''' x = casADi__Function__jacSparsity''''''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> Ptr StdString' -> CInt -> CInt -> IO (Ptr Sparsity')
casADi__Function__jacSparsity''''''''''''
  :: Function -> String -> String -> Bool -> Bool -> IO Sparsity
casADi__Function__jacSparsity'''''''''''' x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' x4' >>= wrapReturn

-- classy wrapper
function_jacSparsity'''''''''''' :: FunctionClass a => a -> String -> String -> Bool -> Bool -> IO Sparsity
function_jacSparsity'''''''''''' x = casADi__Function__jacSparsity'''''''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> Ptr StdString' -> CInt -> IO (Ptr Sparsity')
casADi__Function__jacSparsity'''''''''''''
  :: Function -> String -> String -> Bool -> IO Sparsity
casADi__Function__jacSparsity''''''''''''' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' >>= wrapReturn

-- classy wrapper
function_jacSparsity''''''''''''' :: FunctionClass a => a -> String -> String -> Bool -> IO Sparsity
function_jacSparsity''''''''''''' x = casADi__Function__jacSparsity''''''''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr StdString' -> Ptr StdString' -> IO (Ptr Sparsity')
casADi__Function__jacSparsity''''''''''''''
  :: Function -> String -> String -> IO Sparsity
casADi__Function__jacSparsity'''''''''''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__Function__jacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
function_jacSparsity'''''''''''''' :: FunctionClass a => a -> String -> String -> IO Sparsity
function_jacSparsity'''''''''''''' x = casADi__Function__jacSparsity'''''''''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__setJacSparsity" c_CasADi__Function__setJacSparsity
  :: Ptr Function' -> Ptr Sparsity' -> CInt -> CInt -> CInt -> IO ()
casADi__Function__setJacSparsity
  :: Function -> Sparsity -> Int -> Int -> Bool -> IO ()
casADi__Function__setJacSparsity x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  c_CasADi__Function__setJacSparsity x0' x1' x2' x3' x4' >>= wrapReturn

-- classy wrapper
{-|
>Generate the sparsity of a Jacobian block.
-}
function_setJacSparsity :: FunctionClass a => a -> Sparsity -> Int -> Int -> Bool -> IO ()
function_setJacSparsity x = casADi__Function__setJacSparsity (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__setJacSparsity_TIC" c_CasADi__Function__setJacSparsity_TIC
  :: Ptr Function' -> Ptr Sparsity' -> CInt -> CInt -> IO ()
casADi__Function__setJacSparsity'
  :: Function -> Sparsity -> Int -> Int -> IO ()
casADi__Function__setJacSparsity' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__Function__setJacSparsity_TIC x0' x1' x2' x3' >>= wrapReturn

-- classy wrapper
function_setJacSparsity' :: FunctionClass a => a -> Sparsity -> Int -> Int -> IO ()
function_setJacSparsity' x = casADi__Function__setJacSparsity' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__setJacSparsity_TIC_TIC" c_CasADi__Function__setJacSparsity_TIC_TIC
  :: Ptr Function' -> Ptr Sparsity' -> Ptr StdString' -> CInt -> CInt -> IO ()
casADi__Function__setJacSparsity''
  :: Function -> Sparsity -> String -> Int -> Bool -> IO ()
casADi__Function__setJacSparsity'' x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  c_CasADi__Function__setJacSparsity_TIC_TIC x0' x1' x2' x3' x4' >>= wrapReturn

-- classy wrapper
function_setJacSparsity'' :: FunctionClass a => a -> Sparsity -> String -> Int -> Bool -> IO ()
function_setJacSparsity'' x = casADi__Function__setJacSparsity'' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__setJacSparsity_TIC_TIC_TIC" c_CasADi__Function__setJacSparsity_TIC_TIC_TIC
  :: Ptr Function' -> Ptr Sparsity' -> Ptr StdString' -> CInt -> IO ()
casADi__Function__setJacSparsity'''
  :: Function -> Sparsity -> String -> Int -> IO ()
casADi__Function__setJacSparsity''' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__Function__setJacSparsity_TIC_TIC_TIC x0' x1' x2' x3' >>= wrapReturn

-- classy wrapper
function_setJacSparsity''' :: FunctionClass a => a -> Sparsity -> String -> Int -> IO ()
function_setJacSparsity''' x = casADi__Function__setJacSparsity''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__setJacSparsity_TIC_TIC_TIC_TIC" c_CasADi__Function__setJacSparsity_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr Sparsity' -> CInt -> Ptr StdString' -> CInt -> IO ()
casADi__Function__setJacSparsity''''
  :: Function -> Sparsity -> Int -> String -> Bool -> IO ()
casADi__Function__setJacSparsity'''' x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  c_CasADi__Function__setJacSparsity_TIC_TIC_TIC_TIC x0' x1' x2' x3' x4' >>= wrapReturn

-- classy wrapper
function_setJacSparsity'''' :: FunctionClass a => a -> Sparsity -> Int -> String -> Bool -> IO ()
function_setJacSparsity'''' x = casADi__Function__setJacSparsity'''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__setJacSparsity_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__setJacSparsity_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr Sparsity' -> CInt -> Ptr StdString' -> IO ()
casADi__Function__setJacSparsity'''''
  :: Function -> Sparsity -> Int -> String -> IO ()
casADi__Function__setJacSparsity''''' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__Function__setJacSparsity_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' >>= wrapReturn

-- classy wrapper
function_setJacSparsity''''' :: FunctionClass a => a -> Sparsity -> Int -> String -> IO ()
function_setJacSparsity''''' x = casADi__Function__setJacSparsity''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__setJacSparsity_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__setJacSparsity_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr Sparsity' -> Ptr StdString' -> Ptr StdString' -> CInt -> IO ()
casADi__Function__setJacSparsity''''''
  :: Function -> Sparsity -> String -> String -> Bool -> IO ()
casADi__Function__setJacSparsity'''''' x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  c_CasADi__Function__setJacSparsity_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' x4' >>= wrapReturn

-- classy wrapper
function_setJacSparsity'''''' :: FunctionClass a => a -> Sparsity -> String -> String -> Bool -> IO ()
function_setJacSparsity'''''' x = casADi__Function__setJacSparsity'''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__setJacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__Function__setJacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr Function' -> Ptr Sparsity' -> Ptr StdString' -> Ptr StdString' -> IO ()
casADi__Function__setJacSparsity'''''''
  :: Function -> Sparsity -> String -> String -> IO ()
casADi__Function__setJacSparsity''''''' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__Function__setJacSparsity_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' >>= wrapReturn

-- classy wrapper
function_setJacSparsity''''''' :: FunctionClass a => a -> Sparsity -> String -> String -> IO ()
function_setJacSparsity''''''' x = casADi__Function__setJacSparsity''''''' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__generateCode" c_CasADi__Function__generateCode
  :: Ptr Function' -> Ptr StdString' -> IO ()
casADi__Function__generateCode
  :: Function -> String -> IO ()
casADi__Function__generateCode x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__generateCode x0' x1' >>= wrapReturn

-- classy wrapper
{-|
>>  void CasADi::Function::generateCode(const std::string &filename)
>------------------------------------------------------------------------
>
>Export / Generate C code for the function.
>
>>  std::string CasADi::Function::generateCode()
>
>>  void CasADi::Function::generateCode(std::ostream &filename)
>------------------------------------------------------------------------
>
>Generate C code for the function.
-}
function_generateCode :: FunctionClass a => a -> String -> IO ()
function_generateCode x = casADi__Function__generateCode (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__generateCode_TIC" c_CasADi__Function__generateCode_TIC
  :: Ptr Function' -> IO (Ptr StdString')
casADi__Function__generateCode'
  :: Function -> IO String
casADi__Function__generateCode' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__generateCode_TIC x0' >>= wrapReturn

-- classy wrapper
function_generateCode' :: FunctionClass a => a -> IO String
function_generateCode' x = casADi__Function__generateCode' (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__checkNode" c_CasADi__Function__checkNode
  :: Ptr Function' -> IO CInt
casADi__Function__checkNode
  :: Function -> IO Bool
casADi__Function__checkNode x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__checkNode x0' >>= wrapReturn

-- classy wrapper
{-|
>[INTERNAL]  Check if the
>node is pointing to the right type of object.
-}
function_checkNode :: FunctionClass a => a -> IO Bool
function_checkNode x = casADi__Function__checkNode (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__getStat" c_CasADi__Function__getStat
  :: Ptr Function' -> Ptr StdString' -> IO (Ptr GenericType')
casADi__Function__getStat
  :: Function -> String -> IO GenericType
casADi__Function__getStat x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__getStat x0' x1' >>= wrapReturn

-- classy wrapper
{-|
>Get a single statistic obtained at the end of the last evaluate call.
-}
function_getStat :: FunctionClass a => a -> String -> IO GenericType
function_getStat x = casADi__Function__getStat (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__symbolicInput" c_CasADi__Function__symbolicInput
  :: Ptr Function' -> IO (Ptr (CppVec (Ptr MX')))
casADi__Function__symbolicInput
  :: Function -> IO (Vector MX)
casADi__Function__symbolicInput x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__symbolicInput x0' >>= wrapReturn

-- classy wrapper
{-|
>Get a vector of symbolic variables with the same dimensions as the inputs.
>
>There is no guarantee that consecutive calls return identical objects
-}
function_symbolicInput :: FunctionClass a => a -> IO (Vector MX)
function_symbolicInput x = casADi__Function__symbolicInput (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__symbolicInputSX" c_CasADi__Function__symbolicInputSX
  :: Ptr Function' -> IO (Ptr (CppVec (Ptr SX')))
casADi__Function__symbolicInputSX
  :: Function -> IO (Vector SX)
casADi__Function__symbolicInputSX x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__symbolicInputSX x0' >>= wrapReturn

-- classy wrapper
{-|
>Get a vector of symbolic variables with the same dimensions as the inputs,
>SX graph.
>
>There is no guarantee that consecutive calls return identical objects
-}
function_symbolicInputSX :: FunctionClass a => a -> IO (Vector SX)
function_symbolicInputSX x = casADi__Function__symbolicInputSX (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__spCanEvaluate" c_CasADi__Function__spCanEvaluate
  :: Ptr Function' -> CInt -> IO CInt
casADi__Function__spCanEvaluate
  :: Function -> Bool -> IO Bool
casADi__Function__spCanEvaluate x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__spCanEvaluate x0' x1' >>= wrapReturn

-- classy wrapper
{-|
>[INTERNAL]  Is the
>class able to propate seeds through the algorithm? (for usage, see the
>example propagating_sparsity.cpp)
-}
function_spCanEvaluate :: FunctionClass a => a -> Bool -> IO Bool
function_spCanEvaluate x = casADi__Function__spCanEvaluate (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__spInit" c_CasADi__Function__spInit
  :: Ptr Function' -> CInt -> IO ()
casADi__Function__spInit
  :: Function -> Bool -> IO ()
casADi__Function__spInit x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__spInit x0' x1' >>= wrapReturn

-- classy wrapper
{-|
>[INTERNAL]  Reset the
>sparsity propagation (for usage, see the example propagating_sparsity.cpp)
-}
function_spInit :: FunctionClass a => a -> Bool -> IO ()
function_spInit x = casADi__Function__spInit (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__spEvaluate" c_CasADi__Function__spEvaluate
  :: Ptr Function' -> CInt -> IO ()
casADi__Function__spEvaluate
  :: Function -> Bool -> IO ()
casADi__Function__spEvaluate x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__spEvaluate x0' x1' >>= wrapReturn

-- classy wrapper
{-|
>[INTERNAL]  Propagate
>the sparsity pattern through a set of directional derivatives forward or
>backward (for usage, see the example propagating_sparsity.cpp)
-}
function_spEvaluate :: FunctionClass a => a -> Bool -> IO ()
function_spEvaluate x = casADi__Function__spEvaluate (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__addMonitor" c_CasADi__Function__addMonitor
  :: Ptr Function' -> Ptr StdString' -> IO ()
casADi__Function__addMonitor
  :: Function -> String -> IO ()
casADi__Function__addMonitor x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__addMonitor x0' x1' >>= wrapReturn

-- classy wrapper
{-|
>Add modules to be monitored.
-}
function_addMonitor :: FunctionClass a => a -> String -> IO ()
function_addMonitor x = casADi__Function__addMonitor (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__removeMonitor" c_CasADi__Function__removeMonitor
  :: Ptr Function' -> Ptr StdString' -> IO ()
casADi__Function__removeMonitor
  :: Function -> String -> IO ()
casADi__Function__removeMonitor x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__Function__removeMonitor x0' x1' >>= wrapReturn

-- classy wrapper
{-|
>Remove modules to be monitored.
-}
function_removeMonitor :: FunctionClass a => a -> String -> IO ()
function_removeMonitor x = casADi__Function__removeMonitor (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__checkInputs" c_CasADi__Function__checkInputs
  :: Ptr Function' -> IO ()
casADi__Function__checkInputs
  :: Function -> IO ()
casADi__Function__checkInputs x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__Function__checkInputs x0' >>= wrapReturn

-- classy wrapper
{-|
>[INTERNAL]  Check if
>the numerical values of the supplied bounds make sense.
-}
function_checkInputs :: FunctionClass a => a -> IO ()
function_checkInputs x = casADi__Function__checkInputs (castFunction x)


-- direct wrapper
foreign import ccall unsafe "CasADi__Function__Function" c_CasADi__Function__Function
  :: IO (Ptr Function')
casADi__Function__Function
  :: IO Function
casADi__Function__Function  =
  c_CasADi__Function__Function  >>= wrapReturn

-- classy wrapper
{-|
>default constructor
-}
function :: IO Function
function = casADi__Function__Function