summaryrefslogtreecommitdiff
path: root/lib/Data/Packed/Internal
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2007-09-21 18:10:59 +0000
committerAlberto Ruiz <aruiz@um.es>2007-09-21 18:10:59 +0000
commitedfaf9e0d1dcfccc9015476510a23e8cf64288be (patch)
tree2b11f0a933a7cce2362aed26ac160312e6b9431a /lib/Data/Packed/Internal
parent6cafd2f26a89008cc0db02e70e39f92a50ec4b4d (diff)
algorithms refactoring
Diffstat (limited to 'lib/Data/Packed/Internal')
-rw-r--r--lib/Data/Packed/Internal/Vector.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Data/Packed/Internal/Vector.hs b/lib/Data/Packed/Internal/Vector.hs
index f0ef8b6..ebe6371 100644
--- a/lib/Data/Packed/Internal/Vector.hs
+++ b/lib/Data/Packed/Internal/Vector.hs
@@ -24,6 +24,7 @@ import Data.List(transpose)
24import Debug.Trace(trace) 24import Debug.Trace(trace)
25import Foreign.C.String(peekCString) 25import Foreign.C.String(peekCString)
26import Foreign.C.Types 26import Foreign.C.Types
27import Data.Monoid
27 28
28-- | A one-dimensional array of objects stored in a contiguous memory block. 29-- | A one-dimensional array of objects stored in a contiguous memory block.
29data Vector t = V { dim :: Int -- ^ number of elements 30data Vector t = V { dim :: Int -- ^ number of elements
@@ -177,3 +178,4 @@ liftVector f = fromList . map f . toList
177liftVector2 :: (Storable a, Storable b, Storable c) => (a-> b -> c) -> Vector a -> Vector b -> Vector c 178liftVector2 :: (Storable a, Storable b, Storable c) => (a-> b -> c) -> Vector a -> Vector b -> Vector c
178liftVector2 f u v = fromList $ zipWith f (toList u) (toList v) 179liftVector2 f u v = fromList $ zipWith f (toList u) (toList v)
179 180
181-----------------------------------------------------------------