packages feed

casadi-bindings-1.8.0.0: Casadi/Wrappers/Tools.hs

{-# OPTIONS_GHC -Wall #-}

module Casadi.Wrappers.Tools
       (
         addMultiple'',
         addMultiple''',
         addMultiple'''',
         addMultiple''''',
         adj',
         adj'',
         blkdiag',
         blkdiag'',
         blkdiag''',
         blkdiag'''',
         blockcat',
         blockcat'',
         blockcat''',
         blocksplit'''',
         blocksplit''''',
         blocksplit'''''',
         blocksplit''''''',
         blocksplit'''''''',
         blocksplit''''''''',
         blocksplit'''''''''',
         blocksplit''''''''''',
         blocksplit'''''''''''',
         blocksplit''''''''''''',
         blocksplit'''''''''''''',
         blocksplit''''''''''''''',
         cofactor',
         cofactor'',
         collocationInterpolators,
         collocationPoints,
         collocationPoints',
         complement,
         compress,
         compress',
         countNodes,
         countNodes',
         createParent,
         densify',
         densify'',
         densify''',
         dependsOn,
         det',
         det'',
         det''',
         diag',
         diag'',
         diag''',
         eig_symbolic,
         evalf,
         evalf',
         expand,
         explicitRK,
         explicitRK',
         explicitRK'',
         explicitRK''',
         extractShared,
         extractShared',
         extractShared'',
         extractShared''',
         extractShared'''',
         extractShared''''',
         fill,
         flatten',
         flatten'',
         flatten''',
         flattenNZ',
         flattenNZ'',
         flattenNZ''',
         flattenNZcat',
         flattenNZcat'',
         flattenNZcat''',
         flattencat',
         flattencat'',
         flattencat''',
         full',
         full'',
         full''',
         gauss_quadrature,
         gauss_quadrature',
         gauss_quadrature'',
         getFree,
         getIntValue,
         getIntValue',
         getIntValue'',
         getMinor',
         getMinor'',
         getNZDense,
         getOperatorRepresentation,
         getOperatorRepresentation',
         getSchemeEntryDoc,
         getSchemeEntryEnum,
         getSchemeEntryEnumName,
         getSchemeEntryName,
         getSchemeEntryNames,
         getSchemeName,
         getSchemeSize,
         getSparseTriplet',
         getSparseTriplet'',
         getSymbols,
         getSymbols',
         getSymbols'',
         getValue,
         getValue',
         getValue'',
         gradient,
         gradient',
         graph_substitute,
         graph_substitute',
         hasNonStructuralZeros',
         hasNonStructuralZeros'',
         hash_combine,
         hash_sparsity,
         heaviside,
         hessian,
         hessian',
         horzcat',
         horzcat'',
         horzcat''',
         horzcat'''',
         horzsplit''',
         horzsplit'''',
         horzsplit''''',
         horzsplit'''''',
         horzsplit''''''',
         horzsplit'''''''',
         horzsplit''''''''',
         horzsplit'''''''''',
         horzsplit''''''''''',
         if_else,
         if_else',
         inner_prod',
         inner_prod'',
         inner_prod''',
         inv',
         inv'',
         inv''',
         isConstant',
         isConstant'',
         isDecreasing,
         isDecreasing',
         isDense',
         isDense'',
         isDense''',
         isEmpty',
         isEmpty'',
         isEqual',
         isEqual'',
         isEqual''',
         isIdentity',
         isIdentity'',
         isIdentity''',
         isIncreasing,
         isIncreasing',
         isInteger',
         isInteger'',
         isMinusOne',
         isMinusOne'',
         isMinusOne''',
         isMonotone,
         isMonotone',
         isNonDecreasing,
         isNonDecreasing',
         isNonIncreasing,
         isNonIncreasing',
         isOne',
         isOne'',
         isOne''',
         isRegular,
         isRegular',
         isRegular''',
         isRegular'''',
         isRegular''''',
         isRegular'''''',
         isScalar',
         isScalar'',
         isSingular,
         isSmooth,
         isStrictlyMonotone,
         isStrictlyMonotone',
         isSymbolic,
         isSymbolic',
         isSymbolicSparse,
         isSymbolicSparse',
         isTranspose,
         isTril',
         isTril'',
         isTriu',
         isTriu'',
         isVector',
         isVector'',
         isVector''',
         isZero',
         isZero'',
         isZero''',
         jacobian,
         jacobian',
         jacobianTimesVector,
         jacobianTimesVector',
         kron',
         kron'',
         kron''',
         logic_and,
         logic_and',
         logic_and''',
         logic_and'''',
         logic_and''''',
         logic_and'''''',
         logic_not,
         logic_not',
         logic_not''',
         logic_not'''',
         logic_not''''',
         logic_not'''''',
         logic_or,
         logic_or',
         logic_or''',
         logic_or'''',
         logic_or''''',
         logic_or'''''',
         lookupvector,
         lowerNZ,
         lowerSparsity,
         lowerSparsity',
         makeDense',
         makeDense'',
         makeDense''',
         makeSparse'',
         makeSparse''',
         makeSparse'''',
         makeSparse''''',
         matrix_expand,
         matrix_expand',
         matrix_expand'',
         matrix_expand''',
         msym,
         msym',
         msym'',
         msym''',
         msym'''',
         msym''''',
         msym'''''',
         msym''''''',
         msym'''''''',
         mtaylor,
         mtaylor',
         mtaylor'',
         mul''',
         mul'''',
         mul''''',
         mul'''''',
         mul''''''',
         mul'''''''',
         mul''''''''',
         mul'''''''''',
         mul''''''''''',
         mul'''''''''''',
         nnz',
         nnz'',
         nnz_sym',
         nnz_sym'',
         norm_1',
         norm_1'',
         norm_1''',
         norm_2',
         norm_2'',
         norm_2''',
         norm_F',
         norm_F'',
         norm_F''',
         norm_inf',
         norm_inf'',
         norm_inf''',
         nullspace',
         nullspace'',
         nullspace''',
         numSample1D,
         numSample1DT,
         numSample2D,
         outer_prod',
         outer_prod'',
         outer_prod''',
         parameterizeTime,
         parameterizeTimeOutput,
         pinv',
         pinv'',
         poly_coeff,
         poly_roots,
         polyval',
         polyval'',
         polyval''',
         printCompact',
         printCompact''',
         project',
         project'',
         pw_const,
         pw_lin,
         qr',
         qr'',
         ramp,
         rank,
         rectangle,
         repmat',
         repmat'',
         repmat''',
         reshape'',
         reshape''',
         reshape'''',
         reshape''''',
         reshape'''''',
         reshape''''''',
         simplify,
         simplify',
         simplify'',
         solve',
         solve'',
         sp_band,
         sp_banded,
         sp_compress,
         sp_compress',
         sp_dense,
         sp_dense',
         sp_diag,
         sp_rowcol,
         sp_sparse,
         sp_sparse',
         sp_tril,
         sp_triplet,
         sp_triplet',
         sp_triplet'',
         sp_unit,
         sparse'',
         sparse''',
         sparse'''',
         sparse''''',
         sprank',
         sprank'',
         spy,
         ssym,
         ssym',
         ssym'',
         ssym''',
         ssym'''',
         ssym''''',
         ssym'''''',
         ssym''''''',
         ssym'''''''',
         substitute,
         substitute',
         substitute'',
         substitute''',
         substituteInPlace,
         substituteInPlace',
         substituteInPlace'',
         substituteInPlace''',
         substituteInPlace'''',
         substituteInPlace''''',
         substituteInPlace'''''',
         substituteInPlace''''''',
         substituteInPlace'''''''',
         substituteInPlace''''''''',
         sumAll',
         sumAll'',
         sumAll''',
         sumCols',
         sumCols'',
         sumCols''',
         sumRows',
         sumRows'',
         sumRows''',
         tangent,
         tangent',
         taylor,
         taylor',
         taylor'',
         trace',
         trace'',
         trace''',
         trans',
         trans'',
         trans''',
         trans'''',
         triangle,
         unite',
         unite'',
         unite''',
         vec',
         vec'',
         vec''',
         vec'''',
         vec''''',
         vec'''''',
         vecNZ',
         vecNZ'',
         vecNZ''',
         vecNZcat',
         vecNZcat'',
         vecNZcat''',
         veccat',
         veccat'',
         veccat''',
         vertcat',
         vertcat'',
         vertcat''',
         vertcat'''',
         vertsplit''',
         vertsplit'''',
         vertsplit''''',
         vertsplit'''''',
         vertsplit''''''',
         vertsplit'''''''',
         vertsplit''''''''',
         vertsplit'''''''''',
         vertsplit''''''''''',
       ) where


import Data.Vector ( Vector )
import Foreign.C.Types
import Foreign.Ptr ( Ptr )
import Foreign.ForeignPtr ( newForeignPtr )

import Casadi.Wrappers.Data
import Casadi.Wrappers.Enums
import Casadi.Wrappers.Deleters
import Casadi.Wrappers.ForeignToolsInstances ( )
import Casadi.MarshalTypes ( CppVec, CppVecVec, CppBool', StdString' )
import Casadi.Marshal (  CornerCase(..), Marshal(..) )
import Casadi.WrapReturn ( WrapReturn(..) )

foreign import ccall unsafe "CasADi__getSchemeEntryName" c_CasADi__getSchemeEntryName
  :: CInt -> CInt -> IO (Ptr StdString')
getSchemeEntryName
  :: InputOutputScheme -> Int -> IO String
getSchemeEntryName x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__getSchemeEntryName x0' x1' >>= (newForeignPtr c_delete_std__string) >>= wrapReturn

foreign import ccall unsafe "CasADi__getSchemeEntryDoc" c_CasADi__getSchemeEntryDoc
  :: CInt -> CInt -> IO (Ptr StdString')
getSchemeEntryDoc
  :: InputOutputScheme -> Int -> IO String
getSchemeEntryDoc x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__getSchemeEntryDoc x0' x1' >>= (newForeignPtr c_delete_std__string) >>= wrapReturn

foreign import ccall unsafe "CasADi__getSchemeEntryEnumName" c_CasADi__getSchemeEntryEnumName
  :: CInt -> CInt -> IO (Ptr StdString')
getSchemeEntryEnumName
  :: InputOutputScheme -> Int -> IO String
getSchemeEntryEnumName x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__getSchemeEntryEnumName x0' x1' >>= (newForeignPtr c_delete_std__string) >>= wrapReturn

foreign import ccall unsafe "CasADi__getSchemeEntryEnum" c_CasADi__getSchemeEntryEnum
  :: CInt -> Ptr StdString' -> IO CInt
getSchemeEntryEnum
  :: InputOutputScheme -> String -> IO Int
getSchemeEntryEnum x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__getSchemeEntryEnum x0' x1' >>= wrapReturn

foreign import ccall unsafe "CasADi__getSchemeSize" c_CasADi__getSchemeSize
  :: CInt -> IO CInt
getSchemeSize
  :: InputOutputScheme -> IO Int
getSchemeSize x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__getSchemeSize x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__getSchemeName" c_CasADi__getSchemeName
  :: CInt -> IO (Ptr StdString')
getSchemeName
  :: InputOutputScheme -> IO String
getSchemeName x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__getSchemeName x0' >>= (newForeignPtr c_delete_std__string) >>= wrapReturn

foreign import ccall unsafe "CasADi__getSchemeEntryNames" c_CasADi__getSchemeEntryNames
  :: CInt -> IO (Ptr StdString')
getSchemeEntryNames
  :: InputOutputScheme -> IO String
getSchemeEntryNames x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__getSchemeEntryNames x0' >>= (newForeignPtr c_delete_std__string) >>= wrapReturn

foreign import ccall unsafe "CasADi__complement" c_CasADi__complement
  :: Ptr (CppVec CInt) -> CInt -> IO (Ptr (CppVec CInt))
{-|
>Returns the list of all i in [0,size[ not found in supplied list.
>
>The supplied vector may contain duplicates and may be non-monotonous The
>supplied vector will be checked for bounds The result vector is guaranteed
>to be monotonously increasing
-}
complement
  :: Vector Int -> Int -> IO (Vector Int)
complement x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__complement x0' x1' >>= (newForeignPtr c_delete_std__vector_int_) >>= wrapReturn

foreign import ccall unsafe "CasADi__lookupvector" c_CasADi__lookupvector
  :: Ptr (CppVec CInt) -> CInt -> IO (Ptr (CppVec CInt))
{-|
>Returns a vector for quickly looking up entries of supplied list.
>
>lookupvector[i]!=-1 <=> v contains i v[lookupvector[i]] == i <=> v contains
>i
>
>Duplicates are treated by looking up last occurence
-}
lookupvector
  :: Vector Int -> Int -> IO (Vector Int)
lookupvector x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__lookupvector x0' x1' >>= (newForeignPtr c_delete_std__vector_int_) >>= wrapReturn

foreign import ccall unsafe "CasADi__isIncreasing" c_CasADi__isIncreasing
  :: Ptr (CppVec CInt) -> IO (Ptr CppBool')
{-|
>Check if the vector is strictly increasing.
-}
isIncreasing
  :: Vector Int -> IO Bool
isIncreasing x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isIncreasing x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isDecreasing" c_CasADi__isDecreasing
  :: Ptr (CppVec CInt) -> IO (Ptr CppBool')
{-|
>Check if the vector is strictly decreasing.
-}
isDecreasing
  :: Vector Int -> IO Bool
isDecreasing x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isDecreasing x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isNonIncreasing" c_CasADi__isNonIncreasing
  :: Ptr (CppVec CInt) -> IO (Ptr CppBool')
{-|
>Check if the vector is non-increasing.
-}
isNonIncreasing
  :: Vector Int -> IO Bool
isNonIncreasing x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isNonIncreasing x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isNonDecreasing" c_CasADi__isNonDecreasing
  :: Ptr (CppVec CInt) -> IO (Ptr CppBool')
{-|
>Check if the vector is non-decreasing.
-}
isNonDecreasing
  :: Vector Int -> IO Bool
isNonDecreasing x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isNonDecreasing x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isMonotone" c_CasADi__isMonotone
  :: Ptr (CppVec CInt) -> IO (Ptr CppBool')
{-|
>Check if the vector is monotone.
-}
isMonotone
  :: Vector Int -> IO Bool
isMonotone x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isMonotone x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isStrictlyMonotone" c_CasADi__isStrictlyMonotone
  :: Ptr (CppVec CInt) -> IO (Ptr CppBool')
{-|
>Check if the vector is strictly monotone.
-}
isStrictlyMonotone
  :: Vector Int -> IO Bool
isStrictlyMonotone x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isStrictlyMonotone x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isRegular" c_CasADi__isRegular
  :: Ptr (CppVec CInt) -> IO (Ptr CppBool')
{-|
>>  bool CasADi::isRegular(const Matrix< int > &ex)
>
>>  bool CasADi::isRegular(const std::vector< T > &vec)
>------------------------------------------------------------------------
>
>Checks if vector does not contain NaN or Inf.
>
>>  bool CasADi::isRegular(const MX &ex)
>------------------------------------------------------------------------
>
>Checks if expression does not contain NaN or Inf.
>
>>  bool CasADi::isRegular(const SX &ex)
>------------------------------------------------------------------------
>
>Make the expression smooth by replacing non-smooth nodes with binary
>variables.
>
>Substitute derivatives with variables void replaceDerivatives(SXMatrix &ex,
>const SXMatrix &var, const SXMatrix &dvar); Checks if expression does not
>contain NaN or Inf
-}
isRegular
  :: Vector Int -> IO Bool
isRegular x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isRegular x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isIncreasing_TIC" c_CasADi__isIncreasing_TIC
  :: Ptr (CppVec CDouble) -> IO (Ptr CppBool')
isIncreasing'
  :: Vector Double -> IO Bool
isIncreasing' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isIncreasing_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isDecreasing_TIC" c_CasADi__isDecreasing_TIC
  :: Ptr (CppVec CDouble) -> IO (Ptr CppBool')
isDecreasing'
  :: Vector Double -> IO Bool
isDecreasing' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isDecreasing_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isNonIncreasing_TIC" c_CasADi__isNonIncreasing_TIC
  :: Ptr (CppVec CDouble) -> IO (Ptr CppBool')
isNonIncreasing'
  :: Vector Double -> IO Bool
isNonIncreasing' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isNonIncreasing_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isNonDecreasing_TIC" c_CasADi__isNonDecreasing_TIC
  :: Ptr (CppVec CDouble) -> IO (Ptr CppBool')
isNonDecreasing'
  :: Vector Double -> IO Bool
isNonDecreasing' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isNonDecreasing_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isMonotone_TIC" c_CasADi__isMonotone_TIC
  :: Ptr (CppVec CDouble) -> IO (Ptr CppBool')
isMonotone'
  :: Vector Double -> IO Bool
isMonotone' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isMonotone_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isStrictlyMonotone_TIC" c_CasADi__isStrictlyMonotone_TIC
  :: Ptr (CppVec CDouble) -> IO (Ptr CppBool')
isStrictlyMonotone'
  :: Vector Double -> IO Bool
isStrictlyMonotone' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isStrictlyMonotone_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isRegular_TIC" c_CasADi__isRegular_TIC
  :: Ptr (CppVec CDouble) -> IO (Ptr CppBool')
isRegular'
  :: Vector Double -> IO Bool
isRegular' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isRegular_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isRegular_TIC_TIC_TIC" c_CasADi__isRegular_TIC_TIC_TIC
  :: Ptr DMatrix' -> IO (Ptr CppBool')
isRegular'''
  :: DMatrix -> IO Bool
isRegular''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isRegular_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__trans_TIC" c_CasADi__trans_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
trans'
  :: DMatrix -> IO DMatrix
trans' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__trans_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__mul_TIC_TIC_TIC" c_CasADi__mul_TIC_TIC_TIC
  :: Ptr DMatrix' -> Ptr DMatrix' -> Ptr CRSSparsity' -> IO (Ptr DMatrix')
mul'''
  :: DMatrix -> DMatrix -> CRSSparsity -> IO DMatrix
mul''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__mul_TIC_TIC_TIC x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__mul_TIC_TIC_TIC_TIC" c_CasADi__mul_TIC_TIC_TIC_TIC
  :: Ptr DMatrix' -> Ptr DMatrix' -> IO (Ptr DMatrix')
mul''''
  :: DMatrix -> DMatrix -> IO DMatrix
mul'''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__mul_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__mul_TIC_TIC_TIC_TIC_TIC" c_CasADi__mul_TIC_TIC_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr DMatrix')) -> IO (Ptr DMatrix')
mul'''''
  :: Vector DMatrix -> IO DMatrix
mul''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__mul_TIC_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__isConstant_TIC" c_CasADi__isConstant_TIC
  :: Ptr DMatrix' -> IO (Ptr CppBool')
isConstant'
  :: DMatrix -> IO Bool
isConstant' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isConstant_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isDense_TIC" c_CasADi__isDense_TIC
  :: Ptr DMatrix' -> IO (Ptr CppBool')
isDense'
  :: DMatrix -> IO Bool
isDense' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isDense_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isEmpty_TIC" c_CasADi__isEmpty_TIC
  :: Ptr DMatrix' -> IO (Ptr CppBool')
isEmpty'
  :: DMatrix -> IO Bool
isEmpty' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isEmpty_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isInteger_TIC" c_CasADi__isInteger_TIC
  :: Ptr DMatrix' -> IO (Ptr CppBool')
isInteger'
  :: DMatrix -> IO Bool
isInteger' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isInteger_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isScalar_TIC" c_CasADi__isScalar_TIC
  :: Ptr DMatrix' -> IO (Ptr CppBool')
isScalar'
  :: DMatrix -> IO Bool
isScalar' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isScalar_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isVector_TIC" c_CasADi__isVector_TIC
  :: Ptr DMatrix' -> IO (Ptr CppBool')
isVector'
  :: DMatrix -> IO Bool
isVector' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isVector_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isTril_TIC" c_CasADi__isTril_TIC
  :: Ptr DMatrix' -> IO (Ptr CppBool')
isTril'
  :: DMatrix -> IO Bool
isTril' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isTril_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isTriu_TIC" c_CasADi__isTriu_TIC
  :: Ptr DMatrix' -> IO (Ptr CppBool')
isTriu'
  :: DMatrix -> IO Bool
isTriu' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isTriu_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__det_TIC" c_CasADi__det_TIC
  :: Ptr DMatrix' -> IO CDouble
det'
  :: DMatrix -> IO Double
det' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__det_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__getMinor_TIC" c_CasADi__getMinor_TIC
  :: Ptr DMatrix' -> CInt -> CInt -> IO CDouble
getMinor'
  :: DMatrix -> Int -> Int -> IO Double
getMinor' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__getMinor_TIC x0' x1' x2' >>= wrapReturn

foreign import ccall unsafe "CasADi__cofactor_TIC" c_CasADi__cofactor_TIC
  :: Ptr DMatrix' -> CInt -> CInt -> IO CDouble
cofactor'
  :: DMatrix -> Int -> Int -> IO Double
cofactor' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__cofactor_TIC x0' x1' x2' >>= wrapReturn

foreign import ccall unsafe "CasADi__adj_TIC" c_CasADi__adj_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
adj'
  :: DMatrix -> IO DMatrix
adj' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__adj_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__inv_TIC" c_CasADi__inv_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
inv'
  :: DMatrix -> IO DMatrix
inv' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__inv_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__reshape_TIC_TIC" c_CasADi__reshape_TIC_TIC
  :: Ptr DMatrix' -> CInt -> CInt -> IO (Ptr DMatrix')
reshape''
  :: DMatrix -> Int -> Int -> IO DMatrix
reshape'' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__reshape_TIC_TIC x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__reshape_TIC_TIC_TIC" c_CasADi__reshape_TIC_TIC_TIC
  :: Ptr DMatrix' -> Ptr CRSSparsity' -> IO (Ptr DMatrix')
reshape'''
  :: DMatrix -> CRSSparsity -> IO DMatrix
reshape''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__reshape_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__vec_TIC" c_CasADi__vec_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
vec'
  :: DMatrix -> IO DMatrix
vec' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__vec_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__flatten_TIC" c_CasADi__flatten_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
flatten'
  :: DMatrix -> IO DMatrix
flatten' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__flatten_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__vecNZ_TIC" c_CasADi__vecNZ_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
vecNZ'
  :: DMatrix -> IO DMatrix
vecNZ' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__vecNZ_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__flattenNZ_TIC" c_CasADi__flattenNZ_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
flattenNZ'
  :: DMatrix -> IO DMatrix
flattenNZ' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__flattenNZ_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__blockcat_TIC" c_CasADi__blockcat_TIC
  :: Ptr (CppVecVec (Ptr DMatrix')) -> IO (Ptr DMatrix')
blockcat'
  :: Vector (Vector DMatrix) -> IO DMatrix
blockcat' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__blockcat_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__blocksplit_TIC_TIC_TIC_TIC" c_CasADi__blocksplit_TIC_TIC_TIC_TIC
  :: Ptr DMatrix' -> Ptr (CppVec CInt) -> Ptr (CppVec CInt) -> IO (Ptr (CppVecVec (Ptr DMatrix')))
blocksplit''''
  :: DMatrix -> Vector Int -> Vector Int -> IO (Vector (Vector DMatrix))
blocksplit'''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__blocksplit_TIC_TIC_TIC_TIC x0' x1' x2' >>= (newForeignPtr c_delete_std__vector_std__vector_CasADi__Matrix_double___) >>= wrapReturn

foreign import ccall unsafe "CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC" c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC
  :: Ptr DMatrix' -> CInt -> CInt -> IO (Ptr (CppVecVec (Ptr DMatrix')))
blocksplit'''''
  :: DMatrix -> Int -> Int -> IO (Vector (Vector DMatrix))
blocksplit''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= (newForeignPtr c_delete_std__vector_std__vector_CasADi__Matrix_double___) >>= wrapReturn

foreign import ccall unsafe "CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr DMatrix' -> CInt -> IO (Ptr (CppVecVec (Ptr DMatrix')))
blocksplit''''''
  :: DMatrix -> Int -> IO (Vector (Vector DMatrix))
blocksplit'''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_std__vector_std__vector_CasADi__Matrix_double___) >>= wrapReturn

foreign import ccall unsafe "CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr DMatrix' -> IO (Ptr (CppVecVec (Ptr DMatrix')))
blocksplit'''''''
  :: DMatrix -> IO (Vector (Vector DMatrix))
blocksplit''''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_std__vector_std__vector_CasADi__Matrix_double___) >>= wrapReturn

foreign import ccall unsafe "CasADi__horzcat_TIC" c_CasADi__horzcat_TIC
  :: Ptr (CppVec (Ptr DMatrix')) -> IO (Ptr DMatrix')
horzcat'
  :: Vector DMatrix -> IO DMatrix
horzcat' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__horzcat_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__horzsplit_TIC_TIC_TIC" c_CasADi__horzsplit_TIC_TIC_TIC
  :: Ptr DMatrix' -> Ptr (CppVec CInt) -> IO (Ptr (CppVec (Ptr DMatrix')))
horzsplit'''
  :: DMatrix -> Vector Int -> IO (Vector DMatrix)
horzsplit''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__horzsplit_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_std__vector_CasADi__Matrix_double__) >>= wrapReturn

foreign import ccall unsafe "CasADi__horzsplit_TIC_TIC_TIC_TIC" c_CasADi__horzsplit_TIC_TIC_TIC_TIC
  :: Ptr DMatrix' -> CInt -> IO (Ptr (CppVec (Ptr DMatrix')))
horzsplit''''
  :: DMatrix -> Int -> IO (Vector DMatrix)
horzsplit'''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__horzsplit_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_std__vector_CasADi__Matrix_double__) >>= wrapReturn

foreign import ccall unsafe "CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC" c_CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC
  :: Ptr DMatrix' -> IO (Ptr (CppVec (Ptr DMatrix')))
horzsplit'''''
  :: DMatrix -> IO (Vector DMatrix)
horzsplit''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_std__vector_CasADi__Matrix_double__) >>= wrapReturn

foreign import ccall unsafe "CasADi__vertcat_TIC" c_CasADi__vertcat_TIC
  :: Ptr (CppVec (Ptr DMatrix')) -> IO (Ptr DMatrix')
vertcat'
  :: Vector DMatrix -> IO DMatrix
vertcat' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__vertcat_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__vertsplit_TIC_TIC_TIC" c_CasADi__vertsplit_TIC_TIC_TIC
  :: Ptr DMatrix' -> Ptr (CppVec CInt) -> IO (Ptr (CppVec (Ptr DMatrix')))
vertsplit'''
  :: DMatrix -> Vector Int -> IO (Vector DMatrix)
vertsplit''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__vertsplit_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_std__vector_CasADi__Matrix_double__) >>= wrapReturn

foreign import ccall unsafe "CasADi__vertsplit_TIC_TIC_TIC_TIC" c_CasADi__vertsplit_TIC_TIC_TIC_TIC
  :: Ptr DMatrix' -> CInt -> IO (Ptr (CppVec (Ptr DMatrix')))
vertsplit''''
  :: DMatrix -> Int -> IO (Vector DMatrix)
vertsplit'''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__vertsplit_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_std__vector_CasADi__Matrix_double__) >>= wrapReturn

foreign import ccall unsafe "CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC" c_CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC
  :: Ptr DMatrix' -> IO (Ptr (CppVec (Ptr DMatrix')))
