diff options
author | Vivian McPhail <haskell.vivian.mcphail@gmail.com> | 2010-07-08 23:03:48 +0000 |
---|---|---|
committer | Vivian McPhail <haskell.vivian.mcphail@gmail.com> | 2010-07-08 23:03:48 +0000 |
commit | 97e8a48be58fd53afccc7ae01ee6ec5805d5c1cd (patch) | |
tree | 837f4a6b21e0317da834c8ac42c8adfce9a22d24 /lib/Numeric/GSL/Vector.hs | |
parent | b8699c4f1acff1e3f31cdbac1a7a4a8864b1eeba (diff) |
Linear and Floating (Complex Float)
Diffstat (limited to 'lib/Numeric/GSL/Vector.hs')
-rw-r--r-- | lib/Numeric/GSL/Vector.hs | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/lib/Numeric/GSL/Vector.hs b/lib/Numeric/GSL/Vector.hs index 0148c4f..14ba0ff 100644 --- a/lib/Numeric/GSL/Vector.hs +++ b/lib/Numeric/GSL/Vector.hs | |||
@@ -17,9 +17,9 @@ module Numeric.GSL.Vector ( | |||
17 | sumF, sumR, sumQ, sumC, | 17 | sumF, sumR, sumQ, sumC, |
18 | dotF, dotR, dotQ, dotC, | 18 | dotF, dotR, dotQ, dotC, |
19 | FunCodeS(..), toScalarR, toScalarF, toScalarC, toScalarQ, | 19 | FunCodeS(..), toScalarR, toScalarF, toScalarC, toScalarQ, |
20 | FunCodeV(..), vectorMapR, vectorMapC, vectorMapF, | 20 | FunCodeV(..), vectorMapR, vectorMapC, vectorMapF, vectorMapQ, |
21 | FunCodeSV(..), vectorMapValR, vectorMapValC, vectorMapValF, | 21 | FunCodeSV(..), vectorMapValR, vectorMapValC, vectorMapValF, vectorMapValQ, |
22 | FunCodeVV(..), vectorZipR, vectorZipC, vectorZipF, | 22 | FunCodeVV(..), vectorZipR, vectorZipC, vectorZipF, vectorZipQ, |
23 | RandDist(..), randomVector | 23 | RandDist(..), randomVector |
24 | ) where | 24 | ) where |
25 | 25 | ||
@@ -214,6 +214,12 @@ vectorMapF = vectorMapAux c_vectorMapF | |||
214 | 214 | ||
215 | foreign import ccall safe "gsl-aux.h mapF" c_vectorMapF :: CInt -> TFF | 215 | foreign import ccall safe "gsl-aux.h mapF" c_vectorMapF :: CInt -> TFF |
216 | 216 | ||
217 | -- | map of real vectors with given function | ||
218 | vectorMapQ :: FunCodeV -> Vector (Complex Float) -> Vector (Complex Float) | ||
219 | vectorMapQ = vectorMapAux c_vectorMapQ | ||
220 | |||
221 | foreign import ccall safe "gsl-aux.h mapQ" c_vectorMapQ :: CInt -> TQVQV | ||
222 | |||
217 | ------------------------------------------------------------------- | 223 | ------------------------------------------------------------------- |
218 | 224 | ||
219 | -- | map of real vectors with given function | 225 | -- | map of real vectors with given function |
@@ -234,6 +240,12 @@ vectorMapValF oper = vectorMapValAux c_vectorMapValF (fromei oper) | |||
234 | 240 | ||
235 | foreign import ccall safe "gsl-aux.h mapValF" c_vectorMapValF :: CInt -> Ptr Float -> TFF | 241 | foreign import ccall safe "gsl-aux.h mapValF" c_vectorMapValF :: CInt -> Ptr Float -> TFF |
236 | 242 | ||
243 | -- | map of complex vectors with given function | ||
244 | vectorMapValQ :: FunCodeSV -> Complex Float -> Vector (Complex Float) -> Vector (Complex Float) | ||
245 | vectorMapValQ oper = vectorMapValAux c_vectorMapValQ (fromei oper) | ||
246 | |||
247 | foreign import ccall safe "gsl-aux.h mapValQ" c_vectorMapValQ :: CInt -> Ptr (Complex Float) -> TQVQV | ||
248 | |||
237 | ------------------------------------------------------------------- | 249 | ------------------------------------------------------------------- |
238 | 250 | ||
239 | -- | elementwise operation on real vectors | 251 | -- | elementwise operation on real vectors |
@@ -254,6 +266,12 @@ vectorZipF = vectorZipAux c_vectorZipF | |||
254 | 266 | ||
255 | foreign import ccall safe "gsl-aux.h zipF" c_vectorZipF :: CInt -> TFFF | 267 | foreign import ccall safe "gsl-aux.h zipF" c_vectorZipF :: CInt -> TFFF |
256 | 268 | ||
269 | -- | elementwise operation on complex vectors | ||
270 | vectorZipQ :: FunCodeVV -> Vector (Complex Float) -> Vector (Complex Float) -> Vector (Complex Float) | ||
271 | vectorZipQ = vectorZipAux c_vectorZipQ | ||
272 | |||
273 | foreign import ccall safe "gsl-aux.h zipQ" c_vectorZipQ :: CInt -> TQVQVQV | ||
274 | |||
257 | ----------------------------------------------------------------------- | 275 | ----------------------------------------------------------------------- |
258 | 276 | ||
259 | data RandDist = Uniform -- ^ uniform distribution in [0,1) | 277 | data RandDist = Uniform -- ^ uniform distribution in [0,1) |