diff options
author | Alberto Ruiz <aruiz@um.es> | 2016-10-27 20:55:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-27 20:55:03 +0200 |
commit | 155cac879362d2672a5504ba134728512b314c60 (patch) | |
tree | e72d8a63fd5b6f57f7f73ac22789c01b212d2164 /packages/base/src/Internal/Algorithms.hs | |
parent | b32b37472559f202995e894f9a627871737d4619 (diff) | |
parent | c1fdf466a51401bb4e3a36a3398e155361477330 (diff) |
Merge pull request #210 from kjslag/master
compactSVDTol doc and inline dim and subVector
Diffstat (limited to 'packages/base/src/Internal/Algorithms.hs')
-rw-r--r-- | packages/base/src/Internal/Algorithms.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/base/src/Internal/Algorithms.hs b/packages/base/src/Internal/Algorithms.hs index 7ead5b4..70d65d7 100644 --- a/packages/base/src/Internal/Algorithms.hs +++ b/packages/base/src/Internal/Algorithms.hs | |||
@@ -294,7 +294,7 @@ fromList [35.18264833189422,1.4769076999800903] | |||
294 | compactSVD :: Field t => Matrix t -> (Matrix t, Vector Double, Matrix t) | 294 | compactSVD :: Field t => Matrix t -> (Matrix t, Vector Double, Matrix t) |
295 | compactSVD = compactSVDTol 1 | 295 | compactSVD = compactSVDTol 1 |
296 | 296 | ||
297 | -- | @compactSVDTol r@ is similar to 'compactSVD', but uses tolerance @tol=r*g*eps*(max rows cols)@ to distinguish nonzero singular values, where @g@ is the greatest singular value. | 297 | -- | @compactSVDTol r@ is similar to 'compactSVD' (for which @r=1@), but uses tolerance @tol=r*g*eps*(max rows cols)@ to distinguish nonzero singular values, where @g@ is the greatest singular value. If @g<r*eps@, then only one singular value is returned. |
298 | compactSVDTol :: Field t => Double -> Matrix t -> (Matrix t, Vector Double, Matrix t) | 298 | compactSVDTol :: Field t => Double -> Matrix t -> (Matrix t, Vector Double, Matrix t) |
299 | compactSVDTol r m = (u', subVector 0 d s, v') where | 299 | compactSVDTol r m = (u', subVector 0 d s, v') where |
300 | (u,s,v) = thinSVD m | 300 | (u,s,v) = thinSVD m |