vertsplit'''''
  :: DMatrix -> IO (Vector DMatrix)
vertsplit''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_std__vector_CasADi__Matrix_double__) >>= wrapReturn

foreign import ccall unsafe "CasADi__inner_prod_TIC" c_CasADi__inner_prod_TIC
  :: Ptr DMatrix' -> Ptr DMatrix' -> IO (Ptr DMatrix')
inner_prod'
  :: DMatrix -> DMatrix -> IO DMatrix
inner_prod' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__inner_prod_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__outer_prod_TIC" c_CasADi__outer_prod_TIC
  :: Ptr DMatrix' -> Ptr DMatrix' -> IO (Ptr DMatrix')
outer_prod'
  :: DMatrix -> DMatrix -> IO DMatrix
outer_prod' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__outer_prod_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__norm_1_TIC" c_CasADi__norm_1_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
norm_1'
  :: DMatrix -> IO DMatrix
norm_1' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__norm_1_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__norm_2_TIC" c_CasADi__norm_2_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
norm_2'
  :: DMatrix -> IO DMatrix
norm_2' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__norm_2_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__norm_inf_TIC" c_CasADi__norm_inf_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
norm_inf'
  :: DMatrix -> IO DMatrix
norm_inf' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__norm_inf_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__norm_F_TIC" c_CasADi__norm_F_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
norm_F'
  :: DMatrix -> IO DMatrix
norm_F' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__norm_F_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__qr_TIC" c_CasADi__qr_TIC
  :: Ptr DMatrix' -> Ptr DMatrix' -> Ptr DMatrix' -> IO ()
qr'
  :: DMatrix -> DMatrix -> DMatrix -> IO ()
qr' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__qr_TIC x0' x1' x2' >>= wrapReturn

foreign import ccall unsafe "CasADi__nullspace_TIC" c_CasADi__nullspace_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
nullspace'
  :: DMatrix -> IO DMatrix
nullspace' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__nullspace_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__solve_TIC" c_CasADi__solve_TIC
  :: Ptr DMatrix' -> Ptr DMatrix' -> IO (Ptr DMatrix')
solve'
  :: DMatrix -> DMatrix -> IO DMatrix
solve' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__solve_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__pinv_TIC" c_CasADi__pinv_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
pinv'
  :: DMatrix -> IO DMatrix
pinv' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__pinv_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__isZero_TIC" c_CasADi__isZero_TIC
  :: Ptr DMatrix' -> IO (Ptr CppBool')
isZero'
  :: DMatrix -> IO Bool
isZero' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isZero_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isOne_TIC" c_CasADi__isOne_TIC
  :: Ptr DMatrix' -> IO (Ptr CppBool')
isOne'
  :: DMatrix -> IO Bool
isOne' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isOne_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isMinusOne_TIC" c_CasADi__isMinusOne_TIC
  :: Ptr DMatrix' -> IO (Ptr CppBool')
isMinusOne'
  :: DMatrix -> IO Bool
isMinusOne' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isMinusOne_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isIdentity_TIC" c_CasADi__isIdentity_TIC
  :: Ptr DMatrix' -> IO (Ptr CppBool')
isIdentity'
  :: DMatrix -> IO Bool
isIdentity' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isIdentity_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__nnz_TIC" c_CasADi__nnz_TIC
  :: Ptr DMatrix' -> IO CInt
nnz'
  :: DMatrix -> IO Int
nnz' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__nnz_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__nnz_sym_TIC" c_CasADi__nnz_sym_TIC
  :: Ptr DMatrix' -> IO CInt
nnz_sym'
  :: DMatrix -> IO Int
nnz_sym' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__nnz_sym_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__isEqual_TIC" c_CasADi__isEqual_TIC
  :: Ptr DMatrix' -> Ptr DMatrix' -> IO (Ptr CppBool')
isEqual'
  :: DMatrix -> DMatrix -> IO Bool
isEqual' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__isEqual_TIC x0' x1' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__repmat_TIC" c_CasADi__repmat_TIC
  :: Ptr DMatrix' -> CInt -> CInt -> IO (Ptr DMatrix')
repmat'
  :: DMatrix -> Int -> Int -> IO DMatrix
repmat' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__repmat_TIC x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__getSparseTriplet_TIC" c_CasADi__getSparseTriplet_TIC
  :: Ptr DMatrix' -> IO (Ptr (CppVecVec CInt))
getSparseTriplet'
  :: DMatrix -> IO (Vector (Vector Int))
getSparseTriplet' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__getSparseTriplet_TIC x0' >>= (newForeignPtr c_delete_std__vector_std__vector_int__) >>= wrapReturn

foreign import ccall unsafe "CasADi__unite_TIC" c_CasADi__unite_TIC
  :: Ptr DMatrix' -> Ptr DMatrix' -> IO (Ptr DMatrix')
unite'
  :: DMatrix -> DMatrix -> IO DMatrix
unite' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__unite_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__sumCols_TIC" c_CasADi__sumCols_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
sumCols'
  :: DMatrix -> IO DMatrix
sumCols' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__sumCols_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__sumRows_TIC" c_CasADi__sumRows_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
sumRows'
  :: DMatrix -> IO DMatrix
sumRows' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__sumRows_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__sumAll_TIC" c_CasADi__sumAll_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
sumAll'
  :: DMatrix -> IO DMatrix
sumAll' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__sumAll_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__trace_TIC" c_CasADi__trace_TIC
  :: Ptr DMatrix' -> IO CDouble
trace'
  :: DMatrix -> IO Double
trace' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__trace_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__makeDense_TIC" c_CasADi__makeDense_TIC
  :: Ptr DMatrix' -> IO ()
makeDense'
  :: DMatrix -> IO ()
makeDense' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__makeDense_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__densify_TIC" c_CasADi__densify_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
densify'
  :: DMatrix -> IO DMatrix
densify' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__densify_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__makeSparse_TIC_TIC" c_CasADi__makeSparse_TIC_TIC
  :: Ptr DMatrix' -> CDouble -> IO ()
makeSparse''
  :: DMatrix -> Double -> IO ()
makeSparse'' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__makeSparse_TIC_TIC x0' x1' >>= wrapReturn

foreign import ccall unsafe "CasADi__makeSparse_TIC_TIC_TIC" c_CasADi__makeSparse_TIC_TIC_TIC
  :: Ptr DMatrix' -> IO ()
makeSparse'''
  :: DMatrix -> IO ()
makeSparse''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__makeSparse_TIC_TIC_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__hasNonStructuralZeros_TIC" c_CasADi__hasNonStructuralZeros_TIC
  :: Ptr DMatrix' -> IO (Ptr CppBool')
hasNonStructuralZeros'
  :: DMatrix -> IO Bool
hasNonStructuralZeros' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__hasNonStructuralZeros_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__diag_TIC" c_CasADi__diag_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
diag'
  :: DMatrix -> IO DMatrix
