summaryrefslogtreecommitdiff
path: root/lib/Data/Packed/Matrix.hs
diff options
context:
space:
mode:
authorKhudyakov Alexey <alexey.skladnoy@gmail.com>2010-09-29 12:35:11 +0000
committerKhudyakov Alexey <alexey.skladnoy@gmail.com>2010-09-29 12:35:11 +0000
commit49df400d892d4f51cbe724f5677aec70753b0408 (patch)
treea49eaa7f4bb6301c4225aab8ec25718bc4870634 /lib/Data/Packed/Matrix.hs
parenta3d3e0bd63a1c8215d4138195d128201ffa424e8 (diff)
[hlint] Remove redundant brackets and $'s
Diffstat (limited to 'lib/Data/Packed/Matrix.hs')
-rw-r--r--lib/Data/Packed/Matrix.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Data/Packed/Matrix.hs b/lib/Data/Packed/Matrix.hs
index 2efb08d..de2300a 100644
--- a/lib/Data/Packed/Matrix.hs
+++ b/lib/Data/Packed/Matrix.hs
@@ -269,7 +269,7 @@ Hilbert matrix of order N:
269-} 269-}
270buildMatrix :: Element a => Int -> Int -> ((Int, Int) -> a) -> Matrix a 270buildMatrix :: Element a => Int -> Int -> ((Int, Int) -> a) -> Matrix a
271buildMatrix rc cc f = 271buildMatrix rc cc f =
272 fromLists $ map (\x -> map f x) 272 fromLists $ map (map f)
273 $ map (\ ri -> map (\ ci -> (ri, ci)) [0 .. (cc - 1)]) [0 .. (rc - 1)] 273 $ map (\ ri -> map (\ ci -> (ri, ci)) [0 .. (cc - 1)]) [0 .. (rc - 1)]
274 274
275----------------------------------------------------- 275-----------------------------------------------------
@@ -283,7 +283,7 @@ fromArray2D m = (r><c) (elems m)
283 283
284-- | rearranges the rows of a matrix according to the order given in a list of integers. 284-- | rearranges the rows of a matrix according to the order given in a list of integers.
285extractRows :: Element t => [Int] -> Matrix t -> Matrix t 285extractRows :: Element t => [Int] -> Matrix t -> Matrix t
286extractRows l m = fromRows $ extract (toRows $ m) l 286extractRows l m = fromRows $ extract (toRows m) l
287 where extract l' is = [l'!!i |i<-is] 287 where extract l' is = [l'!!i |i<-is]
288 288
289{- | creates matrix by repetition of a matrix a given number of rows and columns 289{- | creates matrix by repetition of a matrix a given number of rows and columns