diff options
author | Alberto Ruiz <aruiz@um.es> | 2007-09-21 18:10:59 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2007-09-21 18:10:59 +0000 |
commit | edfaf9e0d1dcfccc9015476510a23e8cf64288be (patch) | |
tree | 2b11f0a933a7cce2362aed26ac160312e6b9431a /lib/Data/Packed | |
parent | 6cafd2f26a89008cc0db02e70e39f92a50ec4b4d (diff) |
algorithms refactoring
Diffstat (limited to 'lib/Data/Packed')
-rw-r--r-- | lib/Data/Packed/Internal/Vector.hs | 2 |
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) | |||
24 | import Debug.Trace(trace) | 24 | import Debug.Trace(trace) |
25 | import Foreign.C.String(peekCString) | 25 | import Foreign.C.String(peekCString) |
26 | import Foreign.C.Types | 26 | import Foreign.C.Types |
27 | import 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. |
29 | data Vector t = V { dim :: Int -- ^ number of elements | 30 | data Vector t = V { dim :: Int -- ^ number of elements |
@@ -177,3 +178,4 @@ liftVector f = fromList . map f . toList | |||
177 | liftVector2 :: (Storable a, Storable b, Storable c) => (a-> b -> c) -> Vector a -> Vector b -> Vector c | 178 | liftVector2 :: (Storable a, Storable b, Storable c) => (a-> b -> c) -> Vector a -> Vector b -> Vector c |
178 | liftVector2 f u v = fromList $ zipWith f (toList u) (toList v) | 179 | liftVector2 f u v = fromList $ zipWith f (toList u) (toList v) |
179 | 180 | ||
181 | ----------------------------------------------------------------- | ||