casadi-bindings 2.1.3.0 → 2.1.3.1
raw patch · 4 files changed
+17/−1 lines, 4 files
Files
- casadi-bindings.cabal +1/−1
- src/Casadi/DMatrix.hs +8/−0
- src/Casadi/MX.hs +4/−0
- src/Casadi/SX.hs +4/−0
casadi-bindings.cabal view
@@ -1,5 +1,5 @@ name: casadi-bindings-version: 2.1.3.0+version: 2.1.3.1 synopsis: mid-level bindings to CasADi category: Numerical, Math description:
src/Casadi/DMatrix.hs view
@@ -10,6 +10,7 @@ import qualified Data.Vector as V import System.IO.Unsafe ( unsafePerformIO )+import Linear.Conjugate ( Conjugate(..) ) import Casadi.Core.Classes.Sparsity import Casadi.Core.Classes.DMatrix@@ -17,9 +18,16 @@ import Casadi.Overloading ( Fmod(..), ArcTan2(..), SymOrd(..) ) +instance Conjugate DMatrix where+ conjugate = id+ instance Show DMatrix where show x = unsafePerformIO (dmatrix_getDescription x) {-# NOINLINE show #-}++instance Eq DMatrix where+ x == y = unsafePerformIO (dmatrix_isEqual x y)+ {-# NOINLINE (==) #-} -- | matrix matrix product dmm :: DMatrix -> DMatrix -> DMatrix
src/Casadi/MX.hs view
@@ -30,6 +30,10 @@ instance Conjugate MX where conjugate = id +instance Eq MX where+ x == y = unsafePerformIO (mx_isEqual__0 x y)+ {-# NOINLINE (==) #-}+ instance Show MX where show x = show (castSharedObject x) {-# NOINLINE show #-}
src/Casadi/SX.hs view
@@ -30,6 +30,10 @@ show x = unsafePerformIO (sx_getDescription x) {-# NOINLINE show #-} +instance Eq SX where+ x == y = unsafePerformIO (sx_isEqual x y)+ {-# NOINLINE (==) #-}+ instance Conjugate SX where conjugate = id