diag' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__diag_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__blkdiag_TIC" c_CasADi__blkdiag_TIC
  :: Ptr (CppVec (Ptr DMatrix')) -> IO (Ptr DMatrix')
blkdiag'
  :: Vector DMatrix -> IO DMatrix
blkdiag' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__blkdiag_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__polyval_TIC" c_CasADi__polyval_TIC
  :: Ptr DMatrix' -> Ptr DMatrix' -> IO (Ptr DMatrix')
polyval'
  :: DMatrix -> DMatrix -> IO DMatrix
polyval' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__polyval_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__addMultiple_TIC_TIC" c_CasADi__addMultiple_TIC_TIC
  :: Ptr DMatrix' -> Ptr (CppVec CDouble) -> Ptr (CppVec CDouble) -> Ptr CppBool' -> IO ()
addMultiple''
  :: DMatrix -> Vector Double -> Vector Double -> Bool -> IO ()
addMultiple'' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__addMultiple_TIC_TIC x0' x1' x2' x3' >>= wrapReturn

foreign import ccall unsafe "CasADi__addMultiple_TIC_TIC_TIC" c_CasADi__addMultiple_TIC_TIC_TIC
  :: Ptr DMatrix' -> Ptr (CppVec CDouble) -> Ptr (CppVec CDouble) -> IO ()
addMultiple'''
  :: DMatrix -> Vector Double -> Vector Double -> IO ()
addMultiple''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__addMultiple_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

foreign import ccall unsafe "CasADi__veccat_TIC" c_CasADi__veccat_TIC
  :: Ptr (CppVec (Ptr DMatrix')) -> IO (Ptr DMatrix')
veccat'
  :: Vector DMatrix -> IO DMatrix
veccat' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__veccat_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__vecNZcat_TIC" c_CasADi__vecNZcat_TIC
  :: Ptr (CppVec (Ptr DMatrix')) -> IO (Ptr DMatrix')
vecNZcat'
  :: Vector DMatrix -> IO DMatrix
vecNZcat' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__vecNZcat_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__flattencat_TIC" c_CasADi__flattencat_TIC
  :: Ptr (CppVec (Ptr DMatrix')) -> IO (Ptr DMatrix')
flattencat'
  :: Vector DMatrix -> IO DMatrix
flattencat' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__flattencat_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__flattenNZcat_TIC" c_CasADi__flattenNZcat_TIC
  :: Ptr (CppVec (Ptr DMatrix')) -> IO (Ptr DMatrix')
flattenNZcat'
  :: Vector DMatrix -> IO DMatrix
flattenNZcat' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__flattenNZcat_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__project_TIC" c_CasADi__project_TIC
  :: Ptr DMatrix' -> Ptr CRSSparsity' -> IO (Ptr DMatrix')
project'
  :: DMatrix -> CRSSparsity -> IO DMatrix
project' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__project_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__sprank_TIC" c_CasADi__sprank_TIC
  :: Ptr DMatrix' -> IO CInt
sprank'
  :: DMatrix -> IO Int
sprank' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__sprank_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__kron_TIC" c_CasADi__kron_TIC
  :: Ptr DMatrix' -> Ptr DMatrix' -> IO (Ptr DMatrix')
kron'
  :: DMatrix -> DMatrix -> IO DMatrix
kron' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__kron_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__sparse_TIC_TIC" c_CasADi__sparse_TIC_TIC
  :: Ptr DMatrix' -> CDouble -> IO (Ptr DMatrix')
sparse''
  :: DMatrix -> Double -> IO DMatrix
sparse'' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__sparse_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__sparse_TIC_TIC_TIC" c_CasADi__sparse_TIC_TIC_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
sparse'''
  :: DMatrix -> IO DMatrix
sparse''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__sparse_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__full_TIC" c_CasADi__full_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
full'
  :: DMatrix -> IO DMatrix
full' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__full_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__trans_TIC_TIC" c_CasADi__trans_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
trans''
  :: SXMatrix -> IO SXMatrix
trans'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__trans_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr CRSSparsity' -> IO (Ptr SXMatrix')
mul''''''
  :: SXMatrix -> SXMatrix -> CRSSparsity -> IO SXMatrix
mul'''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
mul'''''''
  :: SXMatrix -> SXMatrix -> IO SXMatrix
mul''''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr SXMatrix')) -> IO (Ptr SXMatrix')
mul''''''''
  :: Vector SXMatrix -> IO SXMatrix
mul'''''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__isConstant_TIC_TIC" c_CasADi__isConstant_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr CppBool')
isConstant''
  :: SXMatrix -> IO Bool
isConstant'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isConstant_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isDense_TIC_TIC" c_CasADi__isDense_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr CppBool')
isDense''
  :: SXMatrix -> IO Bool
isDense'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isDense_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isEmpty_TIC_TIC" c_CasADi__isEmpty_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr CppBool')
isEmpty''
  :: SXMatrix -> IO Bool
isEmpty'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isEmpty_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isInteger_TIC_TIC" c_CasADi__isInteger_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr CppBool')
isInteger''
  :: SXMatrix -> IO Bool
isInteger'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isInteger_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isScalar_TIC_TIC" c_CasADi__isScalar_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr CppBool')
isScalar''
  :: SXMatrix -> IO Bool
isScalar'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isScalar_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isVector_TIC_TIC" c_CasADi__isVector_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr CppBool')
isVector''
  :: SXMatrix -> IO Bool
isVector'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isVector_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isTril_TIC_TIC" c_CasADi__isTril_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr CppBool')
isTril''
  :: SXMatrix -> IO Bool
isTril'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isTril_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isTriu_TIC_TIC" c_CasADi__isTriu_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr CppBool')
isTriu''
  :: SXMatrix -> IO Bool
isTriu'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isTriu_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__det_TIC_TIC" c_CasADi__det_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SX')
det''
  :: SXMatrix -> IO SX
det'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__det_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__SX) >>= wrapReturn

foreign import ccall unsafe "CasADi__getMinor_TIC_TIC" c_CasADi__getMinor_TIC_TIC
  :: Ptr SXMatrix' -> CInt -> CInt -> IO (Ptr SX')
getMinor''
  :: SXMatrix -> Int -> Int -> IO SX
getMinor'' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__getMinor_TIC_TIC x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__SX) >>= wrapReturn

foreign import ccall unsafe "CasADi__cofactor_TIC_TIC" c_CasADi__cofactor_TIC_TIC
  :: Ptr SXMatrix' -> CInt -> CInt -> IO (Ptr SX')
cofactor''
  :: SXMatrix -> Int -> Int -> IO SX
cofactor'' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__cofactor_TIC_TIC x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__SX) >>= wrapReturn

foreign import ccall unsafe "CasADi__adj_TIC_TIC" c_CasADi__adj_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
adj''
  :: SXMatrix -> IO SXMatrix
adj'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__adj_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__inv_TIC_TIC" c_CasADi__inv_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
inv''
  :: SXMatrix -> IO SXMatrix
inv'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__inv_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__reshape_TIC_TIC_TIC_TIC" c_CasADi__reshape_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> CInt -> CInt -> IO (Ptr SXMatrix')
reshape''''
  :: SXMatrix -> Int -> Int -> IO SXMatrix
reshape'''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__reshape_TIC_TIC_TIC_TIC x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__reshape_TIC_TIC_TIC_TIC_TIC" c_CasADi__reshape_TIC_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> Ptr CRSSparsity' -> IO (Ptr SXMatrix')
reshape'''''
  :: SXMatrix -> CRSSparsity -> IO SXMatrix
reshape''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__reshape_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__vec_TIC_TIC" c_CasADi__vec_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
vec''
  :: SXMatrix -> IO SXMatrix
vec'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__vec_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__flatten_TIC_TIC" c_CasADi__flatten_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
flatten''
  :: SXMatrix -> IO SXMatrix
flatten'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__flatten_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__vecNZ_TIC_TIC" c_CasADi__vecNZ_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
vecNZ''
  :: SXMatrix -> IO SXMatrix
vecNZ'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__vecNZ_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__flattenNZ_TIC_TIC" c_CasADi__flattenNZ_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
flattenNZ''
  :: SXMatrix -> IO SXMatrix
flattenNZ'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__flattenNZ_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__blockcat_TIC_TIC" c_CasADi__blockcat_TIC_TIC
  :: Ptr (CppVecVec (Ptr SXMatrix')) -> IO (Ptr SXMatrix')
blockcat''
  :: Vector (Vector SXMatrix) -> IO SXMatrix
blockcat'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__blockcat_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> Ptr (CppVec CInt) -> Ptr (CppVec CInt) -> IO (Ptr (CppVecVec (Ptr SXMatrix')))
blocksplit''''''''
  :: SXMatrix -> Vector Int -> Vector Int -> IO (Vector (Vector SXMatrix))
blocksplit'''''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= (newForeignPtr c_delete_std__vector_std__vector_CasADi__Matrix_CasADi__SX___) >>= wrapReturn

foreign import ccall unsafe "CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> CInt -> CInt -> IO (Ptr (CppVecVec (Ptr SXMatrix')))
blocksplit'''''''''
  :: SXMatrix -> Int -> Int -> IO (Vector (Vector SXMatrix))
blocksplit''''''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= (newForeignPtr c_delete_std__vector_std__vector_CasADi__Matrix_CasADi__SX___) >>= wrapReturn

foreign import ccall unsafe "CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> CInt -> IO (Ptr (CppVecVec (Ptr SXMatrix')))
blocksplit''''''''''
  :: SXMatrix -> Int -> IO (Vector (Vector SXMatrix))
blocksplit'''''''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_std__vector_std__vector_CasADi__Matrix_CasADi__SX___) >>= wrapReturn

foreign import ccall unsafe "CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr (CppVecVec (Ptr SXMatrix')))
blocksplit'''''''''''
  :: SXMatrix -> IO (Vector (Vector SXMatrix))
blocksplit''''''''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_std__vector_std__vector_CasADi__Matrix_CasADi__SX___) >>= wrapReturn

foreign import ccall unsafe "CasADi__horzcat_TIC_TIC" c_CasADi__horzcat_TIC_TIC
  :: Ptr (CppVec (Ptr SXMatrix')) -> IO (Ptr SXMatrix')
horzcat''
  :: Vector SXMatrix -> IO SXMatrix
horzcat'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__horzcat_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> Ptr (CppVec CInt) -> IO (Ptr (CppVec (Ptr SXMatrix')))
horzsplit''''''
  :: SXMatrix -> Vector Int -> IO (Vector SXMatrix)
horzsplit'''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_std__vector_CasADi__Matrix_CasADi__SX__) >>= wrapReturn

foreign import ccall unsafe "CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> CInt -> IO (Ptr (CppVec (Ptr SXMatrix')))
horzsplit'''''''
  :: SXMatrix -> Int -> IO (Vector SXMatrix)
horzsplit''''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_std__vector_CasADi__Matrix_CasADi__SX__) >>= wrapReturn

foreign import ccall unsafe "CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr (CppVec (Ptr SXMatrix')))
horzsplit''''''''
  :: SXMatrix -> IO (Vector SXMatrix)
horzsplit'''''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_std__vector_CasADi__Matrix_CasADi__SX__) >>= wrapReturn

foreign import ccall unsafe "CasADi__vertcat_TIC_TIC" c_CasADi__vertcat_TIC_TIC
  :: Ptr (CppVec (Ptr SXMatrix')) -> IO (Ptr SXMatrix')
vertcat''
  :: Vector SXMatrix -> IO SXMatrix
vertcat'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__vertcat_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> Ptr (CppVec CInt) -> IO (Ptr (CppVec (Ptr SXMatrix')))
vertsplit''''''
  :: SXMatrix -> Vector Int -> IO (Vector SXMatrix)
vertsplit'''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_std__vector_CasADi__Matrix_CasADi__SX__) >>= wrapReturn

foreign import ccall unsafe "CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> CInt -> IO (Ptr (CppVec (Ptr SXMatrix')))
vertsplit'''''''
  :: SXMatrix -> Int -> IO (Vector SXMatrix)
vertsplit''''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_std__vector_CasADi__Matrix_CasADi__SX__) >>= wrapReturn

foreign import ccall unsafe "CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr (CppVec (Ptr SXMatrix')))
vertsplit''''''''
  :: SXMatrix -> IO (Vector SXMatrix)
vertsplit'''''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_std__vector_CasADi__Matrix_CasADi__SX__) >>= wrapReturn

foreign import ccall unsafe "CasADi__inner_prod_TIC_TIC" c_CasADi__inner_prod_TIC_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
inner_prod''
  :: SXMatrix -> SXMatrix -> IO SXMatrix
inner_prod'' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__inner_prod_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__outer_prod_TIC_TIC" c_CasADi__outer_prod_TIC_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
outer_prod''
  :: SXMatrix -> SXMatrix -> IO SXMatrix
outer_prod'' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__outer_prod_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__norm_1_TIC_TIC" c_CasADi__norm_1_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
norm_1''
  :: SXMatrix -> IO SXMatrix
norm_1'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__norm_1_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__norm_2_TIC_TIC" c_CasADi__norm_2_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
norm_2''
  :: SXMatrix -> IO SXMatrix
norm_2'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__norm_2_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__norm_inf_TIC_TIC" c_CasADi__norm_inf_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
norm_inf''
  :: SXMatrix -> IO SXMatrix
norm_inf'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__norm_inf_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__norm_F_TIC_TIC" c_CasADi__norm_F_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
norm_F''
  :: SXMatrix -> IO SXMatrix
norm_F'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__norm_F_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__qr_TIC_TIC" c_CasADi__qr_TIC_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr SXMatrix' -> IO ()
qr''
  :: SXMatrix -> SXMatrix -> SXMatrix -> IO ()
qr'' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__qr_TIC_TIC x0' x1' x2' >>= wrapReturn

foreign import ccall unsafe "CasADi__nullspace_TIC_TIC" c_CasADi__nullspace_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
nullspace''
  :: SXMatrix -> IO SXMatrix
nullspace'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__nullspace_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__solve_TIC_TIC" c_CasADi__solve_TIC_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
solve''
  :: SXMatrix -> SXMatrix -> IO SXMatrix
solve'' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__solve_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__pinv_TIC_TIC" c_CasADi__pinv_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
pinv''
  :: SXMatrix -> IO SXMatrix
pinv'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__pinv_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__isZero_TIC_TIC" c_CasADi__isZero_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr CppBool')
isZero''
  :: SXMatrix -> IO Bool
isZero'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isZero_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isOne_TIC_TIC" c_CasADi__isOne_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr CppBool')
isOne''
  :: SXMatrix -> IO Bool
isOne'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isOne_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isMinusOne_TIC_TIC" c_CasADi__isMinusOne_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr CppBool')
isMinusOne''
  :: SXMatrix -> IO Bool
isMinusOne'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isMinusOne_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isIdentity_TIC_TIC" c_CasADi__isIdentity_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr CppBool')
isIdentity''
  :: SXMatrix -> IO Bool
isIdentity'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isIdentity_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__nnz_TIC_TIC" c_CasADi__nnz_TIC_TIC
  :: Ptr SXMatrix' -> IO CInt
nnz''
  :: SXMatrix -> IO Int
nnz'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__nnz_TIC_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__nnz_sym_TIC_TIC" c_CasADi__nnz_sym_TIC_TIC
  :: Ptr SXMatrix' -> IO CInt
nnz_sym''
  :: SXMatrix -> IO Int
nnz_sym'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__nnz_sym_TIC_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__isEqual_TIC_TIC" c_CasADi__isEqual_TIC_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr CppBool')
isEqual''
  :: SXMatrix -> SXMatrix -> IO Bool
isEqual'' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__isEqual_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__repmat_TIC_TIC" c_CasADi__repmat_TIC_TIC
  :: Ptr SXMatrix' -> CInt -> CInt -> IO (Ptr SXMatrix')
repmat''
  :: SXMatrix -> Int -> Int -> IO SXMatrix
repmat'' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__repmat_TIC_TIC x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__getSparseTriplet_TIC_TIC" c_CasADi__getSparseTriplet_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr (CppVecVec CInt))
getSparseTriplet''
  :: SXMatrix -> IO (Vector (Vector Int))
getSparseTriplet'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__getSparseTriplet_TIC_TIC x0' >>= (newForeignPtr c_delete_std__vector_std__vector_int__) >>= wrapReturn

foreign import ccall unsafe "CasADi__unite_TIC_TIC" c_CasADi__unite_TIC_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
unite''
  :: SXMatrix -> SXMatrix -> IO SXMatrix
unite'' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__unite_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__sumCols_TIC_TIC" c_CasADi__sumCols_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
sumCols''
  :: SXMatrix -> IO SXMatrix
sumCols'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__sumCols_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__sumRows_TIC_TIC" c_CasADi__sumRows_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
sumRows''
  :: SXMatrix -> IO SXMatrix
sumRows'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__sumRows_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__sumAll_TIC_TIC" c_CasADi__sumAll_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
sumAll''
  :: SXMatrix -> IO SXMatrix
sumAll'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__sumAll_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__trace_TIC_TIC" c_CasADi__trace_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SX')
trace''
  :: SXMatrix -> IO SX
trace'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__trace_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__SX) >>= wrapReturn

foreign import ccall unsafe "CasADi__makeDense_TIC_TIC" c_CasADi__makeDense_TIC_TIC
  :: Ptr SXMatrix' -> IO ()
makeDense''
  :: SXMatrix -> IO ()
makeDense'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__makeDense_TIC_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__densify_TIC_TIC" c_CasADi__densify_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
densify''
  :: SXMatrix -> IO SXMatrix
densify'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__densify_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__makeSparse_TIC_TIC_TIC_TIC" c_CasADi__makeSparse_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> CDouble -> IO ()
makeSparse''''
  :: SXMatrix -> Double -> IO ()
makeSparse'''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__makeSparse_TIC_TIC_TIC_TIC x0' x1' >>= wrapReturn

foreign import ccall unsafe "CasADi__makeSparse_TIC_TIC_TIC_TIC_TIC" c_CasADi__makeSparse_TIC_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> IO ()
makeSparse'''''
  :: SXMatrix -> IO ()
makeSparse''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__makeSparse_TIC_TIC_TIC_TIC_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__hasNonStructuralZeros_TIC_TIC" c_CasADi__hasNonStructuralZeros_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr CppBool')
hasNonStructuralZeros''
  :: SXMatrix -> IO Bool
hasNonStructuralZeros'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__hasNonStructuralZeros_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__diag_TIC_TIC" c_CasADi__diag_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
diag''
  :: SXMatrix -> IO SXMatrix
diag'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__diag_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__blkdiag_TIC_TIC" c_CasADi__blkdiag_TIC_TIC
  :: Ptr (CppVec (Ptr SXMatrix')) -> IO (Ptr SXMatrix')
blkdiag''
  :: Vector SXMatrix -> IO SXMatrix
blkdiag'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__blkdiag_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__polyval_TIC_TIC" c_CasADi__polyval_TIC_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
polyval''
  :: SXMatrix -> SXMatrix -> IO SXMatrix
polyval'' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__polyval_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__addMultiple_TIC_TIC_TIC_TIC" c_CasADi__addMultiple_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> Ptr (CppVec (Ptr SX')) -> Ptr (CppVec (Ptr SX')) -> Ptr CppBool' -> IO ()
addMultiple''''
  :: SXMatrix -> Vector SX -> Vector SX -> Bool -> IO ()
addMultiple'''' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__addMultiple_TIC_TIC_TIC_TIC x0' x1' x2' x3' >>= wrapReturn

foreign import ccall unsafe "CasADi__addMultiple_TIC_TIC_TIC_TIC_TIC" c_CasADi__addMultiple_TIC_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> Ptr (CppVec (Ptr SX')) -> Ptr (CppVec (Ptr SX')) -> IO ()
addMultiple'''''
  :: SXMatrix -> Vector SX -> Vector SX -> IO ()
