diff options
author | Alberto Ruiz <aruiz@um.es> | 2007-06-25 17:34:09 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2007-06-25 17:34:09 +0000 |
commit | 2984d5cc1cedb1621f6fa8d9dda0c515441f92e1 (patch) | |
tree | 85e155bd77644c26e265996f9cfecd7de70e2450 /lib/Data/Packed/Internal | |
parent | 1871acb835b4fc164bcff3f6e7467884b87fbd0f (diff) |
old tests passed
Diffstat (limited to 'lib/Data/Packed/Internal')
-rw-r--r-- | lib/Data/Packed/Internal/Vector.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Data/Packed/Internal/Vector.hs b/lib/Data/Packed/Internal/Vector.hs index f1addf4..ab93577 100644 --- a/lib/Data/Packed/Internal/Vector.hs +++ b/lib/Data/Packed/Internal/Vector.hs | |||
@@ -129,5 +129,8 @@ constant x n | isReal id x = scast $ constantR (scast x) n | |||
129 | | isComp id x = scast $ constantC (scast x) n | 129 | | isComp id x = scast $ constantC (scast x) n |
130 | | otherwise = constantG x n | 130 | | otherwise = constantG x n |
131 | 131 | ||
132 | liftVector :: (Storable a, Storable b) => (a-> b) -> Vector a -> Vector b | ||
132 | liftVector f = fromList . map f . toList | 133 | liftVector f = fromList . map f . toList |
134 | |||
135 | liftVector2 :: (Storable a, Storable b, Storable c) => (a-> b -> c) -> Vector a -> Vector b -> Vector c | ||
133 | liftVector2 f u v = fromList $ zipWith f (toList u) (toList v) | 136 | liftVector2 f u v = fromList $ zipWith f (toList u) (toList v) |