diff options
Diffstat (limited to 'packages/base')
-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 | -------------------------------------------------------------------------------- |