addMultiple''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__addMultiple_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

foreign import ccall unsafe "CasADi__veccat_TIC_TIC" c_CasADi__veccat_TIC_TIC
  :: Ptr (CppVec (Ptr SXMatrix')) -> IO (Ptr SXMatrix')
veccat''
  :: Vector SXMatrix -> IO SXMatrix
veccat'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__veccat_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__vecNZcat_TIC_TIC" c_CasADi__vecNZcat_TIC_TIC
  :: Ptr (CppVec (Ptr SXMatrix')) -> IO (Ptr SXMatrix')
vecNZcat''
  :: Vector SXMatrix -> IO SXMatrix
vecNZcat'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__vecNZcat_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__flattencat_TIC_TIC" c_CasADi__flattencat_TIC_TIC
  :: Ptr (CppVec (Ptr SXMatrix')) -> IO (Ptr SXMatrix')
flattencat''
  :: Vector SXMatrix -> IO SXMatrix
flattencat'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__flattencat_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__flattenNZcat_TIC_TIC" c_CasADi__flattenNZcat_TIC_TIC
  :: Ptr (CppVec (Ptr SXMatrix')) -> IO (Ptr SXMatrix')
flattenNZcat''
  :: Vector SXMatrix -> IO SXMatrix
flattenNZcat'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__flattenNZcat_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__project_TIC_TIC" c_CasADi__project_TIC_TIC
  :: Ptr SXMatrix' -> Ptr CRSSparsity' -> IO (Ptr SXMatrix')
project''
  :: SXMatrix -> CRSSparsity -> IO SXMatrix
project'' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__project_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__sprank_TIC_TIC" c_CasADi__sprank_TIC_TIC
  :: Ptr SXMatrix' -> IO CInt
sprank''
  :: SXMatrix -> IO Int
sprank'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__sprank_TIC_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__kron_TIC_TIC" c_CasADi__kron_TIC_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
kron''
  :: SXMatrix -> SXMatrix -> IO SXMatrix
kron'' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__kron_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__sparse_TIC_TIC_TIC_TIC" c_CasADi__sparse_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> CDouble -> IO (Ptr SXMatrix')
sparse''''
  :: SXMatrix -> Double -> IO SXMatrix
sparse'''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__sparse_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__sparse_TIC_TIC_TIC_TIC_TIC" c_CasADi__sparse_TIC_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
sparse'''''
  :: SXMatrix -> IO SXMatrix
sparse''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__sparse_TIC_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__full_TIC_TIC" c_CasADi__full_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
full''
  :: SXMatrix -> IO SXMatrix
full'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__full_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__logic_and" c_CasADi__logic_and
  :: CInt -> CInt -> IO CInt
{-|
>Logical and, returns (an expression evaluating to) 1 if both expressions are
>nonzero and 0 otherwise.
-}
logic_and
  :: Int -> Int -> IO Int
logic_and x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__logic_and x0' x1' >>= wrapReturn

foreign import ccall unsafe "CasADi__logic_or" c_CasADi__logic_or
  :: CInt -> CInt -> IO CInt
{-|
>Logical or, returns (an expression evaluating to) 1 if at least one
>expression is nonzero and 0 otherwise.
-}
logic_or
  :: Int -> Int -> IO Int
logic_or x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__logic_or x0' x1' >>= wrapReturn

foreign import ccall unsafe "CasADi__logic_not" c_CasADi__logic_not
  :: CInt -> IO CInt
{-|
>Logical not, returns (an expression evaluating to) 1 if expression is zero
>and 0 otherwise.
-}
logic_not
  :: Int -> IO Int
logic_not x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__logic_not x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__logic_and_TIC" c_CasADi__logic_and_TIC
  :: CDouble -> CDouble -> IO CDouble
logic_and'
  :: Double -> Double -> IO Double
logic_and' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__logic_and_TIC x0' x1' >>= wrapReturn

foreign import ccall unsafe "CasADi__logic_or_TIC" c_CasADi__logic_or_TIC
  :: CDouble -> CDouble -> IO CDouble
logic_or'
  :: Double -> Double -> IO Double
logic_or' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__logic_or_TIC x0' x1' >>= wrapReturn

foreign import ccall unsafe "CasADi__logic_not_TIC" c_CasADi__logic_not_TIC
  :: CDouble -> IO CDouble
logic_not'
  :: Double -> IO Double
logic_not' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__logic_not_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__logic_and_TIC_TIC_TIC" c_CasADi__logic_and_TIC_TIC_TIC
  :: Ptr DMatrix' -> Ptr DMatrix' -> IO (Ptr DMatrix')
logic_and'''
  :: DMatrix -> DMatrix -> IO DMatrix
logic_and''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__logic_and_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__logic_or_TIC_TIC_TIC" c_CasADi__logic_or_TIC_TIC_TIC
  :: Ptr DMatrix' -> Ptr DMatrix' -> IO (Ptr DMatrix')
logic_or'''
  :: DMatrix -> DMatrix -> IO DMatrix
logic_or''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__logic_or_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__logic_not_TIC_TIC_TIC" c_CasADi__logic_not_TIC_TIC_TIC
  :: Ptr DMatrix' -> IO (Ptr DMatrix')
logic_not'''
  :: DMatrix -> IO DMatrix
logic_not''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__logic_not_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__logic_and_TIC_TIC_TIC_TIC" c_CasADi__logic_and_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
logic_and''''
  :: SXMatrix -> SXMatrix -> IO SXMatrix
logic_and'''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__logic_and_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__logic_or_TIC_TIC_TIC_TIC" c_CasADi__logic_or_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
logic_or''''
  :: SXMatrix -> SXMatrix -> IO SXMatrix
logic_or'''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__logic_or_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__logic_not_TIC_TIC_TIC_TIC" c_CasADi__logic_not_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
logic_not''''
  :: SXMatrix -> IO SXMatrix
logic_not'''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__logic_not_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__logic_and_TIC_TIC_TIC_TIC_TIC" c_CasADi__logic_and_TIC_TIC_TIC_TIC_TIC
  :: Ptr MX' -> Ptr MX' -> IO (Ptr MX')
logic_and'''''
  :: MX -> MX -> IO MX
logic_and''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__logic_and_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__logic_or_TIC_TIC_TIC_TIC_TIC" c_CasADi__logic_or_TIC_TIC_TIC_TIC_TIC
  :: Ptr MX' -> Ptr MX' -> IO (Ptr MX')
logic_or'''''
  :: MX -> MX -> IO MX
logic_or''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__logic_or_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__logic_not_TIC_TIC_TIC_TIC_TIC" c_CasADi__logic_not_TIC_TIC_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr MX')
logic_not'''''
  :: MX -> IO MX
logic_not''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__logic_not_TIC_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__logic_and_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__logic_and_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr SX' -> Ptr SX' -> IO (Ptr SX')
logic_and''''''
  :: SX -> SX -> IO SX
logic_and'''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__logic_and_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__SX) >>= wrapReturn

foreign import ccall unsafe "CasADi__logic_or_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__logic_or_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr SX' -> Ptr SX' -> IO (Ptr SX')
logic_or''''''
  :: SX -> SX -> IO SX
logic_or'''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__logic_or_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__SX) >>= wrapReturn

foreign import ccall unsafe "CasADi__logic_not_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__logic_not_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr SX' -> IO (Ptr SX')
logic_not''''''
  :: SX -> IO SX
logic_not'''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__logic_not_TIC_TIC_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__SX) >>= wrapReturn

foreign import ccall unsafe "CasADi__hash_combine" c_CasADi__hash_combine
  :: CSize -> Ptr (CppVec CInt) -> IO ()
{-|
>Generate a hash value incrementally (function taken from boost)
-}
hash_combine
  :: CSize -> Vector Int -> IO ()
hash_combine x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__hash_combine x0' x1' >>= wrapReturn

foreign import ccall unsafe "CasADi__hash_sparsity" c_CasADi__hash_sparsity
  :: CInt -> CInt -> Ptr (CppVec CInt) -> Ptr (CppVec CInt) -> IO CSize
{-|
>Hash a sparsity pattern.
-}
hash_sparsity
  :: Int -> Int -> Vector Int -> Vector Int -> IO CSize
hash_sparsity x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__hash_sparsity x0' x1' x2' x3' >>= wrapReturn

foreign import ccall unsafe "CasADi__sp_dense" c_CasADi__sp_dense
  :: CInt -> CInt -> IO (Ptr CRSSparsity')
{-|
>Create a dense rectangular sparsity pattern.
-}
sp_dense
  :: Int -> Int -> IO CRSSparsity
sp_dense x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__sp_dense x0' x1' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__sp_dense_TIC" c_CasADi__sp_dense_TIC
  :: CInt -> IO (Ptr CRSSparsity')
sp_dense'
  :: Int -> IO CRSSparsity
sp_dense' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__sp_dense_TIC x0' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__sp_sparse" c_CasADi__sp_sparse
  :: CInt -> CInt -> IO (Ptr CRSSparsity')
{-|
>>  CRSSparsity CasADi::sp_sparse(int n, int m=1)
>------------------------------------------------------------------------
>
>Create a sparse rectangular sparsity pattern.
>
>>  CRSSparsity CasADi::sp_sparse(const std::pair< int, int > &nm)
>------------------------------------------------------------------------
>
>Create a dense rectangular sparsity pattern.
-}
sp_sparse
  :: Int -> Int -> IO CRSSparsity
sp_sparse x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__sp_sparse x0' x1' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__sp_sparse_TIC" c_CasADi__sp_sparse_TIC
  :: CInt -> IO (Ptr CRSSparsity')
sp_sparse'
  :: Int -> IO CRSSparsity
sp_sparse' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__sp_sparse_TIC x0' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__sp_unit" c_CasADi__sp_unit
  :: CInt -> CInt -> IO (Ptr CRSSparsity')
{-|
>Create the sparsity pattern for a unit vector of length n and a nonzero on
>position el.
-}
sp_unit
  :: Int -> Int -> IO CRSSparsity
sp_unit x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__sp_unit x0' x1' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__sp_tril" c_CasADi__sp_tril
  :: CInt -> IO (Ptr CRSSparsity')
{-|
>Create a lower triangular square sparsity pattern.
>
>See:   lowerSparsity
-}
sp_tril
  :: Int -> IO CRSSparsity
sp_tril x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__sp_tril x0' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__sp_diag" c_CasADi__sp_diag
  :: CInt -> IO (Ptr CRSSparsity')
{-|
>Create diagonal square sparsity pattern.
-}
sp_diag
  :: Int -> IO CRSSparsity
sp_diag x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__sp_diag x0' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__sp_band" c_CasADi__sp_band
  :: CInt -> CInt -> IO (Ptr CRSSparsity')
{-|
>Create a single band in a square sparsity pattern.
>
>sp_band(n,0) is equivalent to sp_diag(n)  sp_band(n,-1) has a band below the
>diagonal
>
>Parameters:
>-----------
>
>p:  indicate
-}
sp_band
  :: Int -> Int -> IO CRSSparsity
sp_band x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__sp_band x0' x1' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__sp_banded" c_CasADi__sp_banded
  :: CInt -> CInt -> IO (Ptr CRSSparsity')
{-|
>Create banded square sparsity pattern.
>
>sp_band(n,0) is equivalent to sp_diag(n)  sp_band(n,1) is tri-diagonal
>matrix
-}
sp_banded
  :: Int -> Int -> IO CRSSparsity
sp_banded x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__sp_banded x0' x1' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__sp_rowcol" c_CasADi__sp_rowcol
  :: Ptr (CppVec CInt) -> Ptr (CppVec CInt) -> CInt -> CInt -> IO (Ptr CRSSparsity')
{-|
>Construct a block sparsity pattern from (row,col) vectors.
-}
sp_rowcol
  :: Vector Int -> Vector Int -> Int -> Int -> IO CRSSparsity
sp_rowcol x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__sp_rowcol x0' x1' x2' x3' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__getNZDense" c_CasADi__getNZDense
  :: Ptr CRSSparsity' -> IO (Ptr (CppVec CInt))
{-|
>Get the indices of all non-zero elements as they would appear in a Dense
>matrix A : DenseMatrix 4 x 3 B : SparseMatrix 4 x 3 , 5 structural non-
>zeros.
>
>k = getNZDense(A) A[k] will contain the elements of A that are non- zero in
>B
-}
getNZDense
  :: CRSSparsity -> IO (Vector Int)
getNZDense x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__getNZDense x0' >>= (newForeignPtr c_delete_std__vector_int_) >>= wrapReturn

foreign import ccall unsafe "CasADi__reshape_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__reshape_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr CRSSparsity' -> CInt -> CInt -> IO (Ptr CRSSparsity')
reshape''''''
  :: CRSSparsity -> Int -> Int -> IO CRSSparsity
reshape'''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__reshape_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__vec_TIC_TIC_TIC" c_CasADi__vec_TIC_TIC_TIC
  :: Ptr CRSSparsity' -> IO (Ptr CRSSparsity')
vec'''
  :: CRSSparsity -> IO CRSSparsity
vec''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__vec_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__trans_TIC_TIC_TIC" c_CasADi__trans_TIC_TIC_TIC
  :: Ptr CRSSparsity' -> IO (Ptr CRSSparsity')
trans'''
  :: CRSSparsity -> IO CRSSparsity
trans''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__trans_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__lowerSparsity" c_CasADi__lowerSparsity
  :: Ptr CRSSparsity' -> Ptr CppBool' -> IO (Ptr CRSSparsity')
{-|
>Return the lower part of the sparsity pattern.
>
>Parameters:
>-----------
>
>includeDiagonal:  specify wether the diagonal must be part of the result
>
>See:   sp_tril
-}
lowerSparsity
  :: CRSSparsity -> Bool -> IO CRSSparsity
lowerSparsity x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__lowerSparsity x0' x1' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__lowerSparsity_TIC" c_CasADi__lowerSparsity_TIC
  :: Ptr CRSSparsity' -> IO (Ptr CRSSparsity')
lowerSparsity'
  :: CRSSparsity -> IO CRSSparsity
lowerSparsity' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__lowerSparsity_TIC x0' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__lowerNZ" c_CasADi__lowerNZ
  :: Ptr CRSSparsity' -> IO (Ptr (CppVec CInt))
{-|
>Return the non-zero entries that make up the lower part of the provided
>matrix.
-}
lowerNZ
  :: CRSSparsity -> IO (Vector Int)
lowerNZ x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__lowerNZ x0' >>= (newForeignPtr c_delete_std__vector_int_) >>= wrapReturn

foreign import ccall unsafe "CasADi__sp_triplet" c_CasADi__sp_triplet
  :: CInt -> CInt -> Ptr (CppVec CInt) -> Ptr (CppVec CInt) -> Ptr (CppVec CInt) -> Ptr CppBool' -> IO (Ptr CRSSparsity')
{-|
>>  CRSSparsity CasADi::sp_triplet(int n, int m, const std::vector< int > &row, const std::vector< int > &col, std::vector< int > &mapping, bool invert_mapping=false)
>------------------------------------------------------------------------
>
>Create a sparsity pattern given the nonzeros in sparse triplet form.
>
>>  CRSSparsity CasADi::sp_triplet(int n, int m, const std::vector< int > &row, const std::vector< int > &col)
>------------------------------------------------------------------------
>
>Create a sparsity pattern given the nonzeros in sparse triplet form (no
>nonzero mapping) columns_are_sorted==true means that the column entries
>already in increasing order for each row and without any duplicates.
-}
sp_triplet
  :: Int -> Int -> Vector Int -> Vector Int -> Vector Int -> Bool -> IO CRSSparsity
sp_triplet x0 x1 x2 x3 x4 x5 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  withMarshal x5 $ \x5' ->
  c_CasADi__sp_triplet x0' x1' x2' x3' x4' x5' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__sp_triplet_TIC" c_CasADi__sp_triplet_TIC
  :: CInt -> CInt -> Ptr (CppVec CInt) -> Ptr (CppVec CInt) -> Ptr (CppVec CInt) -> IO (Ptr CRSSparsity')
sp_triplet'
  :: Int -> Int -> Vector Int -> Vector Int -> Vector Int -> IO CRSSparsity
sp_triplet' x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  c_CasADi__sp_triplet_TIC x0' x1' x2' x3' x4' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__sp_triplet_TIC_TIC" c_CasADi__sp_triplet_TIC_TIC
  :: CInt -> CInt -> Ptr (CppVec CInt) -> Ptr (CppVec CInt) -> IO (Ptr CRSSparsity')
sp_triplet''
  :: Int -> Int -> Vector Int -> Vector Int -> IO CRSSparsity
sp_triplet'' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__sp_triplet_TIC_TIC x0' x1' x2' x3' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr CRSSparsity' -> Ptr CRSSparsity' -> IO (Ptr CRSSparsity')
mul'''''''''
  :: CRSSparsity -> CRSSparsity -> IO CRSSparsity
mul''''''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__vertcat_TIC_TIC_TIC" c_CasADi__vertcat_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr CRSSparsity')) -> IO (Ptr CRSSparsity')
vertcat'''
  :: Vector CRSSparsity -> IO CRSSparsity
vertcat''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__vertcat_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__horzcat_TIC_TIC_TIC" c_CasADi__horzcat_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr CRSSparsity')) -> IO (Ptr CRSSparsity')
horzcat'''
  :: Vector CRSSparsity -> IO CRSSparsity
horzcat''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__horzcat_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__blkdiag_TIC_TIC_TIC" c_CasADi__blkdiag_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr CRSSparsity')) -> IO (Ptr CRSSparsity')
blkdiag'''
  :: Vector CRSSparsity -> IO CRSSparsity
blkdiag''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__blkdiag_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__sp_compress" c_CasADi__sp_compress
  :: Ptr CRSSparsity' -> IO (Ptr (CppVec CInt))
{-|
>>  std::vector< int > CasADi::sp_compress(const CRSSparsity &a)
>------------------------------------------------------------------------
>
>Represent a sparsity pattern as an array of integers, the most compact way
>of representing a sparsity pattern The format: The first two entries are the
>number of rows (nrow) and columns (ncol) The next nrow+1 entries are the row
>offsets (rowind). Note that the last element rowind[nrow] gives the number
>of nonzeros The last rowind[nrow] entries are the column indices.
>
>Compress a sparsity pattern
>
>>  CRSSparsity CasADi::sp_compress(const std::vector< int > &v)
>------------------------------------------------------------------------
>
>Decompress a sparsity pattern.
>
>>  CRSSparsity CasADi::sp_compress(const int *v)
>------------------------------------------------------------------------
>
>Decompress a sparsity pattern (array version)
-}
sp_compress
  :: CRSSparsity -> IO (Vector Int)
sp_compress x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__sp_compress x0' >>= (newForeignPtr c_delete_std__vector_int_) >>= wrapReturn

foreign import ccall unsafe "CasADi__sp_compress_TIC" c_CasADi__sp_compress_TIC
  :: Ptr (CppVec CInt) -> IO (Ptr CRSSparsity')
sp_compress'
  :: Vector Int -> IO CRSSparsity
sp_compress' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__sp_compress_TIC x0' >>= (newForeignPtr c_delete_CasADi__CRSSparsity) >>= wrapReturn

foreign import ccall unsafe "CasADi__rank" c_CasADi__rank
  :: Ptr CRSSparsity' -> IO CInt
{-|
>Obtain the structural rank of a sparsity-pattern.
-}
rank
  :: CRSSparsity -> IO Int
rank x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__rank x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__isSingular" c_CasADi__isSingular
  :: Ptr CRSSparsity' -> IO (Ptr CppBool')
{-|
>Check whether the sparsity-pattern inidcates structural singularity.
-}
isSingular
  :: CRSSparsity -> IO Bool
isSingular x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isSingular x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__ssym" c_CasADi__ssym
  :: Ptr StdString' -> CInt -> CInt -> IO (Ptr SXMatrix')
{-|
>>  SXMatrix CasADi::ssym(const std::string &name, int n=1, int m=1)
>------------------------------------------------------------------------
>
>Construct symbolic arrays and variables using CasADi's SX expression graph
>representation The "ssym" function is intended to work in a similar way as
>"sym" used in the Symbolic Toolbox for Matlab but instead creating an
>SXMatrix object. The SX expression graph has much less overhead, but is also
>more restricted than the alternative MX expression graph.
>
>Construct symbolic arrays and variables using CasADi's more restricted, but
>more efficient SX expression graphCreate an n-by-m matrix with symbolic
>variables
>
>>  SXMatrix CasADi::ssym(const std::string &name, const std::pair< int, int > &nm)
>------------------------------------------------------------------------
>
>Create an n-by-m matrix with symbolic variables.
>
>>  SXMatrix CasADi::ssym(const std::string &name, const CRSSparsity &sp)
>------------------------------------------------------------------------
>
>Create an matrix with symbolic variables, given a sparsity pattern.
>
>>  std::vector< SXMatrix > CasADi::ssym(const std::string &name, const CRSSparsity &sp, int p)
>------------------------------------------------------------------------
>
>Create a vector of length p with with matrices with symbolic variables of
>given sparsity.
>
>>  std::vector< std::vector< SXMatrix > > CasADi::ssym(const std::string &name, const CRSSparsity &sp, int p, int r)
>------------------------------------------------------------------------
>
>Create a vector of length r of vectors of length p with matrices with
>symbolic variables with given sparsity.
>
>>  std::vector< SXMatrix > CasADi::ssym(const std::string &name, int n, int m, int p)
>------------------------------------------------------------------------
>
>Create a vector of length p with n-by-m matrices with symbolic variables.
>
>>  std::vector< std::vector< SXMatrix > > CasADi::ssym(const std::string &name, int n, int m, int p, int r)
>------------------------------------------------------------------------
>
>Create a vector of length r of vectors of length p with n-by-m matrices with
>symbolic variables.
>
>>  SXMatrix CasADi::ssym(const Matrix< double > &x)
>------------------------------------------------------------------------
>
>Create a symbolic matrix out of a numeric one.
-}
ssym
  :: String -> Int -> Int -> IO SXMatrix
ssym x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__ssym x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__ssym_TIC" c_CasADi__ssym_TIC
  :: Ptr StdString' -> CInt -> IO (Ptr SXMatrix')
ssym'
  :: String -> Int -> IO SXMatrix
ssym' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__ssym_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__ssym_TIC_TIC" c_CasADi__ssym_TIC_TIC
  :: Ptr StdString' -> IO (Ptr SXMatrix')
ssym''
  :: String -> IO SXMatrix
ssym'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__ssym_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__ssym_TIC_TIC_TIC" c_CasADi__ssym_TIC_TIC_TIC
  :: Ptr StdString' -> Ptr CRSSparsity' -> CInt -> IO (Ptr (CppVec (Ptr SXMatrix')))
ssym'''
  :: String -> CRSSparsity -> Int -> IO (Vector SXMatrix)
ssym''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__ssym_TIC_TIC_TIC x0' x1' x2' >>= (newForeignPtr c_delete_std__vector_CasADi__Matrix_CasADi__SX__) >>= wrapReturn

foreign import ccall unsafe "CasADi__ssym_TIC_TIC_TIC_TIC" c_CasADi__ssym_TIC_TIC_TIC_TIC
  :: Ptr StdString' -> CInt -> CInt -> CInt -> IO (Ptr (CppVec (Ptr SXMatrix')))
ssym''''
  :: String -> Int -> Int -> Int -> IO (Vector SXMatrix)
ssym'''' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__ssym_TIC_TIC_TIC_TIC x0' x1' x2' x3' >>= (newForeignPtr c_delete_std__vector_CasADi__Matrix_CasADi__SX__) >>= wrapReturn

foreign import ccall unsafe "CasADi__ssym_TIC_TIC_TIC_TIC_TIC" c_CasADi__ssym_TIC_TIC_TIC_TIC_TIC
  :: Ptr StdString' -> Ptr CRSSparsity' -> CInt -> CInt -> IO (Ptr (CppVecVec (Ptr SXMatrix')))
ssym'''''
  :: String -> CRSSparsity -> Int -> Int -> IO (Vector (Vector SXMatrix))
ssym''''' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__ssym_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' >>= (newForeignPtr c_delete_std__vector_std__vector_CasADi__Matrix_CasADi__SX___) >>= wrapReturn

foreign import ccall unsafe "CasADi__ssym_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__ssym_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr StdString' -> CInt -> CInt -> CInt -> CInt -> IO (Ptr (CppVecVec (Ptr SXMatrix')))
ssym''''''
  :: String -> Int -> Int -> Int -> Int -> IO (Vector (Vector SXMatrix))
ssym'''''' x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  c_CasADi__ssym_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' x4' >>= (newForeignPtr c_delete_std__vector_std__vector_CasADi__Matrix_CasADi__SX___) >>= wrapReturn

foreign import ccall unsafe "CasADi__ssym_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__ssym_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr StdString' -> Ptr CRSSparsity' -> IO (Ptr SXMatrix')
ssym'''''''
  :: String -> CRSSparsity -> IO SXMatrix
ssym''''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__ssym_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__ssym_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__ssym_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr DMatrix' -> IO (Ptr SXMatrix')
ssym''''''''
  :: DMatrix -> IO SXMatrix
ssym'''''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__ssym_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__expand" c_CasADi__expand
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr SXMatrix' -> IO ()
{-|
>Expand the expression as a weighted sum (with constant weights)
-}
expand
  :: SXMatrix -> SXMatrix -> SXMatrix -> IO ()
expand x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__expand x0' x1' x2' >>= wrapReturn

foreign import ccall unsafe "CasADi__simplify" c_CasADi__simplify
  :: Ptr SX' -> IO ()
{-|
>>  void CasADi::simplify(MX &ex)
>
>>  void CasADi::simplify(SXMatrix &ex)
>------------------------------------------------------------------------
>
>Simplify an expression.
>
>>  void CasADi::simplify(SX &ex)
>------------------------------------------------------------------------
>
>Simplify the expression: formulates the expression as and eliminates terms.
-}
simplify
  :: SX -> IO ()
simplify x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__simplify x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__pw_const" c_CasADi__pw_const
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
{-|
>Create a piecewise constant function Create a piecewise constant function
>with n=val.size() intervals.
>
>Inputs:
>
>Parameters:
>-----------
>
>t:  a scalar variable (e.g. time)
>
>tval:  vector with the discrete values of t at the interval transitions
>(length n-1)
>
>val:  vector with the value of the function for each interval (length n)
-}
pw_const
  :: SXMatrix -> SXMatrix -> SXMatrix -> IO SXMatrix
pw_const x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__pw_const x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__pw_lin" c_CasADi__pw_lin
  :: Ptr SX' -> Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
{-|
>t a scalar variable (e.g. time)
>
>Create a piecewise linear function Create a piecewise linear function:
>
>Inputs: tval vector with the the discrete values of t (monotonically
>increasing) val vector with the corresponding function values (same length
>as tval)
-}
pw_lin
  :: SX -> SXMatrix -> SXMatrix -> IO SXMatrix
pw_lin x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__pw_lin x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__if_else" c_CasADi__if_else
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
{-|
>>  MX CasADi::if_else(const MX &cond, const MX &if_true, const MX &if_false)
>------------------------------------------------------------------------
>
>Branching on MX nodes Ternary operator, "cond ? if_true : if_false".
-}
if_else
  :: SXMatrix -> SXMatrix -> SXMatrix -> IO SXMatrix
if_else x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__if_else x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__heaviside" c_CasADi__heaviside
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
{-|
>Heaviside function.
>
>\\[ \\begin{cases} H(x) = 0 & x<0 \\\\ H(x) = 1/2 & x=0 \\\\
>H(x) = 1 & x>0 \\\\ \\end{cases} \\]
-}
heaviside
  :: SXMatrix -> IO SXMatrix
heaviside x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__heaviside x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__rectangle" c_CasADi__rectangle
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
{-|
>rectangle function
>
>\\[ \\begin{cases} \\Pi(x) = 1 & |x| < 1/2 \\\\ \\Pi(x) = 1/2 &
>|x| = 1/2 \\\\ \\Pi(x) = 0 & |x| > 1/2 \\\\ \\end{cases} \\]
>
>Also called: gate function, block function, band function, pulse function,
>window function
-}
rectangle
  :: SXMatrix -> IO SXMatrix
rectangle x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__rectangle x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__triangle" c_CasADi__triangle
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
{-|
>triangle function
>
>\\[ \\begin{cases} \\Lambda(x) = 0 & |x| >= 1 \\\\ \\Lambda(x) =
>1-|x| & |x| < 1 \\end{cases} \\]
-}
triangle
  :: SXMatrix -> IO SXMatrix
triangle x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__triangle x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__ramp" c_CasADi__ramp
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
{-|
>ramp function
>
>\\[ \\begin{cases} R(x) = 0 & x <= 1 \\\\ R(x) = x & x > 1 \\\\
>\\end{cases} \\]
>
>Also called: slope function
-}
ramp
  :: SXMatrix -> IO SXMatrix
ramp x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__ramp x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__gauss_quadrature" c_CasADi__gauss_quadrature
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr SXMatrix' -> CInt -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
{-|
>Integrate f from a to b using Gaussian quadrature with n points.
-}
gauss_quadrature
  :: SXMatrix -> SXMatrix -> SXMatrix -> SXMatrix -> Int -> SXMatrix -> IO SXMatrix
gauss_quadrature x0 x1 x2 x3 x4 x5 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  withMarshal x5 $ \x5' ->
  c_CasADi__gauss_quadrature x0' x1' x2' x3' x4' x5' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__gauss_quadrature_TIC" c_CasADi__gauss_quadrature_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr SXMatrix' -> CInt -> IO (Ptr SXMatrix')
gauss_quadrature'
  :: SXMatrix -> SXMatrix -> SXMatrix -> SXMatrix -> Int -> IO SXMatrix
gauss_quadrature' x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  c_CasADi__gauss_quadrature_TIC x0' x1' x2' x3' x4' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__gauss_quadrature_TIC_TIC" c_CasADi__gauss_quadrature_TIC_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
gauss_quadrature''
  :: SXMatrix -> SXMatrix -> SXMatrix -> SXMatrix -> IO SXMatrix
gauss_quadrature'' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__gauss_quadrature_TIC_TIC x0' x1' x2' x3' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__simplify_TIC" c_CasADi__simplify_TIC
  :: Ptr SXMatrix' -> IO ()
simplify'
  :: SXMatrix -> IO ()
simplify' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__simplify_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__compress" c_CasADi__compress
  :: Ptr SXMatrix' -> CInt -> IO ()
{-|
>Remove identical calculations.
-}
compress
  :: SXMatrix -> Int -> IO ()
compress x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__compress x0' x1' >>= wrapReturn

foreign import ccall unsafe "CasADi__compress_TIC" c_CasADi__compress_TIC
  :: Ptr SXMatrix' -> IO ()
compress'
  :: SXMatrix -> IO ()
compress' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__compress_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__substitute" c_CasADi__substitute
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
{-|
>>  MX CasADi::substitute(const MX &ex, const MX &v, const MX &vdef)
>
>>  SXMatrix CasADi::substitute(const SXMatrix &ex, const SXMatrix &v, const SXMatrix &vdef)
>------------------------------------------------------------------------
>
>Substitute variable v with expression vdef in an expression ex.
>
>>  std::vector< MX > CasADi::substitute(const std::vector< MX > &ex, const std::vector< MX > &v, const std::vector< MX > &vdef)
>
>>  std::vector< SXMatrix > CasADi::substitute(const std::vector< SXMatrix > &ex, const std::vector< SXMatrix > &v, const std::vector< SXMatrix > &vdef)
>------------------------------------------------------------------------
>
>Substitute variable var with expression expr in multiple expressions.
-}
substitute
  :: SXMatrix -> SXMatrix -> SXMatrix -> IO SXMatrix
substitute x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__substitute x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__substitute_TIC" c_CasADi__substitute_TIC
  :: Ptr (CppVec (Ptr SXMatrix')) -> Ptr (CppVec (Ptr SXMatrix')) -> Ptr (CppVec (Ptr SXMatrix')) -> IO (Ptr (CppVec (Ptr SXMatrix')))
substitute'
  :: Vector SXMatrix -> Vector SXMatrix -> Vector SXMatrix -> IO (Vector SXMatrix)
substitute' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__substitute_TIC x0' x1' x2' >>= (newForeignPtr c_delete_std__vector_CasADi__Matrix_CasADi__SX__) >>= wrapReturn

foreign import ccall unsafe "CasADi__substituteInPlace" c_CasADi__substituteInPlace
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr CppBool' -> IO ()
{-|
>>  void CasADi::substituteInPlace(const std::vector< MX > &v, std::vector< MX > &vdef, bool reverse=false)
>------------------------------------------------------------------------
>
>Inplace substitution Substitute variables v out of the expressions vdef
>sequentially.
>
>>  void CasADi::substituteInPlace(const std::vector< MX > &v, std::vector< MX > &vdef, std::vector< MX > &ex, bool reverse=false)
>------------------------------------------------------------------------
>
>Inplace substitution with piggyback expressions Substitute variables v out
>of the expressions vdef sequentially, as well as out of a number of other
>expressions piggyback.
>
>>  void CasADi::substituteInPlace(const SXMatrix &v, SXMatrix &vdef, bool reverse=false)
>------------------------------------------------------------------------
>
>Substitute variable var out of or into an expression expr.
>
>>  void CasADi::substituteInPlace(const SXMatrix &v, SXMatrix &vdef, std::vector< SXMatrix > &ex, bool reverse=false)
>------------------------------------------------------------------------
>
>Substitute variable var out of or into an expression expr, with an arbitrary
>number of other expressions piggyback.
>
>>  void CasADi::substituteInPlace(const std::vector< SXMatrix > &v, std::vector< SXMatrix > &vdef, std::vector< SXMatrix > &ex, bool reverse=false)
>------------------------------------------------------------------------
>
>Substitute variable var out of or into an expression expr, with an arbitrary
>number of other expressions piggyback (vector version)
-}
substituteInPlace
  :: SXMatrix -> SXMatrix -> Bool -> IO ()
substituteInPlace x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__substituteInPlace x0' x1' x2' >>= wrapReturn

foreign import ccall unsafe "CasADi__substituteInPlace_TIC" c_CasADi__substituteInPlace_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> IO ()
substituteInPlace'
  :: SXMatrix -> SXMatrix -> IO ()
substituteInPlace' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__substituteInPlace_TIC x0' x1' >>= wrapReturn

foreign import ccall unsafe "CasADi__substituteInPlace_TIC_TIC" c_CasADi__substituteInPlace_TIC_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr (CppVec (Ptr SXMatrix')) -> Ptr CppBool' -> IO ()
substituteInPlace''
  :: SXMatrix -> SXMatrix -> Vector SXMatrix -> Bool -> IO ()
substituteInPlace'' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__substituteInPlace_TIC_TIC x0' x1' x2' x3' >>= wrapReturn

foreign import ccall unsafe "CasADi__substituteInPlace_TIC_TIC_TIC" c_CasADi__substituteInPlace_TIC_TIC_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr (CppVec (Ptr SXMatrix')) -> IO ()
substituteInPlace'''
  :: SXMatrix -> SXMatrix -> Vector SXMatrix -> IO ()
substituteInPlace''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__substituteInPlace_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

foreign import ccall unsafe "CasADi__substituteInPlace_TIC_TIC_TIC_TIC" c_CasADi__substituteInPlace_TIC_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr SXMatrix')) -> Ptr (CppVec (Ptr SXMatrix')) -> Ptr (CppVec (Ptr SXMatrix')) -> Ptr CppBool' -> IO ()
substituteInPlace''''
  :: Vector SXMatrix -> Vector SXMatrix -> Vector SXMatrix -> Bool -> IO ()
substituteInPlace'''' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__substituteInPlace_TIC_TIC_TIC_TIC x0' x1' x2' x3' >>= wrapReturn

foreign import ccall unsafe "CasADi__substituteInPlace_TIC_TIC_TIC_TIC_TIC" c_CasADi__substituteInPlace_TIC_TIC_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr SXMatrix')) -> Ptr (CppVec (Ptr SXMatrix')) -> Ptr (CppVec (Ptr SXMatrix')) -> IO ()
substituteInPlace'''''
  :: Vector SXMatrix -> Vector SXMatrix -> Vector SXMatrix -> IO ()
substituteInPlace''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__substituteInPlace_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

foreign import ccall unsafe "CasADi__evalf" c_CasADi__evalf
  :: Ptr SXMatrix' -> IO (Ptr DMatrix')
{-|
>>  Matrix< double > CasADi::evalf(const SXMatrix &ex, const SXMatrix &v, const Matrix< double > &vdef)
>------------------------------------------------------------------------
>
>Substitute variable v with value vdef in an expression ex, and evaluate
>numerically Note: this is not efficient. For critical parts (loops) of your
>code, always use SXFunction.
>
>See:   numSample1D
>
>>  Matrix< double > CasADi::evalf(const SXMatrix &ex)
>------------------------------------------------------------------------
>
>Evaluate an SX graph numerically Note: this is not efficient. For critical
>parts (loops) of your code, always use SXFunction.
-}
evalf
  :: SXMatrix -> IO DMatrix
evalf x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__evalf x0' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__evalf_TIC" c_CasADi__evalf_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr DMatrix' -> IO (Ptr DMatrix')
evalf'
  :: SXMatrix -> SXMatrix -> DMatrix -> IO DMatrix
evalf' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__evalf_TIC x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__isRegular_TIC_TIC_TIC_TIC" c_CasADi__isRegular_TIC_TIC_TIC_TIC
  :: Ptr SX' -> IO (Ptr CppBool')
isRegular''''
  :: SX -> IO Bool
isRegular'''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isRegular_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isRegular_TIC_TIC_TIC_TIC_TIC" c_CasADi__isRegular_TIC_TIC_TIC_TIC_TIC
  :: Ptr SXMatrix' -> IO (Ptr CppBool')
isRegular'''''
  :: SXMatrix -> IO Bool
isRegular''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isRegular_TIC_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__spy" c_CasADi__spy
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
{-|
>Get the sparsity pattern of a matrix.
-}
spy
  :: SXMatrix -> IO SXMatrix
spy x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__spy x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__dependsOn" c_CasADi__dependsOn
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr CppBool')
{-|
>Check dependency: very inefficient algorithm.
-}
dependsOn
  :: SXMatrix -> SXMatrix -> IO Bool
dependsOn x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__dependsOn x0' x1' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__getSymbols" c_CasADi__getSymbols
  :: Ptr SXMatrix' -> IO (Ptr (CppVec (Ptr SX')))
{-|
>>  std::vector< MX > CasADi::getSymbols(const MX &e)
>
>>  std::vector< MX > CasADi::getSymbols(const std::vector< MX > &e)
>------------------------------------------------------------------------
>
>Get all symbols contained in the supplied expression Get all symbols on
>which the supplied expression depends.
>
>See:   MXFunction::getFree()
>
>>  std::vector< SX > CasADi::getSymbols(const SXMatrix &e)
>------------------------------------------------------------------------
>
>Get all symbols contained in the supplied expression Get all symbols on
>which the supplied expression depends.
>
>See:   SXFunction::getFree()
-}
getSymbols
  :: SXMatrix -> IO (Vector SX)
getSymbols x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__getSymbols x0' >>= (newForeignPtr c_delete_std__vector_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__isSmooth" c_CasADi__isSmooth
  :: Ptr SXMatrix' -> IO (Ptr CppBool')
{-|
>check if smooth
-}
isSmooth
  :: SXMatrix -> IO Bool
isSmooth x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isSmooth x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isSymbolic" c_CasADi__isSymbolic
  :: Ptr SXMatrix' -> IO (Ptr CppBool')
{-|
>>  bool CasADi::isSymbolic(const MX &ex)
>------------------------------------------------------------------------
>
>check if symbolic
>
>>  bool CasADi::isSymbolic(const SXMatrix &ex)
>------------------------------------------------------------------------
>
>check if symbolic (Dense)
>
>Sparse matrices invariable return false
-}
isSymbolic
  :: SXMatrix -> IO Bool
isSymbolic x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isSymbolic x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isSymbolicSparse" c_CasADi__isSymbolicSparse
  :: Ptr SXMatrix' -> IO (Ptr CppBool')
{-|
>>  bool CasADi::isSymbolicSparse(const MX &ex)
>------------------------------------------------------------------------
>
>check if all nonzeros are symbolic (this function is currently identical to
>isSymbolic)
>
>>  bool CasADi::isSymbolicSparse(const SXMatrix &ex)
>------------------------------------------------------------------------
>
>check if symbolic
>
>Sparse matrices can return true if all non-zero elements are symbolic
-}
isSymbolicSparse
  :: SXMatrix -> IO Bool
isSymbolicSparse x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isSymbolicSparse x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__jacobian" c_CasADi__jacobian
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
{-|
>>  MX CasADi::jacobian(const MX &ex, const MX &arg)
>------------------------------------------------------------------------
>
>Calculate jacobian via source code transformation.
>
>Uses CasADi::MXFunction::jac
>
>>  SXMatrix CasADi::jacobian(const SXMatrix &ex, const SXMatrix &arg)
>------------------------------------------------------------------------
>
>Calculate jacobian via source code transformation.
>
>Uses CasADi::SXFunction::jac
-}
jacobian
  :: SXMatrix -> SXMatrix -> IO SXMatrix
jacobian x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__jacobian x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__gradient" c_CasADi__gradient
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
{-|
>>  MX CasADi::gradient(const MX &ex, const MX &arg)
>------------------------------------------------------------------------
>
>Calculate jacobian via source code transformation.
>
>Uses CasADi::MXFunction::jac
>
>>  SXMatrix CasADi::gradient(const SXMatrix &ex, const SXMatrix &arg)
>------------------------------------------------------------------------
>
>Calculate jacobian via source code transformation.
>
>Uses CasADi::SXFunction::jac
-}
gradient
  :: SXMatrix -> SXMatrix -> IO SXMatrix
gradient x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__gradient x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__tangent" c_CasADi__tangent
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
{-|
>>  MX CasADi::tangent(const MX &ex, const MX &arg)
>------------------------------------------------------------------------
>
>Calculate jacobian via source code transformation.
>
>Uses CasADi::MXFunction::jac
>
>>  SXMatrix CasADi::tangent(const SXMatrix &ex, const SXMatrix &arg)
>------------------------------------------------------------------------
>
>Calculate jacobian via source code transformation.
>
>Uses CasADi::SXFunction::jac
-}
tangent
  :: SXMatrix -> SXMatrix -> IO SXMatrix
tangent x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__tangent x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__hessian" c_CasADi__hessian
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
{-|
>Calculate jacobian via source code transformation.
>
>Uses CasADi::SXFunction::jac
-}
hessian
  :: SXMatrix -> SXMatrix -> IO SXMatrix
hessian x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__hessian x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__hessian_TIC" c_CasADi__hessian_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr SXMatrix' -> IO ()
hessian'
  :: SXMatrix -> SXMatrix -> SXMatrix -> SXMatrix -> IO ()
hessian' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__hessian_TIC x0' x1' x2' x3' >>= wrapReturn

foreign import ccall unsafe "CasADi__jacobianTimesVector" c_CasADi__jacobianTimesVector
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr CppBool' -> IO (Ptr SXMatrix')
{-|
>Calculate the Jacobian and multiply by a vector from the left This is
>equivalent to mul(jacobian(ex,arg),v) or mul(jacobian(ex,arg).T,v) for
>transpose_jacobian set to false and true respectively. If contrast to these
>expressions, it will use directional derivatives which is typically (but not
>necessarily) more efficient if the complete Jacobian is not needed and v has
>few columns.
-}
jacobianTimesVector
  :: SXMatrix -> SXMatrix -> SXMatrix -> Bool -> IO SXMatrix
jacobianTimesVector x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__jacobianTimesVector x0' x1' x2' x3' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__jacobianTimesVector_TIC" c_CasADi__jacobianTimesVector_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
jacobianTimesVector'
  :: SXMatrix -> SXMatrix -> SXMatrix -> IO SXMatrix
jacobianTimesVector' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__jacobianTimesVector_TIC x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__getValue" c_CasADi__getValue
  :: Ptr SXMatrix' -> CInt -> CInt -> IO CDouble
{-|
>>  double CasADi::getValue(const SXMatrix &ex, int i=0, int j=0)
>------------------------------------------------------------------------
>
>Obtain the values of a constant expression.
-}
getValue
  :: SXMatrix -> Int -> Int -> IO Double
getValue x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__getValue x0' x1' x2' >>= wrapReturn

foreign import ccall unsafe "CasADi__getValue_TIC" c_CasADi__getValue_TIC
  :: Ptr SXMatrix' -> CInt -> IO CDouble
getValue'
  :: SXMatrix -> Int -> IO Double
getValue' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__getValue_TIC x0' x1' >>= wrapReturn

foreign import ccall unsafe "CasADi__getValue_TIC_TIC" c_CasADi__getValue_TIC_TIC
  :: Ptr SXMatrix' -> IO CDouble
getValue''
  :: SXMatrix -> IO Double
getValue'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__getValue_TIC_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__getIntValue" c_CasADi__getIntValue
  :: Ptr SXMatrix' -> CInt -> CInt -> IO CInt
getIntValue
  :: SXMatrix -> Int -> Int -> IO Int
getIntValue x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__getIntValue x0' x1' x2' >>= wrapReturn

foreign import ccall unsafe "CasADi__getIntValue_TIC" c_CasADi__getIntValue_TIC
  :: Ptr SXMatrix' -> CInt -> IO CInt
getIntValue'
  :: SXMatrix -> Int -> IO Int
getIntValue' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__getIntValue_TIC x0' x1' >>= wrapReturn

foreign import ccall unsafe "CasADi__getIntValue_TIC_TIC" c_CasADi__getIntValue_TIC_TIC
  :: Ptr SXMatrix' -> IO CInt
getIntValue''
  :: SXMatrix -> IO Int
getIntValue'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__getIntValue_TIC_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__fill" c_CasADi__fill
  :: Ptr SXMatrix' -> Ptr SX' -> IO ()
{-|
>Fill the matrix with the value val, make empty sparse if zero.
-}
fill
  :: SXMatrix -> SX -> IO ()
fill x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__fill x0' x1' >>= wrapReturn

foreign import ccall unsafe "CasADi__taylor" c_CasADi__taylor
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr SXMatrix' -> CInt -> IO (Ptr SXMatrix')
{-|
>univariate taylor series expansion
>
>Calculate the taylor expansion of expression 'ex' up to order 'order' with
>repsect to variable 'x' around the point 'a'
>
>$(x)=f(a)+f'(a)(x-a)+f''(a)\\frac{(x-a)^2}{2!}+f'''(a)\\frac{(x-a)^3}{3!}+\\ldots$
>
>Example usage:>>   x
-}
taylor
  :: SXMatrix -> SXMatrix -> SXMatrix -> Int -> IO SXMatrix
taylor x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__taylor x0' x1' x2' x3' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__taylor_TIC" c_CasADi__taylor_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
taylor'
  :: SXMatrix -> SXMatrix -> SXMatrix -> IO SXMatrix
taylor' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__taylor_TIC x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__taylor_TIC_TIC" c_CasADi__taylor_TIC_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
taylor''
  :: SXMatrix -> SXMatrix -> IO SXMatrix
taylor'' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__taylor_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__mtaylor" c_CasADi__mtaylor
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr SXMatrix' -> CInt -> IO (Ptr SXMatrix')
{-|
>>  SXMatrix CasADi::mtaylor(const SXMatrix &ex, const SXMatrix &x, const SXMatrix &a, int order=1)
>------------------------------------------------------------------------
>
>multivariate taylor series expansion
>
>Do taylor expansions until the aggregated order of a term is equal to
>'order'. The aggregated order of $x^n y^m$ equals $n+m$.
>
>>  SXMatrix CasADi::mtaylor(const SXMatrix &ex, const SXMatrix &x, const SXMatrix &a, int order, const std::vector< int > &order_contributions)
>------------------------------------------------------------------------
>
>multivariate taylor series expansion
>
>Do taylor expansions until the aggregated order of a term is equal to
>'order'. The aggregated order of $x^n y^m$ equals $n+m$.
>
>The argument order_contributions can denote how match each variable
>contributes to the aggregated order. If x=[x,y] and
>order_contributions=[1,2], then the aggregated order of $x^n y^m$ equals
>$1n+2m$.
>
>Example usage
>
>$ \\sin(b+a)+\\cos(b+a)(x-a)+\\cos(b+a)(y-b) $ $ y+x-(x^3+3y x^2+3 y^2
>x+y^3)/6 $ $ (-3 x^2 y-x^3)/6+y+x $
-}
mtaylor
  :: SXMatrix -> SXMatrix -> SXMatrix -> Int -> IO SXMatrix
mtaylor x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__mtaylor x0' x1' x2' x3' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__mtaylor_TIC" c_CasADi__mtaylor_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
mtaylor'
  :: SXMatrix -> SXMatrix -> SXMatrix -> IO SXMatrix
mtaylor' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__mtaylor_TIC x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__mtaylor_TIC_TIC" c_CasADi__mtaylor_TIC_TIC
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> Ptr SXMatrix' -> CInt -> Ptr (CppVec CInt) -> IO (Ptr SXMatrix')
mtaylor''
  :: SXMatrix -> SXMatrix -> SXMatrix -> Int -> Vector Int -> IO SXMatrix
mtaylor'' x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  c_CasADi__mtaylor_TIC_TIC x0' x1' x2' x3' x4' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__countNodes" c_CasADi__countNodes
  :: Ptr SXMatrix' -> IO CInt
{-|
>>  int CasADi::countNodes(const MX &A)
>------------------------------------------------------------------------
>
>Count number of nodes
>
>>  int CasADi::countNodes(const SXMatrix &A)
>------------------------------------------------------------------------
>
>Count number of nodes.
-}
countNodes
  :: SXMatrix -> IO Int
countNodes x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__countNodes x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__getOperatorRepresentation" c_CasADi__getOperatorRepresentation
  :: Ptr SX' -> Ptr (CppVec (Ptr StdString')) -> IO (Ptr StdString')
{-|
>>  std::string CasADi::getOperatorRepresentation(const MX &x, const std::vector< std::string > &args)
>------------------------------------------------------------------------
>
>Get a string representation for a binary MX, using custom arguments.
>
>>  std::string CasADi::getOperatorRepresentation(const SX &x, const std::vector< std::string > &args)
>------------------------------------------------------------------------
>
>Get a string representation for a binary SX, using custom arguments.
-}
getOperatorRepresentation
  :: SX -> Vector String -> IO String
getOperatorRepresentation x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal (CornerCase x1) $ \x1' ->
  c_CasADi__getOperatorRepresentation x0' x1' >>= (newForeignPtr c_delete_std__string) >>= wrapReturn

foreign import ccall unsafe "CasADi__getFree" c_CasADi__getFree
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
{-|
>Get all the free variables in an expression.
-}
getFree
  :: SXMatrix -> IO SXMatrix
getFree x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__getFree x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__extractShared" c_CasADi__extractShared
  :: Ptr (CppVec (Ptr SX')) -> Ptr (CppVec (Ptr SX')) -> Ptr (CppVec (Ptr SX')) -> Ptr StdString' -> Ptr StdString' -> IO ()
{-|
>Extract shared subexpressions from an set of expressions.
-}
extractShared
  :: Vector SX -> Vector SX -> Vector SX -> String -> String -> IO ()
extractShared x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  c_CasADi__extractShared x0' x1' x2' x3' x4' >>= wrapReturn

foreign import ccall unsafe "CasADi__extractShared_TIC" c_CasADi__extractShared_TIC
  :: Ptr (CppVec (Ptr SX')) -> Ptr (CppVec (Ptr SX')) -> Ptr (CppVec (Ptr SX')) -> Ptr StdString' -> IO ()
extractShared'
  :: Vector SX -> Vector SX -> Vector SX -> String -> IO ()
extractShared' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__extractShared_TIC x0' x1' x2' x3' >>= wrapReturn

foreign import ccall unsafe "CasADi__extractShared_TIC_TIC" c_CasADi__extractShared_TIC_TIC
  :: Ptr (CppVec (Ptr SX')) -> Ptr (CppVec (Ptr SX')) -> Ptr (CppVec (Ptr SX')) -> IO ()
extractShared''
  :: Vector SX -> Vector SX -> Vector SX -> IO ()
extractShared'' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__extractShared_TIC_TIC x0' x1' x2' >>= wrapReturn

foreign import ccall unsafe "CasADi__printCompact_TIC" c_CasADi__printCompact_TIC
  :: Ptr SXMatrix' -> IO ()
printCompact'
  :: SXMatrix -> IO ()
printCompact' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__printCompact_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__poly_coeff" c_CasADi__poly_coeff
  :: Ptr SXMatrix' -> Ptr SXMatrix' -> IO (Ptr SXMatrix')
{-|
>extracts polynomial coefficients from an expression
>
>ex Scalar expression that represents a polynomial  x Scalar symbol that th
>epolynomial is build up with
-}
poly_coeff
  :: SXMatrix -> SXMatrix -> IO SXMatrix
poly_coeff x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__poly_coeff x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__poly_roots" c_CasADi__poly_roots
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
{-|
>Attempts to find the roots of a polynomial.
>
>This will only work for polynomials up to order 3 It is assumed that the
>roots are real.
-}
poly_roots
  :: SXMatrix -> IO SXMatrix
poly_roots x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__poly_roots x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__eig_symbolic" c_CasADi__eig_symbolic
  :: Ptr SXMatrix' -> IO (Ptr SXMatrix')
{-|
>Attempts to find the eigenvalues of a symbolic matrix This will only work
>for up to 3x3 matrices.
>
>Bring m in block diagonal form, calculating eigenvalues of each block
>seperately 
-}
eig_symbolic
  :: SXMatrix -> IO SXMatrix
eig_symbolic x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__eig_symbolic x0' >>= (newForeignPtr c_delete_CasADi__Matrix_CasADi__SX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__vertcat_TIC_TIC_TIC_TIC" c_CasADi__vertcat_TIC_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr MX')) -> IO (Ptr MX')
vertcat''''
  :: Vector MX -> IO MX
vertcat'''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__vertcat_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr MX' -> Ptr (CppVec CInt) -> IO (Ptr (CppVec (Ptr MX')))
vertsplit'''''''''
  :: MX -> Vector Int -> IO (Vector MX)
vertsplit''''''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_std__vector_CasADi__MX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr MX' -> CInt -> IO (Ptr (CppVec (Ptr MX')))
vertsplit''''''''''
  :: MX -> Int -> IO (Vector MX)
vertsplit'''''''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_std__vector_CasADi__MX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr (CppVec (Ptr MX')))
vertsplit'''''''''''
  :: MX -> IO (Vector MX)
vertsplit''''''''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__vertsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_std__vector_CasADi__MX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__horzcat_TIC_TIC_TIC_TIC" c_CasADi__horzcat_TIC_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr MX')) -> IO (Ptr MX')
horzcat''''
  :: Vector MX -> IO MX
horzcat'''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__horzcat_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr MX' -> Ptr (CppVec CInt) -> IO (Ptr (CppVec (Ptr MX')))
horzsplit'''''''''
  :: MX -> Vector Int -> IO (Vector MX)
horzsplit''''''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_std__vector_CasADi__MX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr MX' -> CInt -> IO (Ptr (CppVec (Ptr MX')))
horzsplit''''''''''
  :: MX -> Int -> IO (Vector MX)
horzsplit'''''''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_std__vector_CasADi__MX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr (CppVec (Ptr MX')))
horzsplit'''''''''''
  :: MX -> IO (Vector MX)
horzsplit''''''''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__horzsplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_std__vector_CasADi__MX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__blockcat_TIC_TIC_TIC" c_CasADi__blockcat_TIC_TIC_TIC
  :: Ptr (CppVecVec (Ptr MX')) -> IO (Ptr MX')
blockcat'''
  :: Vector (Vector MX) -> IO MX
blockcat''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__blockcat_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr MX' -> Ptr (CppVec CInt) -> Ptr (CppVec CInt) -> IO (Ptr (CppVecVec (Ptr MX')))
blocksplit''''''''''''
  :: MX -> Vector Int -> Vector Int -> IO (Vector (Vector MX))
blocksplit'''''''''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= (newForeignPtr c_delete_std__vector_std__vector_CasADi__MX__) >>= wrapReturn

foreign import ccall unsafe "CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr MX' -> CInt -> CInt -> IO (Ptr (CppVecVec (Ptr MX')))
blocksplit'''''''''''''
  :: MX -> Int -> Int -> IO (Vector (Vector MX))
blocksplit''''''''''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= (newForeignPtr c_delete_std__vector_std__vector_CasADi__MX__) >>= wrapReturn

foreign import ccall unsafe "CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr MX' -> CInt -> IO (Ptr (CppVecVec (Ptr MX')))
blocksplit''''''''''''''
  :: MX -> Int -> IO (Vector (Vector MX))
blocksplit'''''''''''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_std__vector_std__vector_CasADi__MX__) >>= wrapReturn

foreign import ccall unsafe "CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr (CppVecVec (Ptr MX')))
blocksplit'''''''''''''''
  :: MX -> IO (Vector (Vector MX))
blocksplit''''''''''''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__blocksplit_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_std__vector_std__vector_CasADi__MX__) >>= wrapReturn

foreign import ccall unsafe "CasADi__veccat_TIC_TIC_TIC" c_CasADi__veccat_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr MX')) -> IO (Ptr MX')
veccat'''
  :: Vector MX -> IO MX
veccat''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__veccat_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__flattencat_TIC_TIC_TIC" c_CasADi__flattencat_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr MX')) -> IO (Ptr MX')
flattencat'''
  :: Vector MX -> IO MX
flattencat''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__flattencat_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__vecNZcat_TIC_TIC_TIC" c_CasADi__vecNZcat_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr MX')) -> IO (Ptr MX')
vecNZcat'''
  :: Vector MX -> IO MX
vecNZcat''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__vecNZcat_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__flattenNZcat_TIC_TIC_TIC" c_CasADi__flattenNZcat_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr MX')) -> IO (Ptr MX')
flattenNZcat'''
  :: Vector MX -> IO MX
flattenNZcat''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__flattenNZcat_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__norm_F_TIC_TIC_TIC" c_CasADi__norm_F_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr MX')
norm_F'''
  :: MX -> IO MX
norm_F''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__norm_F_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__norm_2_TIC_TIC_TIC" c_CasADi__norm_2_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr MX')
norm_2'''
  :: MX -> IO MX
norm_2''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__norm_2_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__norm_1_TIC_TIC_TIC" c_CasADi__norm_1_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr MX')
norm_1'''
  :: MX -> IO MX
norm_1''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__norm_1_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__norm_inf_TIC_TIC_TIC" c_CasADi__norm_inf_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr MX')
norm_inf'''
  :: MX -> IO MX
norm_inf''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__norm_inf_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__trans_TIC_TIC_TIC_TIC" c_CasADi__trans_TIC_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr MX')
trans''''
  :: MX -> IO MX
trans'''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__trans_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr MX' -> Ptr MX' -> Ptr CRSSparsity' -> IO (Ptr MX')
mul''''''''''
  :: MX -> MX -> CRSSparsity -> IO MX
mul'''''''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr MX' -> Ptr MX' -> IO (Ptr MX')
mul'''''''''''
  :: MX -> MX -> IO MX
mul''''''''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr MX')) -> IO (Ptr MX')
mul''''''''''''
  :: Vector MX -> IO MX
mul'''''''''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__mul_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__inner_prod_TIC_TIC_TIC" c_CasADi__inner_prod_TIC_TIC_TIC
  :: Ptr MX' -> Ptr MX' -> IO (Ptr MX')
inner_prod'''
  :: MX -> MX -> IO MX
inner_prod''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__inner_prod_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__outer_prod_TIC_TIC_TIC" c_CasADi__outer_prod_TIC_TIC_TIC
  :: Ptr MX' -> Ptr MX' -> IO (Ptr MX')
outer_prod'''
  :: MX -> MX -> IO MX
outer_prod''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__outer_prod_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__if_else_TIC" c_CasADi__if_else_TIC
  :: Ptr MX' -> Ptr MX' -> Ptr MX' -> IO (Ptr MX')
if_else'
  :: MX -> MX -> MX -> IO MX
if_else' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__if_else_TIC x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__reshape_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__reshape_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr MX' -> Ptr CRSSparsity' -> IO (Ptr MX')
reshape'''''''
  :: MX -> CRSSparsity -> IO MX
reshape''''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__reshape_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__vec_TIC_TIC_TIC_TIC" c_CasADi__vec_TIC_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr MX')
vec''''
  :: MX -> IO MX
vec'''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__vec_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__flatten_TIC_TIC_TIC" c_CasADi__flatten_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr MX')
flatten'''
  :: MX -> IO MX
flatten''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__flatten_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__vecNZ_TIC_TIC_TIC" c_CasADi__vecNZ_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr MX')
vecNZ'''
  :: MX -> IO MX
vecNZ''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__vecNZ_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__flattenNZ_TIC_TIC_TIC" c_CasADi__flattenNZ_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr MX')
flattenNZ'''
  :: MX -> IO MX
flattenNZ''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__flattenNZ_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__unite_TIC_TIC_TIC" c_CasADi__unite_TIC_TIC_TIC
  :: Ptr MX' -> Ptr MX' -> IO (Ptr MX')
unite'''
  :: MX -> MX -> IO MX
unite''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__unite_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__isSymbolic_TIC" c_CasADi__isSymbolic_TIC
  :: Ptr MX' -> IO (Ptr CppBool')
isSymbolic'
  :: MX -> IO Bool
isSymbolic' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isSymbolic_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isSymbolicSparse_TIC" c_CasADi__isSymbolicSparse_TIC
  :: Ptr MX' -> IO (Ptr CppBool')
isSymbolicSparse'
  :: MX -> IO Bool
isSymbolicSparse' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isSymbolicSparse_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isIdentity_TIC_TIC_TIC" c_CasADi__isIdentity_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr CppBool')
isIdentity'''
  :: MX -> IO Bool
isIdentity''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isIdentity_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isZero_TIC_TIC_TIC" c_CasADi__isZero_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr CppBool')
isZero'''
  :: MX -> IO Bool
isZero''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isZero_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isOne_TIC_TIC_TIC" c_CasADi__isOne_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr CppBool')
isOne'''
  :: MX -> IO Bool
isOne''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isOne_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__simplify_TIC_TIC" c_CasADi__simplify_TIC_TIC
  :: Ptr MX' -> IO ()
simplify''
  :: MX -> IO ()
simplify'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__simplify_TIC_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__isTranspose" c_CasADi__isTranspose
  :: Ptr MX' -> IO (Ptr CppBool')
{-|
>Is the expression a transpose?
-}
isTranspose
  :: MX -> IO Bool
isTranspose x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isTranspose x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isMinusOne_TIC_TIC_TIC" c_CasADi__isMinusOne_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr CppBool')
isMinusOne'''
  :: MX -> IO Bool
isMinusOne''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isMinusOne_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isVector_TIC_TIC_TIC" c_CasADi__isVector_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr CppBool')
isVector'''
  :: MX -> IO Bool
isVector''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isVector_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isDense_TIC_TIC_TIC" c_CasADi__isDense_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr CppBool')
isDense'''
  :: MX -> IO Bool
isDense''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isDense_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__isRegular_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__isRegular_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr CppBool')
isRegular''''''
  :: MX -> IO Bool
isRegular'''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__isRegular_TIC_TIC_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__trace_TIC_TIC_TIC" c_CasADi__trace_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr MX')
trace'''
  :: MX -> IO MX
trace''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__trace_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__repmat_TIC_TIC_TIC" c_CasADi__repmat_TIC_TIC_TIC
  :: Ptr MX' -> CInt -> CInt -> IO (Ptr MX')
repmat'''
  :: MX -> Int -> Int -> IO MX
repmat''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__repmat_TIC_TIC_TIC x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__makeDense_TIC_TIC_TIC" c_CasADi__makeDense_TIC_TIC_TIC
  :: Ptr MX' -> IO ()
makeDense'''
  :: MX -> IO ()
makeDense''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__makeDense_TIC_TIC_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__densify_TIC_TIC_TIC" c_CasADi__densify_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr MX')
densify'''
  :: MX -> IO MX
densify''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__densify_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__full_TIC_TIC_TIC" c_CasADi__full_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr MX')
full'''
  :: MX -> IO MX
full''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__full_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__createParent" c_CasADi__createParent
  :: Ptr (CppVec (Ptr MX')) -> IO (Ptr MX')
{-|
>>  MX CasADi::createParent(std::vector< MX > &deps)
>------------------------------------------------------------------------
>
>Create a parent MX on which all given MX's will depend.
>
>In some sense, this function is the inverse of
>
>Parameters:
>-----------
>
>deps:  Must all be symbolic matrices.
>
>>  std::pair< MX, std::vector< MX > > CasADi::createParent(const std::vector< CRSSparsity > &deps)
>
>>  std::pair< MX, std::vector< MX > > CasADi::createParent(const std::vector< MX > &deps)
>------------------------------------------------------------------------
>
>Create a parent MX on which a bunch of MX's (sizes given as argument) will
>depend.
-}
createParent
  :: Vector MX -> IO MX
createParent x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__createParent x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__countNodes_TIC" c_CasADi__countNodes_TIC
  :: Ptr MX' -> IO CInt
countNodes'
  :: MX -> IO Int
countNodes' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__countNodes_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__diag_TIC_TIC_TIC" c_CasADi__diag_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr MX')
diag'''
  :: MX -> IO MX
diag''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__diag_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__blkdiag_TIC_TIC_TIC_TIC" c_CasADi__blkdiag_TIC_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr MX')) -> IO (Ptr MX')
blkdiag''''
  :: Vector MX -> IO MX
blkdiag'''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__blkdiag_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__sumRows_TIC_TIC_TIC" c_CasADi__sumRows_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr MX')
sumRows'''
  :: MX -> IO MX
sumRows''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__sumRows_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__sumCols_TIC_TIC_TIC" c_CasADi__sumCols_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr MX')
sumCols'''
  :: MX -> IO MX
sumCols''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__sumCols_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__sumAll_TIC_TIC_TIC" c_CasADi__sumAll_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr MX')
sumAll'''
  :: MX -> IO MX
sumAll''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__sumAll_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__polyval_TIC_TIC_TIC" c_CasADi__polyval_TIC_TIC_TIC
  :: Ptr MX' -> Ptr MX' -> IO (Ptr MX')
polyval'''
  :: MX -> MX -> IO MX
polyval''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__polyval_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__msym" c_CasADi__msym
  :: Ptr StdString' -> CInt -> CInt -> IO (Ptr MX')
{-|
>>  MX CasADi::msym(const std::string &name, int n=1, int m=1)
>------------------------------------------------------------------------
>
>Construct symbolic arrays and variables using CasADi's MX expression graph
>representation The "msym" function is intended to work in a similar way as
>"sym" used in the Symbolic Toolbox for Matlab but instead creating an MX
>object. The MX expression graph is more general but also have considerably
>more overhead than the alternative SX expression graph.
>
>Create a matrix symbolic variable of given sparsity
>
>>  MX CasADi::msym(const std::string &name, const std::pair< int, int > &nm)
>
>>  MX CasADi::msym(const std::string &name, const CRSSparsity &sp)
>------------------------------------------------------------------------
>
>Create a matrix symbolic variable of given sparsity.
>
>>  MX CasADi::msym(const Matrix< double > &x)
>------------------------------------------------------------------------
>
>Create a matrix variable from a constant matrix.
>
>>  std::vector< MX > CasADi::msym(const std::string &name, const CRSSparsity &sp, int p)
>------------------------------------------------------------------------
>
>Create a vector of length p with with matrix symbolic variables of given
>sparsity.
>
>>  std::vector< std::vector< MX > > CasADi::msym(const std::string &name, const CRSSparsity &sp, int p, int r)
>------------------------------------------------------------------------
>
>Create a vector of length r of vectors of length p with matrix symbolic
>variables with given sparsity.
>
>>  std::vector< MX > CasADi::msym(const std::string &name, int n, int m, int p)
>------------------------------------------------------------------------
>
>Create a vector of length p with n-by-m matrix symbolic variables.
>
>>  std::vector< std::vector< MX > > CasADi::msym(const std::string &name, int n, int m, int p, int r)
>------------------------------------------------------------------------
>
>Create a vector of length r of vectors of length p with n-by-m matrices with
>symbolic variables.
-}
msym
  :: String -> Int -> Int -> IO MX
msym x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__msym x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__msym_TIC" c_CasADi__msym_TIC
  :: Ptr StdString' -> CInt -> IO (Ptr MX')
msym'
  :: String -> Int -> IO MX
msym' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__msym_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__msym_TIC_TIC" c_CasADi__msym_TIC_TIC
  :: Ptr StdString' -> IO (Ptr MX')
msym''
  :: String -> IO MX
msym'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__msym_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__msym_TIC_TIC_TIC" c_CasADi__msym_TIC_TIC_TIC
  :: Ptr DMatrix' -> IO (Ptr MX')
msym'''
  :: DMatrix -> IO MX
msym''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__msym_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__msym_TIC_TIC_TIC_TIC" c_CasADi__msym_TIC_TIC_TIC_TIC
  :: Ptr StdString' -> Ptr CRSSparsity' -> IO (Ptr MX')
msym''''
  :: String -> CRSSparsity -> IO MX
msym'''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__msym_TIC_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__msym_TIC_TIC_TIC_TIC_TIC" c_CasADi__msym_TIC_TIC_TIC_TIC_TIC
  :: Ptr StdString' -> Ptr CRSSparsity' -> CInt -> IO (Ptr (CppVec (Ptr MX')))
msym'''''
  :: String -> CRSSparsity -> Int -> IO (Vector MX)
msym''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__msym_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= (newForeignPtr c_delete_std__vector_CasADi__MX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__msym_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__msym_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr StdString' -> CInt -> CInt -> CInt -> IO (Ptr (CppVec (Ptr MX')))
msym''''''
  :: String -> Int -> Int -> Int -> IO (Vector MX)
