diff options
Diffstat (limited to 'lib/GSL')
-rw-r--r-- | lib/GSL/Fourier.hs | 2 | ||||
-rw-r--r-- | lib/GSL/Minimization.hs | 4 | ||||
-rw-r--r-- | lib/GSL/Polynomials.hs | 2 | ||||
-rw-r--r-- | lib/GSL/Vector.hs | 23 |
4 files changed, 11 insertions, 20 deletions
diff --git a/lib/GSL/Fourier.hs b/lib/GSL/Fourier.hs index bf6cd60..9788602 100644 --- a/lib/GSL/Fourier.hs +++ b/lib/GSL/Fourier.hs | |||
@@ -29,7 +29,7 @@ genfft code v = unsafePerformIO $ do | |||
29 | c_fft code // vec v // vec r // check "fft" [v] | 29 | c_fft code // vec v // vec r // check "fft" [v] |
30 | return r | 30 | return r |
31 | 31 | ||
32 | foreign import ccall "gsl-aux.h fft" c_fft :: Int -> TCVCV -- Complex Double :> Complex Double :> IO Int | 32 | foreign import ccall "gsl-aux.h fft" c_fft :: Int -> TCVCV |
33 | 33 | ||
34 | 34 | ||
35 | {- | Fast 1D Fourier transform of a 'Vector' @(@'Complex' 'Double'@)@ using /gsl_fft_complex_forward/. It uses the same scaling conventions as GNU Octave. | 35 | {- | Fast 1D Fourier transform of a 'Vector' @(@'Complex' 'Double'@)@ using /gsl_fft_complex_forward/. It uses the same scaling conventions as GNU Octave. |
diff --git a/lib/GSL/Minimization.hs b/lib/GSL/Minimization.hs index 32b266f..a59977e 100644 --- a/lib/GSL/Minimization.hs +++ b/lib/GSL/Minimization.hs | |||
@@ -97,7 +97,7 @@ minimizeNMSimplex f xi sz tol maxit = unsafePerformIO $ do | |||
97 | 97 | ||
98 | foreign import ccall "gsl-aux.h minimize" | 98 | foreign import ccall "gsl-aux.h minimize" |
99 | c_minimizeNMSimplex:: FunPtr (Int -> Ptr Double -> Double) -> Double -> Int | 99 | c_minimizeNMSimplex:: FunPtr (Int -> Ptr Double -> Double) -> Double -> Int |
100 | -> TVVM -- Double :> Double :> Double ::> IO Int | 100 | -> TVVM |
101 | 101 | ||
102 | ---------------------------------------------------------------------------------- | 102 | ---------------------------------------------------------------------------------- |
103 | 103 | ||
@@ -165,7 +165,7 @@ foreign import ccall "gsl-aux.h minimizeWithDeriv" | |||
165 | c_minimizeConjugateGradient :: FunPtr (Int -> Ptr Double -> Double) | 165 | c_minimizeConjugateGradient :: FunPtr (Int -> Ptr Double -> Double) |
166 | -> FunPtr (Int -> Ptr Double -> Ptr Double -> IO ()) | 166 | -> FunPtr (Int -> Ptr Double -> Ptr Double -> IO ()) |
167 | -> Double -> Double -> Double -> Int | 167 | -> Double -> Double -> Double -> Int |
168 | -> TVM -- Double :> Double ::> IO Int | 168 | -> TVM |
169 | 169 | ||
170 | --------------------------------------------------------------------- | 170 | --------------------------------------------------------------------- |
171 | iv :: (Vector Double -> Double) -> (Int -> Ptr Double -> Double) | 171 | iv :: (Vector Double -> Double) -> (Int -> Ptr Double -> Double) |
diff --git a/lib/GSL/Polynomials.hs b/lib/GSL/Polynomials.hs index 365c74e..a87fa56 100644 --- a/lib/GSL/Polynomials.hs +++ b/lib/GSL/Polynomials.hs | |||
@@ -51,4 +51,4 @@ polySolve' v | dim v > 1 = unsafePerformIO $ do | |||
51 | return r | 51 | return r |
52 | | otherwise = error "polySolve on a polynomial of degree zero" | 52 | | otherwise = error "polySolve on a polynomial of degree zero" |
53 | 53 | ||
54 | foreign import ccall "gsl-aux.h polySolve" c_polySolve:: TVCV -- Double :> Complex Double :> IO Int | 54 | foreign import ccall "gsl-aux.h polySolve" c_polySolve:: TVCV |
diff --git a/lib/GSL/Vector.hs b/lib/GSL/Vector.hs index fc80c16..a772b34 100644 --- a/lib/GSL/Vector.hs +++ b/lib/GSL/Vector.hs | |||
@@ -121,8 +121,7 @@ vectorZipAux fun code u v = unsafePerformIO $ do | |||
121 | toScalarR :: FunCodeS -> Vector Double -> Double | 121 | toScalarR :: FunCodeS -> Vector Double -> Double |
122 | toScalarR oper = toScalarAux c_toScalarR (fromEnum oper) | 122 | toScalarR oper = toScalarAux c_toScalarR (fromEnum oper) |
123 | 123 | ||
124 | foreign import ccall safe "gsl-aux.h toScalarR" | 124 | foreign import ccall safe "gsl-aux.h toScalarR" c_toScalarR :: Int -> TVV |
125 | c_toScalarR :: Int -> TVV -- Double :> Double :> IO Int | ||
126 | 125 | ||
127 | ------------------------------------------------------------------ | 126 | ------------------------------------------------------------------ |
128 | 127 | ||
@@ -130,15 +129,13 @@ foreign import ccall safe "gsl-aux.h toScalarR" | |||
130 | vectorMapR :: FunCodeV -> Vector Double -> Vector Double | 129 | vectorMapR :: FunCodeV -> Vector Double -> Vector Double |
131 | vectorMapR = vectorMapAux c_vectorMapR | 130 | vectorMapR = vectorMapAux c_vectorMapR |
132 | 131 | ||
133 | foreign import ccall safe "gsl-aux.h mapR" | 132 | foreign import ccall safe "gsl-aux.h mapR" c_vectorMapR :: Int -> TVV |
134 | c_vectorMapR :: Int -> TVV -- Double :> Double :> IO Int | ||
135 | 133 | ||
136 | -- | map of complex vectors with given function | 134 | -- | map of complex vectors with given function |
137 | vectorMapC :: FunCodeV -> Vector (Complex Double) -> Vector (Complex Double) | 135 | vectorMapC :: FunCodeV -> Vector (Complex Double) -> Vector (Complex Double) |
138 | vectorMapC oper = vectorMapAux c_vectorMapC (fromEnum oper) | 136 | vectorMapC oper = vectorMapAux c_vectorMapC (fromEnum oper) |
139 | 137 | ||
140 | foreign import ccall safe "gsl-aux.h mapC" | 138 | foreign import ccall safe "gsl-aux.h mapC" c_vectorMapC :: Int -> TCVCV |
141 | c_vectorMapC :: Int -> TCVCV -- Complex Double :> Complex Double :> IO Int | ||
142 | 139 | ||
143 | ------------------------------------------------------------------- | 140 | ------------------------------------------------------------------- |
144 | 141 | ||
@@ -146,15 +143,13 @@ foreign import ccall safe "gsl-aux.h mapC" | |||
146 | vectorMapValR :: FunCodeSV -> Double -> Vector Double -> Vector Double | 143 | vectorMapValR :: FunCodeSV -> Double -> Vector Double -> Vector Double |
147 | vectorMapValR oper = vectorMapValAux c_vectorMapValR (fromEnum oper) | 144 | vectorMapValR oper = vectorMapValAux c_vectorMapValR (fromEnum oper) |
148 | 145 | ||
149 | foreign import ccall safe "gsl-aux.h mapValR" | 146 | foreign import ccall safe "gsl-aux.h mapValR" c_vectorMapValR :: Int -> Ptr Double -> TVV |
150 | c_vectorMapValR :: Int -> Ptr Double -> TVV -- Double :> Double :> IO Int | ||
151 | 147 | ||
152 | -- | map of complex vectors with given function | 148 | -- | map of complex vectors with given function |
153 | vectorMapValC :: FunCodeSV -> Complex Double -> Vector (Complex Double) -> Vector (Complex Double) | 149 | vectorMapValC :: FunCodeSV -> Complex Double -> Vector (Complex Double) -> Vector (Complex Double) |
154 | vectorMapValC = vectorMapValAux c_vectorMapValC | 150 | vectorMapValC = vectorMapValAux c_vectorMapValC |
155 | 151 | ||
156 | foreign import ccall safe "gsl-aux.h mapValC" | 152 | foreign import ccall safe "gsl-aux.h mapValC" c_vectorMapValC :: Int -> Ptr (Complex Double) -> TCVCV |
157 | c_vectorMapValC :: Int -> Ptr (Complex Double) -> TCVCV -- Complex Double :> Complex Double :> IO Int | ||
158 | 153 | ||
159 | ------------------------------------------------------------------- | 154 | ------------------------------------------------------------------- |
160 | 155 | ||
@@ -162,14 +157,10 @@ foreign import ccall safe "gsl-aux.h mapValC" | |||
162 | vectorZipR :: FunCodeVV -> Vector Double -> Vector Double -> Vector Double | 157 | vectorZipR :: FunCodeVV -> Vector Double -> Vector Double -> Vector Double |
163 | vectorZipR = vectorZipAux c_vectorZipR | 158 | vectorZipR = vectorZipAux c_vectorZipR |
164 | 159 | ||
165 | foreign import ccall safe "gsl-aux.h zipR" | 160 | foreign import ccall safe "gsl-aux.h zipR" c_vectorZipR :: Int -> TVVV |
166 | c_vectorZipR :: Int -> TVVV -- Double :> Double :> Double :> IO Int | ||
167 | 161 | ||
168 | -- | elementwise operation on complex vectors | 162 | -- | elementwise operation on complex vectors |
169 | vectorZipC :: FunCodeVV -> Vector (Complex Double) -> Vector (Complex Double) -> Vector (Complex Double) | 163 | vectorZipC :: FunCodeVV -> Vector (Complex Double) -> Vector (Complex Double) -> Vector (Complex Double) |
170 | vectorZipC = vectorZipAux c_vectorZipC | 164 | vectorZipC = vectorZipAux c_vectorZipC |
171 | 165 | ||
172 | foreign import ccall safe "gsl-aux.h zipC" | 166 | foreign import ccall safe "gsl-aux.h zipC" c_vectorZipC :: Int -> TCVCVCV |
173 | c_vectorZipC :: Int -> TCVCVCV -- Complex Double :> Complex Double :> Complex Double :> IO Int | ||
174 | |||
175 | |||