summaryrefslogtreecommitdiff
path: root/packages/hmatrix/src/Numeric/GSL/Vector.hs
diff options
context:
space:
mode:
Diffstat (limited to 'packages/hmatrix/src/Numeric/GSL/Vector.hs')
-rw-r--r--packages/hmatrix/src/Numeric/GSL/Vector.hs29
1 files changed, 2 insertions, 27 deletions
diff --git a/packages/hmatrix/src/Numeric/GSL/Vector.hs b/packages/hmatrix/src/Numeric/GSL/Vector.hs
index 27db6ae..7197924 100644
--- a/packages/hmatrix/src/Numeric/GSL/Vector.hs
+++ b/packages/hmatrix/src/Numeric/GSL/Vector.hs
@@ -28,8 +28,8 @@ import Numeric.Vectorized(
28 sumF, sumR, sumQ, sumC, 28 sumF, sumR, sumQ, sumC,
29 prodF, prodR, prodQ, prodC, 29 prodF, prodR, prodQ, prodC,
30 FunCodeS(..), toScalarR, toScalarF, toScalarC, toScalarQ, 30 FunCodeS(..), toScalarR, toScalarF, toScalarC, toScalarQ,
31 FunCodeV(..), 31 FunCodeV(..), vectorMapR, vectorMapF,
32 FunCodeSV(..), 32 FunCodeSV(..), vectorMapValR, vectorMapValF,
33 FunCodeVV(..) 33 FunCodeVV(..)
34 ) 34 )
35 35
@@ -65,13 +65,6 @@ vectorZipAux fun code u v = unsafePerformIO $ do
65 65
66--------------------------------------------------------------------- 66---------------------------------------------------------------------
67 67
68
69-- | map of real vectors with given function
70vectorMapR :: FunCodeV -> Vector Double -> Vector Double
71vectorMapR = vectorMapAux c_vectorMapR
72
73foreign import ccall unsafe "gsl-aux.h mapR" c_vectorMapR :: CInt -> TVV
74
75-- | map of complex vectors with given function 68-- | map of complex vectors with given function
76vectorMapC :: FunCodeV -> Vector (Complex Double) -> Vector (Complex Double) 69vectorMapC :: FunCodeV -> Vector (Complex Double) -> Vector (Complex Double)
77vectorMapC oper = vectorMapAux c_vectorMapC (fromei oper) 70vectorMapC oper = vectorMapAux c_vectorMapC (fromei oper)
@@ -79,12 +72,6 @@ vectorMapC oper = vectorMapAux c_vectorMapC (fromei oper)
79foreign import ccall unsafe "gsl-aux.h mapC" c_vectorMapC :: CInt -> TCVCV 72foreign import ccall unsafe "gsl-aux.h mapC" c_vectorMapC :: CInt -> TCVCV
80 73
81-- | map of real vectors with given function 74-- | map of real vectors with given function
82vectorMapF :: FunCodeV -> Vector Float -> Vector Float
83vectorMapF = vectorMapAux c_vectorMapF
84
85foreign import ccall unsafe "gsl-aux.h mapF" c_vectorMapF :: CInt -> TFF
86
87-- | map of real vectors with given function
88vectorMapQ :: FunCodeV -> Vector (Complex Float) -> Vector (Complex Float) 75vectorMapQ :: FunCodeV -> Vector (Complex Float) -> Vector (Complex Float)
89vectorMapQ = vectorMapAux c_vectorMapQ 76vectorMapQ = vectorMapAux c_vectorMapQ
90 77
@@ -92,24 +79,12 @@ foreign import ccall unsafe "gsl-aux.h mapQ" c_vectorMapQ :: CInt -> TQVQV
92 79
93------------------------------------------------------------------- 80-------------------------------------------------------------------
94 81
95-- | map of real vectors with given function
96vectorMapValR :: FunCodeSV -> Double -> Vector Double -> Vector Double
97vectorMapValR oper = vectorMapValAux c_vectorMapValR (fromei oper)
98
99foreign import ccall unsafe "gsl-aux.h mapValR" c_vectorMapValR :: CInt -> Ptr Double -> TVV
100
101-- | map of complex vectors with given function 82-- | map of complex vectors with given function
102vectorMapValC :: FunCodeSV -> Complex Double -> Vector (Complex Double) -> Vector (Complex Double) 83vectorMapValC :: FunCodeSV -> Complex Double -> Vector (Complex Double) -> Vector (Complex Double)
103vectorMapValC = vectorMapValAux c_vectorMapValC 84vectorMapValC = vectorMapValAux c_vectorMapValC
104 85
105foreign import ccall unsafe "gsl-aux.h mapValC" c_vectorMapValC :: CInt -> Ptr (Complex Double) -> TCVCV 86foreign import ccall unsafe "gsl-aux.h mapValC" c_vectorMapValC :: CInt -> Ptr (Complex Double) -> TCVCV
106 87
107-- | map of real vectors with given function
108vectorMapValF :: FunCodeSV -> Float -> Vector Float -> Vector Float
109vectorMapValF oper = vectorMapValAux c_vectorMapValF (fromei oper)
110
111foreign import ccall unsafe "gsl-aux.h mapValF" c_vectorMapValF :: CInt -> Ptr Float -> TFF
112
113-- | map of complex vectors with given function 88-- | map of complex vectors with given function
114vectorMapValQ :: FunCodeSV -> Complex Float -> Vector (Complex Float) -> Vector (Complex Float) 89vectorMapValQ :: FunCodeSV -> Complex Float -> Vector (Complex Float) -> Vector (Complex Float)
115vectorMapValQ oper = vectorMapValAux c_vectorMapValQ (fromei oper) 90vectorMapValQ oper = vectorMapValAux c_vectorMapValQ (fromei oper)