msym'''''' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__msym_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' >>= (newForeignPtr c_delete_std__vector_CasADi__MX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__msym_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__msym_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr StdString' -> Ptr CRSSparsity' -> CInt -> CInt -> IO (Ptr (CppVecVec (Ptr MX')))
msym'''''''
  :: String -> CRSSparsity -> Int -> Int -> IO (Vector (Vector MX))
msym''''''' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__msym_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' >>= (newForeignPtr c_delete_std__vector_std__vector_CasADi__MX__) >>= wrapReturn

foreign import ccall unsafe "CasADi__msym_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__msym_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr StdString' -> CInt -> CInt -> CInt -> CInt -> IO (Ptr (CppVecVec (Ptr MX')))
msym''''''''
  :: String -> Int -> Int -> Int -> Int -> IO (Vector (Vector MX))
msym'''''''' x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  c_CasADi__msym_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' x4' >>= (newForeignPtr c_delete_std__vector_std__vector_CasADi__MX__) >>= wrapReturn

foreign import ccall unsafe "CasADi__isEqual_TIC_TIC_TIC" c_CasADi__isEqual_TIC_TIC_TIC
  :: Ptr MX' -> Ptr MX' -> IO (Ptr CppBool')
isEqual'''
  :: MX -> MX -> IO Bool
isEqual''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__isEqual_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_bool) >>= wrapReturn

foreign import ccall unsafe "CasADi__getOperatorRepresentation_TIC" c_CasADi__getOperatorRepresentation_TIC
  :: Ptr MX' -> Ptr (CppVec (Ptr StdString')) -> IO (Ptr StdString')
getOperatorRepresentation'
  :: MX -> Vector String -> IO String
getOperatorRepresentation' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal (CornerCase x1) $ \x1' ->
  c_CasADi__getOperatorRepresentation_TIC x0' x1' >>= (newForeignPtr c_delete_std__string) >>= wrapReturn

foreign import ccall unsafe "CasADi__substitute_TIC_TIC" c_CasADi__substitute_TIC_TIC
  :: Ptr MX' -> Ptr MX' -> Ptr MX' -> IO (Ptr MX')
substitute''
  :: MX -> MX -> MX -> IO MX
substitute'' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__substitute_TIC_TIC x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__substitute_TIC_TIC_TIC" c_CasADi__substitute_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> IO (Ptr (CppVec (Ptr MX')))
substitute'''
  :: Vector MX -> Vector MX -> Vector MX -> IO (Vector MX)
substitute''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__substitute_TIC_TIC_TIC x0' x1' x2' >>= (newForeignPtr c_delete_std__vector_CasADi__MX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__graph_substitute" c_CasADi__graph_substitute
  :: Ptr MX' -> Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> IO (Ptr MX')
{-|
>>  MX CasADi::graph_substitute(const MX &ex, const std::vector< MX > &v, const std::vector< MX > &vdef)
>------------------------------------------------------------------------
>
>Substitute variable v with expression vdef in an expression ex, preserving
>nodes.
>
>>  std::vector< MX > CasADi::graph_substitute(const std::vector< MX > &ex, const std::vector< MX > &v, const std::vector< MX > &vdef)
>------------------------------------------------------------------------
>
>Substitute variable var with expression expr in multiple expressions,
>preserving nodes.
-}
graph_substitute
  :: MX -> Vector MX -> Vector MX -> IO MX
