casadi-bindings 2.4.1.2 → 2.4.1.3
raw patch · 6 files changed
+20/−6 lines, 6 files
Files
- casadi-bindings.cabal +1/−1
- src/Casadi/CMatrix.hs +2/−0
- src/Casadi/DMatrix.hs +5/−1
- src/Casadi/MX.hs +5/−1
- src/Casadi/SX.hs +5/−1
- src/Casadi/Viewable.hs +2/−2
casadi-bindings.cabal view
@@ -1,5 +1,5 @@ name: casadi-bindings-version: 2.4.1.2+version: 2.4.1.3 synopsis: mid-level bindings to CasADi category: Numerical, Math description:
src/Casadi/CMatrix.hs view
@@ -18,6 +18,8 @@ class (Eq a, Show a, Floating a, Fmod a, ArcTan2 a, SymOrd a, Erf a, Viewable a) => CMatrix a where+ blocksplit :: a -> V.Vector Int -> V.Vector Int -> V.Vector (V.Vector a)+ blockcat :: V.Vector (V.Vector a) -> a vertsplit :: a -> V.Vector Int -> V.Vector a vertcat :: V.Vector a -> a horzsplit :: a -> V.Vector Int -> V.Vector a
src/Casadi/DMatrix.hs view
@@ -43,7 +43,7 @@ conjugate = id instance Viewable DMatrix where- vveccat = veccat+ vvertcat = vertcat vvertsplit = vertsplit vsize1 = size1 vsize2 = size2@@ -70,6 +70,10 @@ {-# NOINLINE (==) #-} instance CMatrix DMatrix where+ blocksplit x ix iy = unsafePerformIO (C.casadi_blocksplit__7 x ix iy)+ {-# NOINLINE blocksplit #-}+ blockcat x = unsafePerformIO (C.casadi_blockcat__3 x)+ {-# NOINLINE blockcat #-} veccat x = unsafePerformIO (C.casadi_veccat__1 x) {-# NOINLINE veccat #-} ---- vertsplit = vertslice
src/Casadi/MX.hs view
@@ -31,7 +31,7 @@ {-# NOINLINE show #-} instance Viewable MX where- vveccat = veccat+ vvertcat = vertcat vvertsplit = vertsplit vsize1 = size1 vsize2 = size2@@ -70,6 +70,10 @@ --{-# NOINLINE sparsify #-} instance CMatrix MX where+ blocksplit x ix iy = unsafePerformIO (C.casadi_blocksplit__15 x ix iy)+ {-# NOINLINE blocksplit #-}+ blockcat x = unsafePerformIO (C.casadi_blockcat__7 x)+ {-# NOINLINE blockcat #-} veccat x = unsafePerformIO (C.casadi_veccat__3 x) {-# NOINLINE veccat #-} -- vertsplit = vertslice
src/Casadi/SX.hs view
@@ -29,7 +29,7 @@ conjugate = id instance Viewable SX where- vveccat = veccat+ vvertcat = vertcat vvertsplit = vertsplit vsize1 = size1 vsize2 = size2@@ -65,6 +65,10 @@ instance CMatrix SX where+ blocksplit x ix iy = unsafePerformIO (C.casadi_blocksplit__3 x ix iy)+ {-# NOINLINE blocksplit #-}+ blockcat x = unsafePerformIO (C.casadi_blockcat__1 x)+ {-# NOINLINE blockcat #-} veccat x = unsafePerformIO (C.casadi_veccat__0 x) {-# NOINLINE veccat #-} -- vertsplit = vertslice
src/Casadi/Viewable.hs view
@@ -8,7 +8,7 @@ class Viewable a where vvertsplit :: a -> V.Vector Int -> V.Vector a- vveccat :: V.Vector a -> a+ vvertcat :: V.Vector a -> a vsize1 :: a -> Int vsize2 :: a -> Int vrecoverDimension :: a -> (Int, Int) -> a@@ -16,7 +16,7 @@ instance Viewable (V.Vector a) where vsize1 = V.length vsize2 = const 1- vveccat = V.concat . V.toList+ vvertcat = V.concat . V.toList vvertsplit x ks = V.fromList (split x (V.toList ks)) -- todo(greg): this doesn't look right vrecoverDimension x _ = x