From fa4e2233a873bbfee26939c013b56acc160bca7b Mon Sep 17 00:00:00 2001 From: Vivian McPhail Date: Sun, 5 Sep 2010 08:11:17 +0000 Subject: refactor Numeric Vector/Matrix and classes --- lib/Graphics/Plot.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Graphics') diff --git a/lib/Graphics/Plot.hs b/lib/Graphics/Plot.hs index 2dc0553..478b4ad 100644 --- a/lib/Graphics/Plot.hs +++ b/lib/Graphics/Plot.hs @@ -150,8 +150,8 @@ matrixToPGM m = header ++ unlines (map unwords ll) where r = rows m header = "P2 "++show c++" "++show r++" "++show (round maxgray :: Int)++"\n" maxgray = 255.0 - maxval = vectorMax $ flatten $ m - minval = vectorMin $ flatten $ m + maxval = maxElement m + minval = minElement m scale' = if (maxval == minval) then 0.0 else maxgray / (maxval - minval) -- cgit v1.2.3