graph_substitute x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__graph_substitute x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__graph_substitute_TIC" c_CasADi__graph_substitute_TIC
  :: Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> IO (Ptr (CppVec (Ptr MX')))
graph_substitute'
  :: Vector MX -> Vector MX -> Vector MX -> IO (Vector MX)
graph_substitute' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__graph_substitute_TIC x0' x1' x2' >>= (newForeignPtr c_delete_std__vector_CasADi__MX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__substituteInPlace_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__substituteInPlace_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> Ptr CppBool' -> IO ()
substituteInPlace''''''
  :: Vector MX -> Vector MX -> Bool -> IO ()
substituteInPlace'''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__substituteInPlace_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

foreign import ccall unsafe "CasADi__substituteInPlace_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__substituteInPlace_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> IO ()
substituteInPlace'''''''
  :: Vector MX -> Vector MX -> IO ()
substituteInPlace''''''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__substituteInPlace_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' >>= wrapReturn

foreign import ccall unsafe "CasADi__substituteInPlace_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__substituteInPlace_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> Ptr CppBool' -> IO ()
substituteInPlace''''''''
  :: Vector MX -> Vector MX -> Vector MX -> Bool -> IO ()
substituteInPlace'''''''' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__substituteInPlace_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' x3' >>= wrapReturn

foreign import ccall unsafe "CasADi__substituteInPlace_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__substituteInPlace_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> IO ()
substituteInPlace'''''''''
  :: Vector MX -> Vector MX -> Vector MX -> IO ()
substituteInPlace''''''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__substituteInPlace_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

foreign import ccall unsafe "CasADi__extractShared_TIC_TIC_TIC" c_CasADi__extractShared_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> Ptr StdString' -> Ptr StdString' -> IO ()
extractShared'''
  :: Vector MX -> Vector MX -> Vector MX -> String -> String -> IO ()
extractShared''' x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  c_CasADi__extractShared_TIC_TIC_TIC x0' x1' x2' x3' x4' >>= wrapReturn

foreign import ccall unsafe "CasADi__extractShared_TIC_TIC_TIC_TIC" c_CasADi__extractShared_TIC_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> Ptr StdString' -> IO ()
extractShared''''
  :: Vector MX -> Vector MX -> Vector MX -> String -> IO ()
extractShared'''' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__extractShared_TIC_TIC_TIC_TIC x0' x1' x2' x3' >>= wrapReturn

foreign import ccall unsafe "CasADi__extractShared_TIC_TIC_TIC_TIC_TIC" c_CasADi__extractShared_TIC_TIC_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> IO ()
extractShared'''''
  :: Vector MX -> Vector MX -> Vector MX -> IO ()
extractShared''''' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__extractShared_TIC_TIC_TIC_TIC_TIC x0' x1' x2' >>= wrapReturn

foreign import ccall unsafe "CasADi__printCompact_TIC_TIC_TIC" c_CasADi__printCompact_TIC_TIC_TIC
  :: Ptr MX' -> IO ()
printCompact'''
  :: MX -> IO ()
printCompact''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__printCompact_TIC_TIC_TIC x0' >>= wrapReturn

foreign import ccall unsafe "CasADi__jacobian_TIC" c_CasADi__jacobian_TIC
  :: Ptr MX' -> Ptr MX' -> IO (Ptr MX')
jacobian'
  :: MX -> MX -> IO MX
jacobian' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__jacobian_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__gradient_TIC" c_CasADi__gradient_TIC
  :: Ptr MX' -> Ptr MX' -> IO (Ptr MX')
gradient'
  :: MX -> MX -> IO MX
gradient' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__gradient_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__tangent_TIC" c_CasADi__tangent_TIC
  :: Ptr MX' -> Ptr MX' -> IO (Ptr MX')
tangent'
  :: MX -> MX -> IO MX
tangent' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__tangent_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__nullspace_TIC_TIC_TIC" c_CasADi__nullspace_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr MX')
nullspace'''
  :: MX -> IO MX
nullspace''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__nullspace_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__det_TIC_TIC_TIC" c_CasADi__det_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr MX')
det'''
  :: MX -> IO MX
det''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__det_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__inv_TIC_TIC_TIC" c_CasADi__inv_TIC_TIC_TIC
  :: Ptr MX' -> IO (Ptr MX')
inv'''
  :: MX -> IO MX
inv''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__inv_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__getSymbols_TIC" c_CasADi__getSymbols_TIC
  :: Ptr MX' -> IO (Ptr (CppVec (Ptr MX')))
getSymbols'
  :: MX -> IO (Vector MX)
getSymbols' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__getSymbols_TIC x0' >>= (newForeignPtr c_delete_std__vector_CasADi__MX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__getSymbols_TIC_TIC" c_CasADi__getSymbols_TIC_TIC
  :: Ptr (CppVec (Ptr MX')) -> IO (Ptr (CppVec (Ptr MX')))
getSymbols''
  :: Vector MX -> IO (Vector MX)
getSymbols'' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__getSymbols_TIC_TIC x0' >>= (newForeignPtr c_delete_std__vector_CasADi__MX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__matrix_expand" c_CasADi__matrix_expand
  :: Ptr MX' -> Ptr (CppVec (Ptr MX')) -> IO (Ptr MX')
{-|
>Expand MX graph to SXFunction call.
>
>Expand the given expression e, optionally supplying expressions contained in
>it at which expansion should stop.
-}
matrix_expand
  :: MX -> Vector MX -> IO MX
matrix_expand x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__matrix_expand x0' x1' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__matrix_expand_TIC" c_CasADi__matrix_expand_TIC
  :: Ptr MX' -> IO (Ptr MX')
