casadi-bindings 3.0.0.4 → 3.0.0.5
raw patch · 5 files changed
+21/−1 lines, 5 files
Files
- casadi-bindings.cabal +1/−1
- src/Casadi/DM.hs +4/−0
- src/Casadi/MX.hs +4/−0
- src/Casadi/Overloading.hs +8/−0
- src/Casadi/SX.hs +4/−0
casadi-bindings.cabal view
@@ -1,5 +1,5 @@ name: casadi-bindings-version: 3.0.0.4+version: 3.0.0.5 synopsis: mid-level bindings to CasADi category: Numerical, Math description:
src/Casadi/DM.hs view
@@ -235,6 +235,10 @@ {-# NOINLINE gt #-} x `eq` y = unsafePerformIO (C.casadi_eq__2 x y) {-# NOINLINE eq #-}+ max' x y = cmax x y+ {-# NOINLINE max' #-}+ min' x y = cmin x y+ {-# NOINLINE min' #-} instance Erf DM where erf x = unsafePerformIO (C.casadi_erf__2 x)
src/Casadi/MX.hs view
@@ -237,6 +237,10 @@ {-# NOINLINE gt #-} x `eq` y = unsafePerformIO (C.casadi_eq__4 x y) {-# NOINLINE eq #-}+ max' x y = cmax x y+ {-# NOINLINE max' #-}+ min' x y = cmin x y+ {-# NOINLINE min' #-} instance Erf MX where erf x = unsafePerformIO (C.casadi_erf__4 x)
src/Casadi/Overloading.hs view
@@ -85,6 +85,10 @@ gt :: a -> a -> a -- | @==@ eq :: a -> a -> a+ -- | max without (==)+ max' :: a -> a -> a+ -- | min without (==)+ min' :: a -> a -> a instance SymOrd Double where x `leq` y = if x <= y then 1 else 0@@ -92,12 +96,16 @@ x `geq` y = if x >= y then 1 else 0 x `gt` y = if x > y then 1 else 0 x `eq` y = if x == y then 1 else 0+ max' = max+ min' = min instance SymOrd Float where x `leq` y = if x <= y then 1 else 0 x `lt` y = if x < y then 1 else 0 x `geq` y = if x >= y then 1 else 0 x `gt` y = if x > y then 1 else 0 x `eq` y = if x == y then 1 else 0+ max' = max+ min' = min -- | @ifLeqThen x y ifX ifY == if x <= y then ifX else ifY@ -- >>> ifLeqThen 41 42 100 200 :: Double
src/Casadi/SX.hs view
@@ -232,6 +232,10 @@ {-# NOINLINE gt #-} x `eq` y = unsafePerformIO (C.casadi_eq__1 x y) {-# NOINLINE eq #-}+ max' x y = cmax x y+ {-# NOINLINE max' #-}+ min' x y = cmin x y+ {-# NOINLINE min' #-} instance Erf SX where erf x = unsafePerformIO (C.casadi_erf__1 x)