summaryrefslogtreecommitdiff
path: root/lib/Data/Packed/Matrix.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2010-04-23 19:37:56 +0000
committerAlberto Ruiz <aruiz@um.es>2010-04-23 19:37:56 +0000
commit0ce6e74a5375b8d7ee1d95826252d8ff622f2cb4 (patch)
treecab666c674543adf0908ea5bc42ec9e9d35a9ea1 /lib/Data/Packed/Matrix.hs
parentf7cbac4bb8d8fc1c4210a548674c222b691f8e9c (diff)
app5-10, some SCC, and other minor changes
Diffstat (limited to 'lib/Data/Packed/Matrix.hs')
-rw-r--r--lib/Data/Packed/Matrix.hs15
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/Data/Packed/Matrix.hs b/lib/Data/Packed/Matrix.hs
index d91a089..4fdd2c6 100644
--- a/lib/Data/Packed/Matrix.hs
+++ b/lib/Data/Packed/Matrix.hs
@@ -292,21 +292,6 @@ formatScaled dec t = "E"++show o++"\n" ++ ss
292 o = floor $ maximum $ map (logBase 10 . abs) $ toList $ flatten t 292 o = floor $ maximum $ map (logBase 10 . abs) $ toList $ flatten t
293 fmt = '%':show (dec+3) ++ '.':show dec ++"f" 293 fmt = '%':show (dec+3) ++ '.':show dec ++"f"
294 294
295{- | Show a vector using a function for showing matrices.
296
297@disp = putStr . vecdisp (dispf 2)
298
299\> disp (linspace 10 (0,1))
30010 |> 0.00 0.11 0.22 0.33 0.44 0.56 0.67 0.78 0.89 1.00
301@
302-}
303vecdisp :: (Element t) => (Matrix t -> String) -> Vector t -> String
304vecdisp f v
305 = ((show (dim v) ++ " |> ") ++) . (++"\n")
306 . unwords . lines . tail . dropWhile (not . (`elem` " \n"))
307 . f . trans . reshape 1
308 $ v
309
310-- | Tool to display matrices with latex syntax. 295-- | Tool to display matrices with latex syntax.
311latexFormat :: String -- ^ type of braces: \"matrix\", \"bmatrix\", \"pmatrix\", etc. 296latexFormat :: String -- ^ type of braces: \"matrix\", \"bmatrix\", \"pmatrix\", etc.
312 -> String -- ^ Formatted matrix, with elements separated by spaces and newlines 297 -> String -- ^ Formatted matrix, with elements separated by spaces and newlines