matrix_expand'
  :: MX -> IO MX
matrix_expand' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__matrix_expand_TIC x0' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__matrix_expand_TIC_TIC" c_CasADi__matrix_expand_TIC_TIC
  :: Ptr (CppVec (Ptr MX')) -> Ptr (CppVec (Ptr MX')) -> IO (Ptr (CppVec (Ptr MX')))
matrix_expand''
  :: Vector MX -> Vector MX -> IO (Vector MX)
matrix_expand'' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__matrix_expand_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_std__vector_CasADi__MX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__matrix_expand_TIC_TIC_TIC" c_CasADi__matrix_expand_TIC_TIC_TIC
  :: Ptr (CppVec (Ptr MX')) -> IO (Ptr (CppVec (Ptr MX')))
matrix_expand'''
  :: Vector MX -> IO (Vector MX)
matrix_expand''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__matrix_expand_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_std__vector_CasADi__MX_) >>= wrapReturn

foreign import ccall unsafe "CasADi__kron_TIC_TIC_TIC" c_CasADi__kron_TIC_TIC_TIC
  :: Ptr MX' -> Ptr MX' -> IO (Ptr MX')
kron'''
  :: MX -> MX -> IO MX
kron''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__kron_TIC_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__MX) >>= wrapReturn

foreign import ccall unsafe "CasADi__parameterizeTime" c_CasADi__parameterizeTime
  :: Ptr FX' -> IO (Ptr FX')
{-|
>make integration start and end time a parameter Applies the conversion t =
>t0 + (tf-t0)*tau to the supplied dae. with tau dimensionless time. The
>Input/OuputScheme of the result is the same as the scheme of the dae, except
>for input(DAE_P), which is extended by t0 and tf at the top.
-}
parameterizeTime
  :: FX -> IO FX
