summaryrefslogtreecommitdiff
path: root/packages/base/src/Data/Packed/Numeric.hs
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base/src/Data/Packed/Numeric.hs')
-rw-r--r--packages/base/src/Data/Packed/Numeric.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/base/src/Data/Packed/Numeric.hs b/packages/base/src/Data/Packed/Numeric.hs
index 906bc83..80f1718 100644
--- a/packages/base/src/Data/Packed/Numeric.hs
+++ b/packages/base/src/Data/Packed/Numeric.hs
@@ -31,7 +31,7 @@ module Data.Packed.Numeric (
31 diag, ident, 31 diag, ident,
32 ctrans, 32 ctrans,
33 -- * Generic operations 33 -- * Generic operations
34 Container(..), Numeric, Extractor(..), (??), range, idxs, I, 34 Container(..), Numeric, Extractor(..), (??), range, idxs, I, remap,
35 -- add, mul, sub, divide, equal, scaleRecip, addConstant, 35 -- add, mul, sub, divide, equal, scaleRecip, addConstant,
36 scalar, conj, scale, arctan2, cmap, cmod, 36 scalar, conj, scale, arctan2, cmap, cmod,
37 atIndex, minIndex, maxIndex, minElement, maxElement, 37 atIndex, minIndex, maxIndex, minElement, maxElement,
@@ -315,3 +315,9 @@ ccompare = ccompare'
315cselect :: (Container c t) => c I -> c t -> c t -> c t -> c t 315cselect :: (Container c t) => c I -> c t -> c t -> c t -> c t
316cselect = cselect' 316cselect = cselect'
317 317
318remap :: Element t => Matrix I -> Matrix I -> Matrix t -> Matrix t
319remap i j m
320 | minElement i >= 0 && maxElement i < fromIntegral (rows m) &&
321 minElement j >= 0 && maxElement j < fromIntegral (cols m) = remapM i j m
322 | otherwise = error $ "out of range index in rmap"
323