summaryrefslogtreecommitdiff
path: root/lib/Data/Packed/Vector.hs
diff options
context:
space:
mode:
authorVivian McPhail <haskell.vivian.mcphail@gmail.com>2010-07-09 16:07:51 +0000
committerVivian McPhail <haskell.vivian.mcphail@gmail.com>2010-07-09 16:07:51 +0000
commitc4531ceaa524b1f8a84dcdf3456d7a7b2831f902 (patch)
tree335a04f017ed8ff858336913939261d050672311 /lib/Data/Packed/Vector.hs
parent97e8a48be58fd53afccc7ae01ee6ec5805d5c1cd (diff)
added unzipVectorWith
Diffstat (limited to 'lib/Data/Packed/Vector.hs')
-rw-r--r--lib/Data/Packed/Vector.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Data/Packed/Vector.hs b/lib/Data/Packed/Vector.hs
index c5b8ba7..ad2ae10 100644
--- a/lib/Data/Packed/Vector.hs
+++ b/lib/Data/Packed/Vector.hs
@@ -1,3 +1,4 @@
1{-# LANGUAGE FlexibleContexts #-}
1----------------------------------------------------------------------------- 2-----------------------------------------------------------------------------
2-- | 3-- |
3-- Module : Data.Packed.Vector 4-- Module : Data.Packed.Vector
@@ -23,7 +24,7 @@ module Data.Packed.Vector (
23-- vectorFMax, vectorFMin, vectorFMaxIndex, vectorFMinIndex, 24-- vectorFMax, vectorFMin, vectorFMaxIndex, vectorFMinIndex,
24-- vectorMax, vectorMin, 25-- vectorMax, vectorMin,
25 vectorMaxIndex, vectorMinIndex, 26 vectorMaxIndex, vectorMinIndex,
26 mapVector, zipVector, 27 mapVector, zipVector, unzipVector, unzipVectorWith,
27 fscanfVector, fprintfVector, freadVector, fwriteVector, 28 fscanfVector, fprintfVector, freadVector, fwriteVector,
28 foldLoop, foldVector, foldVectorG 29 foldLoop, foldVector, foldVectorG
29) where 30) where
@@ -149,3 +150,7 @@ vecdisp f v
149 . unwords . lines . tail . dropWhile (not . (`elem` " \n")) 150 . unwords . lines . tail . dropWhile (not . (`elem` " \n"))
150 . f . trans . reshape 1 151 . f . trans . reshape 1
151 $ v 152 $ v
153
154-- | unzip for Vectors
155unzipVector :: (Storable a, Storable b, Storable (a,b)) => Vector (a,b) -> (Vector a,Vector b)
156unzipVector = unzipVectorWith id id