summaryrefslogtreecommitdiff
path: root/lib/Numeric/GSL/Vector.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Numeric/GSL/Vector.hs')
-rw-r--r--lib/Numeric/GSL/Vector.hs24
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
215foreign import ccall safe "gsl-aux.h mapF" c_vectorMapF :: CInt -> TFF 215foreign import ccall safe "gsl-aux.h mapF" c_vectorMapF :: CInt -> TFF
216 216
217-- | map of real vectors with given function
218vectorMapQ :: FunCodeV -> Vector (Complex Float) -> Vector (Complex Float)
219vectorMapQ = vectorMapAux c_vectorMapQ
220
221foreign 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
235foreign import ccall safe "gsl-aux.h mapValF" c_vectorMapValF :: CInt -> Ptr Float -> TFF 241foreign import ccall safe "gsl-aux.h mapValF" c_vectorMapValF :: CInt -> Ptr Float -> TFF
236 242
243-- | map of complex vectors with given function
244vectorMapValQ :: FunCodeSV -> Complex Float -> Vector (Complex Float) -> Vector (Complex Float)
245vectorMapValQ oper = vectorMapValAux c_vectorMapValQ (fromei oper)
246
247foreign 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
255foreign import ccall safe "gsl-aux.h zipF" c_vectorZipF :: CInt -> TFFF 267foreign import ccall safe "gsl-aux.h zipF" c_vectorZipF :: CInt -> TFFF
256 268
269-- | elementwise operation on complex vectors
270vectorZipQ :: FunCodeVV -> Vector (Complex Float) -> Vector (Complex Float) -> Vector (Complex Float)
271vectorZipQ = vectorZipAux c_vectorZipQ
272
273foreign import ccall safe "gsl-aux.h zipQ" c_vectorZipQ :: CInt -> TQVQVQV
274
257----------------------------------------------------------------------- 275-----------------------------------------------------------------------
258 276
259data RandDist = Uniform -- ^ uniform distribution in [0,1) 277data RandDist = Uniform -- ^ uniform distribution in [0,1)