diff options
Diffstat (limited to 'lib/Numeric/LinearAlgebra/Algorithms.hs')
-rw-r--r-- | lib/Numeric/LinearAlgebra/Algorithms.hs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Numeric/LinearAlgebra/Algorithms.hs b/lib/Numeric/LinearAlgebra/Algorithms.hs index 6e703fa..5bc9ca5 100644 --- a/lib/Numeric/LinearAlgebra/Algorithms.hs +++ b/lib/Numeric/LinearAlgebra/Algorithms.hs | |||
@@ -83,8 +83,6 @@ import Data.List(foldl1') | |||
83 | import Data.Array | 83 | import Data.Array |
84 | import Numeric.Container | 84 | import Numeric.Container |
85 | 85 | ||
86 | constant x = constantD x | ||
87 | |||
88 | -- | Auxiliary typeclass used to define generic computations for both real and complex matrices. | 86 | -- | Auxiliary typeclass used to define generic computations for both real and complex matrices. |
89 | class (Product t, Container Vector t, Container Matrix t) => Field t where | 87 | class (Product t, Container Vector t, Container Matrix t) => Field t where |
90 | svd' :: Matrix t -> (Matrix t, Vector Double, Matrix t) | 88 | svd' :: Matrix t -> (Matrix t, Vector Double, Matrix t) |
@@ -469,7 +467,7 @@ zh k v = fromList $ replicate (k-1) 0 ++ (1:drop k xs) | |||
469 | where xs = toList v | 467 | where xs = toList v |
470 | 468 | ||
471 | zt 0 v = v | 469 | zt 0 v = v |
472 | zt k v = join [subVector 0 (dim v - k) v, constant 0 k] | 470 | zt k v = join [subVector 0 (dim v - k) v, konst 0 k] |
473 | 471 | ||
474 | 472 | ||
475 | unpackQR :: (Field t) => (Matrix t, Vector t) -> (Matrix t, Matrix t) | 473 | unpackQR :: (Field t) => (Matrix t, Vector t) -> (Matrix t, Matrix t) |
@@ -623,10 +621,10 @@ luFact (l_u,perm) | r <= c = (l ,u ,p, s) | |||
623 | c = cols l_u | 621 | c = cols l_u |
624 | tu = triang r c 0 1 | 622 | tu = triang r c 0 1 |
625 | tl = triang r c 0 0 | 623 | tl = triang r c 0 0 |
626 | l = takeColumns r (l_u |*| tl) |+| diagRect (constant 1 r) r r | 624 | l = takeColumns r (l_u |*| tl) |+| diagRect (konst 1 r) r r |
627 | u = l_u |*| tu | 625 | u = l_u |*| tu |
628 | (p,s) = fixPerm r perm | 626 | (p,s) = fixPerm r perm |
629 | l' = (l_u |*| tl) |+| diagRect (constant 1 c) r c | 627 | l' = (l_u |*| tl) |+| diagRect (konst 1 c) r c |
630 | u' = takeRows c (l_u |*| tu) | 628 | u' = takeRows c (l_u |*| tu) |
631 | (|+|) = add | 629 | (|+|) = add |
632 | (|*|) = mul | 630 | (|*|) = mul |