From 3d7aa0b176573422e1a569078195407b168f8b2e Mon Sep 17 00:00:00 2001 From: Kevin Slagle Date: Wed, 26 Oct 2016 22:54:20 -0700 Subject: clarify compactSVDTol corner case in documentation --- packages/base/src/Internal/Algorithms.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') 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] compactSVD :: Field t => Matrix t -> (Matrix t, Vector Double, Matrix t) compactSVD = compactSVDTol 1 --- | @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. +-- | @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 Double -> Matrix t -> (Matrix t, Vector Double, Matrix t) compactSVDTol r m = (u', subVector 0 d s, v') where (u,s,v) = thinSVD m -- cgit v1.2.3 From c1fdf466a51401bb4e3a36a3398e155361477330 Mon Sep 17 00:00:00 2001 From: Kevin Slagle Date: Wed, 26 Oct 2016 22:56:24 -0700 Subject: inline dim and subVector since these are inlined by the vector package --- packages/base/src/Internal/Vector.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'packages') diff --git a/packages/base/src/Internal/Vector.hs b/packages/base/src/Internal/Vector.hs index c4a310d..67d0416 100644 --- a/packages/base/src/Internal/Vector.hs +++ b/packages/base/src/Internal/Vector.hs @@ -62,6 +62,7 @@ ti = fromIntegral -- | Number of elements dim :: (Storable t) => Vector t -> Int dim = Vector.length +{-# INLINE dim #-} -- C-Haskell vector adapter @@ -139,6 +140,7 @@ subVector :: Storable t => Int -- ^ index of the starting element -> Vector t -- ^ source -> Vector t -- ^ result subVector = Vector.slice +{-# INLINE subVector #-} -- cgit v1.2.3