parameterizeTime x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__parameterizeTime x0' >>= (newForeignPtr c_delete_CasADi__FX) >>= wrapReturn

foreign import ccall unsafe "CasADi__parameterizeTimeOutput" c_CasADi__parameterizeTimeOutput
  :: Ptr FX' -> IO (Ptr FX')
{-|
>adapts an output function such that start and end time are parameters
>Applies the conversion t = t0 + (tf-t0)*tau to the supplied dae. with tau
>dimensionless time. The InputScheme of the result is the same as the scheme
>of the dae, except for input(DAE_P), which is extended by t0 and tf at the
>top.
-}
parameterizeTimeOutput
  :: FX -> IO FX
parameterizeTimeOutput x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__parameterizeTimeOutput x0' >>= (newForeignPtr c_delete_CasADi__FX) >>= wrapReturn

foreign import ccall unsafe "CasADi__numSample1D" c_CasADi__numSample1D
  :: Ptr FX' -> Ptr DMatrix' -> IO (Ptr DMatrix')
{-|
>sample a function on a 1D grid
>
>Parameters:
>-----------
>
>fx:  an initialized function mapping from single p-by-1 to single m-by-n
>
>a:  grid of numbers p-by-N
>
>For each column in the grid, fx is numerically evaluated and the output is
>put in a resulting matrix of size m-by-n*p
>
>If your fx is really multiple output, and you wish to use a particular
>output, use the slice operator on the fx.
>
>See:   evalf
-}
numSample1D
  :: FX -> DMatrix -> IO DMatrix
numSample1D x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__numSample1D x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__numSample1DT" c_CasADi__numSample1DT
  :: Ptr FX' -> Ptr DMatrix' -> IO (Ptr DMatrix')
{-|
>sample a function on a 1D grid
>
>Parameters:
>-----------
>
>fx:  an initialized function mapping from single p-by-1 to single m-by-n
>
>a:  grid of numbers p-by-N
>
>For each column in the grid, fx is numerically evaluated and the output is
>put in a resulting matrix of size m*p-by-n
>
>If your fx is really multiple output, and you wish to use a particular
>output, use the slice operator on the fx.
-}
numSample1DT
  :: FX -> DMatrix -> IO DMatrix
numSample1DT x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__numSample1DT x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__numSample2D" c_CasADi__numSample2D
  :: Ptr FX' -> Ptr DMatrix' -> IO (Ptr DMatrix')
{-|
>sample a function on a 2D grid
>
>Parameters:
>-----------
>
>fx:  an initialized function mapping from (1-by-1,1-by-1) to single m-by-n
>
>a:  grid of numbers
>
>For each point (i,j) in the grid, fx is numerically evaluated and the output
>is put in a matrix
>
>If your fx is really multiple output, and you wish to use a particular
>output, use the slice operator on the fx.
-}
numSample2D
  :: FX -> DMatrix -> IO DMatrix
numSample2D x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__numSample2D x0' x1' >>= (newForeignPtr c_delete_CasADi__Matrix_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__vec_TIC_TIC_TIC_TIC_TIC" c_CasADi__vec_TIC_TIC_TIC_TIC_TIC
  :: Ptr SXFunction' -> IO (Ptr SXFunction')
vec'''''
  :: SXFunction -> IO SXFunction
vec''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__vec_TIC_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__SXFunction) >>= wrapReturn

foreign import ccall unsafe "CasADi__vec_TIC_TIC_TIC_TIC_TIC_TIC" c_CasADi__vec_TIC_TIC_TIC_TIC_TIC_TIC
  :: Ptr FX' -> IO (Ptr MXFunction')
vec''''''
  :: FX -> IO MXFunction
vec'''''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__vec_TIC_TIC_TIC_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__MXFunction) >>= wrapReturn

foreign import ccall unsafe "CasADi__collocationPoints" c_CasADi__collocationPoints
  :: CInt -> Ptr StdString' -> IO (Ptr (CppVec CDouble))
{-|
>Obtain collocation points of specific order and scheme.
>
>Parameters:
>-----------
>
>scheme:  'radau' or 'legendre'
-}
collocationPoints
  :: Int -> String -> IO (Vector Double)
collocationPoints x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__collocationPoints x0' x1' >>= (newForeignPtr c_delete_std__vector_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__collocationPoints_TIC" c_CasADi__collocationPoints_TIC
  :: CInt -> IO (Ptr (CppVec CDouble))
collocationPoints'
  :: Int -> IO (Vector Double)
collocationPoints' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__collocationPoints_TIC x0' >>= (newForeignPtr c_delete_std__vector_double_) >>= wrapReturn

foreign import ccall unsafe "CasADi__collocationInterpolators" c_CasADi__collocationInterpolators
  :: Ptr (CppVec CDouble) -> Ptr (CppVecVec CDouble) -> Ptr (CppVec CDouble) -> IO ()
{-|
>Obtain collocation interpolating matrices.
>
>Parameters:
>-----------
>
>tau_root:  location of collocation points, as obtained from
>collocationPoints
>
>C:  interpolating coefficients to obtain derivatives Length: order+1, order
>+ 1
>
>dX/dt (j) ~ Sum_i C[j][i]*X(i)
>
>Parameters:
>-----------
>
>D:  interpolating coefficients to obtain end state Length: order+1
-}
collocationInterpolators
  :: Vector Double -> Vector (Vector Double) -> Vector Double -> IO ()
collocationInterpolators x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__collocationInterpolators x0' x1' x2' >>= wrapReturn

foreign import ccall unsafe "CasADi__explicitRK" c_CasADi__explicitRK
  :: Ptr FX' -> Ptr MX' -> CInt -> CInt -> IO (Ptr FX')
{-|
>Construct an explicit Runge-Kutta integrator.
>
>Parameters:
>-----------
>
>f:  dynamical system
>
>>Input scheme: CasADi::DAEInput (DAE_NUM_IN = 5) [daeIn]
>+-----------+-------+----------------------------+
>| Full name | Short |        Description         |
>+===========+=======+============================+
>| DAE_X     | x     | Differential state .       |
>+-----------+-------+----------------------------+
>| DAE_Z     | z     | Algebraic state .          |
>+-----------+-------+----------------------------+
>| DAE_P     | p     | Parameter .                |
>+-----------+-------+----------------------------+
>| DAE_T     | t     | Explicit time dependence . |
>+-----------+-------+----------------------------+
>
>>Output scheme: CasADi::DAEOutput (DAE_NUM_OUT = 4) [daeOut]
>+-----------+-------+--------------------------------------------+
>| Full name | Short |                Description                 |
>+===========+=======+============================================+
>| DAE_ODE   | ode   | Right hand side of the implicit ODE .      |
>+-----------+-------+--------------------------------------------+
>| DAE_ALG   | alg   | Right hand side of algebraic equations .   |
>+-----------+-------+--------------------------------------------+
>| DAE_QUAD  | quad  | Right hand side of quadratures equations . |
>+-----------+-------+--------------------------------------------+
>
>Parameters:
>-----------
>
>tf:  Integration end time
>
>order:  Order of integration
>
>ne:  Number of times the RK primitive is repeated over the integration
>interval
-}
explicitRK
  :: FX -> MX -> Int -> Int -> IO FX
explicitRK x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__explicitRK x0' x1' x2' x3' >>= (newForeignPtr c_delete_CasADi__FX) >>= wrapReturn

foreign import ccall unsafe "CasADi__explicitRK_TIC" c_CasADi__explicitRK_TIC
  :: Ptr FX' -> Ptr MX' -> CInt -> IO (Ptr FX')
explicitRK'
  :: FX -> MX -> Int -> IO FX
explicitRK' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__explicitRK_TIC x0' x1' x2' >>= (newForeignPtr c_delete_CasADi__FX) >>= wrapReturn

foreign import ccall unsafe "CasADi__explicitRK_TIC_TIC" c_CasADi__explicitRK_TIC_TIC
  :: Ptr FX' -> Ptr MX' -> IO (Ptr FX')
explicitRK''
  :: FX -> MX -> IO FX
explicitRK'' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__explicitRK_TIC_TIC x0' x1' >>= (newForeignPtr c_delete_CasADi__FX) >>= wrapReturn

foreign import ccall unsafe "CasADi__explicitRK_TIC_TIC_TIC" c_CasADi__explicitRK_TIC_TIC_TIC
  :: Ptr FX' -> IO (Ptr FX')
explicitRK'''
  :: FX -> IO FX
explicitRK''' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__explicitRK_TIC_TIC_TIC x0' >>= (newForeignPtr c_delete_CasADi__FX) >>= wrapReturn