diff options
Diffstat (limited to 'packages/hmatrix/src/Numeric/GSL/Vector.hs')
-rw-r--r-- | packages/hmatrix/src/Numeric/GSL/Vector.hs | 29 |
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 | ||
70 | vectorMapR :: FunCodeV -> Vector Double -> Vector Double | ||
71 | vectorMapR = vectorMapAux c_vectorMapR | ||
72 | |||
73 | foreign 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 |
76 | vectorMapC :: FunCodeV -> Vector (Complex Double) -> Vector (Complex Double) | 69 | vectorMapC :: FunCodeV -> Vector (Complex Double) -> Vector (Complex Double) |
77 | vectorMapC oper = vectorMapAux c_vectorMapC (fromei oper) | 70 | vectorMapC oper = vectorMapAux c_vectorMapC (fromei oper) |
@@ -79,12 +72,6 @@ vectorMapC oper = vectorMapAux c_vectorMapC (fromei oper) | |||
79 | foreign import ccall unsafe "gsl-aux.h mapC" c_vectorMapC :: CInt -> TCVCV | 72 | foreign 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 |
82 | vectorMapF :: FunCodeV -> Vector Float -> Vector Float | ||
83 | vectorMapF = vectorMapAux c_vectorMapF | ||
84 | |||
85 | foreign import ccall unsafe "gsl-aux.h mapF" c_vectorMapF :: CInt -> TFF | ||
86 | |||
87 | -- | map of real vectors with given function | ||
88 | vectorMapQ :: FunCodeV -> Vector (Complex Float) -> Vector (Complex Float) | 75 | vectorMapQ :: FunCodeV -> Vector (Complex Float) -> Vector (Complex Float) |
89 | vectorMapQ = vectorMapAux c_vectorMapQ | 76 | vectorMapQ = 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 | ||
96 | vectorMapValR :: FunCodeSV -> Double -> Vector Double -> Vector Double | ||
97 | vectorMapValR oper = vectorMapValAux c_vectorMapValR (fromei oper) | ||
98 | |||
99 | foreign 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 |
102 | vectorMapValC :: FunCodeSV -> Complex Double -> Vector (Complex Double) -> Vector (Complex Double) | 83 | vectorMapValC :: FunCodeSV -> Complex Double -> Vector (Complex Double) -> Vector (Complex Double) |
103 | vectorMapValC = vectorMapValAux c_vectorMapValC | 84 | vectorMapValC = vectorMapValAux c_vectorMapValC |
104 | 85 | ||
105 | foreign import ccall unsafe "gsl-aux.h mapValC" c_vectorMapValC :: CInt -> Ptr (Complex Double) -> TCVCV | 86 | foreign import ccall unsafe "gsl-aux.h mapValC" c_vectorMapValC :: CInt -> Ptr (Complex Double) -> TCVCV |
106 | 87 | ||
107 | -- | map of real vectors with given function | ||
108 | vectorMapValF :: FunCodeSV -> Float -> Vector Float -> Vector Float | ||
109 | vectorMapValF oper = vectorMapValAux c_vectorMapValF (fromei oper) | ||
110 | |||
111 | foreign 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 |
114 | vectorMapValQ :: FunCodeSV -> Complex Float -> Vector (Complex Float) -> Vector (Complex Float) | 89 | vectorMapValQ :: FunCodeSV -> Complex Float -> Vector (Complex Float) -> Vector (Complex Float) |
115 | vectorMapValQ oper = vectorMapValAux c_vectorMapValQ (fromei oper) | 90 | vectorMapValQ oper = vectorMapValAux c_vectorMapValQ (fromei oper) |