diff options
author | Alberto Ruiz <aruiz@um.es> | 2016-01-11 21:24:02 +0100 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2016-01-11 21:24:02 +0100 |
commit | 8fe477ce386f1b9c092e5cebfee440b5542b64a3 (patch) | |
tree | 429329f4af74be9c62877d34234d26c6c4adc826 /packages/base/src/Numeric/LinearAlgebra | |
parent | 8519dc68fc3d020982e89dc502d7d7f81f6efcaf (diff) |
provisional fix for takeDiag
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra')
-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 720b011..1ab7e57 100644 --- a/packages/base/src/Numeric/LinearAlgebra/Static.hs +++ b/packages/base/src/Numeric/LinearAlgebra/Static.hs | |||
@@ -225,19 +225,14 @@ class Diag m d | m -> d | |||
225 | takeDiag :: m -> d | 225 | takeDiag :: m -> d |
226 | 226 | ||
227 | 227 | ||
228 | instance forall n . (KnownNat n) => Diag (L n n) (R n) | 228 | instance KnownNat n => Diag (L n n) (R n) |
229 | where | 229 | where |
230 | takeDiag m = mkR (LA.takeDiag (extract m)) | 230 | takeDiag x = mkR (LA.takeDiag (extract x)) |
231 | 231 | ||
232 | 232 | ||
233 | instance forall m n . (KnownNat m, KnownNat n, m <= n+1) => Diag (L m n) (R m) | 233 | instance KnownNat n => Diag (M n n) (C n) |
234 | where | 234 | where |
235 | takeDiag m = mkR (LA.takeDiag (extract m)) | 235 | takeDiag x = mkC (LA.takeDiag (extract x)) |
236 | |||
237 | |||
238 | instance forall m n . (KnownNat m, KnownNat n, n <= m+1) => Diag (L m n) (R n) | ||
239 | where | ||
240 | takeDiag m = mkR (LA.takeDiag (extract m)) | ||
241 | 236 | ||
242 | 237 | ||
243 | -------------------------------------------------------------------------------- | 238 | -------------------------------------------------------------------------------- |