diff options
author | Reiner Pope <reiner.pope@gmail.com> | 2012-01-07 11:22:59 +1100 |
---|---|---|
committer | Reiner Pope <reiner.pope@gmail.com> | 2012-01-07 11:22:59 +1100 |
commit | 4029bf2f48c7e0564fe23de8dc74409d1206ca0d (patch) | |
tree | 94746f7ac7c81e8fcc383ffc2b18962f892e4d7c | |
parent | 7482b3c5929c65ff793d9cab097e9625ddfb2e4c (diff) |
Replace divMod with quotRem in matrixFromVector
-rw-r--r-- | lib/Data/Packed/Internal/Matrix.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Data/Packed/Internal/Matrix.hs b/lib/Data/Packed/Internal/Matrix.hs index d4b0bc1..a39c0f0 100644 --- a/lib/Data/Packed/Internal/Matrix.hs +++ b/lib/Data/Packed/Internal/Matrix.hs | |||
@@ -207,12 +207,12 @@ atM' MF {irows = r, fdat = v} i j = v `at'` (j*r+i) | |||
207 | ------------------------------------------------------------------ | 207 | ------------------------------------------------------------------ |
208 | 208 | ||
209 | matrixFromVector RowMajor c v = MC { irows = r, icols = c, cdat = v } | 209 | matrixFromVector RowMajor c v = MC { irows = r, icols = c, cdat = v } |
210 | where (d,m) = dim v `divMod` c | 210 | where (d,m) = dim v `quotRem` c |
211 | r | m==0 = d | 211 | r | m==0 = d |
212 | | otherwise = error "matrixFromVector" | 212 | | otherwise = error "matrixFromVector" |
213 | 213 | ||
214 | matrixFromVector ColumnMajor c v = MF { irows = r, icols = c, fdat = v } | 214 | matrixFromVector ColumnMajor c v = MF { irows = r, icols = c, fdat = v } |
215 | where (d,m) = dim v `divMod` c | 215 | where (d,m) = dim v `quotRem` c |
216 | r | m==0 = d | 216 | r | m==0 = d |
217 | | otherwise = error "matrixFromVector" | 217 | | otherwise = error "matrixFromVector" |
218 | 218 | ||