summaryrefslogtreecommitdiff
path: root/packages/base/src/Internal/Util.hs
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base/src/Internal/Util.hs')
-rw-r--r--packages/base/src/Internal/Util.hs14
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/base/src/Internal/Util.hs b/packages/base/src/Internal/Util.hs
index 4123e6c..36b7855 100644
--- a/packages/base/src/Internal/Util.hs
+++ b/packages/base/src/Internal/Util.hs
@@ -458,12 +458,12 @@ rowOuters a b = a' * b'
458-------------------------------------------------------------------------------- 458--------------------------------------------------------------------------------
459 459
460-- | solution of overconstrained homogeneous linear system 460-- | solution of overconstrained homogeneous linear system
461null1 :: Matrix Double -> Vector Double 461null1 :: Matrix R -> Vector R
462null1 = last . toColumns . snd . rightSV 462null1 = last . toColumns . snd . rightSV
463 463
464-- | solution of overconstrained homogeneous symmetric linear system 464-- | solution of overconstrained homogeneous symmetric linear system
465null1sym :: Matrix Double -> Vector Double 465null1sym :: Her R -> Vector R
466null1sym = last . toColumns . snd . eigSH' 466null1sym = last . toColumns . snd . eigSH
467 467
468-------------------------------------------------------------------------------- 468--------------------------------------------------------------------------------
469 469
@@ -712,7 +712,9 @@ luST ok (r,_) x = do
712 , 0, 0, 0, 0, 1 ] 712 , 0, 0, 0, 0, 1 ]
713 713
714-} 714-}
715luPacked' x = mutable (luST (magnit 0)) x 715luPacked' x = LU m p
716 where
717 (m,p) = mutable (luST (magnit 0)) x
716 718
717-------------------------------------------------------------------------------- 719--------------------------------------------------------------------------------
718 720
@@ -782,7 +784,7 @@ forwSust' lup rhs = foldl' f (rhs?[]) ls
782 (b - l<>x) 784 (b - l<>x)
783 785
784 786
785luSolve'' (lup,p) b = backSust' lup (forwSust' lup pb) 787luSolve'' (LU lup p) b = backSust' lup (forwSust' lup pb)
786 where 788 where
787 pb = b ?? (Pos (fixPerm' p), All) 789 pb = b ?? (Pos (fixPerm' p), All)
788 790
@@ -827,7 +829,7 @@ backSust lup rhs = fst $ mutable f rhs
827 , 7, 10, 6 ] 829 , 7, 10, 6 ]
828 830
829-} 831-}
830luSolve' (lup,p) b = backSust lup (forwSust lup pb) 832luSolve' (LU lup p) b = backSust lup (forwSust lup pb)
831 where 833 where
832 pb = b ?? (Pos (fixPerm' p), All) 834 pb = b ?? (Pos (fixPerm' p), All)
833 835