diff options
author | Justin Le <justin@jle.im> | 2016-05-25 02:35:19 -0700 |
---|---|---|
committer | Justin Le <justin@jle.im> | 2016-05-25 02:36:42 -0700 |
commit | 37c1348ade91807bdad45272801115b32572ad40 (patch) | |
tree | 5b6f6f288c7b178deb8dc2dddc7a280c274e417c /packages/base/src/Numeric/LinearAlgebra | |
parent | 5623e4d4e613b89786a225265a4d8373680096f3 (diff) |
Additive, Transposable instances for Static data types
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra')
-rw-r--r-- | packages/base/src/Numeric/LinearAlgebra/Static.hs | 7 |
1 files changed, 7 insertions, 0 deletions
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 | |||
825 | instance KnownNat n => Additive (Sym n) where | ||
826 | add = (+) | ||
827 | |||
828 | instance KnownNat n => Transposable (Sym n) (Sym n) where | ||
829 | tr (Sym m) = Sym (tr m) | ||
830 | tr' = id | ||