packages feed

orthotope-hmatrix 0.1.0.1 → 0.1.1.0

raw patch · 5 files changed

+44/−5 lines, 5 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Data.Array.Dynamic.MatMul: matMul :: forall a. (HasCallStack, Numeric a) => Array a -> Array a -> Array a
+ Data.Array.Ranked.MatMul: matMul :: forall a. (HasCallStack, Numeric a) => Array 2 a -> Array 2 a -> Array 2 a
+ Data.Array.Shaped.MatMul: matMul :: forall m n o a. (Numeric a, KnownNat m, KnownNat n, KnownNat o) => Array [m, n] a -> Array [n, o] a -> Array [m, o] a
- Data.Array.ShapedS.MatMul: matMul :: forall m n o a. (HasCallStack, Numeric a, KnownNat m, KnownNat n, KnownNat o) => Array [m, n] a -> Array [n, o] a -> Array [m, o] a
+ Data.Array.ShapedS.MatMul: matMul :: forall m n o a. (Numeric a, KnownNat m, KnownNat n, KnownNat o) => Array [m, n] a -> Array [n, o] a -> Array [m, o] a

Files

+ Data/Array/Dynamic/MatMul.hs view
@@ -0,0 +1,12 @@+{-# LANGUAGE ScopedTypeVariables #-}+module Data.Array.Dynamic.MatMul(matMul) where+import GHC.Stack+import Data.Array.Convert+import Data.Array.Dynamic+import qualified Data.Array.DynamicS.MatMul as S+import Numeric.LinearAlgebra as N++matMul :: forall a .+          (HasCallStack, N.Numeric a) =>+          Array a -> Array a -> Array a+matMul x y = convert $ S.matMul (convert x) (convert y)
+ Data/Array/Ranked/MatMul.hs view
@@ -0,0 +1,13 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE ScopedTypeVariables #-}+module Data.Array.Ranked.MatMul(matMul) where+import GHC.Stack+import Data.Array.Convert+import Data.Array.Ranked+import qualified Data.Array.RankedS.MatMul as S+import Numeric.LinearAlgebra as N++matMul :: forall a .+          (HasCallStack, N.Numeric a) =>+          Array 2 a -> Array 2 a -> Array 2 a+matMul x y = convert $ S.matMul (convert x) (convert y)
+ Data/Array/Shaped/MatMul.hs view
@@ -0,0 +1,13 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE ScopedTypeVariables #-}+module Data.Array.Shaped.MatMul(matMul) where+import GHC.TypeLits+import Data.Array.Convert+import Data.Array.Shaped+import qualified Data.Array.ShapedS.MatMul as S+import Numeric.LinearAlgebra as N++matMul :: forall m n o a .+          (N.Numeric a, KnownNat m, KnownNat n, KnownNat o) =>+          Array [m, n] a -> Array [n, o] a -> Array [m, o] a+matMul x y = convert $ S.matMul (convert x) (convert y)
Data/Array/ShapedS/MatMul.hs view
@@ -2,15 +2,13 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} module Data.Array.ShapedS.MatMul(matMul) where-import Prelude hiding ((<>))-import GHC.Stack import GHC.TypeLits import Data.Array.Internal(valueOf) import Data.Array.ShapedS import Numeric.LinearAlgebra as N  matMul :: forall m n o a .-          (HasCallStack, N.Numeric a, KnownNat m, KnownNat n, KnownNat o) =>+          (N.Numeric a, KnownNat m, KnownNat n, KnownNat o) =>           Array [m, n] a -> Array [n, o] a -> Array [m, o] a matMul x y =   let n = valueOf @n
orthotope-hmatrix.cabal view
@@ -1,5 +1,5 @@ name:                orthotope-hmatrix-version:             0.1.0.1+version:             0.1.1.0 synopsis:            Some algorithms from hmatrix license:             Apache license-file:        LICENSE@@ -22,8 +22,11 @@ library   hs-source-dirs:      .   ghc-options:         -Wall-  exposed-modules:     Data.Array.DynamicS.MatMul+  exposed-modules:     Data.Array.Dynamic.MatMul+                       Data.Array.DynamicS.MatMul+                       Data.Array.Ranked.MatMul                        Data.Array.RankedS.MatMul+                       Data.Array.Shaped.MatMul                        Data.Array.ShapedS.MatMul    build-depends:       base >= 4.12 && < 4.18