summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/base/src/Internal/Static.hs12
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Static.hs7
2 files changed, 19 insertions, 0 deletions
diff --git a/packages/base/src/Internal/Static.hs b/packages/base/src/Internal/Static.hs
index 381f3bc..9ed4710 100644
--- a/packages/base/src/Internal/Static.hs
+++ b/packages/base/src/Internal/Static.hs
@@ -518,6 +518,18 @@ instance (KnownNat n, KnownNat m) => Floating (M n m) where
518 (**) = lift2MD (**) 518 (**) = lift2MD (**)
519 pi = M pi 519 pi = M pi
520 520
521instance Additive (R n) where
522 add = (+)
523
524instance Additive (C n) where
525 add = (+)
526
527instance (KnownNat m, KnownNat n) => Additive (L m n) where
528 add = (+)
529
530instance (KnownNat m, KnownNat n) => Additive (M m n) where
531 add = (+)
532
521-------------------------------------------------------------------------------- 533--------------------------------------------------------------------------------
522 534
523 535
diff --git a/packages/base/src/Numeric/LinearAlgebra/Static.hs b/packages/base/src/Numeric/LinearAlgebra/Static.hs
index a55ae44..2ffc531 100644
--- a/packages/base/src/Numeric/LinearAlgebra/Static.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/Static.hs
@@ -821,3 +821,10 @@ instance KnownNat n => Floating (Sym n)
821 sqrt = mkSym sqrt 821 sqrt = mkSym sqrt
822 (**) = mkSym2 (**) 822 (**) = mkSym2 (**)
823 pi = Sym pi 823 pi = Sym pi
824
825instance KnownNat n => Additive (Sym n) where
826 add = (+)
827
828instance KnownNat n => Transposable (Sym n) (Sym n) where
829 tr (Sym m) = Sym (tr m)
830 tr' = id