summaryrefslogtreecommitdiff
path: root/lib/Data/Packed
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Data/Packed')
-rw-r--r--lib/Data/Packed/Matrix.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Data/Packed/Matrix.hs b/lib/Data/Packed/Matrix.hs
index 27fa36c..ca96c50 100644
--- a/lib/Data/Packed/Matrix.hs
+++ b/lib/Data/Packed/Matrix.hs
@@ -205,7 +205,7 @@ safely be used with lists that are too long (like infinite lists).
205 205
206Example: 206Example:
207 207
208@\> (2>|<3)[1..] 208@\> (2><3)[1..]
209(2><3) 209(2><3)
210 [ 1.0, 2.0, 3.0 210 [ 1.0, 2.0, 3.0
211 , 4.0, 5.0, 6.0 ]@ 211 , 4.0, 5.0, 6.0 ]@
@@ -259,7 +259,7 @@ asColumn v = reshape 1 v
259{- | creates a Matrix of the specified size using the supplied function to 259{- | creates a Matrix of the specified size using the supplied function to
260 to map the row\/column position to the value at that row\/column position. 260 to map the row\/column position to the value at that row\/column position.
261 261
262@> buildMatrix 3 4 (\ (r,c) -> fromIntegral r * fromIntegral c) 262@> buildMatrix 3 4 (\\(r,c) -> fromIntegral r * fromIntegral c)
263(3><4) 263(3><4)
264 [ 0.0, 0.0, 0.0, 0.0, 0.0 264 [ 0.0, 0.0, 0.0, 0.0, 0.0
265 , 0.0, 1.0, 2.0, 3.0, 4.0 265 , 0.0, 1.0, 2.0, 3.0, 4.0
@@ -267,7 +267,7 @@ asColumn v = reshape 1 v
267 267
268Hilbert matrix of order N: 268Hilbert matrix of order N:
269 269
270@hilb n = buildMatrix n n (\(i,j)->1/(fromIntegral i + fromIntegral j +1))@ 270@hilb n = buildMatrix n n (\\(i,j)->1/(fromIntegral i + fromIntegral j +1))@
271 271
272-} 272-}
273buildMatrix :: Element a => Int -> Int -> ((Int, Int) -> a) -> Matrix a 273buildMatrix :: Element a => Int -> Int -> ((Int, Int) -> a) -> Matrix a