diff options
Diffstat (limited to 'lib/Data/Packed/Matrix.hs')
-rw-r--r-- | lib/Data/Packed/Matrix.hs | 15 |
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)) | ||
300 | 10 |> 0.00 0.11 0.22 0.33 0.44 0.56 0.67 0.78 0.89 1.00 | ||
301 | @ | ||
302 | -} | ||
303 | vecdisp :: (Element t) => (Matrix t -> String) -> Vector t -> String | ||
304 | vecdisp 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. |
311 | latexFormat :: String -- ^ type of braces: \"matrix\", \"bmatrix\", \"pmatrix\", etc. | 296 | latexFormat :: 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 |