summaryrefslogtreecommitdiff
path: root/packages/base/src
diff options
context:
space:
mode:
authorJustin Le <justin@jle.im>2016-01-11 13:17:39 -0800
committerJustin Le <justin@jle.im>2016-01-11 13:17:39 -0800
commitd64d1b468197198213c850c47f7fe79bd3b1a2ab (patch)
tree246e94d4f1d67bb3650118d17184cbf289469680 /packages/base/src
parent85d98118f3d6bd6d1c7ad6a86b69271ebeb466b9 (diff)
parent8fe477ce386f1b9c092e5cebfee440b5542b64a3 (diff)
Merge branch 'master' of github.com:albertoruiz/hmatrix
Diffstat (limited to 'packages/base/src')
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Static.hs13
1 files changed, 4 insertions, 9 deletions
diff --git a/packages/base/src/Numeric/LinearAlgebra/Static.hs b/packages/base/src/Numeric/LinearAlgebra/Static.hs
index 6d828d7..e18ba0c 100644
--- a/packages/base/src/Numeric/LinearAlgebra/Static.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/Static.hs
@@ -226,19 +226,14 @@ class Diag m d | m -> d
226 takeDiag :: m -> d 226 takeDiag :: m -> d
227 227
228 228
229instance forall n . (KnownNat n) => Diag (L n n) (R n) 229instance KnownNat n => Diag (L n n) (R n)
230 where 230 where
231 takeDiag m = mkR (LA.takeDiag (extract m)) 231 takeDiag x = mkR (LA.takeDiag (extract x))
232 232
233 233
234instance forall m n . (KnownNat m, KnownNat n, m <= n+1) => Diag (L m n) (R m) 234instance KnownNat n => Diag (M n n) (C n)
235 where 235 where
236 takeDiag m = mkR (LA.takeDiag (extract m)) 236 takeDiag x = mkC (LA.takeDiag (extract x))
237
238
239instance forall m n . (KnownNat m, KnownNat n, n <= m+1) => Diag (L m n) (R n)
240 where
241 takeDiag m = mkR (LA.takeDiag (extract m))
242 237
243 238
244-------------------------------------------------------------------------------- 239--------------------------------------------------------------------------------