diff options
author | Justin Le <justin@jle.im> | 2016-01-11 13:17:39 -0800 |
---|---|---|
committer | Justin Le <justin@jle.im> | 2016-01-11 13:17:39 -0800 |
commit | d64d1b468197198213c850c47f7fe79bd3b1a2ab (patch) | |
tree | 246e94d4f1d67bb3650118d17184cbf289469680 /packages/base/src | |
parent | 85d98118f3d6bd6d1c7ad6a86b69271ebeb466b9 (diff) | |
parent | 8fe477ce386f1b9c092e5cebfee440b5542b64a3 (diff) |
Merge branch 'master' of github.com:albertoruiz/hmatrix
Diffstat (limited to 'packages/base/src')
-rw-r--r-- | packages/base/src/Numeric/LinearAlgebra/Static.hs | 13 |
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 | ||
229 | instance forall n . (KnownNat n) => Diag (L n n) (R n) | 229 | instance 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 | ||
234 | instance forall m n . (KnownNat m, KnownNat n, m <= n+1) => Diag (L m n) (R m) | 234 | instance 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 | |||
239 | instance 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 | -------------------------------------------------------------------------------- |