diff options
author | Alberto Ruiz <aruiz@um.es> | 2014-04-24 13:17:55 +0200 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2014-04-24 13:17:55 +0200 |
commit | de0219353ca9631135a3f750cef05b9636bef232 (patch) | |
tree | 2943867ceca43bcf5037f60077a6269f589deff8 /lib/Numeric/LinearAlgebra/Algorithms.hs | |
parent | 3c1bbdd450304945c035a1e49cdb67871ea50451 (diff) |
konst with bidirectional type inference
Diffstat (limited to 'lib/Numeric/LinearAlgebra/Algorithms.hs')
-rw-r--r-- | lib/Numeric/LinearAlgebra/Algorithms.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Numeric/LinearAlgebra/Algorithms.hs b/lib/Numeric/LinearAlgebra/Algorithms.hs index a3f541b..7223cd9 100644 --- a/lib/Numeric/LinearAlgebra/Algorithms.hs +++ b/lib/Numeric/LinearAlgebra/Algorithms.hs | |||
@@ -484,7 +484,7 @@ zh k v = fromList $ replicate (k-1) 0 ++ (1:drop k xs) | |||
484 | where xs = toList v | 484 | where xs = toList v |
485 | 485 | ||
486 | zt 0 v = v | 486 | zt 0 v = v |
487 | zt k v = vjoin [subVector 0 (dim v - k) v, konst 0 k] | 487 | zt k v = vjoin [subVector 0 (dim v - k) v, konst' 0 k] |
488 | 488 | ||
489 | 489 | ||
490 | unpackQR :: (Field t) => (Matrix t, Vector t) -> (Matrix t, Matrix t) | 490 | unpackQR :: (Field t) => (Matrix t, Vector t) -> (Matrix t, Matrix t) |
@@ -640,10 +640,10 @@ luFact (l_u,perm) | r <= c = (l ,u ,p, s) | |||
640 | c = cols l_u | 640 | c = cols l_u |
641 | tu = triang r c 0 1 | 641 | tu = triang r c 0 1 |
642 | tl = triang r c 0 0 | 642 | tl = triang r c 0 0 |
643 | l = takeColumns r (l_u |*| tl) |+| diagRect 0 (konst 1 r) r r | 643 | l = takeColumns r (l_u |*| tl) |+| diagRect 0 (konst' 1 r) r r |
644 | u = l_u |*| tu | 644 | u = l_u |*| tu |
645 | (p,s) = fixPerm r perm | 645 | (p,s) = fixPerm r perm |
646 | l' = (l_u |*| tl) |+| diagRect 0 (konst 1 c) r c | 646 | l' = (l_u |*| tl) |+| diagRect 0 (konst' 1 c) r c |
647 | u' = takeRows c (l_u |*| tu) | 647 | u' = takeRows c (l_u |*| tu) |
648 | (|+|) = add | 648 | (|+|) = add |
649 | (|*|) = mul | 649 | (|*|) = mul |