diff options
author | Alberto Ruiz <aruiz@um.es> | 2007-10-01 15:04:16 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2007-10-01 15:04:16 +0000 |
commit | c99b8fd6e3f8a2fb365ec12baf838f864b118ece (patch) | |
tree | 11b5b8515861fe88d547253ae10c2182d5fadaf2 /lib/GSL | |
parent | 768f08d4134a066d773d56a9c03ae688e3850352 (diff) |
LinearAlgebra and GSL moved to Numeric
Diffstat (limited to 'lib/GSL')
67 files changed, 0 insertions, 6708 deletions
diff --git a/lib/GSL/Differentiation.hs b/lib/GSL/Differentiation.hs deleted file mode 100644 index e8e22d2..0000000 --- a/lib/GSL/Differentiation.hs +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | {-# OPTIONS #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | {- | | ||
4 | Module : GSL.Differentiation | ||
5 | Copyright : (c) Alberto Ruiz 2006 | ||
6 | License : GPL-style | ||
7 | |||
8 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
9 | Stability : provisional | ||
10 | Portability : uses ffi | ||
11 | |||
12 | Numerical differentiation. | ||
13 | |||
14 | <http://www.gnu.org/software/gsl/manual/html_node/Numerical-Differentiation.html#Numerical-Differentiation> | ||
15 | |||
16 | From the GSL manual: \"The functions described in this chapter compute numerical derivatives by finite differencing. An adaptive algorithm is used to find the best choice of finite difference and to estimate the error in the derivative.\" | ||
17 | -} | ||
18 | ----------------------------------------------------------------------------- | ||
19 | module GSL.Differentiation ( | ||
20 | derivCentral, | ||
21 | derivForward, | ||
22 | derivBackward | ||
23 | ) where | ||
24 | |||
25 | import Foreign | ||
26 | import Data.Packed.Internal(mkfun,check,(//)) | ||
27 | |||
28 | derivGen :: | ||
29 | Int -- ^ type: 0 central, 1 forward, 2 backward | ||
30 | -> Double -- ^ initial step size | ||
31 | -> (Double -> Double) -- ^ function | ||
32 | -> Double -- ^ point where the derivative is taken | ||
33 | -> (Double, Double) -- ^ result and error | ||
34 | derivGen c h f x = unsafePerformIO $ do | ||
35 | r <- malloc | ||
36 | e <- malloc | ||
37 | fp <- mkfun (\x _ -> f x) | ||
38 | c_deriv c fp x h r e // check "deriv" [] | ||
39 | vr <- peek r | ||
40 | ve <- peek e | ||
41 | let result = (vr,ve) | ||
42 | free r | ||
43 | free e | ||
44 | freeHaskellFunPtr fp | ||
45 | return result | ||
46 | |||
47 | foreign import ccall "gsl-aux.h deriv" | ||
48 | c_deriv :: Int -> FunPtr (Double -> Ptr () -> Double) -> Double -> Double | ||
49 | -> Ptr Double -> Ptr Double -> IO Int | ||
50 | |||
51 | |||
52 | {- | Adaptive central difference algorithm, /gsl_deriv_central/. For example: | ||
53 | |||
54 | > > let deriv = derivCentral 0.01 | ||
55 | > > deriv sin (pi/4) | ||
56 | >(0.7071067812000676,1.0600063101654055e-10) | ||
57 | > > cos (pi/4) | ||
58 | >0.7071067811865476 | ||
59 | |||
60 | -} | ||
61 | derivCentral :: Double -- ^ initial step size | ||
62 | -> (Double -> Double) -- ^ function | ||
63 | -> Double -- ^ point where the derivative is taken | ||
64 | -> (Double, Double) -- ^ result and absolute error | ||
65 | derivCentral = derivGen 0 | ||
66 | |||
67 | -- | Adaptive forward difference algorithm, /gsl_deriv_forward/. The function is evaluated only at points greater than x, and never at x itself. The derivative is returned in result and an estimate of its absolute error is returned in abserr. This function should be used if f(x) has a discontinuity at x, or is undefined for values less than x. A backward derivative can be obtained using a negative step. | ||
68 | derivForward :: Double -- ^ initial step size | ||
69 | -> (Double -> Double) -- ^ function | ||
70 | -> Double -- ^ point where the derivative is taken | ||
71 | -> (Double, Double) -- ^ result and absolute error | ||
72 | derivForward = derivGen 1 | ||
73 | |||
74 | -- | Adaptive backward difference algorithm, /gsl_deriv_backward/. | ||
75 | derivBackward ::Double -- ^ initial step size | ||
76 | -> (Double -> Double) -- ^ function | ||
77 | -> Double -- ^ point where the derivative is taken | ||
78 | -> (Double, Double) -- ^ result and absolute error | ||
79 | derivBackward = derivGen 2 | ||
diff --git a/lib/GSL/Fourier.hs b/lib/GSL/Fourier.hs deleted file mode 100644 index 9788602..0000000 --- a/lib/GSL/Fourier.hs +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | {-# OPTIONS_GHC -fglasgow-exts #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | {- | | ||
4 | Module : GSL.Fourier | ||
5 | Copyright : (c) Alberto Ruiz 2006 | ||
6 | License : GPL-style | ||
7 | |||
8 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
9 | Stability : provisional | ||
10 | Portability : uses ffi | ||
11 | |||
12 | Fourier Transform. | ||
13 | |||
14 | <http://www.gnu.org/software/gsl/manual/html_node/Fast-Fourier-Transforms.html#Fast-Fourier-Transforms> | ||
15 | |||
16 | -} | ||
17 | ----------------------------------------------------------------------------- | ||
18 | module GSL.Fourier ( | ||
19 | fft, | ||
20 | ifft | ||
21 | ) where | ||
22 | |||
23 | import Data.Packed.Internal | ||
24 | import Complex | ||
25 | import Foreign | ||
26 | |||
27 | genfft code v = unsafePerformIO $ do | ||
28 | r <- createVector (dim v) | ||
29 | c_fft code // vec v // vec r // check "fft" [v] | ||
30 | return r | ||
31 | |||
32 | foreign import ccall "gsl-aux.h fft" c_fft :: Int -> TCVCV | ||
33 | |||
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. | ||
36 | |||
37 | @> fft ('GSL.Matrix.fromList' [1,2,3,4]) | ||
38 | vector (4) [10.0 :+ 0.0,(-2.0) :+ 2.0,(-2.0) :+ 0.0,(-2.0) :+ (-2.0)]@ | ||
39 | |||
40 | -} | ||
41 | fft :: Vector (Complex Double) -> Vector (Complex Double) | ||
42 | fft = genfft 0 | ||
43 | |||
44 | -- | The inverse of 'fft', using /gsl_fft_complex_inverse/. | ||
45 | ifft :: Vector (Complex Double) -> Vector (Complex Double) | ||
46 | ifft = genfft 1 | ||
diff --git a/lib/GSL/Integration.hs b/lib/GSL/Integration.hs deleted file mode 100644 index 4152c9d..0000000 --- a/lib/GSL/Integration.hs +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | {-# OPTIONS #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | {- | | ||
4 | Module : GSL.Integration | ||
5 | Copyright : (c) Alberto Ruiz 2006 | ||
6 | License : GPL-style | ||
7 | |||
8 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
9 | Stability : provisional | ||
10 | Portability : uses ffi | ||
11 | |||
12 | Numerical integration routines. | ||
13 | |||
14 | <http://www.gnu.org/software/gsl/manual/html_node/Numerical-Integration.html#Numerical-Integration> | ||
15 | -} | ||
16 | ----------------------------------------------------------------------------- | ||
17 | |||
18 | module GSL.Integration ( | ||
19 | integrateQNG, | ||
20 | integrateQAGS | ||
21 | ) where | ||
22 | |||
23 | import Foreign | ||
24 | import Data.Packed.Internal(mkfun,check,(//)) | ||
25 | |||
26 | |||
27 | -------------------------------------------------------------------- | ||
28 | {- | Numerical integration using /gsl_integration_qags/ (adaptive integration with singularities). For example: | ||
29 | |||
30 | @\> let quad = integrateQAGS 1E-9 1000 | ||
31 | \> let f a x = x**(-0.5) * log (a*x) | ||
32 | \> quad (f 1) 0 1 | ||
33 | (-3.999999999999974,4.871658632055187e-13)@ | ||
34 | |||
35 | -} | ||
36 | |||
37 | integrateQAGS :: Double -- ^ precision (e.g. 1E-9) | ||
38 | -> Int -- ^ size of auxiliary workspace (e.g. 1000) | ||
39 | -> (Double -> Double) -- ^ function to be integrated on the interval (a,b) | ||
40 | -> Double -- ^ a | ||
41 | -> Double -- ^ b | ||
42 | -> (Double, Double) -- ^ result of the integration and error | ||
43 | integrateQAGS prec n f a b = unsafePerformIO $ do | ||
44 | r <- malloc | ||
45 | e <- malloc | ||
46 | fp <- mkfun (\x _ -> f x) | ||
47 | c_integrate_qags fp a b prec n r e // check "integrate_qags" [] | ||
48 | vr <- peek r | ||
49 | ve <- peek e | ||
50 | let result = (vr,ve) | ||
51 | free r | ||
52 | free e | ||
53 | freeHaskellFunPtr fp | ||
54 | return result | ||
55 | |||
56 | foreign import ccall "gsl-aux.h integrate_qags" | ||
57 | c_integrate_qags :: FunPtr (Double-> Ptr() -> Double) -> Double -> Double -> Double -> Int | ||
58 | -> Ptr Double -> Ptr Double -> IO Int | ||
59 | |||
60 | ----------------------------------------------------------------- | ||
61 | {- | Numerical integration using /gsl_integration_qng/ (useful for fast integration of smooth functions). For example: | ||
62 | |||
63 | @\> let quad = integrateQNG 1E-6 | ||
64 | \> quad (\\x -> 4\/(1+x*x)) 0 1 | ||
65 | (3.141592653589793,3.487868498008632e-14)@ | ||
66 | |||
67 | -} | ||
68 | |||
69 | integrateQNG :: Double -- ^ precision (e.g. 1E-9) | ||
70 | -> (Double -> Double) -- ^ function to be integrated on the interval (a,b) | ||
71 | -> Double -- ^ a | ||
72 | -> Double -- ^ b | ||
73 | -> (Double, Double) -- ^ result of the integration and error | ||
74 | integrateQNG prec f a b = unsafePerformIO $ do | ||
75 | r <- malloc | ||
76 | e <- malloc | ||
77 | fp <- mkfun (\x _ -> f x) | ||
78 | c_integrate_qng fp a b prec r e // check "integrate_qng" [] | ||
79 | vr <- peek r | ||
80 | ve <- peek e | ||
81 | let result = (vr,ve) | ||
82 | free r | ||
83 | free e | ||
84 | freeHaskellFunPtr fp | ||
85 | return result | ||
86 | |||
87 | foreign import ccall "gsl-aux.h integrate_qng" | ||
88 | c_integrate_qng :: FunPtr (Double-> Ptr() -> Double) -> Double -> Double -> Double | ||
89 | -> Ptr Double -> Ptr Double -> IO Int | ||
90 | |||
diff --git a/lib/GSL/Matrix.hs b/lib/GSL/Matrix.hs deleted file mode 100644 index 3a54226..0000000 --- a/lib/GSL/Matrix.hs +++ /dev/null | |||
@@ -1,301 +0,0 @@ | |||
1 | ----------------------------------------------------------------------------- | ||
2 | -- | | ||
3 | -- Module : GSL.Matrix | ||
4 | -- Copyright : (c) Alberto Ruiz 2007 | ||
5 | -- License : GPL-style | ||
6 | -- | ||
7 | -- Maintainer : Alberto Ruiz <aruiz@um.es> | ||
8 | -- Stability : provisional | ||
9 | -- Portability : portable (uses FFI) | ||
10 | -- | ||
11 | -- A few linear algebra computations based on the GSL (<http://www.gnu.org/software/gsl>). | ||
12 | -- | ||
13 | ----------------------------------------------------------------------------- | ||
14 | |||
15 | module GSL.Matrix( | ||
16 | eigSg, eigHg, | ||
17 | svdg, | ||
18 | qr, | ||
19 | cholR, -- cholC, | ||
20 | luSolveR, luSolveC, | ||
21 | luR, luC | ||
22 | ) where | ||
23 | |||
24 | import Data.Packed.Internal | ||
25 | import Data.Packed.Matrix(fromLists,ident,takeDiag) | ||
26 | import GSL.Vector | ||
27 | import Foreign | ||
28 | import Complex | ||
29 | |||
30 | {- | eigendecomposition of a real symmetric matrix using /gsl_eigen_symmv/. | ||
31 | |||
32 | > > let (l,v) = eigS $ 'fromLists' [[1,2],[2,1]] | ||
33 | > > l | ||
34 | > 3.000 -1.000 | ||
35 | > | ||
36 | > > v | ||
37 | > 0.707 -0.707 | ||
38 | > 0.707 0.707 | ||
39 | > | ||
40 | > > v <> diag l <> trans v | ||
41 | > 1.000 2.000 | ||
42 | > 2.000 1.000 | ||
43 | |||
44 | -} | ||
45 | eigSg :: Matrix Double -> (Vector Double, Matrix Double) | ||
46 | eigSg m | ||
47 | | r == 1 = (fromList [cdat m `at` 0], singleton 1) | ||
48 | | otherwise = unsafePerformIO $ do | ||
49 | l <- createVector r | ||
50 | v <- createMatrix RowMajor r r | ||
51 | c_eigS // mat cdat m // vec l // mat dat v // check "eigSg" [cdat m] | ||
52 | return (l,v) | ||
53 | where r = rows m | ||
54 | foreign import ccall "gsl-aux.h eigensystemR" c_eigS :: TMVM | ||
55 | |||
56 | ------------------------------------------------------------------ | ||
57 | |||
58 | |||
59 | |||
60 | {- | eigendecomposition of a complex hermitian matrix using /gsl_eigen_hermv/ | ||
61 | |||
62 | > > let (l,v) = eigH $ 'fromLists' [[1,2+i],[2-i,3]] | ||
63 | > | ||
64 | > > l | ||
65 | > 4.449 -0.449 | ||
66 | > | ||
67 | > > v | ||
68 | > -0.544 0.839 | ||
69 | > (-0.751,0.375) (-0.487,0.243) | ||
70 | > | ||
71 | > > v <> diag l <> (conjTrans) v | ||
72 | > 1.000 (2.000,1.000) | ||
73 | > (2.000,-1.000) 3.000 | ||
74 | |||
75 | -} | ||
76 | eigHg :: Matrix (Complex Double)-> (Vector Double, Matrix (Complex Double)) | ||
77 | eigHg m | ||
78 | | r == 1 = (fromList [realPart $ cdat m `at` 0], singleton 1) | ||
79 | | otherwise = unsafePerformIO $ do | ||
80 | l <- createVector r | ||
81 | v <- createMatrix RowMajor r r | ||
82 | c_eigH // mat cdat m // vec l // mat dat v // check "eigHg" [cdat m] | ||
83 | return (l,v) | ||
84 | where r = rows m | ||
85 | foreign import ccall "gsl-aux.h eigensystemC" c_eigH :: TCMVCM | ||
86 | |||
87 | |||
88 | {- | Singular value decomposition of a real matrix, using /gsl_linalg_SV_decomp_mod/: | ||
89 | |||
90 | @\> let (u,s,v) = svdg $ 'fromLists' [[1,2,3],[-4,1,7]] | ||
91 | \ | ||
92 | \> u | ||
93 | 0.310 -0.951 | ||
94 | 0.951 0.310 | ||
95 | \ | ||
96 | \> s | ||
97 | 8.497 2.792 | ||
98 | \ | ||
99 | \> v | ||
100 | -0.411 -0.785 | ||
101 | 0.185 -0.570 | ||
102 | 0.893 -0.243 | ||
103 | \ | ||
104 | \> u \<\> 'diag' s \<\> 'trans' v | ||
105 | 1. 2. 3. | ||
106 | -4. 1. 7.@ | ||
107 | |||
108 | -} | ||
109 | svdg :: Matrix Double -> (Matrix Double, Vector Double, Matrix Double) | ||
110 | svdg x = if rows x >= cols x | ||
111 | then svd' x | ||
112 | else (v, s, u) where (u,s,v) = svd' (trans x) | ||
113 | |||
114 | svd' x = unsafePerformIO $ do | ||
115 | u <- createMatrix RowMajor r c | ||
116 | s <- createVector c | ||
117 | v <- createMatrix RowMajor c c | ||
118 | c_svd // mat cdat x // mat dat u // vec s // mat dat v // check "svdg" [cdat x] | ||
119 | return (u,s,v) | ||
120 | where r = rows x | ||
121 | c = cols x | ||
122 | foreign import ccall "gsl-aux.h svd" c_svd :: TMMVM | ||
123 | |||
124 | {- | QR decomposition of a real matrix using /gsl_linalg_QR_decomp/ and /gsl_linalg_QR_unpack/. | ||
125 | |||
126 | @\> let (q,r) = qr $ 'fromLists' [[1,3,5,7],[2,0,-2,4]] | ||
127 | \ | ||
128 | \> q | ||
129 | -0.447 -0.894 | ||
130 | -0.894 0.447 | ||
131 | \ | ||
132 | \> r | ||
133 | -2.236 -1.342 -0.447 -6.708 | ||
134 | 0. -2.683 -5.367 -4.472 | ||
135 | \ | ||
136 | \> q \<\> r | ||
137 | 1.000 3.000 5.000 7.000 | ||
138 | 2.000 0. -2.000 4.000@ | ||
139 | |||
140 | -} | ||
141 | qr :: Matrix Double -> (Matrix Double, Matrix Double) | ||
142 | qr x = unsafePerformIO $ do | ||
143 | q <- createMatrix RowMajor r r | ||
144 | rot <- createMatrix RowMajor r c | ||
145 | c_qr // mat cdat x // mat dat q // mat dat rot // check "qr" [cdat x] | ||
146 | return (q,rot) | ||
147 | where r = rows x | ||
148 | c = cols x | ||
149 | foreign import ccall "gsl-aux.h QR" c_qr :: TMMM | ||
150 | |||
151 | {- | Cholesky decomposition of a symmetric positive definite real matrix using /gsl_linalg_cholesky_decomp/. | ||
152 | |||
153 | @\> chol $ (2><2) [1,2, | ||
154 | 2,9::Double] | ||
155 | (2><2) | ||
156 | [ 1.0, 0.0 | ||
157 | , 2.0, 2.23606797749979 ]@ | ||
158 | |||
159 | -} | ||
160 | cholR :: Matrix Double -> Matrix Double | ||
161 | cholR x = unsafePerformIO $ do | ||
162 | res <- createMatrix RowMajor r r | ||
163 | c_cholR // mat cdat x // mat dat res // check "cholR" [cdat x] | ||
164 | return res | ||
165 | where r = rows x | ||
166 | foreign import ccall "gsl-aux.h cholR" c_cholR :: TMM | ||
167 | |||
168 | cholC :: Matrix (Complex Double) -> Matrix (Complex Double) | ||
169 | cholC x = unsafePerformIO $ do | ||
170 | res <- createMatrix RowMajor r r | ||
171 | c_cholC // mat cdat x // mat dat res // check "cholC" [cdat x] | ||
172 | return res | ||
173 | where r = rows x | ||
174 | foreign import ccall "gsl-aux.h cholC" c_cholC :: TCMCM | ||
175 | |||
176 | |||
177 | -------------------------------------------------------- | ||
178 | |||
179 | {- -| efficient multiplication by the inverse of a matrix (for real matrices) | ||
180 | -} | ||
181 | luSolveR :: Matrix Double -> Matrix Double -> Matrix Double | ||
182 | luSolveR a b | ||
183 | | n1==n2 && n1==r = unsafePerformIO $ do | ||
184 | s <- createMatrix RowMajor r c | ||
185 | c_luSolveR // mat cdat a // mat cdat b // mat dat s // check "luSolveR" [cdat a, cdat b] | ||
186 | return s | ||
187 | | otherwise = error "luSolveR of nonsquare matrix" | ||
188 | where n1 = rows a | ||
189 | n2 = cols a | ||
190 | r = rows b | ||
191 | c = cols b | ||
192 | foreign import ccall "gsl-aux.h luSolveR" c_luSolveR :: TMMM | ||
193 | |||
194 | {- -| efficient multiplication by the inverse of a matrix (for complex matrices). | ||
195 | -} | ||
196 | luSolveC :: Matrix (Complex Double) -> Matrix (Complex Double) -> Matrix (Complex Double) | ||
197 | luSolveC a b | ||
198 | | n1==n2 && n1==r = unsafePerformIO $ do | ||
199 | s <- createMatrix RowMajor r c | ||
200 | c_luSolveC // mat cdat a // mat cdat b // mat dat s // check "luSolveC" [cdat a, cdat b] | ||
201 | return s | ||
202 | | otherwise = error "luSolveC of nonsquare matrix" | ||
203 | where n1 = rows a | ||
204 | n2 = cols a | ||
205 | r = rows b | ||
206 | c = cols b | ||
207 | foreign import ccall "gsl-aux.h luSolveC" c_luSolveC :: TCMCMCM | ||
208 | |||
209 | {- | lu decomposition of real matrix (packed as a vector including l, u, the permutation and sign) | ||
210 | -} | ||
211 | luRaux :: Matrix Double -> Vector Double | ||
212 | luRaux x = unsafePerformIO $ do | ||
213 | res <- createVector (r*r+r+1) | ||
214 | c_luRaux // mat cdat x // vec res // check "luRaux" [cdat x] | ||
215 | return res | ||
216 | where r = rows x | ||
217 | c = cols x | ||
218 | foreign import ccall "gsl-aux.h luRaux" c_luRaux :: TMV | ||
219 | |||
220 | {- | lu decomposition of complex matrix (packed as a vector including l, u, the permutation and sign) | ||
221 | -} | ||
222 | luCaux :: Matrix (Complex Double) -> Vector (Complex Double) | ||
223 | luCaux x = unsafePerformIO $ do | ||
224 | res <- createVector (r*r+r+1) | ||
225 | c_luCaux // mat cdat x // vec res // check "luCaux" [cdat x] | ||
226 | return res | ||
227 | where r = rows x | ||
228 | c = cols x | ||
229 | foreign import ccall "gsl-aux.h luCaux" c_luCaux :: TCMCV | ||
230 | |||
231 | {- | The LU decomposition of a square matrix. Is based on /gsl_linalg_LU_decomp/ and /gsl_linalg_complex_LU_decomp/ as described in <http://www.gnu.org/software/gsl/manual/gsl-ref_13.html#SEC223>. | ||
232 | |||
233 | @\> let m = 'fromLists' [[1,2,-3],[2+3*i,-7,0],[1,-i,2*i]] | ||
234 | \> let (l,u,p,s) = luR m@ | ||
235 | |||
236 | L is the lower triangular: | ||
237 | |||
238 | @\> l | ||
239 | 1. 0. 0. | ||
240 | 0.154-0.231i 1. 0. | ||
241 | 0.154-0.231i 0.624-0.522i 1.@ | ||
242 | |||
243 | U is the upper triangular: | ||
244 | |||
245 | @\> u | ||
246 | 2.+3.i -7. 0. | ||
247 | 0. 3.077-1.615i -3. | ||
248 | 0. 0. 1.873+0.433i@ | ||
249 | |||
250 | p is a permutation: | ||
251 | |||
252 | @\> p | ||
253 | [1,0,2]@ | ||
254 | |||
255 | L \* U obtains a permuted version of the original matrix: | ||
256 | |||
257 | @\> extractRows p m | ||
258 | 2.+3.i -7. 0. | ||
259 | 1. 2. -3. | ||
260 | 1. -1.i 2.i | ||
261 | \ | ||
262 | \> l \<\> u | ||
263 | 2.+3.i -7. 0. | ||
264 | 1. 2. -3. | ||
265 | 1. -1.i 2.i@ | ||
266 | |||
267 | s is the sign of the permutation, required to obtain sign of the determinant: | ||
268 | |||
269 | @\> s * product ('toList' $ 'takeDiag' u) | ||
270 | (-18.0) :+ (-16.000000000000004) | ||
271 | \> 'LinearAlgebra.Algorithms.det' m | ||
272 | (-18.0) :+ (-16.000000000000004)@ | ||
273 | |||
274 | -} | ||
275 | luR :: Matrix Double -> (Matrix Double, Matrix Double, [Int], Double) | ||
276 | luR m = (l,u,p, fromIntegral s') where | ||
277 | r = rows m | ||
278 | v = luRaux m | ||
279 | lu = reshape r $ subVector 0 (r*r) v | ||
280 | s':p = map round . toList . subVector (r*r) (r+1) $ v | ||
281 | u = triang r r 0 1`mul` lu | ||
282 | l = (triang r r 0 0 `mul` lu) `add` ident r | ||
283 | add = liftMatrix2 $ vectorZipR Add | ||
284 | mul = liftMatrix2 $ vectorZipR Mul | ||
285 | |||
286 | -- | Complex version of 'luR'. | ||
287 | luC :: Matrix (Complex Double) -> (Matrix (Complex Double), Matrix (Complex Double), [Int], Complex Double) | ||
288 | luC m = (l,u,p, fromIntegral s') where | ||
289 | r = rows m | ||
290 | v = luCaux m | ||
291 | lu = reshape r $ subVector 0 (r*r) v | ||
292 | s':p = map (round.realPart) . toList . subVector (r*r) (r+1) $ v | ||
293 | u = triang r r 0 1 `mul` lu | ||
294 | l = (triang r r 0 0 `mul` lu) `add` liftMatrix comp (ident r) | ||
295 | add = liftMatrix2 $ vectorZipC Add | ||
296 | mul = liftMatrix2 $ vectorZipC Mul | ||
297 | |||
298 | {- auxiliary function to get triangular matrices | ||
299 | -} | ||
300 | triang r c h v = reshape c $ fromList [el i j | i<-[0..r-1], j<-[0..c-1]] | ||
301 | where el i j = if j-i>=h then v else 1 - v | ||
diff --git a/lib/GSL/Minimization.hs b/lib/GSL/Minimization.hs deleted file mode 100644 index aa89475..0000000 --- a/lib/GSL/Minimization.hs +++ /dev/null | |||
@@ -1,213 +0,0 @@ | |||
1 | {-# OPTIONS_GHC -fglasgow-exts #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | {- | | ||
4 | Module : GSL.Minimization | ||
5 | Copyright : (c) Alberto Ruiz 2006 | ||
6 | License : GPL-style | ||
7 | |||
8 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
9 | Stability : provisional | ||
10 | Portability : uses ffi | ||
11 | |||
12 | Minimization of a multidimensional function Minimization of a multidimensional function using some of the algorithms described in: | ||
13 | |||
14 | <http://www.gnu.org/software/gsl/manual/html_node/Multidimensional-Minimization.html> | ||
15 | |||
16 | -} | ||
17 | ----------------------------------------------------------------------------- | ||
18 | module GSL.Minimization ( | ||
19 | minimizeConjugateGradient, | ||
20 | minimizeNMSimplex | ||
21 | ) where | ||
22 | |||
23 | |||
24 | import Data.Packed.Internal | ||
25 | import Data.Packed.Matrix | ||
26 | import Foreign | ||
27 | import Complex | ||
28 | |||
29 | |||
30 | ------------------------------------------------------------------------- | ||
31 | |||
32 | {- | The method of Nelder and Mead, implemented by /gsl_multimin_fminimizer_nmsimplex/. The gradient of the function is not required. This is the example in the GSL manual: | ||
33 | |||
34 | @minimize f xi = minimizeNMSimplex f xi (replicate (length xi) 1) 1e-2 100 | ||
35 | \ | ||
36 | f [x,y] = 10*(x-1)^2 + 20*(y-2)^2 + 30 | ||
37 | \ | ||
38 | main = do | ||
39 | let (s,p) = minimize f [5,7] | ||
40 | print s | ||
41 | print p | ||
42 | \ | ||
43 | \> main | ||
44 | [0.9920430849306285,1.9969168063253164] | ||
45 | 0. 512.500 1.082 6.500 5. | ||
46 | 1. 290.625 1.372 5.250 4. | ||
47 | 2. 290.625 1.372 5.250 4. | ||
48 | 3. 252.500 1.372 5.500 1. | ||
49 | 4. 101.406 1.823 2.625 3.500 | ||
50 | 5. 101.406 1.823 2.625 3.500 | ||
51 | 6. 60. 1.823 0. 3. | ||
52 | 7. 42.275 1.303 2.094 1.875 | ||
53 | 8. 42.275 1.303 2.094 1.875 | ||
54 | 9. 35.684 1.026 0.258 1.906 | ||
55 | 10. 35.664 0.804 0.588 2.445 | ||
56 | 11. 30.680 0.467 1.258 2.025 | ||
57 | 12. 30.680 0.356 1.258 2.025 | ||
58 | 13. 30.539 0.285 1.093 1.849 | ||
59 | 14. 30.137 0.168 0.883 2.004 | ||
60 | 15. 30.137 0.123 0.883 2.004 | ||
61 | 16. 30.090 0.100 0.958 2.060 | ||
62 | 17. 30.005 6.051e-2 1.022 2.004 | ||
63 | 18. 30.005 4.249e-2 1.022 2.004 | ||
64 | 19. 30.005 4.249e-2 1.022 2.004 | ||
65 | 20. 30.005 2.742e-2 1.022 2.004 | ||
66 | 21. 30.005 2.119e-2 1.022 2.004 | ||
67 | 22. 30.001 1.530e-2 0.992 1.997 | ||
68 | 23. 30.001 1.259e-2 0.992 1.997 | ||
69 | 24. 30.001 7.663e-3 0.992 1.997@ | ||
70 | |||
71 | The path to the solution can be graphically shown by means of: | ||
72 | |||
73 | @'GSL.Plot.mplot' $ drop 3 ('toColumns' p)@ | ||
74 | |||
75 | -} | ||
76 | minimizeNMSimplex :: ([Double] -> Double) -- ^ function to minimize | ||
77 | -> [Double] -- ^ starting point | ||
78 | -> [Double] -- ^ sizes of the initial search box | ||
79 | -> Double -- ^ desired precision of the solution | ||
80 | -> Int -- ^ maximum number of iterations allowed | ||
81 | -> ([Double], Matrix Double) | ||
82 | -- ^ solution vector, and the optimization trajectory followed by the algorithm | ||
83 | minimizeNMSimplex f xi sz tol maxit = unsafePerformIO $ do | ||
84 | let xiv = fromList xi | ||
85 | szv = fromList sz | ||
86 | n = dim xiv | ||
87 | fp <- mkVecfun (iv (f.toList)) | ||
88 | rawpath <- createMIO maxit (n+3) | ||
89 | (c_minimizeNMSimplex fp tol maxit // vec xiv // vec szv) | ||
90 | "minimizeNMSimplex" [xiv,szv] | ||
91 | let it = round (rawpath @@> (maxit-1,0)) | ||
92 | path = takeRows it rawpath | ||
93 | [sol] = toLists $ dropRows (it-1) path | ||
94 | freeHaskellFunPtr fp | ||
95 | return (drop 3 sol, path) | ||
96 | |||
97 | |||
98 | foreign import ccall "gsl-aux.h minimize" | ||
99 | c_minimizeNMSimplex:: FunPtr (Int -> Ptr Double -> Double) -> Double -> Int | ||
100 | -> TVVM | ||
101 | |||
102 | ---------------------------------------------------------------------------------- | ||
103 | |||
104 | {- | The Fletcher-Reeves conjugate gradient algorithm /gsl_multimin_fminimizer_conjugate_fr/. This is the example in the GSL manual: | ||
105 | |||
106 | @minimize = minimizeConjugateGradient 1E-2 1E-4 1E-3 30 | ||
107 | f [x,y] = 10*(x-1)^2 + 20*(y-2)^2 + 30 | ||
108 | \ | ||
109 | df [x,y] = [20*(x-1), 40*(y-2)] | ||
110 | \ | ||
111 | main = do | ||
112 | let (s,p) = minimize f df [5,7] | ||
113 | print s | ||
114 | print p | ||
115 | \ | ||
116 | \> main | ||
117 | [1.0,2.0] | ||
118 | 0. 687.848 4.996 6.991 | ||
119 | 1. 683.555 4.989 6.972 | ||
120 | 2. 675.013 4.974 6.935 | ||
121 | 3. 658.108 4.944 6.861 | ||
122 | 4. 625.013 4.885 6.712 | ||
123 | 5. 561.684 4.766 6.415 | ||
124 | 6. 446.467 4.528 5.821 | ||
125 | 7. 261.794 4.053 4.632 | ||
126 | 8. 75.498 3.102 2.255 | ||
127 | 9. 67.037 2.852 1.630 | ||
128 | 10. 45.316 2.191 1.762 | ||
129 | 11. 30.186 0.869 2.026 | ||
130 | 12. 30. 1. 2.@ | ||
131 | |||
132 | The path to the solution can be graphically shown by means of: | ||
133 | |||
134 | @'GSL.Plot.mplot' $ drop 2 ('toColumns' p)@ | ||
135 | |||
136 | -} | ||
137 | minimizeConjugateGradient :: | ||
138 | Double -- ^ initial step size | ||
139 | -> Double -- ^ minimization parameter | ||
140 | -> Double -- ^ desired precision of the solution (gradient test) | ||
141 | -> Int -- ^ maximum number of iterations allowed | ||
142 | -> ([Double] -> Double) -- ^ function to minimize | ||
143 | -> ([Double] -> [Double]) -- ^ gradient | ||
144 | -> [Double] -- ^ starting point | ||
145 | -> ([Double], Matrix Double) -- ^ solution vector, and the optimization trajectory followed by the algorithm | ||
146 | minimizeConjugateGradient istep minimpar tol maxit f df xi = unsafePerformIO $ do | ||
147 | let xiv = fromList xi | ||
148 | n = dim xiv | ||
149 | f' = f . toList | ||
150 | df' = (fromList . df . toList) | ||
151 | fp <- mkVecfun (iv f') | ||
152 | dfp <- mkVecVecfun (aux_vTov df') | ||
153 | print "entro" | ||
154 | rawpath <- createMIO maxit (n+2) | ||
155 | (c_minimizeConjugateGradient fp dfp istep minimpar tol maxit // vec xiv) | ||
156 | "minimizeDerivV" [xiv] | ||
157 | print "salgo" | ||
158 | let it = round (rawpath @@> (maxit-1,0)) | ||
159 | path = takeRows it rawpath | ||
160 | sol = toList $ cdat $ dropColumns 2 $ dropRows (it-1) path | ||
161 | freeHaskellFunPtr fp | ||
162 | freeHaskellFunPtr dfp | ||
163 | return (sol,path) | ||
164 | |||
165 | |||
166 | foreign import ccall "gsl-aux.h minimizeWithDeriv" | ||
167 | c_minimizeConjugateGradient :: FunPtr (Int -> Ptr Double -> Double) | ||
168 | -> FunPtr (Int -> Ptr Double -> Ptr Double -> IO ()) | ||
169 | -> Double -> Double -> Double -> Int | ||
170 | -> TVM | ||
171 | |||
172 | --------------------------------------------------------------------- | ||
173 | iv :: (Vector Double -> Double) -> (Int -> Ptr Double -> Double) | ||
174 | iv f n p = f (createV n copy "iv" []) where | ||
175 | copy n q = do | ||
176 | copyArray q p n | ||
177 | return 0 | ||
178 | |||
179 | -- | conversion of Haskell functions into function pointers that can be used in the C side | ||
180 | foreign import ccall "wrapper" | ||
181 | mkVecfun :: (Int -> Ptr Double -> Double) | ||
182 | -> IO( FunPtr (Int -> Ptr Double -> Double)) | ||
183 | |||
184 | -- | another required conversion | ||
185 | foreign import ccall "wrapper" | ||
186 | mkVecVecfun :: (Int -> Ptr Double -> Ptr Double -> IO ()) | ||
187 | -> IO (FunPtr (Int -> Ptr Double -> Ptr Double->IO())) | ||
188 | |||
189 | aux_vTov :: (Vector Double -> Vector Double) -> (Int -> Ptr Double -> Ptr Double -> IO()) | ||
190 | aux_vTov f n p r = g where | ||
191 | V {fptr = pr, ptr = t} = f x | ||
192 | x = createV n copy "aux_vTov" [] | ||
193 | copy n q = do | ||
194 | copyArray q p n | ||
195 | return 0 | ||
196 | g = withForeignPtr pr $ \_ -> copyArray r t n | ||
197 | |||
198 | -------------------------------------------------------------------- | ||
199 | |||
200 | createV n fun msg ptrs = unsafePerformIO $ do | ||
201 | r <- createVector n | ||
202 | fun // vec r // check msg ptrs | ||
203 | return r | ||
204 | |||
205 | createM r c fun msg ptrs = unsafePerformIO $ do | ||
206 | r <- createMatrix RowMajor r c | ||
207 | fun // mat cdat r // check msg ptrs | ||
208 | return r | ||
209 | |||
210 | createMIO r c fun msg ptrs = do | ||
211 | r <- createMatrix RowMajor r c | ||
212 | fun // mat cdat r // check msg ptrs | ||
213 | return r | ||
diff --git a/lib/GSL/Polynomials.hs b/lib/GSL/Polynomials.hs deleted file mode 100644 index a87fa56..0000000 --- a/lib/GSL/Polynomials.hs +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | {-# OPTIONS_GHC -fglasgow-exts #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | {- | | ||
4 | Module : GSL.Polynomials | ||
5 | Copyright : (c) Alberto Ruiz 2006 | ||
6 | License : GPL-style | ||
7 | |||
8 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
9 | Stability : provisional | ||
10 | Portability : uses ffi | ||
11 | |||
12 | Polynomials. | ||
13 | |||
14 | <http://www.gnu.org/software/gsl/manual/html_node/General-Polynomial-Equations.html#General-Polynomial-Equations> | ||
15 | |||
16 | -} | ||
17 | ----------------------------------------------------------------------------- | ||
18 | module GSL.Polynomials ( | ||
19 | polySolve | ||
20 | ) where | ||
21 | |||
22 | import Data.Packed.Internal | ||
23 | import Complex | ||
24 | import Foreign | ||
25 | |||
26 | {- | Solution of general polynomial equations, using /gsl_poly_complex_solve/. For example, | ||
27 | the three solutions of x^3 + 8 = 0 | ||
28 | |||
29 | @\> polySolve [8,0,0,1] | ||
30 | [(-1.9999999999999998) :+ 0.0, | ||
31 | 1.0 :+ 1.732050807568877, | ||
32 | 1.0 :+ (-1.732050807568877)]@ | ||
33 | |||
34 | The example in the GSL manual: To find the roots of x^5 -1 = 0: | ||
35 | |||
36 | @\> polySolve [-1, 0, 0, 0, 0, 1] | ||
37 | [(-0.8090169943749475) :+ 0.5877852522924731, | ||
38 | (-0.8090169943749475) :+ (-0.5877852522924731), | ||
39 | 0.30901699437494734 :+ 0.9510565162951536, | ||
40 | 0.30901699437494734 :+ (-0.9510565162951536), | ||
41 | 1.0 :+ 0.0]@ | ||
42 | |||
43 | -} | ||
44 | polySolve :: [Double] -> [Complex Double] | ||
45 | polySolve = toList . polySolve' . fromList | ||
46 | |||
47 | polySolve' :: Vector Double -> Vector (Complex Double) | ||
48 | polySolve' v | dim v > 1 = unsafePerformIO $ do | ||
49 | r <- createVector (dim v-1) | ||
50 | c_polySolve // vec v // vec r // check "polySolve" [v] | ||
51 | return r | ||
52 | | otherwise = error "polySolve on a polynomial of degree zero" | ||
53 | |||
54 | foreign import ccall "gsl-aux.h polySolve" c_polySolve:: TVCV | ||
diff --git a/lib/GSL/Special.hs b/lib/GSL/Special.hs deleted file mode 100644 index fa002b9..0000000 --- a/lib/GSL/Special.hs +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | ----------------------------------------------------------------------------- | ||
2 | {- | | ||
3 | Module : GSL.Special | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | |||
7 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
8 | Stability : provisional | ||
9 | Portability : uses ffi | ||
10 | |||
11 | Wrappers for selected special functions. | ||
12 | |||
13 | <http://www.gnu.org/software/gsl/manual/html_node/Special-Functions.html#Special-Functions> | ||
14 | -} | ||
15 | ----------------------------------------------------------------------------- | ||
16 | |||
17 | module GSL.Special ( | ||
18 | module GSL.Special.Airy | ||
19 | , module GSL.Special.Bessel | ||
20 | , module GSL.Special.Clausen | ||
21 | , module GSL.Special.Coulomb | ||
22 | , module GSL.Special.Coupling | ||
23 | , module GSL.Special.Dawson | ||
24 | , module GSL.Special.Debye | ||
25 | , module GSL.Special.Dilog | ||
26 | , module GSL.Special.Elementary | ||
27 | , module GSL.Special.Ellint | ||
28 | , module GSL.Special.Erf | ||
29 | , module GSL.Special.Exp | ||
30 | , module GSL.Special.Expint | ||
31 | , module GSL.Special.Fermi_dirac | ||
32 | , module GSL.Special.Gamma | ||
33 | , module GSL.Special.Gegenbauer | ||
34 | , module GSL.Special.Hyperg | ||
35 | , module GSL.Special.Laguerre | ||
36 | , module GSL.Special.Lambert | ||
37 | , module GSL.Special.Legendre | ||
38 | , module GSL.Special.Log | ||
39 | , module GSL.Special.Pow_int | ||
40 | , module GSL.Special.Psi | ||
41 | , module GSL.Special.Synchrotron | ||
42 | , module GSL.Special.Trig | ||
43 | , module GSL.Special.Zeta | ||
44 | ) | ||
45 | where | ||
46 | |||
47 | import Foreign | ||
48 | import GSL.Special.Internal | ||
49 | import GSL.Special.Airy | ||
50 | import GSL.Special.Bessel | ||
51 | import GSL.Special.Clausen | ||
52 | import GSL.Special.Coulomb | ||
53 | import GSL.Special.Coupling | ||
54 | import GSL.Special.Dawson | ||
55 | import GSL.Special.Debye | ||
56 | import GSL.Special.Dilog | ||
57 | import GSL.Special.Elementary | ||
58 | import GSL.Special.Ellint | ||
59 | import GSL.Special.Erf | ||
60 | import GSL.Special.Exp | ||
61 | import GSL.Special.Expint | ||
62 | import GSL.Special.Fermi_dirac | ||
63 | import GSL.Special.Gamma | ||
64 | import GSL.Special.Gegenbauer | ||
65 | import GSL.Special.Hyperg | ||
66 | import GSL.Special.Laguerre | ||
67 | import GSL.Special.Lambert | ||
68 | import GSL.Special.Legendre | ||
69 | import GSL.Special.Log | ||
70 | import GSL.Special.Pow_int | ||
71 | import GSL.Special.Psi | ||
72 | import GSL.Special.Synchrotron | ||
73 | import GSL.Special.Trig | ||
74 | import GSL.Special.Zeta | ||
diff --git a/lib/GSL/Special/Airy.hs b/lib/GSL/Special/Airy.hs deleted file mode 100644 index 872f7c5..0000000 --- a/lib/GSL/Special/Airy.hs +++ /dev/null | |||
@@ -1,166 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Airy | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.gnu.org/software/gsl/manual/html_node/Airy-Functions-and-Derivatives.html> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Airy( | ||
18 | Precision (..) | ||
19 | , airy_Ai_e | ||
20 | , airy_Ai | ||
21 | , airy_Bi_e | ||
22 | , airy_Bi | ||
23 | , airy_Ai_scaled_e | ||
24 | , airy_Ai_scaled | ||
25 | , airy_Bi_scaled_e | ||
26 | , airy_Bi_scaled | ||
27 | , airy_Ai_deriv_e | ||
28 | , airy_Ai_deriv | ||
29 | , airy_Bi_deriv_e | ||
30 | , airy_Bi_deriv | ||
31 | , airy_Ai_deriv_scaled_e | ||
32 | , airy_Ai_deriv_scaled | ||
33 | , airy_Bi_deriv_scaled_e | ||
34 | , airy_Bi_deriv_scaled | ||
35 | , airy_zero_Ai_e | ||
36 | , airy_zero_Ai | ||
37 | , airy_zero_Bi_e | ||
38 | , airy_zero_Bi | ||
39 | , airy_zero_Ai_deriv_e | ||
40 | , airy_zero_Ai_deriv | ||
41 | , airy_zero_Bi_deriv_e | ||
42 | , airy_zero_Bi_deriv | ||
43 | ) where | ||
44 | |||
45 | import Foreign(Ptr) | ||
46 | import GSL.Special.Internal | ||
47 | |||
48 | -- | wrapper for int gsl_sf_airy_Ai_e(double x,gsl_mode_t mode,gsl_sf_result* result); | ||
49 | airy_Ai_e :: Double -> Precision -> (Double,Double) | ||
50 | airy_Ai_e x mode = createSFR "airy_Ai_e" $ gsl_sf_airy_Ai_e x (precCode mode) | ||
51 | foreign import ccall "airy.h gsl_sf_airy_Ai_e" gsl_sf_airy_Ai_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int) | ||
52 | |||
53 | -- | wrapper for double gsl_sf_airy_Ai(double x,gsl_mode_t mode); | ||
54 | airy_Ai :: Double -> Precision -> Double | ||
55 | airy_Ai x mode = gsl_sf_airy_Ai x (precCode mode) | ||
56 | foreign import ccall "airy.h gsl_sf_airy_Ai" gsl_sf_airy_Ai :: Double -> Gsl_mode_t -> Double | ||
57 | |||
58 | -- | wrapper for int gsl_sf_airy_Bi_e(double x,gsl_mode_t mode,gsl_sf_result* result); | ||
59 | airy_Bi_e :: Double -> Precision -> (Double,Double) | ||
60 | airy_Bi_e x mode = createSFR "airy_Bi_e" $ gsl_sf_airy_Bi_e x (precCode mode) | ||
61 | foreign import ccall "airy.h gsl_sf_airy_Bi_e" gsl_sf_airy_Bi_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int) | ||
62 | |||
63 | -- | wrapper for double gsl_sf_airy_Bi(double x,gsl_mode_t mode); | ||
64 | airy_Bi :: Double -> Precision -> Double | ||
65 | airy_Bi x mode = gsl_sf_airy_Bi x (precCode mode) | ||
66 | foreign import ccall "airy.h gsl_sf_airy_Bi" gsl_sf_airy_Bi :: Double -> Gsl_mode_t -> Double | ||
67 | |||
68 | -- | wrapper for int gsl_sf_airy_Ai_scaled_e(double x,gsl_mode_t mode,gsl_sf_result* result); | ||
69 | airy_Ai_scaled_e :: Double -> Precision -> (Double,Double) | ||
70 | airy_Ai_scaled_e x mode = createSFR "airy_Ai_scaled_e" $ gsl_sf_airy_Ai_scaled_e x (precCode mode) | ||
71 | foreign import ccall "airy.h gsl_sf_airy_Ai_scaled_e" gsl_sf_airy_Ai_scaled_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int) | ||
72 | |||
73 | -- | wrapper for double gsl_sf_airy_Ai_scaled(double x,gsl_mode_t mode); | ||
74 | airy_Ai_scaled :: Double -> Precision -> Double | ||
75 | airy_Ai_scaled x mode = gsl_sf_airy_Ai_scaled x (precCode mode) | ||
76 | foreign import ccall "airy.h gsl_sf_airy_Ai_scaled" gsl_sf_airy_Ai_scaled :: Double -> Gsl_mode_t -> Double | ||
77 | |||
78 | -- | wrapper for int gsl_sf_airy_Bi_scaled_e(double x,gsl_mode_t mode,gsl_sf_result* result); | ||
79 | airy_Bi_scaled_e :: Double -> Precision -> (Double,Double) | ||
80 | airy_Bi_scaled_e x mode = createSFR "airy_Bi_scaled_e" $ gsl_sf_airy_Bi_scaled_e x (precCode mode) | ||
81 | foreign import ccall "airy.h gsl_sf_airy_Bi_scaled_e" gsl_sf_airy_Bi_scaled_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int) | ||
82 | |||
83 | -- | wrapper for double gsl_sf_airy_Bi_scaled(double x,gsl_mode_t mode); | ||
84 | airy_Bi_scaled :: Double -> Precision -> Double | ||
85 | airy_Bi_scaled x mode = gsl_sf_airy_Bi_scaled x (precCode mode) | ||
86 | foreign import ccall "airy.h gsl_sf_airy_Bi_scaled" gsl_sf_airy_Bi_scaled :: Double -> Gsl_mode_t -> Double | ||
87 | |||
88 | -- | wrapper for int gsl_sf_airy_Ai_deriv_e(double x,gsl_mode_t mode,gsl_sf_result* result); | ||
89 | airy_Ai_deriv_e :: Double -> Precision -> (Double,Double) | ||
90 | airy_Ai_deriv_e x mode = createSFR "airy_Ai_deriv_e" $ gsl_sf_airy_Ai_deriv_e x (precCode mode) | ||
91 | foreign import ccall "airy.h gsl_sf_airy_Ai_deriv_e" gsl_sf_airy_Ai_deriv_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int) | ||
92 | |||
93 | -- | wrapper for double gsl_sf_airy_Ai_deriv(double x,gsl_mode_t mode); | ||
94 | airy_Ai_deriv :: Double -> Precision -> Double | ||
95 | airy_Ai_deriv x mode = gsl_sf_airy_Ai_deriv x (precCode mode) | ||
96 | foreign import ccall "airy.h gsl_sf_airy_Ai_deriv" gsl_sf_airy_Ai_deriv :: Double -> Gsl_mode_t -> Double | ||
97 | |||
98 | -- | wrapper for int gsl_sf_airy_Bi_deriv_e(double x,gsl_mode_t mode,gsl_sf_result* result); | ||
99 | airy_Bi_deriv_e :: Double -> Precision -> (Double,Double) | ||
100 | airy_Bi_deriv_e x mode = createSFR "airy_Bi_deriv_e" $ gsl_sf_airy_Bi_deriv_e x (precCode mode) | ||
101 | foreign import ccall "airy.h gsl_sf_airy_Bi_deriv_e" gsl_sf_airy_Bi_deriv_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int) | ||
102 | |||
103 | -- | wrapper for double gsl_sf_airy_Bi_deriv(double x,gsl_mode_t mode); | ||
104 | airy_Bi_deriv :: Double -> Precision -> Double | ||
105 | airy_Bi_deriv x mode = gsl_sf_airy_Bi_deriv x (precCode mode) | ||
106 | foreign import ccall "airy.h gsl_sf_airy_Bi_deriv" gsl_sf_airy_Bi_deriv :: Double -> Gsl_mode_t -> Double | ||
107 | |||
108 | -- | wrapper for int gsl_sf_airy_Ai_deriv_scaled_e(double x,gsl_mode_t mode,gsl_sf_result* result); | ||
109 | airy_Ai_deriv_scaled_e :: Double -> Precision -> (Double,Double) | ||
110 | airy_Ai_deriv_scaled_e x mode = createSFR "airy_Ai_deriv_scaled_e" $ gsl_sf_airy_Ai_deriv_scaled_e x (precCode mode) | ||
111 | foreign import ccall "airy.h gsl_sf_airy_Ai_deriv_scaled_e" gsl_sf_airy_Ai_deriv_scaled_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int) | ||
112 | |||
113 | -- | wrapper for double gsl_sf_airy_Ai_deriv_scaled(double x,gsl_mode_t mode); | ||
114 | airy_Ai_deriv_scaled :: Double -> Precision -> Double | ||
115 | airy_Ai_deriv_scaled x mode = gsl_sf_airy_Ai_deriv_scaled x (precCode mode) | ||
116 | foreign import ccall "airy.h gsl_sf_airy_Ai_deriv_scaled" gsl_sf_airy_Ai_deriv_scaled :: Double -> Gsl_mode_t -> Double | ||
117 | |||
118 | -- | wrapper for int gsl_sf_airy_Bi_deriv_scaled_e(double x,gsl_mode_t mode,gsl_sf_result* result); | ||
119 | airy_Bi_deriv_scaled_e :: Double -> Precision -> (Double,Double) | ||
120 | airy_Bi_deriv_scaled_e x mode = createSFR "airy_Bi_deriv_scaled_e" $ gsl_sf_airy_Bi_deriv_scaled_e x (precCode mode) | ||
121 | foreign import ccall "airy.h gsl_sf_airy_Bi_deriv_scaled_e" gsl_sf_airy_Bi_deriv_scaled_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int) | ||
122 | |||
123 | -- | wrapper for double gsl_sf_airy_Bi_deriv_scaled(double x,gsl_mode_t mode); | ||
124 | airy_Bi_deriv_scaled :: Double -> Precision -> Double | ||
125 | airy_Bi_deriv_scaled x mode = gsl_sf_airy_Bi_deriv_scaled x (precCode mode) | ||
126 | foreign import ccall "airy.h gsl_sf_airy_Bi_deriv_scaled" gsl_sf_airy_Bi_deriv_scaled :: Double -> Gsl_mode_t -> Double | ||
127 | |||
128 | -- | wrapper for int gsl_sf_airy_zero_Ai_e(int s,gsl_sf_result* result); | ||
129 | airy_zero_Ai_e :: Int -> (Double,Double) | ||
130 | airy_zero_Ai_e s = createSFR "airy_zero_Ai_e" $ gsl_sf_airy_zero_Ai_e s | ||
131 | foreign import ccall "airy.h gsl_sf_airy_zero_Ai_e" gsl_sf_airy_zero_Ai_e :: Int -> Ptr Double -> IO(Int) | ||
132 | |||
133 | -- | wrapper for double gsl_sf_airy_zero_Ai(int s); | ||
134 | airy_zero_Ai :: Int -> Double | ||
135 | airy_zero_Ai = gsl_sf_airy_zero_Ai | ||
136 | foreign import ccall "airy.h gsl_sf_airy_zero_Ai" gsl_sf_airy_zero_Ai :: Int -> Double | ||
137 | |||
138 | -- | wrapper for int gsl_sf_airy_zero_Bi_e(int s,gsl_sf_result* result); | ||
139 | airy_zero_Bi_e :: Int -> (Double,Double) | ||
140 | airy_zero_Bi_e s = createSFR "airy_zero_Bi_e" $ gsl_sf_airy_zero_Bi_e s | ||
141 | foreign import ccall "airy.h gsl_sf_airy_zero_Bi_e" gsl_sf_airy_zero_Bi_e :: Int -> Ptr Double -> IO(Int) | ||
142 | |||
143 | -- | wrapper for double gsl_sf_airy_zero_Bi(int s); | ||
144 | airy_zero_Bi :: Int -> Double | ||
145 | airy_zero_Bi = gsl_sf_airy_zero_Bi | ||
146 | foreign import ccall "airy.h gsl_sf_airy_zero_Bi" gsl_sf_airy_zero_Bi :: Int -> Double | ||
147 | |||
148 | -- | wrapper for int gsl_sf_airy_zero_Ai_deriv_e(int s,gsl_sf_result* result); | ||
149 | airy_zero_Ai_deriv_e :: Int -> (Double,Double) | ||
150 | airy_zero_Ai_deriv_e s = createSFR "airy_zero_Ai_deriv_e" $ gsl_sf_airy_zero_Ai_deriv_e s | ||
151 | foreign import ccall "airy.h gsl_sf_airy_zero_Ai_deriv_e" gsl_sf_airy_zero_Ai_deriv_e :: Int -> Ptr Double -> IO(Int) | ||
152 | |||
153 | -- | wrapper for double gsl_sf_airy_zero_Ai_deriv(int s); | ||
154 | airy_zero_Ai_deriv :: Int -> Double | ||
155 | airy_zero_Ai_deriv = gsl_sf_airy_zero_Ai_deriv | ||
156 | foreign import ccall "airy.h gsl_sf_airy_zero_Ai_deriv" gsl_sf_airy_zero_Ai_deriv :: Int -> Double | ||
157 | |||
158 | -- | wrapper for int gsl_sf_airy_zero_Bi_deriv_e(int s,gsl_sf_result* result); | ||
159 | airy_zero_Bi_deriv_e :: Int -> (Double,Double) | ||
160 | airy_zero_Bi_deriv_e s = createSFR "airy_zero_Bi_deriv_e" $ gsl_sf_airy_zero_Bi_deriv_e s | ||
161 | foreign import ccall "airy.h gsl_sf_airy_zero_Bi_deriv_e" gsl_sf_airy_zero_Bi_deriv_e :: Int -> Ptr Double -> IO(Int) | ||
162 | |||
163 | -- | wrapper for double gsl_sf_airy_zero_Bi_deriv(int s); | ||
164 | airy_zero_Bi_deriv :: Int -> Double | ||
165 | airy_zero_Bi_deriv = gsl_sf_airy_zero_Bi_deriv | ||
166 | foreign import ccall "airy.h gsl_sf_airy_zero_Bi_deriv" gsl_sf_airy_zero_Bi_deriv :: Int -> Double | ||
diff --git a/lib/GSL/Special/Bessel.hs b/lib/GSL/Special/Bessel.hs deleted file mode 100644 index 4a96926..0000000 --- a/lib/GSL/Special/Bessel.hs +++ /dev/null | |||
@@ -1,809 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Bessel | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.google.com/search?q=gsl_sf_bessel.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Bessel( | ||
18 | bessel_J0_e | ||
19 | , bessel_J0 | ||
20 | , bessel_J1_e | ||
21 | , bessel_J1 | ||
22 | , bessel_Jn_e | ||
23 | , bessel_Jn | ||
24 | , bessel_Y0_e | ||
25 | , bessel_Y0 | ||
26 | , bessel_Y1_e | ||
27 | , bessel_Y1 | ||
28 | , bessel_Yn_e | ||
29 | , bessel_Yn | ||
30 | , bessel_I0_e | ||
31 | , bessel_I0 | ||
32 | , bessel_I1_e | ||
33 | , bessel_I1 | ||
34 | , bessel_In_e | ||
35 | , bessel_In | ||
36 | , bessel_I0_scaled_e | ||
37 | , bessel_I0_scaled | ||
38 | , bessel_I1_scaled_e | ||
39 | , bessel_I1_scaled | ||
40 | , bessel_In_scaled_e | ||
41 | , bessel_In_scaled | ||
42 | , bessel_K0_e | ||
43 | , bessel_K0 | ||
44 | , bessel_K1_e | ||
45 | , bessel_K1 | ||
46 | , bessel_Kn_e | ||
47 | , bessel_Kn | ||
48 | , bessel_K0_scaled_e | ||
49 | , bessel_K0_scaled | ||
50 | , bessel_K1_scaled_e | ||
51 | , bessel_K1_scaled | ||
52 | , bessel_Kn_scaled_e | ||
53 | , bessel_Kn_scaled | ||
54 | , bessel_j0_e | ||
55 | , bessel_j0 | ||
56 | , bessel_j1_e | ||
57 | , bessel_j1 | ||
58 | , bessel_j2_e | ||
59 | , bessel_j2 | ||
60 | , bessel_jl_e | ||
61 | , bessel_jl | ||
62 | , bessel_y0_e | ||
63 | , bessel_y0 | ||
64 | , bessel_y1_e | ||
65 | , bessel_y1 | ||
66 | , bessel_y2_e | ||
67 | , bessel_y2 | ||
68 | , bessel_yl_e | ||
69 | , bessel_yl | ||
70 | , bessel_i0_scaled_e | ||
71 | , bessel_i0_scaled | ||
72 | , bessel_i1_scaled_e | ||
73 | , bessel_i1_scaled | ||
74 | , bessel_i2_scaled_e | ||
75 | , bessel_i2_scaled | ||
76 | , bessel_il_scaled_e | ||
77 | , bessel_il_scaled | ||
78 | , bessel_k0_scaled_e | ||
79 | , bessel_k0_scaled | ||
80 | , bessel_k1_scaled_e | ||
81 | , bessel_k1_scaled | ||
82 | , bessel_k2_scaled_e | ||
83 | , bessel_k2_scaled | ||
84 | , bessel_kl_scaled_e | ||
85 | , bessel_kl_scaled | ||
86 | , bessel_Jnu_e | ||
87 | , bessel_Jnu | ||
88 | , bessel_Ynu_e | ||
89 | , bessel_Ynu | ||
90 | , bessel_Inu_scaled_e | ||
91 | , bessel_Inu_scaled | ||
92 | , bessel_Inu_e | ||
93 | , bessel_Inu | ||
94 | , bessel_Knu_scaled_e | ||
95 | , bessel_Knu_scaled | ||
96 | , bessel_Knu_e | ||
97 | , bessel_Knu | ||
98 | , bessel_lnKnu_e | ||
99 | , bessel_lnKnu | ||
100 | , bessel_zero_J0_e | ||
101 | , bessel_zero_J0 | ||
102 | , bessel_zero_J1_e | ||
103 | , bessel_zero_J1 | ||
104 | , bessel_zero_Jnu_e | ||
105 | , bessel_zero_Jnu | ||
106 | ) where | ||
107 | |||
108 | import Foreign(Ptr) | ||
109 | import GSL.Special.Internal | ||
110 | |||
111 | -- | wrapper for int gsl_sf_bessel_J0_e(double x,gsl_sf_result* result); | ||
112 | -- | ||
113 | -- <http://www.google.com/search?q=gsl_sf_bessel_J0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
114 | bessel_J0_e :: Double -> (Double,Double) | ||
115 | bessel_J0_e x = createSFR "bessel_J0_e" $ gsl_sf_bessel_J0_e x | ||
116 | foreign import ccall "bessel.h gsl_sf_bessel_J0_e" gsl_sf_bessel_J0_e :: Double -> Ptr Double -> IO(Int) | ||
117 | |||
118 | -- | wrapper for double gsl_sf_bessel_J0(double x); | ||
119 | -- | ||
120 | -- <http://www.google.com/search?q=gsl_sf_bessel_J0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
121 | bessel_J0 :: Double -> Double | ||
122 | bessel_J0 = gsl_sf_bessel_J0 | ||
123 | foreign import ccall "bessel.h gsl_sf_bessel_J0" gsl_sf_bessel_J0 :: Double -> Double | ||
124 | |||
125 | -- | wrapper for int gsl_sf_bessel_J1_e(double x,gsl_sf_result* result); | ||
126 | -- | ||
127 | -- <http://www.google.com/search?q=gsl_sf_bessel_J1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
128 | bessel_J1_e :: Double -> (Double,Double) | ||
129 | bessel_J1_e x = createSFR "bessel_J1_e" $ gsl_sf_bessel_J1_e x | ||
130 | foreign import ccall "bessel.h gsl_sf_bessel_J1_e" gsl_sf_bessel_J1_e :: Double -> Ptr Double -> IO(Int) | ||
131 | |||
132 | -- | wrapper for double gsl_sf_bessel_J1(double x); | ||
133 | -- | ||
134 | -- <http://www.google.com/search?q=gsl_sf_bessel_J1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
135 | bessel_J1 :: Double -> Double | ||
136 | bessel_J1 = gsl_sf_bessel_J1 | ||
137 | foreign import ccall "bessel.h gsl_sf_bessel_J1" gsl_sf_bessel_J1 :: Double -> Double | ||
138 | |||
139 | -- | wrapper for int gsl_sf_bessel_Jn_e(int n,double x,gsl_sf_result* result); | ||
140 | -- | ||
141 | -- <http://www.google.com/search?q=gsl_sf_bessel_Jn_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
142 | bessel_Jn_e :: Int -> Double -> (Double,Double) | ||
143 | bessel_Jn_e n x = createSFR "bessel_Jn_e" $ gsl_sf_bessel_Jn_e n x | ||
144 | foreign import ccall "bessel.h gsl_sf_bessel_Jn_e" gsl_sf_bessel_Jn_e :: Int -> Double -> Ptr Double -> IO(Int) | ||
145 | |||
146 | -- | wrapper for double gsl_sf_bessel_Jn(int n,double x); | ||
147 | -- | ||
148 | -- <http://www.google.com/search?q=gsl_sf_bessel_Jn&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
149 | bessel_Jn :: Int -> Double -> Double | ||
150 | bessel_Jn = gsl_sf_bessel_Jn | ||
151 | foreign import ccall "bessel.h gsl_sf_bessel_Jn" gsl_sf_bessel_Jn :: Int -> Double -> Double | ||
152 | |||
153 | -- | wrapper for int gsl_sf_bessel_Jn_array(int nmin,int nmax,double x,double* result_array); | ||
154 | -- | ||
155 | -- <http://www.google.com/search?q=gsl_sf_bessel_Jn_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
156 | bessel_Jn_array :: Int -> Int -> Double -> Ptr Double -> Int | ||
157 | bessel_Jn_array = gsl_sf_bessel_Jn_array | ||
158 | foreign import ccall "bessel.h gsl_sf_bessel_Jn_array" gsl_sf_bessel_Jn_array :: Int -> Int -> Double -> Ptr Double -> Int | ||
159 | |||
160 | -- | wrapper for int gsl_sf_bessel_Y0_e(double x,gsl_sf_result* result); | ||
161 | -- | ||
162 | -- <http://www.google.com/search?q=gsl_sf_bessel_Y0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
163 | bessel_Y0_e :: Double -> (Double,Double) | ||
164 | bessel_Y0_e x = createSFR "bessel_Y0_e" $ gsl_sf_bessel_Y0_e x | ||
165 | foreign import ccall "bessel.h gsl_sf_bessel_Y0_e" gsl_sf_bessel_Y0_e :: Double -> Ptr Double -> IO(Int) | ||
166 | |||
167 | -- | wrapper for double gsl_sf_bessel_Y0(double x); | ||
168 | -- | ||
169 | -- <http://www.google.com/search?q=gsl_sf_bessel_Y0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
170 | bessel_Y0 :: Double -> Double | ||
171 | bessel_Y0 = gsl_sf_bessel_Y0 | ||
172 | foreign import ccall "bessel.h gsl_sf_bessel_Y0" gsl_sf_bessel_Y0 :: Double -> Double | ||
173 | |||
174 | -- | wrapper for int gsl_sf_bessel_Y1_e(double x,gsl_sf_result* result); | ||
175 | -- | ||
176 | -- <http://www.google.com/search?q=gsl_sf_bessel_Y1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
177 | bessel_Y1_e :: Double -> (Double,Double) | ||
178 | bessel_Y1_e x = createSFR "bessel_Y1_e" $ gsl_sf_bessel_Y1_e x | ||
179 | foreign import ccall "bessel.h gsl_sf_bessel_Y1_e" gsl_sf_bessel_Y1_e :: Double -> Ptr Double -> IO(Int) | ||
180 | |||
181 | -- | wrapper for double gsl_sf_bessel_Y1(double x); | ||
182 | -- | ||
183 | -- <http://www.google.com/search?q=gsl_sf_bessel_Y1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
184 | bessel_Y1 :: Double -> Double | ||
185 | bessel_Y1 = gsl_sf_bessel_Y1 | ||
186 | foreign import ccall "bessel.h gsl_sf_bessel_Y1" gsl_sf_bessel_Y1 :: Double -> Double | ||
187 | |||
188 | -- | wrapper for int gsl_sf_bessel_Yn_e(int n,double x,gsl_sf_result* result); | ||
189 | -- | ||
190 | -- <http://www.google.com/search?q=gsl_sf_bessel_Yn_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
191 | bessel_Yn_e :: Int -> Double -> (Double,Double) | ||
192 | bessel_Yn_e n x = createSFR "bessel_Yn_e" $ gsl_sf_bessel_Yn_e n x | ||
193 | foreign import ccall "bessel.h gsl_sf_bessel_Yn_e" gsl_sf_bessel_Yn_e :: Int -> Double -> Ptr Double -> IO(Int) | ||
194 | |||
195 | -- | wrapper for double gsl_sf_bessel_Yn(int n,double x); | ||
196 | -- | ||
197 | -- <http://www.google.com/search?q=gsl_sf_bessel_Yn&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
198 | bessel_Yn :: Int -> Double -> Double | ||
199 | bessel_Yn = gsl_sf_bessel_Yn | ||
200 | foreign import ccall "bessel.h gsl_sf_bessel_Yn" gsl_sf_bessel_Yn :: Int -> Double -> Double | ||
201 | |||
202 | -- | wrapper for int gsl_sf_bessel_Yn_array(int nmin,int nmax,double x,double* result_array); | ||
203 | -- | ||
204 | -- <http://www.google.com/search?q=gsl_sf_bessel_Yn_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
205 | bessel_Yn_array :: Int -> Int -> Double -> Ptr Double -> Int | ||
206 | bessel_Yn_array = gsl_sf_bessel_Yn_array | ||
207 | foreign import ccall "bessel.h gsl_sf_bessel_Yn_array" gsl_sf_bessel_Yn_array :: Int -> Int -> Double -> Ptr Double -> Int | ||
208 | |||
209 | -- | wrapper for int gsl_sf_bessel_I0_e(double x,gsl_sf_result* result); | ||
210 | -- | ||
211 | -- <http://www.google.com/search?q=gsl_sf_bessel_I0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
212 | bessel_I0_e :: Double -> (Double,Double) | ||
213 | bessel_I0_e x = createSFR "bessel_I0_e" $ gsl_sf_bessel_I0_e x | ||
214 | foreign import ccall "bessel.h gsl_sf_bessel_I0_e" gsl_sf_bessel_I0_e :: Double -> Ptr Double -> IO(Int) | ||
215 | |||
216 | -- | wrapper for double gsl_sf_bessel_I0(double x); | ||
217 | -- | ||
218 | -- <http://www.google.com/search?q=gsl_sf_bessel_I0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
219 | bessel_I0 :: Double -> Double | ||
220 | bessel_I0 = gsl_sf_bessel_I0 | ||
221 | foreign import ccall "bessel.h gsl_sf_bessel_I0" gsl_sf_bessel_I0 :: Double -> Double | ||
222 | |||
223 | -- | wrapper for int gsl_sf_bessel_I1_e(double x,gsl_sf_result* result); | ||
224 | -- | ||
225 | -- <http://www.google.com/search?q=gsl_sf_bessel_I1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
226 | bessel_I1_e :: Double -> (Double,Double) | ||
227 | bessel_I1_e x = createSFR "bessel_I1_e" $ gsl_sf_bessel_I1_e x | ||
228 | foreign import ccall "bessel.h gsl_sf_bessel_I1_e" gsl_sf_bessel_I1_e :: Double -> Ptr Double -> IO(Int) | ||
229 | |||
230 | -- | wrapper for double gsl_sf_bessel_I1(double x); | ||
231 | -- | ||
232 | -- <http://www.google.com/search?q=gsl_sf_bessel_I1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
233 | bessel_I1 :: Double -> Double | ||
234 | bessel_I1 = gsl_sf_bessel_I1 | ||
235 | foreign import ccall "bessel.h gsl_sf_bessel_I1" gsl_sf_bessel_I1 :: Double -> Double | ||
236 | |||
237 | -- | wrapper for int gsl_sf_bessel_In_e(int n,double x,gsl_sf_result* result); | ||
238 | -- | ||
239 | -- <http://www.google.com/search?q=gsl_sf_bessel_In_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
240 | bessel_In_e :: Int -> Double -> (Double,Double) | ||
241 | bessel_In_e n x = createSFR "bessel_In_e" $ gsl_sf_bessel_In_e n x | ||
242 | foreign import ccall "bessel.h gsl_sf_bessel_In_e" gsl_sf_bessel_In_e :: Int -> Double -> Ptr Double -> IO(Int) | ||
243 | |||
244 | -- | wrapper for double gsl_sf_bessel_In(int n,double x); | ||
245 | -- | ||
246 | -- <http://www.google.com/search?q=gsl_sf_bessel_In&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
247 | bessel_In :: Int -> Double -> Double | ||
248 | bessel_In = gsl_sf_bessel_In | ||
249 | foreign import ccall "bessel.h gsl_sf_bessel_In" gsl_sf_bessel_In :: Int -> Double -> Double | ||
250 | |||
251 | -- | wrapper for int gsl_sf_bessel_In_array(int nmin,int nmax,double x,double* result_array); | ||
252 | -- | ||
253 | -- <http://www.google.com/search?q=gsl_sf_bessel_In_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
254 | bessel_In_array :: Int -> Int -> Double -> Ptr Double -> Int | ||
255 | bessel_In_array = gsl_sf_bessel_In_array | ||
256 | foreign import ccall "bessel.h gsl_sf_bessel_In_array" gsl_sf_bessel_In_array :: Int -> Int -> Double -> Ptr Double -> Int | ||
257 | |||
258 | -- | wrapper for int gsl_sf_bessel_I0_scaled_e(double x,gsl_sf_result* result); | ||
259 | -- | ||
260 | -- <http://www.google.com/search?q=gsl_sf_bessel_I0_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
261 | bessel_I0_scaled_e :: Double -> (Double,Double) | ||
262 | bessel_I0_scaled_e x = createSFR "bessel_I0_scaled_e" $ gsl_sf_bessel_I0_scaled_e x | ||
263 | foreign import ccall "bessel.h gsl_sf_bessel_I0_scaled_e" gsl_sf_bessel_I0_scaled_e :: Double -> Ptr Double -> IO(Int) | ||
264 | |||
265 | -- | wrapper for double gsl_sf_bessel_I0_scaled(double x); | ||
266 | -- | ||
267 | -- <http://www.google.com/search?q=gsl_sf_bessel_I0_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
268 | bessel_I0_scaled :: Double -> Double | ||
269 | bessel_I0_scaled = gsl_sf_bessel_I0_scaled | ||
270 | foreign import ccall "bessel.h gsl_sf_bessel_I0_scaled" gsl_sf_bessel_I0_scaled :: Double -> Double | ||
271 | |||
272 | -- | wrapper for int gsl_sf_bessel_I1_scaled_e(double x,gsl_sf_result* result); | ||
273 | -- | ||
274 | -- <http://www.google.com/search?q=gsl_sf_bessel_I1_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
275 | bessel_I1_scaled_e :: Double -> (Double,Double) | ||
276 | bessel_I1_scaled_e x = createSFR "bessel_I1_scaled_e" $ gsl_sf_bessel_I1_scaled_e x | ||
277 | foreign import ccall "bessel.h gsl_sf_bessel_I1_scaled_e" gsl_sf_bessel_I1_scaled_e :: Double -> Ptr Double -> IO(Int) | ||
278 | |||
279 | -- | wrapper for double gsl_sf_bessel_I1_scaled(double x); | ||
280 | -- | ||
281 | -- <http://www.google.com/search?q=gsl_sf_bessel_I1_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
282 | bessel_I1_scaled :: Double -> Double | ||
283 | bessel_I1_scaled = gsl_sf_bessel_I1_scaled | ||
284 | foreign import ccall "bessel.h gsl_sf_bessel_I1_scaled" gsl_sf_bessel_I1_scaled :: Double -> Double | ||
285 | |||
286 | -- | wrapper for int gsl_sf_bessel_In_scaled_e(int n,double x,gsl_sf_result* result); | ||
287 | -- | ||
288 | -- <http://www.google.com/search?q=gsl_sf_bessel_In_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
289 | bessel_In_scaled_e :: Int -> Double -> (Double,Double) | ||
290 | bessel_In_scaled_e n x = createSFR "bessel_In_scaled_e" $ gsl_sf_bessel_In_scaled_e n x | ||
291 | foreign import ccall "bessel.h gsl_sf_bessel_In_scaled_e" gsl_sf_bessel_In_scaled_e :: Int -> Double -> Ptr Double -> IO(Int) | ||
292 | |||
293 | -- | wrapper for double gsl_sf_bessel_In_scaled(int n,double x); | ||
294 | -- | ||
295 | -- <http://www.google.com/search?q=gsl_sf_bessel_In_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
296 | bessel_In_scaled :: Int -> Double -> Double | ||
297 | bessel_In_scaled = gsl_sf_bessel_In_scaled | ||
298 | foreign import ccall "bessel.h gsl_sf_bessel_In_scaled" gsl_sf_bessel_In_scaled :: Int -> Double -> Double | ||
299 | |||
300 | -- | wrapper for int gsl_sf_bessel_In_scaled_array(int nmin,int nmax,double x,double* result_array); | ||
301 | -- | ||
302 | -- <http://www.google.com/search?q=gsl_sf_bessel_In_scaled_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
303 | bessel_In_scaled_array :: Int -> Int -> Double -> Ptr Double -> Int | ||
304 | bessel_In_scaled_array = gsl_sf_bessel_In_scaled_array | ||
305 | foreign import ccall "bessel.h gsl_sf_bessel_In_scaled_array" gsl_sf_bessel_In_scaled_array :: Int -> Int -> Double -> Ptr Double -> Int | ||
306 | |||
307 | -- | wrapper for int gsl_sf_bessel_K0_e(double x,gsl_sf_result* result); | ||
308 | -- | ||
309 | -- <http://www.google.com/search?q=gsl_sf_bessel_K0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
310 | bessel_K0_e :: Double -> (Double,Double) | ||
311 | bessel_K0_e x = createSFR "bessel_K0_e" $ gsl_sf_bessel_K0_e x | ||
312 | foreign import ccall "bessel.h gsl_sf_bessel_K0_e" gsl_sf_bessel_K0_e :: Double -> Ptr Double -> IO(Int) | ||
313 | |||
314 | -- | wrapper for double gsl_sf_bessel_K0(double x); | ||
315 | -- | ||
316 | -- <http://www.google.com/search?q=gsl_sf_bessel_K0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
317 | bessel_K0 :: Double -> Double | ||
318 | bessel_K0 = gsl_sf_bessel_K0 | ||
319 | foreign import ccall "bessel.h gsl_sf_bessel_K0" gsl_sf_bessel_K0 :: Double -> Double | ||
320 | |||
321 | -- | wrapper for int gsl_sf_bessel_K1_e(double x,gsl_sf_result* result); | ||
322 | -- | ||
323 | -- <http://www.google.com/search?q=gsl_sf_bessel_K1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
324 | bessel_K1_e :: Double -> (Double,Double) | ||
325 | bessel_K1_e x = createSFR "bessel_K1_e" $ gsl_sf_bessel_K1_e x | ||
326 | foreign import ccall "bessel.h gsl_sf_bessel_K1_e" gsl_sf_bessel_K1_e :: Double -> Ptr Double -> IO(Int) | ||
327 | |||
328 | -- | wrapper for double gsl_sf_bessel_K1(double x); | ||
329 | -- | ||
330 | -- <http://www.google.com/search?q=gsl_sf_bessel_K1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
331 | bessel_K1 :: Double -> Double | ||
332 | bessel_K1 = gsl_sf_bessel_K1 | ||
333 | foreign import ccall "bessel.h gsl_sf_bessel_K1" gsl_sf_bessel_K1 :: Double -> Double | ||
334 | |||
335 | -- | wrapper for int gsl_sf_bessel_Kn_e(int n,double x,gsl_sf_result* result); | ||
336 | -- | ||
337 | -- <http://www.google.com/search?q=gsl_sf_bessel_Kn_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
338 | bessel_Kn_e :: Int -> Double -> (Double,Double) | ||
339 | bessel_Kn_e n x = createSFR "bessel_Kn_e" $ gsl_sf_bessel_Kn_e n x | ||
340 | foreign import ccall "bessel.h gsl_sf_bessel_Kn_e" gsl_sf_bessel_Kn_e :: Int -> Double -> Ptr Double -> IO(Int) | ||
341 | |||
342 | -- | wrapper for double gsl_sf_bessel_Kn(int n,double x); | ||
343 | -- | ||
344 | -- <http://www.google.com/search?q=gsl_sf_bessel_Kn&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
345 | bessel_Kn :: Int -> Double -> Double | ||
346 | bessel_Kn = gsl_sf_bessel_Kn | ||
347 | foreign import ccall "bessel.h gsl_sf_bessel_Kn" gsl_sf_bessel_Kn :: Int -> Double -> Double | ||
348 | |||
349 | -- | wrapper for int gsl_sf_bessel_Kn_array(int nmin,int nmax,double x,double* result_array); | ||
350 | -- | ||
351 | -- <http://www.google.com/search?q=gsl_sf_bessel_Kn_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
352 | bessel_Kn_array :: Int -> Int -> Double -> Ptr Double -> Int | ||
353 | bessel_Kn_array = gsl_sf_bessel_Kn_array | ||
354 | foreign import ccall "bessel.h gsl_sf_bessel_Kn_array" gsl_sf_bessel_Kn_array :: Int -> Int -> Double -> Ptr Double -> Int | ||
355 | |||
356 | -- | wrapper for int gsl_sf_bessel_K0_scaled_e(double x,gsl_sf_result* result); | ||
357 | -- | ||
358 | -- <http://www.google.com/search?q=gsl_sf_bessel_K0_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
359 | bessel_K0_scaled_e :: Double -> (Double,Double) | ||
360 | bessel_K0_scaled_e x = createSFR "bessel_K0_scaled_e" $ gsl_sf_bessel_K0_scaled_e x | ||
361 | foreign import ccall "bessel.h gsl_sf_bessel_K0_scaled_e" gsl_sf_bessel_K0_scaled_e :: Double -> Ptr Double -> IO(Int) | ||
362 | |||
363 | -- | wrapper for double gsl_sf_bessel_K0_scaled(double x); | ||
364 | -- | ||
365 | -- <http://www.google.com/search?q=gsl_sf_bessel_K0_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
366 | bessel_K0_scaled :: Double -> Double | ||
367 | bessel_K0_scaled = gsl_sf_bessel_K0_scaled | ||
368 | foreign import ccall "bessel.h gsl_sf_bessel_K0_scaled" gsl_sf_bessel_K0_scaled :: Double -> Double | ||
369 | |||
370 | -- | wrapper for int gsl_sf_bessel_K1_scaled_e(double x,gsl_sf_result* result); | ||
371 | -- | ||
372 | -- <http://www.google.com/search?q=gsl_sf_bessel_K1_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
373 | bessel_K1_scaled_e :: Double -> (Double,Double) | ||
374 | bessel_K1_scaled_e x = createSFR "bessel_K1_scaled_e" $ gsl_sf_bessel_K1_scaled_e x | ||
375 | foreign import ccall "bessel.h gsl_sf_bessel_K1_scaled_e" gsl_sf_bessel_K1_scaled_e :: Double -> Ptr Double -> IO(Int) | ||
376 | |||
377 | -- | wrapper for double gsl_sf_bessel_K1_scaled(double x); | ||
378 | -- | ||
379 | -- <http://www.google.com/search?q=gsl_sf_bessel_K1_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
380 | bessel_K1_scaled :: Double -> Double | ||
381 | bessel_K1_scaled = gsl_sf_bessel_K1_scaled | ||
382 | foreign import ccall "bessel.h gsl_sf_bessel_K1_scaled" gsl_sf_bessel_K1_scaled :: Double -> Double | ||
383 | |||
384 | -- | wrapper for int gsl_sf_bessel_Kn_scaled_e(int n,double x,gsl_sf_result* result); | ||
385 | -- | ||
386 | -- <http://www.google.com/search?q=gsl_sf_bessel_Kn_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
387 | bessel_Kn_scaled_e :: Int -> Double -> (Double,Double) | ||
388 | bessel_Kn_scaled_e n x = createSFR "bessel_Kn_scaled_e" $ gsl_sf_bessel_Kn_scaled_e n x | ||
389 | foreign import ccall "bessel.h gsl_sf_bessel_Kn_scaled_e" gsl_sf_bessel_Kn_scaled_e :: Int -> Double -> Ptr Double -> IO(Int) | ||
390 | |||
391 | -- | wrapper for double gsl_sf_bessel_Kn_scaled(int n,double x); | ||
392 | -- | ||
393 | -- <http://www.google.com/search?q=gsl_sf_bessel_Kn_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
394 | bessel_Kn_scaled :: Int -> Double -> Double | ||
395 | bessel_Kn_scaled = gsl_sf_bessel_Kn_scaled | ||
396 | foreign import ccall "bessel.h gsl_sf_bessel_Kn_scaled" gsl_sf_bessel_Kn_scaled :: Int -> Double -> Double | ||
397 | |||
398 | -- | wrapper for int gsl_sf_bessel_Kn_scaled_array(int nmin,int nmax,double x,double* result_array); | ||
399 | -- | ||
400 | -- <http://www.google.com/search?q=gsl_sf_bessel_Kn_scaled_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
401 | bessel_Kn_scaled_array :: Int -> Int -> Double -> Ptr Double -> Int | ||
402 | bessel_Kn_scaled_array = gsl_sf_bessel_Kn_scaled_array | ||
403 | foreign import ccall "bessel.h gsl_sf_bessel_Kn_scaled_array" gsl_sf_bessel_Kn_scaled_array :: Int -> Int -> Double -> Ptr Double -> Int | ||
404 | |||
405 | -- | wrapper for int gsl_sf_bessel_j0_e(double x,gsl_sf_result* result); | ||
406 | -- | ||
407 | -- <http://www.google.com/search?q=gsl_sf_bessel_j0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
408 | bessel_j0_e :: Double -> (Double,Double) | ||
409 | bessel_j0_e x = createSFR "bessel_j0_e" $ gsl_sf_bessel_j0_e x | ||
410 | foreign import ccall "bessel.h gsl_sf_bessel_j0_e" gsl_sf_bessel_j0_e :: Double -> Ptr Double -> IO(Int) | ||
411 | |||
412 | -- | wrapper for double gsl_sf_bessel_j0(double x); | ||
413 | -- | ||
414 | -- <http://www.google.com/search?q=gsl_sf_bessel_j0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
415 | bessel_j0 :: Double -> Double | ||
416 | bessel_j0 = gsl_sf_bessel_j0 | ||
417 | foreign import ccall "bessel.h gsl_sf_bessel_j0" gsl_sf_bessel_j0 :: Double -> Double | ||
418 | |||
419 | -- | wrapper for int gsl_sf_bessel_j1_e(double x,gsl_sf_result* result); | ||
420 | -- | ||
421 | -- <http://www.google.com/search?q=gsl_sf_bessel_j1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
422 | bessel_j1_e :: Double -> (Double,Double) | ||
423 | bessel_j1_e x = createSFR "bessel_j1_e" $ gsl_sf_bessel_j1_e x | ||
424 | foreign import ccall "bessel.h gsl_sf_bessel_j1_e" gsl_sf_bessel_j1_e :: Double -> Ptr Double -> IO(Int) | ||
425 | |||
426 | -- | wrapper for double gsl_sf_bessel_j1(double x); | ||
427 | -- | ||
428 | -- <http://www.google.com/search?q=gsl_sf_bessel_j1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
429 | bessel_j1 :: Double -> Double | ||
430 | bessel_j1 = gsl_sf_bessel_j1 | ||
431 | foreign import ccall "bessel.h gsl_sf_bessel_j1" gsl_sf_bessel_j1 :: Double -> Double | ||
432 | |||
433 | -- | wrapper for int gsl_sf_bessel_j2_e(double x,gsl_sf_result* result); | ||
434 | -- | ||
435 | -- <http://www.google.com/search?q=gsl_sf_bessel_j2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
436 | bessel_j2_e :: Double -> (Double,Double) | ||
437 | bessel_j2_e x = createSFR "bessel_j2_e" $ gsl_sf_bessel_j2_e x | ||
438 | foreign import ccall "bessel.h gsl_sf_bessel_j2_e" gsl_sf_bessel_j2_e :: Double -> Ptr Double -> IO(Int) | ||
439 | |||
440 | -- | wrapper for double gsl_sf_bessel_j2(double x); | ||
441 | -- | ||
442 | -- <http://www.google.com/search?q=gsl_sf_bessel_j2&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
443 | bessel_j2 :: Double -> Double | ||
444 | bessel_j2 = gsl_sf_bessel_j2 | ||
445 | foreign import ccall "bessel.h gsl_sf_bessel_j2" gsl_sf_bessel_j2 :: Double -> Double | ||
446 | |||
447 | -- | wrapper for int gsl_sf_bessel_jl_e(int l,double x,gsl_sf_result* result); | ||
448 | -- | ||
449 | -- <http://www.google.com/search?q=gsl_sf_bessel_jl_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
450 | bessel_jl_e :: Int -> Double -> (Double,Double) | ||
451 | bessel_jl_e l x = createSFR "bessel_jl_e" $ gsl_sf_bessel_jl_e l x | ||
452 | foreign import ccall "bessel.h gsl_sf_bessel_jl_e" gsl_sf_bessel_jl_e :: Int -> Double -> Ptr Double -> IO(Int) | ||
453 | |||
454 | -- | wrapper for double gsl_sf_bessel_jl(int l,double x); | ||
455 | -- | ||
456 | -- <http://www.google.com/search?q=gsl_sf_bessel_jl&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
457 | bessel_jl :: Int -> Double -> Double | ||
458 | bessel_jl = gsl_sf_bessel_jl | ||
459 | foreign import ccall "bessel.h gsl_sf_bessel_jl" gsl_sf_bessel_jl :: Int -> Double -> Double | ||
460 | |||
461 | -- | wrapper for int gsl_sf_bessel_jl_array(int lmax,double x,double* result_array); | ||
462 | -- | ||
463 | -- <http://www.google.com/search?q=gsl_sf_bessel_jl_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
464 | bessel_jl_array :: Int -> Double -> Ptr Double -> Int | ||
465 | bessel_jl_array = gsl_sf_bessel_jl_array | ||
466 | foreign import ccall "bessel.h gsl_sf_bessel_jl_array" gsl_sf_bessel_jl_array :: Int -> Double -> Ptr Double -> Int | ||
467 | |||
468 | -- | wrapper for int gsl_sf_bessel_jl_steed_array(int lmax,double x,double* jl_x_array); | ||
469 | -- | ||
470 | -- <http://www.google.com/search?q=gsl_sf_bessel_jl_steed_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
471 | bessel_jl_steed_array :: Int -> Double -> Ptr Double -> Int | ||
472 | bessel_jl_steed_array = gsl_sf_bessel_jl_steed_array | ||
473 | foreign import ccall "bessel.h gsl_sf_bessel_jl_steed_array" gsl_sf_bessel_jl_steed_array :: Int -> Double -> Ptr Double -> Int | ||
474 | |||
475 | -- | wrapper for int gsl_sf_bessel_y0_e(double x,gsl_sf_result* result); | ||
476 | -- | ||
477 | -- <http://www.google.com/search?q=gsl_sf_bessel_y0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
478 | bessel_y0_e :: Double -> (Double,Double) | ||
479 | bessel_y0_e x = createSFR "bessel_y0_e" $ gsl_sf_bessel_y0_e x | ||
480 | foreign import ccall "bessel.h gsl_sf_bessel_y0_e" gsl_sf_bessel_y0_e :: Double -> Ptr Double -> IO(Int) | ||
481 | |||
482 | -- | wrapper for double gsl_sf_bessel_y0(double x); | ||
483 | -- | ||
484 | -- <http://www.google.com/search?q=gsl_sf_bessel_y0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
485 | bessel_y0 :: Double -> Double | ||
486 | bessel_y0 = gsl_sf_bessel_y0 | ||
487 | foreign import ccall "bessel.h gsl_sf_bessel_y0" gsl_sf_bessel_y0 :: Double -> Double | ||
488 | |||
489 | -- | wrapper for int gsl_sf_bessel_y1_e(double x,gsl_sf_result* result); | ||
490 | -- | ||
491 | -- <http://www.google.com/search?q=gsl_sf_bessel_y1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
492 | bessel_y1_e :: Double -> (Double,Double) | ||
493 | bessel_y1_e x = createSFR "bessel_y1_e" $ gsl_sf_bessel_y1_e x | ||
494 | foreign import ccall "bessel.h gsl_sf_bessel_y1_e" gsl_sf_bessel_y1_e :: Double -> Ptr Double -> IO(Int) | ||
495 | |||
496 | -- | wrapper for double gsl_sf_bessel_y1(double x); | ||
497 | -- | ||
498 | -- <http://www.google.com/search?q=gsl_sf_bessel_y1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
499 | bessel_y1 :: Double -> Double | ||
500 | bessel_y1 = gsl_sf_bessel_y1 | ||
501 | foreign import ccall "bessel.h gsl_sf_bessel_y1" gsl_sf_bessel_y1 :: Double -> Double | ||
502 | |||
503 | -- | wrapper for int gsl_sf_bessel_y2_e(double x,gsl_sf_result* result); | ||
504 | -- | ||
505 | -- <http://www.google.com/search?q=gsl_sf_bessel_y2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
506 | bessel_y2_e :: Double -> (Double,Double) | ||
507 | bessel_y2_e x = createSFR "bessel_y2_e" $ gsl_sf_bessel_y2_e x | ||
508 | foreign import ccall "bessel.h gsl_sf_bessel_y2_e" gsl_sf_bessel_y2_e :: Double -> Ptr Double -> IO(Int) | ||
509 | |||
510 | -- | wrapper for double gsl_sf_bessel_y2(double x); | ||
511 | -- | ||
512 | -- <http://www.google.com/search?q=gsl_sf_bessel_y2&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
513 | bessel_y2 :: Double -> Double | ||
514 | bessel_y2 = gsl_sf_bessel_y2 | ||
515 | foreign import ccall "bessel.h gsl_sf_bessel_y2" gsl_sf_bessel_y2 :: Double -> Double | ||
516 | |||
517 | -- | wrapper for int gsl_sf_bessel_yl_e(int l,double x,gsl_sf_result* result); | ||
518 | -- | ||
519 | -- <http://www.google.com/search?q=gsl_sf_bessel_yl_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
520 | bessel_yl_e :: Int -> Double -> (Double,Double) | ||
521 | bessel_yl_e l x = createSFR "bessel_yl_e" $ gsl_sf_bessel_yl_e l x | ||
522 | foreign import ccall "bessel.h gsl_sf_bessel_yl_e" gsl_sf_bessel_yl_e :: Int -> Double -> Ptr Double -> IO(Int) | ||
523 | |||
524 | -- | wrapper for double gsl_sf_bessel_yl(int l,double x); | ||
525 | -- | ||
526 | -- <http://www.google.com/search?q=gsl_sf_bessel_yl&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
527 | bessel_yl :: Int -> Double -> Double | ||
528 | bessel_yl = gsl_sf_bessel_yl | ||
529 | foreign import ccall "bessel.h gsl_sf_bessel_yl" gsl_sf_bessel_yl :: Int -> Double -> Double | ||
530 | |||
531 | -- | wrapper for int gsl_sf_bessel_yl_array(int lmax,double x,double* result_array); | ||
532 | -- | ||
533 | -- <http://www.google.com/search?q=gsl_sf_bessel_yl_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
534 | bessel_yl_array :: Int -> Double -> Ptr Double -> Int | ||
535 | bessel_yl_array = gsl_sf_bessel_yl_array | ||
536 | foreign import ccall "bessel.h gsl_sf_bessel_yl_array" gsl_sf_bessel_yl_array :: Int -> Double -> Ptr Double -> Int | ||
537 | |||
538 | -- | wrapper for int gsl_sf_bessel_i0_scaled_e(double x,gsl_sf_result* result); | ||
539 | -- | ||
540 | -- <http://www.google.com/search?q=gsl_sf_bessel_i0_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
541 | bessel_i0_scaled_e :: Double -> (Double,Double) | ||
542 | bessel_i0_scaled_e x = createSFR "bessel_i0_scaled_e" $ gsl_sf_bessel_i0_scaled_e x | ||
543 | foreign import ccall "bessel.h gsl_sf_bessel_i0_scaled_e" gsl_sf_bessel_i0_scaled_e :: Double -> Ptr Double -> IO(Int) | ||
544 | |||
545 | -- | wrapper for double gsl_sf_bessel_i0_scaled(double x); | ||
546 | -- | ||
547 | -- <http://www.google.com/search?q=gsl_sf_bessel_i0_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
548 | bessel_i0_scaled :: Double -> Double | ||
549 | bessel_i0_scaled = gsl_sf_bessel_i0_scaled | ||
550 | foreign import ccall "bessel.h gsl_sf_bessel_i0_scaled" gsl_sf_bessel_i0_scaled :: Double -> Double | ||
551 | |||
552 | -- | wrapper for int gsl_sf_bessel_i1_scaled_e(double x,gsl_sf_result* result); | ||
553 | -- | ||
554 | -- <http://www.google.com/search?q=gsl_sf_bessel_i1_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
555 | bessel_i1_scaled_e :: Double -> (Double,Double) | ||
556 | bessel_i1_scaled_e x = createSFR "bessel_i1_scaled_e" $ gsl_sf_bessel_i1_scaled_e x | ||
557 | foreign import ccall "bessel.h gsl_sf_bessel_i1_scaled_e" gsl_sf_bessel_i1_scaled_e :: Double -> Ptr Double -> IO(Int) | ||
558 | |||
559 | -- | wrapper for double gsl_sf_bessel_i1_scaled(double x); | ||
560 | -- | ||
561 | -- <http://www.google.com/search?q=gsl_sf_bessel_i1_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
562 | bessel_i1_scaled :: Double -> Double | ||
563 | bessel_i1_scaled = gsl_sf_bessel_i1_scaled | ||
564 | foreign import ccall "bessel.h gsl_sf_bessel_i1_scaled" gsl_sf_bessel_i1_scaled :: Double -> Double | ||
565 | |||
566 | -- | wrapper for int gsl_sf_bessel_i2_scaled_e(double x,gsl_sf_result* result); | ||
567 | -- | ||
568 | -- <http://www.google.com/search?q=gsl_sf_bessel_i2_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
569 | bessel_i2_scaled_e :: Double -> (Double,Double) | ||
570 | bessel_i2_scaled_e x = createSFR "bessel_i2_scaled_e" $ gsl_sf_bessel_i2_scaled_e x | ||
571 | foreign import ccall "bessel.h gsl_sf_bessel_i2_scaled_e" gsl_sf_bessel_i2_scaled_e :: Double -> Ptr Double -> IO(Int) | ||
572 | |||
573 | -- | wrapper for double gsl_sf_bessel_i2_scaled(double x); | ||
574 | -- | ||
575 | -- <http://www.google.com/search?q=gsl_sf_bessel_i2_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
576 | bessel_i2_scaled :: Double -> Double | ||
577 | bessel_i2_scaled = gsl_sf_bessel_i2_scaled | ||
578 | foreign import ccall "bessel.h gsl_sf_bessel_i2_scaled" gsl_sf_bessel_i2_scaled :: Double -> Double | ||
579 | |||
580 | -- | wrapper for int gsl_sf_bessel_il_scaled_e(int l,double x,gsl_sf_result* result); | ||
581 | -- | ||
582 | -- <http://www.google.com/search?q=gsl_sf_bessel_il_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
583 | bessel_il_scaled_e :: Int -> Double -> (Double,Double) | ||
584 | bessel_il_scaled_e l x = createSFR "bessel_il_scaled_e" $ gsl_sf_bessel_il_scaled_e l x | ||
585 | foreign import ccall "bessel.h gsl_sf_bessel_il_scaled_e" gsl_sf_bessel_il_scaled_e :: Int -> Double -> Ptr Double -> IO(Int) | ||
586 | |||
587 | -- | wrapper for double gsl_sf_bessel_il_scaled(int l,double x); | ||
588 | -- | ||
589 | -- <http://www.google.com/search?q=gsl_sf_bessel_il_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
590 | bessel_il_scaled :: Int -> Double -> Double | ||
591 | bessel_il_scaled = gsl_sf_bessel_il_scaled | ||
592 | foreign import ccall "bessel.h gsl_sf_bessel_il_scaled" gsl_sf_bessel_il_scaled :: Int -> Double -> Double | ||
593 | |||
594 | -- | wrapper for int gsl_sf_bessel_il_scaled_array(int lmax,double x,double* result_array); | ||
595 | -- | ||
596 | -- <http://www.google.com/search?q=gsl_sf_bessel_il_scaled_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
597 | bessel_il_scaled_array :: Int -> Double -> Ptr Double -> Int | ||
598 | bessel_il_scaled_array = gsl_sf_bessel_il_scaled_array | ||
599 | foreign import ccall "bessel.h gsl_sf_bessel_il_scaled_array" gsl_sf_bessel_il_scaled_array :: Int -> Double -> Ptr Double -> Int | ||
600 | |||
601 | -- | wrapper for int gsl_sf_bessel_k0_scaled_e(double x,gsl_sf_result* result); | ||
602 | -- | ||
603 | -- <http://www.google.com/search?q=gsl_sf_bessel_k0_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
604 | bessel_k0_scaled_e :: Double -> (Double,Double) | ||
605 | bessel_k0_scaled_e x = createSFR "bessel_k0_scaled_e" $ gsl_sf_bessel_k0_scaled_e x | ||
606 | foreign import ccall "bessel.h gsl_sf_bessel_k0_scaled_e" gsl_sf_bessel_k0_scaled_e :: Double -> Ptr Double -> IO(Int) | ||
607 | |||
608 | -- | wrapper for double gsl_sf_bessel_k0_scaled(double x); | ||
609 | -- | ||
610 | -- <http://www.google.com/search?q=gsl_sf_bessel_k0_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
611 | bessel_k0_scaled :: Double -> Double | ||
612 | bessel_k0_scaled = gsl_sf_bessel_k0_scaled | ||
613 | foreign import ccall "bessel.h gsl_sf_bessel_k0_scaled" gsl_sf_bessel_k0_scaled :: Double -> Double | ||
614 | |||
615 | -- | wrapper for int gsl_sf_bessel_k1_scaled_e(double x,gsl_sf_result* result); | ||
616 | -- | ||
617 | -- <http://www.google.com/search?q=gsl_sf_bessel_k1_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
618 | bessel_k1_scaled_e :: Double -> (Double,Double) | ||
619 | bessel_k1_scaled_e x = createSFR "bessel_k1_scaled_e" $ gsl_sf_bessel_k1_scaled_e x | ||
620 | foreign import ccall "bessel.h gsl_sf_bessel_k1_scaled_e" gsl_sf_bessel_k1_scaled_e :: Double -> Ptr Double -> IO(Int) | ||
621 | |||
622 | -- | wrapper for double gsl_sf_bessel_k1_scaled(double x); | ||
623 | -- | ||
624 | -- <http://www.google.com/search?q=gsl_sf_bessel_k1_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
625 | bessel_k1_scaled :: Double -> Double | ||
626 | bessel_k1_scaled = gsl_sf_bessel_k1_scaled | ||
627 | foreign import ccall "bessel.h gsl_sf_bessel_k1_scaled" gsl_sf_bessel_k1_scaled :: Double -> Double | ||
628 | |||
629 | -- | wrapper for int gsl_sf_bessel_k2_scaled_e(double x,gsl_sf_result* result); | ||
630 | -- | ||
631 | -- <http://www.google.com/search?q=gsl_sf_bessel_k2_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
632 | bessel_k2_scaled_e :: Double -> (Double,Double) | ||
633 | bessel_k2_scaled_e x = createSFR "bessel_k2_scaled_e" $ gsl_sf_bessel_k2_scaled_e x | ||
634 | foreign import ccall "bessel.h gsl_sf_bessel_k2_scaled_e" gsl_sf_bessel_k2_scaled_e :: Double -> Ptr Double -> IO(Int) | ||
635 | |||
636 | -- | wrapper for double gsl_sf_bessel_k2_scaled(double x); | ||
637 | -- | ||
638 | -- <http://www.google.com/search?q=gsl_sf_bessel_k2_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
639 | bessel_k2_scaled :: Double -> Double | ||
640 | bessel_k2_scaled = gsl_sf_bessel_k2_scaled | ||
641 | foreign import ccall "bessel.h gsl_sf_bessel_k2_scaled" gsl_sf_bessel_k2_scaled :: Double -> Double | ||
642 | |||
643 | -- | wrapper for int gsl_sf_bessel_kl_scaled_e(int l,double x,gsl_sf_result* result); | ||
644 | -- | ||
645 | -- <http://www.google.com/search?q=gsl_sf_bessel_kl_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
646 | bessel_kl_scaled_e :: Int -> Double -> (Double,Double) | ||
647 | bessel_kl_scaled_e l x = createSFR "bessel_kl_scaled_e" $ gsl_sf_bessel_kl_scaled_e l x | ||
648 | foreign import ccall "bessel.h gsl_sf_bessel_kl_scaled_e" gsl_sf_bessel_kl_scaled_e :: Int -> Double -> Ptr Double -> IO(Int) | ||
649 | |||
650 | -- | wrapper for double gsl_sf_bessel_kl_scaled(int l,double x); | ||
651 | -- | ||
652 | -- <http://www.google.com/search?q=gsl_sf_bessel_kl_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
653 | bessel_kl_scaled :: Int -> Double -> Double | ||
654 | bessel_kl_scaled = gsl_sf_bessel_kl_scaled | ||
655 | foreign import ccall "bessel.h gsl_sf_bessel_kl_scaled" gsl_sf_bessel_kl_scaled :: Int -> Double -> Double | ||
656 | |||
657 | -- | wrapper for int gsl_sf_bessel_kl_scaled_array(int lmax,double x,double* result_array); | ||
658 | -- | ||
659 | -- <http://www.google.com/search?q=gsl_sf_bessel_kl_scaled_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
660 | bessel_kl_scaled_array :: Int -> Double -> Ptr Double -> Int | ||
661 | bessel_kl_scaled_array = gsl_sf_bessel_kl_scaled_array | ||
662 | foreign import ccall "bessel.h gsl_sf_bessel_kl_scaled_array" gsl_sf_bessel_kl_scaled_array :: Int -> Double -> Ptr Double -> Int | ||
663 | |||
664 | -- | wrapper for int gsl_sf_bessel_Jnu_e(double nu,double x,gsl_sf_result* result); | ||
665 | -- | ||
666 | -- <http://www.google.com/search?q=gsl_sf_bessel_Jnu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
667 | bessel_Jnu_e :: Double -> Double -> (Double,Double) | ||
668 | bessel_Jnu_e nu x = createSFR "bessel_Jnu_e" $ gsl_sf_bessel_Jnu_e nu x | ||
669 | foreign import ccall "bessel.h gsl_sf_bessel_Jnu_e" gsl_sf_bessel_Jnu_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
670 | |||
671 | -- | wrapper for double gsl_sf_bessel_Jnu(double nu,double x); | ||
672 | -- | ||
673 | -- <http://www.google.com/search?q=gsl_sf_bessel_Jnu&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
674 | bessel_Jnu :: Double -> Double -> Double | ||
675 | bessel_Jnu = gsl_sf_bessel_Jnu | ||
676 | foreign import ccall "bessel.h gsl_sf_bessel_Jnu" gsl_sf_bessel_Jnu :: Double -> Double -> Double | ||
677 | |||
678 | -- | wrapper for int gsl_sf_bessel_Ynu_e(double nu,double x,gsl_sf_result* result); | ||
679 | -- | ||
680 | -- <http://www.google.com/search?q=gsl_sf_bessel_Ynu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
681 | bessel_Ynu_e :: Double -> Double -> (Double,Double) | ||
682 | bessel_Ynu_e nu x = createSFR "bessel_Ynu_e" $ gsl_sf_bessel_Ynu_e nu x | ||
683 | foreign import ccall "bessel.h gsl_sf_bessel_Ynu_e" gsl_sf_bessel_Ynu_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
684 | |||
685 | -- | wrapper for double gsl_sf_bessel_Ynu(double nu,double x); | ||
686 | -- | ||
687 | -- <http://www.google.com/search?q=gsl_sf_bessel_Ynu&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
688 | bessel_Ynu :: Double -> Double -> Double | ||
689 | bessel_Ynu = gsl_sf_bessel_Ynu | ||
690 | foreign import ccall "bessel.h gsl_sf_bessel_Ynu" gsl_sf_bessel_Ynu :: Double -> Double -> Double | ||
691 | |||
692 | -- | wrapper for int gsl_sf_bessel_sequence_Jnu_e(double nu,gsl_mode_t mode,size_t size,double* v); | ||
693 | -- | ||
694 | -- <http://www.google.com/search?q=gsl_sf_bessel_sequence_Jnu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
695 | bessel_sequence_Jnu_e :: Double -> Precision -> Size_t -> Ptr Double -> Int | ||
696 | bessel_sequence_Jnu_e nu mode size v = gsl_sf_bessel_sequence_Jnu_e nu (precCode mode) size v | ||
697 | foreign import ccall "bessel.h gsl_sf_bessel_sequence_Jnu_e" gsl_sf_bessel_sequence_Jnu_e :: Double -> Gsl_mode_t -> Size_t -> Ptr Double -> Int | ||
698 | |||
699 | -- | wrapper for int gsl_sf_bessel_Inu_scaled_e(double nu,double x,gsl_sf_result* result); | ||
700 | -- | ||
701 | -- <http://www.google.com/search?q=gsl_sf_bessel_Inu_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
702 | bessel_Inu_scaled_e :: Double -> Double -> (Double,Double) | ||
703 | bessel_Inu_scaled_e nu x = createSFR "bessel_Inu_scaled_e" $ gsl_sf_bessel_Inu_scaled_e nu x | ||
704 | foreign import ccall "bessel.h gsl_sf_bessel_Inu_scaled_e" gsl_sf_bessel_Inu_scaled_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
705 | |||
706 | -- | wrapper for double gsl_sf_bessel_Inu_scaled(double nu,double x); | ||
707 | -- | ||
708 | -- <http://www.google.com/search?q=gsl_sf_bessel_Inu_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
709 | bessel_Inu_scaled :: Double -> Double -> Double | ||
710 | bessel_Inu_scaled = gsl_sf_bessel_Inu_scaled | ||
711 | foreign import ccall "bessel.h gsl_sf_bessel_Inu_scaled" gsl_sf_bessel_Inu_scaled :: Double -> Double -> Double | ||
712 | |||
713 | -- | wrapper for int gsl_sf_bessel_Inu_e(double nu,double x,gsl_sf_result* result); | ||
714 | -- | ||
715 | -- <http://www.google.com/search?q=gsl_sf_bessel_Inu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
716 | bessel_Inu_e :: Double -> Double -> (Double,Double) | ||
717 | bessel_Inu_e nu x = createSFR "bessel_Inu_e" $ gsl_sf_bessel_Inu_e nu x | ||
718 | foreign import ccall "bessel.h gsl_sf_bessel_Inu_e" gsl_sf_bessel_Inu_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
719 | |||
720 | -- | wrapper for double gsl_sf_bessel_Inu(double nu,double x); | ||
721 | -- | ||
722 | -- <http://www.google.com/search?q=gsl_sf_bessel_Inu&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
723 | bessel_Inu :: Double -> Double -> Double | ||
724 | bessel_Inu = gsl_sf_bessel_Inu | ||
725 | foreign import ccall "bessel.h gsl_sf_bessel_Inu" gsl_sf_bessel_Inu :: Double -> Double -> Double | ||
726 | |||
727 | -- | wrapper for int gsl_sf_bessel_Knu_scaled_e(double nu,double x,gsl_sf_result* result); | ||
728 | -- | ||
729 | -- <http://www.google.com/search?q=gsl_sf_bessel_Knu_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
730 | bessel_Knu_scaled_e :: Double -> Double -> (Double,Double) | ||
731 | bessel_Knu_scaled_e nu x = createSFR "bessel_Knu_scaled_e" $ gsl_sf_bessel_Knu_scaled_e nu x | ||
732 | foreign import ccall "bessel.h gsl_sf_bessel_Knu_scaled_e" gsl_sf_bessel_Knu_scaled_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
733 | |||
734 | -- | wrapper for double gsl_sf_bessel_Knu_scaled(double nu,double x); | ||
735 | -- | ||
736 | -- <http://www.google.com/search?q=gsl_sf_bessel_Knu_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
737 | bessel_Knu_scaled :: Double -> Double -> Double | ||
738 | bessel_Knu_scaled = gsl_sf_bessel_Knu_scaled | ||
739 | foreign import ccall "bessel.h gsl_sf_bessel_Knu_scaled" gsl_sf_bessel_Knu_scaled :: Double -> Double -> Double | ||
740 | |||
741 | -- | wrapper for int gsl_sf_bessel_Knu_e(double nu,double x,gsl_sf_result* result); | ||
742 | -- | ||
743 | -- <http://www.google.com/search?q=gsl_sf_bessel_Knu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
744 | bessel_Knu_e :: Double -> Double -> (Double,Double) | ||
745 | bessel_Knu_e nu x = createSFR "bessel_Knu_e" $ gsl_sf_bessel_Knu_e nu x | ||
746 | foreign import ccall "bessel.h gsl_sf_bessel_Knu_e" gsl_sf_bessel_Knu_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
747 | |||
748 | -- | wrapper for double gsl_sf_bessel_Knu(double nu,double x); | ||
749 | -- | ||
750 | -- <http://www.google.com/search?q=gsl_sf_bessel_Knu&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
751 | bessel_Knu :: Double -> Double -> Double | ||
752 | bessel_Knu = gsl_sf_bessel_Knu | ||
753 | foreign import ccall "bessel.h gsl_sf_bessel_Knu" gsl_sf_bessel_Knu :: Double -> Double -> Double | ||
754 | |||
755 | -- | wrapper for int gsl_sf_bessel_lnKnu_e(double nu,double x,gsl_sf_result* result); | ||
756 | -- | ||
757 | -- <http://www.google.com/search?q=gsl_sf_bessel_lnKnu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
758 | bessel_lnKnu_e :: Double -> Double -> (Double,Double) | ||
759 | bessel_lnKnu_e nu x = createSFR "bessel_lnKnu_e" $ gsl_sf_bessel_lnKnu_e nu x | ||
760 | foreign import ccall "bessel.h gsl_sf_bessel_lnKnu_e" gsl_sf_bessel_lnKnu_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
761 | |||
762 | -- | wrapper for double gsl_sf_bessel_lnKnu(double nu,double x); | ||
763 | -- | ||
764 | -- <http://www.google.com/search?q=gsl_sf_bessel_lnKnu&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
765 | bessel_lnKnu :: Double -> Double -> Double | ||
766 | bessel_lnKnu = gsl_sf_bessel_lnKnu | ||
767 | foreign import ccall "bessel.h gsl_sf_bessel_lnKnu" gsl_sf_bessel_lnKnu :: Double -> Double -> Double | ||
768 | |||
769 | -- | wrapper for int gsl_sf_bessel_zero_J0_e(int s,gsl_sf_result* result); | ||
770 | -- | ||
771 | -- <http://www.google.com/search?q=gsl_sf_bessel_zero_J0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
772 | bessel_zero_J0_e :: Int -> (Double,Double) | ||
773 | bessel_zero_J0_e s = createSFR "bessel_zero_J0_e" $ gsl_sf_bessel_zero_J0_e s | ||
774 | foreign import ccall "bessel.h gsl_sf_bessel_zero_J0_e" gsl_sf_bessel_zero_J0_e :: Int -> Ptr Double -> IO(Int) | ||
775 | |||
776 | -- | wrapper for double gsl_sf_bessel_zero_J0(int s); | ||
777 | -- | ||
778 | -- <http://www.google.com/search?q=gsl_sf_bessel_zero_J0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
779 | bessel_zero_J0 :: Int -> Double | ||
780 | bessel_zero_J0 = gsl_sf_bessel_zero_J0 | ||
781 | foreign import ccall "bessel.h gsl_sf_bessel_zero_J0" gsl_sf_bessel_zero_J0 :: Int -> Double | ||
782 | |||
783 | -- | wrapper for int gsl_sf_bessel_zero_J1_e(int s,gsl_sf_result* result); | ||
784 | -- | ||
785 | -- <http://www.google.com/search?q=gsl_sf_bessel_zero_J1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
786 | bessel_zero_J1_e :: Int -> (Double,Double) | ||
787 | bessel_zero_J1_e s = createSFR "bessel_zero_J1_e" $ gsl_sf_bessel_zero_J1_e s | ||
788 | foreign import ccall "bessel.h gsl_sf_bessel_zero_J1_e" gsl_sf_bessel_zero_J1_e :: Int -> Ptr Double -> IO(Int) | ||
789 | |||
790 | -- | wrapper for double gsl_sf_bessel_zero_J1(int s); | ||
791 | -- | ||
792 | -- <http://www.google.com/search?q=gsl_sf_bessel_zero_J1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
793 | bessel_zero_J1 :: Int -> Double | ||
794 | bessel_zero_J1 = gsl_sf_bessel_zero_J1 | ||
795 | foreign import ccall "bessel.h gsl_sf_bessel_zero_J1" gsl_sf_bessel_zero_J1 :: Int -> Double | ||
796 | |||
797 | -- | wrapper for int gsl_sf_bessel_zero_Jnu_e(double nu,int s,gsl_sf_result* result); | ||
798 | -- | ||
799 | -- <http://www.google.com/search?q=gsl_sf_bessel_zero_Jnu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
800 | bessel_zero_Jnu_e :: Double -> Int -> (Double,Double) | ||
801 | bessel_zero_Jnu_e nu s = createSFR "bessel_zero_Jnu_e" $ gsl_sf_bessel_zero_Jnu_e nu s | ||
802 | foreign import ccall "bessel.h gsl_sf_bessel_zero_Jnu_e" gsl_sf_bessel_zero_Jnu_e :: Double -> Int -> Ptr Double -> IO(Int) | ||
803 | |||
804 | -- | wrapper for double gsl_sf_bessel_zero_Jnu(double nu,int s); | ||
805 | -- | ||
806 | -- <http://www.google.com/search?q=gsl_sf_bessel_zero_Jnu&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
807 | bessel_zero_Jnu :: Double -> Int -> Double | ||
808 | bessel_zero_Jnu = gsl_sf_bessel_zero_Jnu | ||
809 | foreign import ccall "bessel.h gsl_sf_bessel_zero_Jnu" gsl_sf_bessel_zero_Jnu :: Double -> Int -> Double | ||
diff --git a/lib/GSL/Special/Clausen.hs b/lib/GSL/Special/Clausen.hs deleted file mode 100644 index 57c8878..0000000 --- a/lib/GSL/Special/Clausen.hs +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Clausen | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.google.com/search?q=gsl_sf_clausen.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Clausen( | ||
18 | clausen_e | ||
19 | , clausen | ||
20 | ) where | ||
21 | |||
22 | import Foreign(Ptr) | ||
23 | import GSL.Special.Internal | ||
24 | |||
25 | -- | wrapper for int gsl_sf_clausen_e(double x,gsl_sf_result* result); | ||
26 | -- | ||
27 | -- <http://www.google.com/search?q=gsl_sf_clausen_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
28 | clausen_e :: Double -> (Double,Double) | ||
29 | clausen_e x = createSFR "clausen_e" $ gsl_sf_clausen_e x | ||
30 | foreign import ccall "clausen.h gsl_sf_clausen_e" gsl_sf_clausen_e :: Double -> Ptr Double -> IO(Int) | ||
31 | |||
32 | -- | wrapper for double gsl_sf_clausen(double x); | ||
33 | -- | ||
34 | -- <http://www.google.com/search?q=gsl_sf_clausen&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
35 | clausen :: Double -> Double | ||
36 | clausen = gsl_sf_clausen | ||
37 | foreign import ccall "clausen.h gsl_sf_clausen" gsl_sf_clausen :: Double -> Double | ||
diff --git a/lib/GSL/Special/Coulomb.hs b/lib/GSL/Special/Coulomb.hs deleted file mode 100644 index a60b724..0000000 --- a/lib/GSL/Special/Coulomb.hs +++ /dev/null | |||
@@ -1,103 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Coulomb | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.google.com/search?q=gsl_sf_coulomb.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Coulomb( | ||
18 | hydrogenicR_1_e | ||
19 | , hydrogenicR_1 | ||
20 | , hydrogenicR_e | ||
21 | , hydrogenicR | ||
22 | , coulomb_CL_e | ||
23 | ) where | ||
24 | |||
25 | import Foreign(Ptr) | ||
26 | import GSL.Special.Internal | ||
27 | |||
28 | -- | wrapper for int gsl_sf_hydrogenicR_1_e(double Z,double r,gsl_sf_result* result); | ||
29 | -- | ||
30 | -- <http://www.google.com/search?q=gsl_sf_hydrogenicR_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
31 | hydrogenicR_1_e :: Double -> Double -> (Double,Double) | ||
32 | hydrogenicR_1_e zZ r = createSFR "hydrogenicR_1_e" $ gsl_sf_hydrogenicR_1_e zZ r | ||
33 | foreign import ccall "coulomb.h gsl_sf_hydrogenicR_1_e" gsl_sf_hydrogenicR_1_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
34 | |||
35 | -- | wrapper for double gsl_sf_hydrogenicR_1(double Z,double r); | ||
36 | -- | ||
37 | -- <http://www.google.com/search?q=gsl_sf_hydrogenicR_1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
38 | hydrogenicR_1 :: Double -> Double -> Double | ||
39 | hydrogenicR_1 = gsl_sf_hydrogenicR_1 | ||
40 | foreign import ccall "coulomb.h gsl_sf_hydrogenicR_1" gsl_sf_hydrogenicR_1 :: Double -> Double -> Double | ||
41 | |||
42 | -- | wrapper for int gsl_sf_hydrogenicR_e(int n,int l,double Z,double r,gsl_sf_result* result); | ||
43 | -- | ||
44 | -- <http://www.google.com/search?q=gsl_sf_hydrogenicR_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
45 | hydrogenicR_e :: Int -> Int -> Double -> Double -> (Double,Double) | ||
46 | hydrogenicR_e n l zZ r = createSFR "hydrogenicR_e" $ gsl_sf_hydrogenicR_e n l zZ r | ||
47 | foreign import ccall "coulomb.h gsl_sf_hydrogenicR_e" gsl_sf_hydrogenicR_e :: Int -> Int -> Double -> Double -> Ptr Double -> IO(Int) | ||
48 | |||
49 | -- | wrapper for double gsl_sf_hydrogenicR(int n,int l,double Z,double r); | ||
50 | -- | ||
51 | -- <http://www.google.com/search?q=gsl_sf_hydrogenicR&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
52 | hydrogenicR :: Int -> Int -> Double -> Double -> Double | ||
53 | hydrogenicR = gsl_sf_hydrogenicR | ||
54 | foreign import ccall "coulomb.h gsl_sf_hydrogenicR" gsl_sf_hydrogenicR :: Int -> Int -> Double -> Double -> Double | ||
55 | |||
56 | -- | wrapper for int gsl_sf_coulomb_wave_FG_e(double eta,double x,double lam_F,int k_lam_G,gsl_sf_result* F,gsl_sf_result* Fp,gsl_sf_result* G,gsl_sf_result* Gp,double* exp_F,double* exp_G); | ||
57 | -- | ||
58 | -- <http://www.google.com/search?q=gsl_sf_coulomb_wave_FG_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
59 | coulomb_wave_FG_e :: Double -> Double -> Double -> Int -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int | ||
60 | coulomb_wave_FG_e = gsl_sf_coulomb_wave_FG_e | ||
61 | foreign import ccall "coulomb.h gsl_sf_coulomb_wave_FG_e" gsl_sf_coulomb_wave_FG_e :: Double -> Double -> Double -> Int -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int | ||
62 | |||
63 | -- | wrapper for int gsl_sf_coulomb_wave_F_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent); | ||
64 | -- | ||
65 | -- <http://www.google.com/search?q=gsl_sf_coulomb_wave_F_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
66 | coulomb_wave_F_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Int | ||
67 | coulomb_wave_F_array = gsl_sf_coulomb_wave_F_array | ||
68 | foreign import ccall "coulomb.h gsl_sf_coulomb_wave_F_array" gsl_sf_coulomb_wave_F_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Int | ||
69 | |||
70 | -- | wrapper for int gsl_sf_coulomb_wave_FG_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* gc_array,double* F_exponent,double* G_exponent); | ||
71 | -- | ||
72 | -- <http://www.google.com/search?q=gsl_sf_coulomb_wave_FG_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
73 | coulomb_wave_FG_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int | ||
74 | coulomb_wave_FG_array = gsl_sf_coulomb_wave_FG_array | ||
75 | foreign import ccall "coulomb.h gsl_sf_coulomb_wave_FG_array" gsl_sf_coulomb_wave_FG_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int | ||
76 | |||
77 | -- | wrapper for int gsl_sf_coulomb_wave_FGp_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* fcp_array,double* gc_array,double* gcp_array,double* F_exponent,double* G_exponent); | ||
78 | -- | ||
79 | -- <http://www.google.com/search?q=gsl_sf_coulomb_wave_FGp_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
80 | coulomb_wave_FGp_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int | ||
81 | coulomb_wave_FGp_array = gsl_sf_coulomb_wave_FGp_array | ||
82 | foreign import ccall "coulomb.h gsl_sf_coulomb_wave_FGp_array" gsl_sf_coulomb_wave_FGp_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int | ||
83 | |||
84 | -- | wrapper for int gsl_sf_coulomb_wave_sphF_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent); | ||
85 | -- | ||
86 | -- <http://www.google.com/search?q=gsl_sf_coulomb_wave_sphF_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
87 | coulomb_wave_sphF_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Int | ||
88 | coulomb_wave_sphF_array = gsl_sf_coulomb_wave_sphF_array | ||
89 | foreign import ccall "coulomb.h gsl_sf_coulomb_wave_sphF_array" gsl_sf_coulomb_wave_sphF_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Int | ||
90 | |||
91 | -- | wrapper for int gsl_sf_coulomb_CL_e(double L,double eta,gsl_sf_result* result); | ||
92 | -- | ||
93 | -- <http://www.google.com/search?q=gsl_sf_coulomb_CL_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
94 | coulomb_CL_e :: Double -> Double -> (Double,Double) | ||
95 | coulomb_CL_e lL eta = createSFR "coulomb_CL_e" $ gsl_sf_coulomb_CL_e lL eta | ||
96 | foreign import ccall "coulomb.h gsl_sf_coulomb_CL_e" gsl_sf_coulomb_CL_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
97 | |||
98 | -- | wrapper for int gsl_sf_coulomb_CL_array(double Lmin,int kmax,double eta,double* cl); | ||
99 | -- | ||
100 | -- <http://www.google.com/search?q=gsl_sf_coulomb_CL_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
101 | coulomb_CL_array :: Double -> Int -> Double -> Ptr Double -> Int | ||
102 | coulomb_CL_array = gsl_sf_coulomb_CL_array | ||
103 | foreign import ccall "coulomb.h gsl_sf_coulomb_CL_array" gsl_sf_coulomb_CL_array :: Double -> Int -> Double -> Ptr Double -> Int | ||
diff --git a/lib/GSL/Special/Coupling.hs b/lib/GSL/Special/Coupling.hs deleted file mode 100644 index fb949d1..0000000 --- a/lib/GSL/Special/Coupling.hs +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Coupling | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.gnu.org/software/gsl/manual/html_node/Coupling-Coefficients.html> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Coupling( | ||
18 | coupling_3j_e | ||
19 | , coupling_3j | ||
20 | , coupling_6j_e | ||
21 | , coupling_6j | ||
22 | , coupling_RacahW_e | ||
23 | , coupling_RacahW | ||
24 | , coupling_9j_e | ||
25 | , coupling_9j | ||
26 | -- , coupling_6j_INCORRECT_e | ||
27 | -- , coupling_6j_INCORRECT | ||
28 | ) where | ||
29 | |||
30 | import Foreign(Ptr) | ||
31 | import GSL.Special.Internal | ||
32 | |||
33 | -- | wrapper for int gsl_sf_coupling_3j_e(int two_ja,int two_jb,int two_jc,int two_ma,int two_mb,int two_mc,gsl_sf_result* result); | ||
34 | coupling_3j_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double) | ||
35 | coupling_3j_e two_ja two_jb two_jc two_ma two_mb two_mc = createSFR "coupling_3j_e" $ gsl_sf_coupling_3j_e two_ja two_jb two_jc two_ma two_mb two_mc | ||
36 | foreign import ccall "coupling.h gsl_sf_coupling_3j_e" gsl_sf_coupling_3j_e :: Int -> Int -> Int -> Int -> Int -> Int -> Ptr Double -> IO(Int) | ||
37 | |||
38 | -- | wrapper for double gsl_sf_coupling_3j(int two_ja,int two_jb,int two_jc,int two_ma,int two_mb,int two_mc); | ||
39 | coupling_3j :: Int -> Int -> Int -> Int -> Int -> Int -> Double | ||
40 | coupling_3j = gsl_sf_coupling_3j | ||
41 | foreign import ccall "coupling.h gsl_sf_coupling_3j" gsl_sf_coupling_3j :: Int -> Int -> Int -> Int -> Int -> Int -> Double | ||
42 | |||
43 | -- | wrapper for int gsl_sf_coupling_6j_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,gsl_sf_result* result); | ||
44 | coupling_6j_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double) | ||
45 | coupling_6j_e two_ja two_jb two_jc two_jd two_je two_jf = createSFR "coupling_6j_e" $ gsl_sf_coupling_6j_e two_ja two_jb two_jc two_jd two_je two_jf | ||
46 | foreign import ccall "coupling.h gsl_sf_coupling_6j_e" gsl_sf_coupling_6j_e :: Int -> Int -> Int -> Int -> Int -> Int -> Ptr Double -> IO(Int) | ||
47 | |||
48 | -- | wrapper for double gsl_sf_coupling_6j(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf); | ||
49 | coupling_6j :: Int -> Int -> Int -> Int -> Int -> Int -> Double | ||
50 | coupling_6j = gsl_sf_coupling_6j | ||
51 | foreign import ccall "coupling.h gsl_sf_coupling_6j" gsl_sf_coupling_6j :: Int -> Int -> Int -> Int -> Int -> Int -> Double | ||
52 | |||
53 | -- | wrapper for int gsl_sf_coupling_RacahW_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,gsl_sf_result* result); | ||
54 | coupling_RacahW_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double) | ||
55 | coupling_RacahW_e two_ja two_jb two_jc two_jd two_je two_jf = createSFR "coupling_RacahW_e" $ gsl_sf_coupling_RacahW_e two_ja two_jb two_jc two_jd two_je two_jf | ||
56 | foreign import ccall "coupling.h gsl_sf_coupling_RacahW_e" gsl_sf_coupling_RacahW_e :: Int -> Int -> Int -> Int -> Int -> Int -> Ptr Double -> IO(Int) | ||
57 | |||
58 | -- | wrapper for double gsl_sf_coupling_RacahW(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf); | ||
59 | coupling_RacahW :: Int -> Int -> Int -> Int -> Int -> Int -> Double | ||
60 | coupling_RacahW = gsl_sf_coupling_RacahW | ||
61 | foreign import ccall "coupling.h gsl_sf_coupling_RacahW" gsl_sf_coupling_RacahW :: Int -> Int -> Int -> Int -> Int -> Int -> Double | ||
62 | |||
63 | -- | wrapper for int gsl_sf_coupling_9j_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,int two_jg,int two_jh,int two_ji,gsl_sf_result* result); | ||
64 | coupling_9j_e :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double) | ||
65 | coupling_9j_e two_ja two_jb two_jc two_jd two_je two_jf two_jg two_jh two_ji = createSFR "coupling_9j_e" $ gsl_sf_coupling_9j_e two_ja two_jb two_jc two_jd two_je two_jf two_jg two_jh two_ji | ||
66 | foreign import ccall "coupling.h gsl_sf_coupling_9j_e" gsl_sf_coupling_9j_e :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Ptr Double -> IO(Int) | ||
67 | |||
68 | -- | wrapper for double gsl_sf_coupling_9j(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,int two_jg,int two_jh,int two_ji); | ||
69 | coupling_9j :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Double | ||
70 | coupling_9j = gsl_sf_coupling_9j | ||
71 | foreign import ccall "coupling.h gsl_sf_coupling_9j" gsl_sf_coupling_9j :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Double | ||
72 | |||
73 | -- | wrapper for int gsl_sf_coupling_6j_INCORRECT_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,gsl_sf_result* result); | ||
74 | coupling_6j_INCORRECT_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double) | ||
75 | coupling_6j_INCORRECT_e two_ja two_jb two_jc two_jd two_je two_jf = createSFR "coupling_6j_INCORRECT_e" $ gsl_sf_coupling_6j_INCORRECT_e two_ja two_jb two_jc two_jd two_je two_jf | ||
76 | foreign import ccall "coupling.h gsl_sf_coupling_6j_INCORRECT_e" gsl_sf_coupling_6j_INCORRECT_e :: Int -> Int -> Int -> Int -> Int -> Int -> Ptr Double -> IO(Int) | ||
77 | |||
78 | -- | wrapper for double gsl_sf_coupling_6j_INCORRECT(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf); | ||
79 | coupling_6j_INCORRECT :: Int -> Int -> Int -> Int -> Int -> Int -> Double | ||
80 | coupling_6j_INCORRECT = gsl_sf_coupling_6j_INCORRECT | ||
81 | foreign import ccall "coupling.h gsl_sf_coupling_6j_INCORRECT" gsl_sf_coupling_6j_INCORRECT :: Int -> Int -> Int -> Int -> Int -> Int -> Double | ||
diff --git a/lib/GSL/Special/Dawson.hs b/lib/GSL/Special/Dawson.hs deleted file mode 100644 index 69d0127..0000000 --- a/lib/GSL/Special/Dawson.hs +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Dawson | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.google.com/search?q=gsl_sf_dawson.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Dawson( | ||
18 | dawson_e | ||
19 | , dawson | ||
20 | ) where | ||
21 | |||
22 | import Foreign(Ptr) | ||
23 | import GSL.Special.Internal | ||
24 | |||
25 | -- | wrapper for int gsl_sf_dawson_e(double x,gsl_sf_result* result); | ||
26 | -- | ||
27 | -- <http://www.google.com/search?q=gsl_sf_dawson_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
28 | dawson_e :: Double -> (Double,Double) | ||
29 | dawson_e x = createSFR "dawson_e" $ gsl_sf_dawson_e x | ||
30 | foreign import ccall "dawson.h gsl_sf_dawson_e" gsl_sf_dawson_e :: Double -> Ptr Double -> IO(Int) | ||
31 | |||
32 | -- | wrapper for double gsl_sf_dawson(double x); | ||
33 | -- | ||
34 | -- <http://www.google.com/search?q=gsl_sf_dawson&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
35 | dawson :: Double -> Double | ||
36 | dawson = gsl_sf_dawson | ||
37 | foreign import ccall "dawson.h gsl_sf_dawson" gsl_sf_dawson :: Double -> Double | ||
diff --git a/lib/GSL/Special/Debye.hs b/lib/GSL/Special/Debye.hs deleted file mode 100644 index 55f5158..0000000 --- a/lib/GSL/Special/Debye.hs +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Debye | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.google.com/search?q=gsl_sf_debye.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Debye( | ||
18 | debye_1_e | ||
19 | , debye_1 | ||
20 | , debye_2_e | ||
21 | , debye_2 | ||
22 | , debye_3_e | ||
23 | , debye_3 | ||
24 | , debye_4_e | ||
25 | , debye_4 | ||
26 | ) where | ||
27 | |||
28 | import Foreign(Ptr) | ||
29 | import GSL.Special.Internal | ||
30 | |||
31 | -- | wrapper for int gsl_sf_debye_1_e(double x,gsl_sf_result* result); | ||
32 | -- | ||
33 | -- <http://www.google.com/search?q=gsl_sf_debye_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
34 | debye_1_e :: Double -> (Double,Double) | ||
35 | debye_1_e x = createSFR "debye_1_e" $ gsl_sf_debye_1_e x | ||
36 | foreign import ccall "debye.h gsl_sf_debye_1_e" gsl_sf_debye_1_e :: Double -> Ptr Double -> IO(Int) | ||
37 | |||
38 | -- | wrapper for double gsl_sf_debye_1(double x); | ||
39 | -- | ||
40 | -- <http://www.google.com/search?q=gsl_sf_debye_1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
41 | debye_1 :: Double -> Double | ||
42 | debye_1 = gsl_sf_debye_1 | ||
43 | foreign import ccall "debye.h gsl_sf_debye_1" gsl_sf_debye_1 :: Double -> Double | ||
44 | |||
45 | -- | wrapper for int gsl_sf_debye_2_e(double x,gsl_sf_result* result); | ||
46 | -- | ||
47 | -- <http://www.google.com/search?q=gsl_sf_debye_2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
48 | debye_2_e :: Double -> (Double,Double) | ||
49 | debye_2_e x = createSFR "debye_2_e" $ gsl_sf_debye_2_e x | ||
50 | foreign import ccall "debye.h gsl_sf_debye_2_e" gsl_sf_debye_2_e :: Double -> Ptr Double -> IO(Int) | ||
51 | |||
52 | -- | wrapper for double gsl_sf_debye_2(double x); | ||
53 | -- | ||
54 | -- <http://www.google.com/search?q=gsl_sf_debye_2&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
55 | debye_2 :: Double -> Double | ||
56 | debye_2 = gsl_sf_debye_2 | ||
57 | foreign import ccall "debye.h gsl_sf_debye_2" gsl_sf_debye_2 :: Double -> Double | ||
58 | |||
59 | -- | wrapper for int gsl_sf_debye_3_e(double x,gsl_sf_result* result); | ||
60 | -- | ||
61 | -- <http://www.google.com/search?q=gsl_sf_debye_3_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
62 | debye_3_e :: Double -> (Double,Double) | ||
63 | debye_3_e x = createSFR "debye_3_e" $ gsl_sf_debye_3_e x | ||
64 | foreign import ccall "debye.h gsl_sf_debye_3_e" gsl_sf_debye_3_e :: Double -> Ptr Double -> IO(Int) | ||
65 | |||
66 | -- | wrapper for double gsl_sf_debye_3(double x); | ||
67 | -- | ||
68 | -- <http://www.google.com/search?q=gsl_sf_debye_3&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
69 | debye_3 :: Double -> Double | ||
70 | debye_3 = gsl_sf_debye_3 | ||
71 | foreign import ccall "debye.h gsl_sf_debye_3" gsl_sf_debye_3 :: Double -> Double | ||
72 | |||
73 | -- | wrapper for int gsl_sf_debye_4_e(double x,gsl_sf_result* result); | ||
74 | -- | ||
75 | -- <http://www.google.com/search?q=gsl_sf_debye_4_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
76 | debye_4_e :: Double -> (Double,Double) | ||
77 | debye_4_e x = createSFR "debye_4_e" $ gsl_sf_debye_4_e x | ||
78 | foreign import ccall "debye.h gsl_sf_debye_4_e" gsl_sf_debye_4_e :: Double -> Ptr Double -> IO(Int) | ||
79 | |||
80 | -- | wrapper for double gsl_sf_debye_4(double x); | ||
81 | -- | ||
82 | -- <http://www.google.com/search?q=gsl_sf_debye_4&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
83 | debye_4 :: Double -> Double | ||
84 | debye_4 = gsl_sf_debye_4 | ||
85 | foreign import ccall "debye.h gsl_sf_debye_4" gsl_sf_debye_4 :: Double -> Double | ||
diff --git a/lib/GSL/Special/Dilog.hs b/lib/GSL/Special/Dilog.hs deleted file mode 100644 index 5575895..0000000 --- a/lib/GSL/Special/Dilog.hs +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Dilog | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.google.com/search?q=gsl_sf_dilog.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Dilog( | ||
18 | dilog_e | ||
19 | , dilog | ||
20 | ) where | ||
21 | |||
22 | import Foreign(Ptr) | ||
23 | import GSL.Special.Internal | ||
24 | |||
25 | -- | wrapper for int gsl_sf_dilog_e(double x,gsl_sf_result* result); | ||
26 | -- | ||
27 | -- <http://www.google.com/search?q=gsl_sf_dilog_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
28 | dilog_e :: Double -> (Double,Double) | ||
29 | dilog_e x = createSFR "dilog_e" $ gsl_sf_dilog_e x | ||
30 | foreign import ccall "dilog.h gsl_sf_dilog_e" gsl_sf_dilog_e :: Double -> Ptr Double -> IO(Int) | ||
31 | |||
32 | -- | wrapper for double gsl_sf_dilog(double x); | ||
33 | -- | ||
34 | -- <http://www.google.com/search?q=gsl_sf_dilog&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
35 | dilog :: Double -> Double | ||
36 | dilog = gsl_sf_dilog | ||
37 | foreign import ccall "dilog.h gsl_sf_dilog" gsl_sf_dilog :: Double -> Double | ||
38 | |||
39 | -- | wrapper for int gsl_sf_complex_dilog_xy_e(double x,double y,gsl_sf_result* result_re,gsl_sf_result* result_im); | ||
40 | -- | ||
41 | -- <http://www.google.com/search?q=gsl_sf_complex_dilog_xy_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
42 | complex_dilog_xy_e :: Double -> Double -> Ptr Double -> (Double,Double) | ||
43 | complex_dilog_xy_e x y result_re = createSFR "complex_dilog_xy_e" $ gsl_sf_complex_dilog_xy_e x y result_re | ||
44 | foreign import ccall "dilog.h gsl_sf_complex_dilog_xy_e" gsl_sf_complex_dilog_xy_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) | ||
45 | |||
46 | -- | wrapper for int gsl_sf_complex_dilog_e(double r,double theta,gsl_sf_result* result_re,gsl_sf_result* result_im); | ||
47 | -- | ||
48 | -- <http://www.google.com/search?q=gsl_sf_complex_dilog_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
49 | complex_dilog_e :: Double -> Double -> Ptr Double -> (Double,Double) | ||
50 | complex_dilog_e r theta result_re = createSFR "complex_dilog_e" $ gsl_sf_complex_dilog_e r theta result_re | ||
51 | foreign import ccall "dilog.h gsl_sf_complex_dilog_e" gsl_sf_complex_dilog_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) | ||
52 | |||
53 | -- | wrapper for int gsl_sf_complex_spence_xy_e(double x,double y,gsl_sf_result* real_sp,gsl_sf_result* imag_sp); | ||
54 | -- | ||
55 | -- <http://www.google.com/search?q=gsl_sf_complex_spence_xy_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
56 | complex_spence_xy_e :: Double -> Double -> Ptr Double -> (Double,Double) | ||
57 | complex_spence_xy_e x y real_sp = createSFR "complex_spence_xy_e" $ gsl_sf_complex_spence_xy_e x y real_sp | ||
58 | foreign import ccall "dilog.h gsl_sf_complex_spence_xy_e" gsl_sf_complex_spence_xy_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) | ||
diff --git a/lib/GSL/Special/Elementary.hs b/lib/GSL/Special/Elementary.hs deleted file mode 100644 index da927a2..0000000 --- a/lib/GSL/Special/Elementary.hs +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Elementary | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.google.com/search?q=gsl_sf_elementary.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Elementary( | ||
18 | multiply_e | ||
19 | , multiply | ||
20 | , multiply_err_e | ||
21 | ) where | ||
22 | |||
23 | import Foreign(Ptr) | ||
24 | import GSL.Special.Internal | ||
25 | |||
26 | -- | wrapper for int gsl_sf_multiply_e(double x,double y,gsl_sf_result* result); | ||
27 | -- | ||
28 | -- <http://www.google.com/search?q=gsl_sf_multiply_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
29 | multiply_e :: Double -> Double -> (Double,Double) | ||
30 | multiply_e x y = createSFR "multiply_e" $ gsl_sf_multiply_e x y | ||
31 | foreign import ccall "elementary.h gsl_sf_multiply_e" gsl_sf_multiply_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
32 | |||
33 | -- | wrapper for double gsl_sf_multiply(double x,double y); | ||
34 | -- | ||
35 | -- <http://www.google.com/search?q=gsl_sf_multiply&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
36 | multiply :: Double -> Double -> Double | ||
37 | multiply = gsl_sf_multiply | ||
38 | foreign import ccall "elementary.h gsl_sf_multiply" gsl_sf_multiply :: Double -> Double -> Double | ||
39 | |||
40 | -- | wrapper for int gsl_sf_multiply_err_e(double x,double dx,double y,double dy,gsl_sf_result* result); | ||
41 | -- | ||
42 | -- <http://www.google.com/search?q=gsl_sf_multiply_err_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
43 | multiply_err_e :: Double -> Double -> Double -> Double -> (Double,Double) | ||
44 | multiply_err_e x dx y dy = createSFR "multiply_err_e" $ gsl_sf_multiply_err_e x dx y dy | ||
45 | foreign import ccall "elementary.h gsl_sf_multiply_err_e" gsl_sf_multiply_err_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int) | ||
diff --git a/lib/GSL/Special/Ellint.hs b/lib/GSL/Special/Ellint.hs deleted file mode 100644 index dddbe21..0000000 --- a/lib/GSL/Special/Ellint.hs +++ /dev/null | |||
@@ -1,181 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Ellint | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.google.com/search?q=gsl_sf_ellint.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Ellint( | ||
18 | ellint_Kcomp_e | ||
19 | , ellint_Kcomp | ||
20 | , ellint_Ecomp_e | ||
21 | , ellint_Ecomp | ||
22 | , ellint_F_e | ||
23 | , ellint_F | ||
24 | , ellint_E_e | ||
25 | , ellint_E | ||
26 | , ellint_P_e | ||
27 | , ellint_P | ||
28 | , ellint_D_e | ||
29 | , ellint_D | ||
30 | , ellint_RC_e | ||
31 | , ellint_RC | ||
32 | , ellint_RD_e | ||
33 | , ellint_RD | ||
34 | , ellint_RF_e | ||
35 | , ellint_RF | ||
36 | , ellint_RJ_e | ||
37 | , ellint_RJ | ||
38 | ) where | ||
39 | |||
40 | import Foreign(Ptr) | ||
41 | import GSL.Special.Internal | ||
42 | |||
43 | -- | wrapper for int gsl_sf_ellint_Kcomp_e(double k,gsl_mode_t mode,gsl_sf_result* result); | ||
44 | -- | ||
45 | -- <http://www.google.com/search?q=gsl_sf_ellint_Kcomp_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
46 | ellint_Kcomp_e :: Double -> Precision -> (Double,Double) | ||
47 | ellint_Kcomp_e k mode = createSFR "ellint_Kcomp_e" $ gsl_sf_ellint_Kcomp_e k (precCode mode) | ||
48 | foreign import ccall "ellint.h gsl_sf_ellint_Kcomp_e" gsl_sf_ellint_Kcomp_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int) | ||
49 | |||
50 | -- | wrapper for double gsl_sf_ellint_Kcomp(double k,gsl_mode_t mode); | ||
51 | -- | ||
52 | -- <http://www.google.com/search?q=gsl_sf_ellint_Kcomp&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
53 | ellint_Kcomp :: Double -> Precision -> Double | ||
54 | ellint_Kcomp k mode = gsl_sf_ellint_Kcomp k (precCode mode) | ||
55 | foreign import ccall "ellint.h gsl_sf_ellint_Kcomp" gsl_sf_ellint_Kcomp :: Double -> Gsl_mode_t -> Double | ||
56 | |||
57 | -- | wrapper for int gsl_sf_ellint_Ecomp_e(double k,gsl_mode_t mode,gsl_sf_result* result); | ||
58 | -- | ||
59 | -- <http://www.google.com/search?q=gsl_sf_ellint_Ecomp_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
60 | ellint_Ecomp_e :: Double -> Precision -> (Double,Double) | ||
61 | ellint_Ecomp_e k mode = createSFR "ellint_Ecomp_e" $ gsl_sf_ellint_Ecomp_e k (precCode mode) | ||
62 | foreign import ccall "ellint.h gsl_sf_ellint_Ecomp_e" gsl_sf_ellint_Ecomp_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int) | ||
63 | |||
64 | -- | wrapper for double gsl_sf_ellint_Ecomp(double k,gsl_mode_t mode); | ||
65 | -- | ||
66 | -- <http://www.google.com/search?q=gsl_sf_ellint_Ecomp&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
67 | ellint_Ecomp :: Double -> Precision -> Double | ||
68 | ellint_Ecomp k mode = gsl_sf_ellint_Ecomp k (precCode mode) | ||
69 | foreign import ccall "ellint.h gsl_sf_ellint_Ecomp" gsl_sf_ellint_Ecomp :: Double -> Gsl_mode_t -> Double | ||
70 | |||
71 | -- | wrapper for int gsl_sf_ellint_F_e(double phi,double k,gsl_mode_t mode,gsl_sf_result* result); | ||
72 | -- | ||
73 | -- <http://www.google.com/search?q=gsl_sf_ellint_F_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
74 | ellint_F_e :: Double -> Double -> Precision -> (Double,Double) | ||
75 | ellint_F_e phi k mode = createSFR "ellint_F_e" $ gsl_sf_ellint_F_e phi k (precCode mode) | ||
76 | foreign import ccall "ellint.h gsl_sf_ellint_F_e" gsl_sf_ellint_F_e :: Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) | ||
77 | |||
78 | -- | wrapper for double gsl_sf_ellint_F(double phi,double k,gsl_mode_t mode); | ||
79 | -- | ||
80 | -- <http://www.google.com/search?q=gsl_sf_ellint_F&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
81 | ellint_F :: Double -> Double -> Precision -> Double | ||
82 | ellint_F phi k mode = gsl_sf_ellint_F phi k (precCode mode) | ||
83 | foreign import ccall "ellint.h gsl_sf_ellint_F" gsl_sf_ellint_F :: Double -> Double -> Gsl_mode_t -> Double | ||
84 | |||
85 | -- | wrapper for int gsl_sf_ellint_E_e(double phi,double k,gsl_mode_t mode,gsl_sf_result* result); | ||
86 | -- | ||
87 | -- <http://www.google.com/search?q=gsl_sf_ellint_E_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
88 | ellint_E_e :: Double -> Double -> Precision -> (Double,Double) | ||
89 | ellint_E_e phi k mode = createSFR "ellint_E_e" $ gsl_sf_ellint_E_e phi k (precCode mode) | ||
90 | foreign import ccall "ellint.h gsl_sf_ellint_E_e" gsl_sf_ellint_E_e :: Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) | ||
91 | |||
92 | -- | wrapper for double gsl_sf_ellint_E(double phi,double k,gsl_mode_t mode); | ||
93 | -- | ||
94 | -- <http://www.google.com/search?q=gsl_sf_ellint_E&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
95 | ellint_E :: Double -> Double -> Precision -> Double | ||
96 | ellint_E phi k mode = gsl_sf_ellint_E phi k (precCode mode) | ||
97 | foreign import ccall "ellint.h gsl_sf_ellint_E" gsl_sf_ellint_E :: Double -> Double -> Gsl_mode_t -> Double | ||
98 | |||
99 | -- | wrapper for int gsl_sf_ellint_P_e(double phi,double k,double n,gsl_mode_t mode,gsl_sf_result* result); | ||
100 | -- | ||
101 | -- <http://www.google.com/search?q=gsl_sf_ellint_P_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
102 | ellint_P_e :: Double -> Double -> Double -> Precision -> (Double,Double) | ||
103 | ellint_P_e phi k n mode = createSFR "ellint_P_e" $ gsl_sf_ellint_P_e phi k n (precCode mode) | ||
104 | foreign import ccall "ellint.h gsl_sf_ellint_P_e" gsl_sf_ellint_P_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) | ||
105 | |||
106 | -- | wrapper for double gsl_sf_ellint_P(double phi,double k,double n,gsl_mode_t mode); | ||
107 | -- | ||
108 | -- <http://www.google.com/search?q=gsl_sf_ellint_P&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
109 | ellint_P :: Double -> Double -> Double -> Precision -> Double | ||
110 | ellint_P phi k n mode = gsl_sf_ellint_P phi k n (precCode mode) | ||
111 | foreign import ccall "ellint.h gsl_sf_ellint_P" gsl_sf_ellint_P :: Double -> Double -> Double -> Gsl_mode_t -> Double | ||
112 | |||
113 | -- | wrapper for int gsl_sf_ellint_D_e(double phi,double k,double n,gsl_mode_t mode,gsl_sf_result* result); | ||
114 | -- | ||
115 | -- <http://www.google.com/search?q=gsl_sf_ellint_D_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
116 | ellint_D_e :: Double -> Double -> Double -> Precision -> (Double,Double) | ||
117 | ellint_D_e phi k n mode = createSFR "ellint_D_e" $ gsl_sf_ellint_D_e phi k n (precCode mode) | ||
118 | foreign import ccall "ellint.h gsl_sf_ellint_D_e" gsl_sf_ellint_D_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) | ||
119 | |||
120 | -- | wrapper for double gsl_sf_ellint_D(double phi,double k,double n,gsl_mode_t mode); | ||
121 | -- | ||
122 | -- <http://www.google.com/search?q=gsl_sf_ellint_D&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
123 | ellint_D :: Double -> Double -> Double -> Precision -> Double | ||
124 | ellint_D phi k n mode = gsl_sf_ellint_D phi k n (precCode mode) | ||
125 | foreign import ccall "ellint.h gsl_sf_ellint_D" gsl_sf_ellint_D :: Double -> Double -> Double -> Gsl_mode_t -> Double | ||
126 | |||
127 | -- | wrapper for int gsl_sf_ellint_RC_e(double x,double y,gsl_mode_t mode,gsl_sf_result* result); | ||
128 | -- | ||
129 | -- <http://www.google.com/search?q=gsl_sf_ellint_RC_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
130 | ellint_RC_e :: Double -> Double -> Precision -> (Double,Double) | ||
131 | ellint_RC_e x y mode = createSFR "ellint_RC_e" $ gsl_sf_ellint_RC_e x y (precCode mode) | ||
132 | foreign import ccall "ellint.h gsl_sf_ellint_RC_e" gsl_sf_ellint_RC_e :: Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) | ||
133 | |||
134 | -- | wrapper for double gsl_sf_ellint_RC(double x,double y,gsl_mode_t mode); | ||
135 | -- | ||
136 | -- <http://www.google.com/search?q=gsl_sf_ellint_RC&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
137 | ellint_RC :: Double -> Double -> Precision -> Double | ||
138 | ellint_RC x y mode = gsl_sf_ellint_RC x y (precCode mode) | ||
139 | foreign import ccall "ellint.h gsl_sf_ellint_RC" gsl_sf_ellint_RC :: Double -> Double -> Gsl_mode_t -> Double | ||
140 | |||
141 | -- | wrapper for int gsl_sf_ellint_RD_e(double x,double y,double z,gsl_mode_t mode,gsl_sf_result* result); | ||
142 | -- | ||
143 | -- <http://www.google.com/search?q=gsl_sf_ellint_RD_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
144 | ellint_RD_e :: Double -> Double -> Double -> Precision -> (Double,Double) | ||
145 | ellint_RD_e x y z mode = createSFR "ellint_RD_e" $ gsl_sf_ellint_RD_e x y z (precCode mode) | ||
146 | foreign import ccall "ellint.h gsl_sf_ellint_RD_e" gsl_sf_ellint_RD_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) | ||
147 | |||
148 | -- | wrapper for double gsl_sf_ellint_RD(double x,double y,double z,gsl_mode_t mode); | ||
149 | -- | ||
150 | -- <http://www.google.com/search?q=gsl_sf_ellint_RD&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
151 | ellint_RD :: Double -> Double -> Double -> Precision -> Double | ||
152 | ellint_RD x y z mode = gsl_sf_ellint_RD x y z (precCode mode) | ||
153 | foreign import ccall "ellint.h gsl_sf_ellint_RD" gsl_sf_ellint_RD :: Double -> Double -> Double -> Gsl_mode_t -> Double | ||
154 | |||
155 | -- | wrapper for int gsl_sf_ellint_RF_e(double x,double y,double z,gsl_mode_t mode,gsl_sf_result* result); | ||
156 | -- | ||
157 | -- <http://www.google.com/search?q=gsl_sf_ellint_RF_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
158 | ellint_RF_e :: Double -> Double -> Double -> Precision -> (Double,Double) | ||
159 | ellint_RF_e x y z mode = createSFR "ellint_RF_e" $ gsl_sf_ellint_RF_e x y z (precCode mode) | ||
160 | foreign import ccall "ellint.h gsl_sf_ellint_RF_e" gsl_sf_ellint_RF_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) | ||
161 | |||
162 | -- | wrapper for double gsl_sf_ellint_RF(double x,double y,double z,gsl_mode_t mode); | ||
163 | -- | ||
164 | -- <http://www.google.com/search?q=gsl_sf_ellint_RF&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
165 | ellint_RF :: Double -> Double -> Double -> Precision -> Double | ||
166 | ellint_RF x y z mode = gsl_sf_ellint_RF x y z (precCode mode) | ||
167 | foreign import ccall "ellint.h gsl_sf_ellint_RF" gsl_sf_ellint_RF :: Double -> Double -> Double -> Gsl_mode_t -> Double | ||
168 | |||
169 | -- | wrapper for int gsl_sf_ellint_RJ_e(double x,double y,double z,double p,gsl_mode_t mode,gsl_sf_result* result); | ||
170 | -- | ||
171 | -- <http://www.google.com/search?q=gsl_sf_ellint_RJ_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
172 | ellint_RJ_e :: Double -> Double -> Double -> Double -> Precision -> (Double,Double) | ||
173 | ellint_RJ_e x y z p mode = createSFR "ellint_RJ_e" $ gsl_sf_ellint_RJ_e x y z p (precCode mode) | ||
174 | foreign import ccall "ellint.h gsl_sf_ellint_RJ_e" gsl_sf_ellint_RJ_e :: Double -> Double -> Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) | ||
175 | |||
176 | -- | wrapper for double gsl_sf_ellint_RJ(double x,double y,double z,double p,gsl_mode_t mode); | ||
177 | -- | ||
178 | -- <http://www.google.com/search?q=gsl_sf_ellint_RJ&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
179 | ellint_RJ :: Double -> Double -> Double -> Double -> Precision -> Double | ||
180 | ellint_RJ x y z p mode = gsl_sf_ellint_RJ x y z p (precCode mode) | ||
181 | foreign import ccall "ellint.h gsl_sf_ellint_RJ" gsl_sf_ellint_RJ :: Double -> Double -> Double -> Double -> Gsl_mode_t -> Double | ||
diff --git a/lib/GSL/Special/Erf.hs b/lib/GSL/Special/Erf.hs deleted file mode 100644 index 6dc5abb..0000000 --- a/lib/GSL/Special/Erf.hs +++ /dev/null | |||
@@ -1,117 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Erf | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.google.com/search?q=gsl_sf_erf.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Erf( | ||
18 | erfc_e | ||
19 | , erfc | ||
20 | , log_erfc_e | ||
21 | , log_erfc | ||
22 | , erf_e | ||
23 | , erf | ||
24 | , erf_Z_e | ||
25 | , erf_Q_e | ||
26 | , erf_Z | ||
27 | , erf_Q | ||
28 | , hazard_e | ||
29 | , hazard | ||
30 | ) where | ||
31 | |||
32 | import Foreign(Ptr) | ||
33 | import GSL.Special.Internal | ||
34 | |||
35 | -- | wrapper for int gsl_sf_erfc_e(double x,gsl_sf_result* result); | ||
36 | -- | ||
37 | -- <http://www.google.com/search?q=gsl_sf_erfc_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
38 | erfc_e :: Double -> (Double,Double) | ||
39 | erfc_e x = createSFR "erfc_e" $ gsl_sf_erfc_e x | ||
40 | foreign import ccall "erf.h gsl_sf_erfc_e" gsl_sf_erfc_e :: Double -> Ptr Double -> IO(Int) | ||
41 | |||
42 | -- | wrapper for double gsl_sf_erfc(double x); | ||
43 | -- | ||
44 | -- <http://www.google.com/search?q=gsl_sf_erfc&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
45 | erfc :: Double -> Double | ||
46 | erfc = gsl_sf_erfc | ||
47 | foreign import ccall "erf.h gsl_sf_erfc" gsl_sf_erfc :: Double -> Double | ||
48 | |||
49 | -- | wrapper for int gsl_sf_log_erfc_e(double x,gsl_sf_result* result); | ||
50 | -- | ||
51 | -- <http://www.google.com/search?q=gsl_sf_log_erfc_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
52 | log_erfc_e :: Double -> (Double,Double) | ||
53 | log_erfc_e x = createSFR "log_erfc_e" $ gsl_sf_log_erfc_e x | ||
54 | foreign import ccall "erf.h gsl_sf_log_erfc_e" gsl_sf_log_erfc_e :: Double -> Ptr Double -> IO(Int) | ||
55 | |||
56 | -- | wrapper for double gsl_sf_log_erfc(double x); | ||
57 | -- | ||
58 | -- <http://www.google.com/search?q=gsl_sf_log_erfc&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
59 | log_erfc :: Double -> Double | ||
60 | log_erfc = gsl_sf_log_erfc | ||
61 | foreign import ccall "erf.h gsl_sf_log_erfc" gsl_sf_log_erfc :: Double -> Double | ||
62 | |||
63 | -- | wrapper for int gsl_sf_erf_e(double x,gsl_sf_result* result); | ||
64 | -- | ||
65 | -- <http://www.google.com/search?q=gsl_sf_erf_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
66 | erf_e :: Double -> (Double,Double) | ||
67 | erf_e x = createSFR "erf_e" $ gsl_sf_erf_e x | ||
68 | foreign import ccall "erf.h gsl_sf_erf_e" gsl_sf_erf_e :: Double -> Ptr Double -> IO(Int) | ||
69 | |||
70 | -- | wrapper for double gsl_sf_erf(double x); | ||
71 | -- | ||
72 | -- <http://www.google.com/search?q=gsl_sf_erf&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
73 | erf :: Double -> Double | ||
74 | erf = gsl_sf_erf | ||
75 | foreign import ccall "erf.h gsl_sf_erf" gsl_sf_erf :: Double -> Double | ||
76 | |||
77 | -- | wrapper for int gsl_sf_erf_Z_e(double x,gsl_sf_result* result); | ||
78 | -- | ||
79 | -- <http://www.google.com/search?q=gsl_sf_erf_Z_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
80 | erf_Z_e :: Double -> (Double,Double) | ||
81 | erf_Z_e x = createSFR "erf_Z_e" $ gsl_sf_erf_Z_e x | ||
82 | foreign import ccall "erf.h gsl_sf_erf_Z_e" gsl_sf_erf_Z_e :: Double -> Ptr Double -> IO(Int) | ||
83 | |||
84 | -- | wrapper for int gsl_sf_erf_Q_e(double x,gsl_sf_result* result); | ||
85 | -- | ||
86 | -- <http://www.google.com/search?q=gsl_sf_erf_Q_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
87 | erf_Q_e :: Double -> (Double,Double) | ||
88 | erf_Q_e x = createSFR "erf_Q_e" $ gsl_sf_erf_Q_e x | ||
89 | foreign import ccall "erf.h gsl_sf_erf_Q_e" gsl_sf_erf_Q_e :: Double -> Ptr Double -> IO(Int) | ||
90 | |||
91 | -- | wrapper for double gsl_sf_erf_Z(double x); | ||
92 | -- | ||
93 | -- <http://www.google.com/search?q=gsl_sf_erf_Z&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
94 | erf_Z :: Double -> Double | ||
95 | erf_Z = gsl_sf_erf_Z | ||
96 | foreign import ccall "erf.h gsl_sf_erf_Z" gsl_sf_erf_Z :: Double -> Double | ||
97 | |||
98 | -- | wrapper for double gsl_sf_erf_Q(double x); | ||
99 | -- | ||
100 | -- <http://www.google.com/search?q=gsl_sf_erf_Q&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
101 | erf_Q :: Double -> Double | ||
102 | erf_Q = gsl_sf_erf_Q | ||
103 | foreign import ccall "erf.h gsl_sf_erf_Q" gsl_sf_erf_Q :: Double -> Double | ||
104 | |||
105 | -- | wrapper for int gsl_sf_hazard_e(double x,gsl_sf_result* result); | ||
106 | -- | ||
107 | -- <http://www.google.com/search?q=gsl_sf_hazard_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
108 | hazard_e :: Double -> (Double,Double) | ||
109 | hazard_e x = createSFR "hazard_e" $ gsl_sf_hazard_e x | ||
110 | foreign import ccall "erf.h gsl_sf_hazard_e" gsl_sf_hazard_e :: Double -> Ptr Double -> IO(Int) | ||
111 | |||
112 | -- | wrapper for double gsl_sf_hazard(double x); | ||
113 | -- | ||
114 | -- <http://www.google.com/search?q=gsl_sf_hazard&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
115 | hazard :: Double -> Double | ||
116 | hazard = gsl_sf_hazard | ||
117 | foreign import ccall "erf.h gsl_sf_hazard" gsl_sf_hazard :: Double -> Double | ||
diff --git a/lib/GSL/Special/Exp.hs b/lib/GSL/Special/Exp.hs deleted file mode 100644 index 8c3e5b8..0000000 --- a/lib/GSL/Special/Exp.hs +++ /dev/null | |||
@@ -1,129 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Exp | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.gnu.org/software/gsl/manual/html_node/Exponential-Functions.html> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Exp( | ||
18 | exp_e | ||
19 | , GSL.Special.Exp.exp | ||
20 | , exp_e10_e | ||
21 | , exp_mult_e | ||
22 | , exp_mult | ||
23 | , exp_mult_e10_e | ||
24 | , expm1_e | ||
25 | , expm1 | ||
26 | , exprel_e | ||
27 | , exprel | ||
28 | , exprel_2_e | ||
29 | , exprel_2 | ||
30 | , exprel_n_e | ||
31 | , exprel_n | ||
32 | , exp_err_e | ||
33 | , exp_err_e10_e | ||
34 | , exp_mult_err_e | ||
35 | , exp_mult_err_e10_e | ||
36 | ) where | ||
37 | |||
38 | import Foreign(Ptr) | ||
39 | import GSL.Special.Internal | ||
40 | |||
41 | -- | wrapper for int gsl_sf_exp_e(double x,gsl_sf_result* result); | ||
42 | exp_e :: Double -> (Double,Double) | ||
43 | exp_e x = createSFR "exp_e" $ gsl_sf_exp_e x | ||
44 | foreign import ccall "exp.h gsl_sf_exp_e" gsl_sf_exp_e :: Double -> Ptr Double -> IO(Int) | ||
45 | |||
46 | -- | wrapper for double gsl_sf_exp(double x); | ||
47 | exp :: Double -> Double | ||
48 | exp = gsl_sf_exp | ||
49 | foreign import ccall "exp.h gsl_sf_exp" gsl_sf_exp :: Double -> Double | ||
50 | |||
51 | -- | wrapper for int gsl_sf_exp_e10_e(double x,gsl_sf_result_e10* result); | ||
52 | exp_e10_e :: Double -> (Double,Int,Double) | ||
53 | exp_e10_e x = createSFR_E10 "exp_e10_e" $ gsl_sf_exp_e10_e x | ||
54 | foreign import ccall "exp.h gsl_sf_exp_e10_e" gsl_sf_exp_e10_e :: Double -> Ptr () -> IO(Int) | ||
55 | |||
56 | -- | wrapper for int gsl_sf_exp_mult_e(double x,double y,gsl_sf_result* result); | ||
57 | exp_mult_e :: Double -> Double -> (Double,Double) | ||
58 | exp_mult_e x y = createSFR "exp_mult_e" $ gsl_sf_exp_mult_e x y | ||
59 | foreign import ccall "exp.h gsl_sf_exp_mult_e" gsl_sf_exp_mult_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
60 | |||
61 | -- | wrapper for double gsl_sf_exp_mult(double x,double y); | ||
62 | exp_mult :: Double -> Double -> Double | ||
63 | exp_mult = gsl_sf_exp_mult | ||
64 | foreign import ccall "exp.h gsl_sf_exp_mult" gsl_sf_exp_mult :: Double -> Double -> Double | ||
65 | |||
66 | -- | wrapper for int gsl_sf_exp_mult_e10_e(double x,double y,gsl_sf_result_e10* result); | ||
67 | exp_mult_e10_e :: Double -> Double -> (Double,Int,Double) | ||
68 | exp_mult_e10_e x y = createSFR_E10 "exp_mult_e10_e" $ gsl_sf_exp_mult_e10_e x y | ||
69 | foreign import ccall "exp.h gsl_sf_exp_mult_e10_e" gsl_sf_exp_mult_e10_e :: Double -> Double -> Ptr () -> IO(Int) | ||
70 | |||
71 | -- | wrapper for int gsl_sf_expm1_e(double x,gsl_sf_result* result); | ||
72 | expm1_e :: Double -> (Double,Double) | ||
73 | expm1_e x = createSFR "expm1_e" $ gsl_sf_expm1_e x | ||
74 | foreign import ccall "exp.h gsl_sf_expm1_e" gsl_sf_expm1_e :: Double -> Ptr Double -> IO(Int) | ||
75 | |||
76 | -- | wrapper for double gsl_sf_expm1(double x); | ||
77 | expm1 :: Double -> Double | ||
78 | expm1 = gsl_sf_expm1 | ||
79 | foreign import ccall "exp.h gsl_sf_expm1" gsl_sf_expm1 :: Double -> Double | ||
80 | |||
81 | -- | wrapper for int gsl_sf_exprel_e(double x,gsl_sf_result* result); | ||
82 | exprel_e :: Double -> (Double,Double) | ||
83 | exprel_e x = createSFR "exprel_e" $ gsl_sf_exprel_e x | ||
84 | foreign import ccall "exp.h gsl_sf_exprel_e" gsl_sf_exprel_e :: Double -> Ptr Double -> IO(Int) | ||
85 | |||
86 | -- | wrapper for double gsl_sf_exprel(double x); | ||
87 | exprel :: Double -> Double | ||
88 | exprel = gsl_sf_exprel | ||
89 | foreign import ccall "exp.h gsl_sf_exprel" gsl_sf_exprel :: Double -> Double | ||
90 | |||
91 | -- | wrapper for int gsl_sf_exprel_2_e(double x,gsl_sf_result* result); | ||
92 | exprel_2_e :: Double -> (Double,Double) | ||
93 | exprel_2_e x = createSFR "exprel_2_e" $ gsl_sf_exprel_2_e x | ||
94 | foreign import ccall "exp.h gsl_sf_exprel_2_e" gsl_sf_exprel_2_e :: Double -> Ptr Double -> IO(Int) | ||
95 | |||
96 | -- | wrapper for double gsl_sf_exprel_2(double x); | ||
97 | exprel_2 :: Double -> Double | ||
98 | exprel_2 = gsl_sf_exprel_2 | ||
99 | foreign import ccall "exp.h gsl_sf_exprel_2" gsl_sf_exprel_2 :: Double -> Double | ||
100 | |||
101 | -- | wrapper for int gsl_sf_exprel_n_e(int n,double x,gsl_sf_result* result); | ||
102 | exprel_n_e :: Int -> Double -> (Double,Double) | ||
103 | exprel_n_e n x = createSFR "exprel_n_e" $ gsl_sf_exprel_n_e n x | ||
104 | foreign import ccall "exp.h gsl_sf_exprel_n_e" gsl_sf_exprel_n_e :: Int -> Double -> Ptr Double -> IO(Int) | ||
105 | |||
106 | -- | wrapper for double gsl_sf_exprel_n(int n,double x); | ||
107 | exprel_n :: Int -> Double -> Double | ||
108 | exprel_n = gsl_sf_exprel_n | ||
109 | foreign import ccall "exp.h gsl_sf_exprel_n" gsl_sf_exprel_n :: Int -> Double -> Double | ||
110 | |||
111 | -- | wrapper for int gsl_sf_exp_err_e(double x,double dx,gsl_sf_result* result); | ||
112 | exp_err_e :: Double -> Double -> (Double,Double) | ||
113 | exp_err_e x dx = createSFR "exp_err_e" $ gsl_sf_exp_err_e x dx | ||
114 | foreign import ccall "exp.h gsl_sf_exp_err_e" gsl_sf_exp_err_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
115 | |||
116 | -- | wrapper for int gsl_sf_exp_err_e10_e(double x,double dx,gsl_sf_result_e10* result); | ||
117 | exp_err_e10_e :: Double -> Double -> (Double,Int,Double) | ||
118 | exp_err_e10_e x dx = createSFR_E10 "exp_err_e10_e" $ gsl_sf_exp_err_e10_e x dx | ||
119 | foreign import ccall "exp.h gsl_sf_exp_err_e10_e" gsl_sf_exp_err_e10_e :: Double -> Double -> Ptr () -> IO(Int) | ||
120 | |||
121 | -- | wrapper for int gsl_sf_exp_mult_err_e(double x,double dx,double y,double dy,gsl_sf_result* result); | ||
122 | exp_mult_err_e :: Double -> Double -> Double -> Double -> (Double,Double) | ||
123 | exp_mult_err_e x dx y dy = createSFR "exp_mult_err_e" $ gsl_sf_exp_mult_err_e x dx y dy | ||
124 | foreign import ccall "exp.h gsl_sf_exp_mult_err_e" gsl_sf_exp_mult_err_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int) | ||
125 | |||
126 | -- | wrapper for int gsl_sf_exp_mult_err_e10_e(double x,double dx,double y,double dy,gsl_sf_result_e10* result); | ||
127 | exp_mult_err_e10_e :: Double -> Double -> Double -> Double -> (Double,Int,Double) | ||
128 | exp_mult_err_e10_e x dx y dy = createSFR_E10 "exp_mult_err_e10_e" $ gsl_sf_exp_mult_err_e10_e x dx y dy | ||
129 | foreign import ccall "exp.h gsl_sf_exp_mult_err_e10_e" gsl_sf_exp_mult_err_e10_e :: Double -> Double -> Double -> Double -> Ptr () -> IO(Int) | ||
diff --git a/lib/GSL/Special/Expint.hs b/lib/GSL/Special/Expint.hs deleted file mode 100644 index 4e1b2b5..0000000 --- a/lib/GSL/Special/Expint.hs +++ /dev/null | |||
@@ -1,213 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Expint | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.google.com/search?q=gsl_sf_expint.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Expint( | ||
18 | expint_E1_e | ||
19 | , expint_E1 | ||
20 | , expint_E2_e | ||
21 | , expint_E2 | ||
22 | , expint_E1_scaled_e | ||
23 | , expint_E1_scaled | ||
24 | , expint_E2_scaled_e | ||
25 | , expint_E2_scaled | ||
26 | , expint_Ei_e | ||
27 | , expint_Ei | ||
28 | , expint_Ei_scaled_e | ||
29 | , expint_Ei_scaled | ||
30 | , shi_e | ||
31 | , shi | ||
32 | , chi_e | ||
33 | , chi | ||
34 | , expint_3_e | ||
35 | , expint_3 | ||
36 | , si_e | ||
37 | , si | ||
38 | , ci_e | ||
39 | , ci | ||
40 | , atanint_e | ||
41 | , atanint | ||
42 | ) where | ||
43 | |||
44 | import Foreign(Ptr) | ||
45 | import GSL.Special.Internal | ||
46 | |||
47 | -- | wrapper for int gsl_sf_expint_E1_e(double x,gsl_sf_result* result); | ||
48 | -- | ||
49 | -- <http://www.google.com/search?q=gsl_sf_expint_E1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
50 | expint_E1_e :: Double -> (Double,Double) | ||
51 | expint_E1_e x = createSFR "expint_E1_e" $ gsl_sf_expint_E1_e x | ||
52 | foreign import ccall "expint.h gsl_sf_expint_E1_e" gsl_sf_expint_E1_e :: Double -> Ptr Double -> IO(Int) | ||
53 | |||
54 | -- | wrapper for double gsl_sf_expint_E1(double x); | ||
55 | -- | ||
56 | -- <http://www.google.com/search?q=gsl_sf_expint_E1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
57 | expint_E1 :: Double -> Double | ||
58 | expint_E1 = gsl_sf_expint_E1 | ||
59 | foreign import ccall "expint.h gsl_sf_expint_E1" gsl_sf_expint_E1 :: Double -> Double | ||
60 | |||
61 | -- | wrapper for int gsl_sf_expint_E2_e(double x,gsl_sf_result* result); | ||
62 | -- | ||
63 | -- <http://www.google.com/search?q=gsl_sf_expint_E2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
64 | expint_E2_e :: Double -> (Double,Double) | ||
65 | expint_E2_e x = createSFR "expint_E2_e" $ gsl_sf_expint_E2_e x | ||
66 | foreign import ccall "expint.h gsl_sf_expint_E2_e" gsl_sf_expint_E2_e :: Double -> Ptr Double -> IO(Int) | ||
67 | |||
68 | -- | wrapper for double gsl_sf_expint_E2(double x); | ||
69 | -- | ||
70 | -- <http://www.google.com/search?q=gsl_sf_expint_E2&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
71 | expint_E2 :: Double -> Double | ||
72 | expint_E2 = gsl_sf_expint_E2 | ||
73 | foreign import ccall "expint.h gsl_sf_expint_E2" gsl_sf_expint_E2 :: Double -> Double | ||
74 | |||
75 | -- | wrapper for int gsl_sf_expint_E1_scaled_e(double x,gsl_sf_result* result); | ||
76 | -- | ||
77 | -- <http://www.google.com/search?q=gsl_sf_expint_E1_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
78 | expint_E1_scaled_e :: Double -> (Double,Double) | ||
79 | expint_E1_scaled_e x = createSFR "expint_E1_scaled_e" $ gsl_sf_expint_E1_scaled_e x | ||
80 | foreign import ccall "expint.h gsl_sf_expint_E1_scaled_e" gsl_sf_expint_E1_scaled_e :: Double -> Ptr Double -> IO(Int) | ||
81 | |||
82 | -- | wrapper for double gsl_sf_expint_E1_scaled(double x); | ||
83 | -- | ||
84 | -- <http://www.google.com/search?q=gsl_sf_expint_E1_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
85 | expint_E1_scaled :: Double -> Double | ||
86 | expint_E1_scaled = gsl_sf_expint_E1_scaled | ||
87 | foreign import ccall "expint.h gsl_sf_expint_E1_scaled" gsl_sf_expint_E1_scaled :: Double -> Double | ||
88 | |||
89 | -- | wrapper for int gsl_sf_expint_E2_scaled_e(double x,gsl_sf_result* result); | ||
90 | -- | ||
91 | -- <http://www.google.com/search?q=gsl_sf_expint_E2_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
92 | expint_E2_scaled_e :: Double -> (Double,Double) | ||
93 | expint_E2_scaled_e x = createSFR "expint_E2_scaled_e" $ gsl_sf_expint_E2_scaled_e x | ||
94 | foreign import ccall "expint.h gsl_sf_expint_E2_scaled_e" gsl_sf_expint_E2_scaled_e :: Double -> Ptr Double -> IO(Int) | ||
95 | |||
96 | -- | wrapper for double gsl_sf_expint_E2_scaled(double x); | ||
97 | -- | ||
98 | -- <http://www.google.com/search?q=gsl_sf_expint_E2_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
99 | expint_E2_scaled :: Double -> Double | ||
100 | expint_E2_scaled = gsl_sf_expint_E2_scaled | ||
101 | foreign import ccall "expint.h gsl_sf_expint_E2_scaled" gsl_sf_expint_E2_scaled :: Double -> Double | ||
102 | |||
103 | -- | wrapper for int gsl_sf_expint_Ei_e(double x,gsl_sf_result* result); | ||
104 | -- | ||
105 | -- <http://www.google.com/search?q=gsl_sf_expint_Ei_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
106 | expint_Ei_e :: Double -> (Double,Double) | ||
107 | expint_Ei_e x = createSFR "expint_Ei_e" $ gsl_sf_expint_Ei_e x | ||
108 | foreign import ccall "expint.h gsl_sf_expint_Ei_e" gsl_sf_expint_Ei_e :: Double -> Ptr Double -> IO(Int) | ||
109 | |||
110 | -- | wrapper for double gsl_sf_expint_Ei(double x); | ||
111 | -- | ||
112 | -- <http://www.google.com/search?q=gsl_sf_expint_Ei&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
113 | expint_Ei :: Double -> Double | ||
114 | expint_Ei = gsl_sf_expint_Ei | ||
115 | foreign import ccall "expint.h gsl_sf_expint_Ei" gsl_sf_expint_Ei :: Double -> Double | ||
116 | |||
117 | -- | wrapper for int gsl_sf_expint_Ei_scaled_e(double x,gsl_sf_result* result); | ||
118 | -- | ||
119 | -- <http://www.google.com/search?q=gsl_sf_expint_Ei_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
120 | expint_Ei_scaled_e :: Double -> (Double,Double) | ||
121 | expint_Ei_scaled_e x = createSFR "expint_Ei_scaled_e" $ gsl_sf_expint_Ei_scaled_e x | ||
122 | foreign import ccall "expint.h gsl_sf_expint_Ei_scaled_e" gsl_sf_expint_Ei_scaled_e :: Double -> Ptr Double -> IO(Int) | ||
123 | |||
124 | -- | wrapper for double gsl_sf_expint_Ei_scaled(double x); | ||
125 | -- | ||
126 | -- <http://www.google.com/search?q=gsl_sf_expint_Ei_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
127 | expint_Ei_scaled :: Double -> Double | ||
128 | expint_Ei_scaled = gsl_sf_expint_Ei_scaled | ||
129 | foreign import ccall "expint.h gsl_sf_expint_Ei_scaled" gsl_sf_expint_Ei_scaled :: Double -> Double | ||
130 | |||
131 | -- | wrapper for int gsl_sf_Shi_e(double x,gsl_sf_result* result); | ||
132 | -- | ||
133 | -- <http://www.google.com/search?q=gsl_sf_Shi_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
134 | shi_e :: Double -> (Double,Double) | ||
135 | shi_e x = createSFR "shi_e" $ gsl_sf_Shi_e x | ||
136 | foreign import ccall "expint.h gsl_sf_Shi_e" gsl_sf_Shi_e :: Double -> Ptr Double -> IO(Int) | ||
137 | |||
138 | -- | wrapper for double gsl_sf_Shi(double x); | ||
139 | -- | ||
140 | -- <http://www.google.com/search?q=gsl_sf_Shi&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
141 | shi :: Double -> Double | ||
142 | shi = gsl_sf_Shi | ||
143 | foreign import ccall "expint.h gsl_sf_Shi" gsl_sf_Shi :: Double -> Double | ||
144 | |||
145 | -- | wrapper for int gsl_sf_Chi_e(double x,gsl_sf_result* result); | ||
146 | -- | ||
147 | -- <http://www.google.com/search?q=gsl_sf_Chi_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
148 | chi_e :: Double -> (Double,Double) | ||
149 | chi_e x = createSFR "chi_e" $ gsl_sf_Chi_e x | ||
150 | foreign import ccall "expint.h gsl_sf_Chi_e" gsl_sf_Chi_e :: Double -> Ptr Double -> IO(Int) | ||
151 | |||
152 | -- | wrapper for double gsl_sf_Chi(double x); | ||
153 | -- | ||
154 | -- <http://www.google.com/search?q=gsl_sf_Chi&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
155 | chi :: Double -> Double | ||
156 | chi = gsl_sf_Chi | ||
157 | foreign import ccall "expint.h gsl_sf_Chi" gsl_sf_Chi :: Double -> Double | ||
158 | |||
159 | -- | wrapper for int gsl_sf_expint_3_e(double x,gsl_sf_result* result); | ||
160 | -- | ||
161 | -- <http://www.google.com/search?q=gsl_sf_expint_3_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
162 | expint_3_e :: Double -> (Double,Double) | ||
163 | expint_3_e x = createSFR "expint_3_e" $ gsl_sf_expint_3_e x | ||
164 | foreign import ccall "expint.h gsl_sf_expint_3_e" gsl_sf_expint_3_e :: Double -> Ptr Double -> IO(Int) | ||
165 | |||
166 | -- | wrapper for double gsl_sf_expint_3(double x); | ||
167 | -- | ||
168 | -- <http://www.google.com/search?q=gsl_sf_expint_3&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
169 | expint_3 :: Double -> Double | ||
170 | expint_3 = gsl_sf_expint_3 | ||
171 | foreign import ccall "expint.h gsl_sf_expint_3" gsl_sf_expint_3 :: Double -> Double | ||
172 | |||
173 | -- | wrapper for int gsl_sf_Si_e(double x,gsl_sf_result* result); | ||
174 | -- | ||
175 | -- <http://www.google.com/search?q=gsl_sf_Si_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
176 | si_e :: Double -> (Double,Double) | ||
177 | si_e x = createSFR "si_e" $ gsl_sf_Si_e x | ||
178 | foreign import ccall "expint.h gsl_sf_Si_e" gsl_sf_Si_e :: Double -> Ptr Double -> IO(Int) | ||
179 | |||
180 | -- | wrapper for double gsl_sf_Si(double x); | ||
181 | -- | ||
182 | -- <http://www.google.com/search?q=gsl_sf_Si&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
183 | si :: Double -> Double | ||
184 | si = gsl_sf_Si | ||
185 | foreign import ccall "expint.h gsl_sf_Si" gsl_sf_Si :: Double -> Double | ||
186 | |||
187 | -- | wrapper for int gsl_sf_Ci_e(double x,gsl_sf_result* result); | ||
188 | -- | ||
189 | -- <http://www.google.com/search?q=gsl_sf_Ci_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
190 | ci_e :: Double -> (Double,Double) | ||
191 | ci_e x = createSFR "ci_e" $ gsl_sf_Ci_e x | ||
192 | foreign import ccall "expint.h gsl_sf_Ci_e" gsl_sf_Ci_e :: Double -> Ptr Double -> IO(Int) | ||
193 | |||
194 | -- | wrapper for double gsl_sf_Ci(double x); | ||
195 | -- | ||
196 | -- <http://www.google.com/search?q=gsl_sf_Ci&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
197 | ci :: Double -> Double | ||
198 | ci = gsl_sf_Ci | ||
199 | foreign import ccall "expint.h gsl_sf_Ci" gsl_sf_Ci :: Double -> Double | ||
200 | |||
201 | -- | wrapper for int gsl_sf_atanint_e(double x,gsl_sf_result* result); | ||
202 | -- | ||
203 | -- <http://www.google.com/search?q=gsl_sf_atanint_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
204 | atanint_e :: Double -> (Double,Double) | ||
205 | atanint_e x = createSFR "atanint_e" $ gsl_sf_atanint_e x | ||
206 | foreign import ccall "expint.h gsl_sf_atanint_e" gsl_sf_atanint_e :: Double -> Ptr Double -> IO(Int) | ||
207 | |||
208 | -- | wrapper for double gsl_sf_atanint(double x); | ||
209 | -- | ||
210 | -- <http://www.google.com/search?q=gsl_sf_atanint&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
211 | atanint :: Double -> Double | ||
212 | atanint = gsl_sf_atanint | ||
213 | foreign import ccall "expint.h gsl_sf_atanint" gsl_sf_atanint :: Double -> Double | ||
diff --git a/lib/GSL/Special/Fermi_dirac.hs b/lib/GSL/Special/Fermi_dirac.hs deleted file mode 100644 index 18dc3b2..0000000 --- a/lib/GSL/Special/Fermi_dirac.hs +++ /dev/null | |||
@@ -1,165 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Fermi_dirac | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.google.com/search?q=gsl_sf_fermi_dirac.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Fermi_dirac( | ||
18 | fermi_dirac_m1_e | ||
19 | , fermi_dirac_m1 | ||
20 | , fermi_dirac_0_e | ||
21 | , fermi_dirac_0 | ||
22 | , fermi_dirac_1_e | ||
23 | , fermi_dirac_1 | ||
24 | , fermi_dirac_2_e | ||
25 | , fermi_dirac_2 | ||
26 | , fermi_dirac_int_e | ||
27 | , fermi_dirac_int | ||
28 | , fermi_dirac_mhalf_e | ||
29 | , fermi_dirac_mhalf | ||
30 | , fermi_dirac_half_e | ||
31 | , fermi_dirac_half | ||
32 | , fermi_dirac_3half_e | ||
33 | , fermi_dirac_3half | ||
34 | , fermi_dirac_inc_0_e | ||
35 | , fermi_dirac_inc_0 | ||
36 | ) where | ||
37 | |||
38 | import Foreign(Ptr) | ||
39 | import GSL.Special.Internal | ||
40 | |||
41 | -- | wrapper for int gsl_sf_fermi_dirac_m1_e(double x,gsl_sf_result* result); | ||
42 | -- | ||
43 | -- <http://www.google.com/search?q=gsl_sf_fermi_dirac_m1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
44 | fermi_dirac_m1_e :: Double -> (Double,Double) | ||
45 | fermi_dirac_m1_e x = createSFR "fermi_dirac_m1_e" $ gsl_sf_fermi_dirac_m1_e x | ||
46 | foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_m1_e" gsl_sf_fermi_dirac_m1_e :: Double -> Ptr Double -> IO(Int) | ||
47 | |||
48 | -- | wrapper for double gsl_sf_fermi_dirac_m1(double x); | ||
49 | -- | ||
50 | -- <http://www.google.com/search?q=gsl_sf_fermi_dirac_m1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
51 | fermi_dirac_m1 :: Double -> Double | ||
52 | fermi_dirac_m1 = gsl_sf_fermi_dirac_m1 | ||
53 | foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_m1" gsl_sf_fermi_dirac_m1 :: Double -> Double | ||
54 | |||
55 | -- | wrapper for int gsl_sf_fermi_dirac_0_e(double x,gsl_sf_result* result); | ||
56 | -- | ||
57 | -- <http://www.google.com/search?q=gsl_sf_fermi_dirac_0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
58 | fermi_dirac_0_e :: Double -> (Double,Double) | ||
59 | fermi_dirac_0_e x = createSFR "fermi_dirac_0_e" $ gsl_sf_fermi_dirac_0_e x | ||
60 | foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_0_e" gsl_sf_fermi_dirac_0_e :: Double -> Ptr Double -> IO(Int) | ||
61 | |||
62 | -- | wrapper for double gsl_sf_fermi_dirac_0(double x); | ||
63 | -- | ||
64 | -- <http://www.google.com/search?q=gsl_sf_fermi_dirac_0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
65 | fermi_dirac_0 :: Double -> Double | ||
66 | fermi_dirac_0 = gsl_sf_fermi_dirac_0 | ||
67 | foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_0" gsl_sf_fermi_dirac_0 :: Double -> Double | ||
68 | |||
69 | -- | wrapper for int gsl_sf_fermi_dirac_1_e(double x,gsl_sf_result* result); | ||
70 | -- | ||
71 | -- <http://www.google.com/search?q=gsl_sf_fermi_dirac_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
72 | fermi_dirac_1_e :: Double -> (Double,Double) | ||
73 | fermi_dirac_1_e x = createSFR "fermi_dirac_1_e" $ gsl_sf_fermi_dirac_1_e x | ||
74 | foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_1_e" gsl_sf_fermi_dirac_1_e :: Double -> Ptr Double -> IO(Int) | ||
75 | |||
76 | -- | wrapper for double gsl_sf_fermi_dirac_1(double x); | ||
77 | -- | ||
78 | -- <http://www.google.com/search?q=gsl_sf_fermi_dirac_1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
79 | fermi_dirac_1 :: Double -> Double | ||
80 | fermi_dirac_1 = gsl_sf_fermi_dirac_1 | ||
81 | foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_1" gsl_sf_fermi_dirac_1 :: Double -> Double | ||
82 | |||
83 | -- | wrapper for int gsl_sf_fermi_dirac_2_e(double x,gsl_sf_result* result); | ||
84 | -- | ||
85 | -- <http://www.google.com/search?q=gsl_sf_fermi_dirac_2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
86 | fermi_dirac_2_e :: Double -> (Double,Double) | ||
87 | fermi_dirac_2_e x = createSFR "fermi_dirac_2_e" $ gsl_sf_fermi_dirac_2_e x | ||
88 | foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_2_e" gsl_sf_fermi_dirac_2_e :: Double -> Ptr Double -> IO(Int) | ||
89 | |||
90 | -- | wrapper for double gsl_sf_fermi_dirac_2(double x); | ||
91 | -- | ||
92 | -- <http://www.google.com/search?q=gsl_sf_fermi_dirac_2&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
93 | fermi_dirac_2 :: Double -> Double | ||
94 | fermi_dirac_2 = gsl_sf_fermi_dirac_2 | ||
95 | foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_2" gsl_sf_fermi_dirac_2 :: Double -> Double | ||
96 | |||
97 | -- | wrapper for int gsl_sf_fermi_dirac_int_e(int j,double x,gsl_sf_result* result); | ||
98 | -- | ||
99 | -- <http://www.google.com/search?q=gsl_sf_fermi_dirac_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
100 | fermi_dirac_int_e :: Int -> Double -> (Double,Double) | ||
101 | fermi_dirac_int_e j x = createSFR "fermi_dirac_int_e" $ gsl_sf_fermi_dirac_int_e j x | ||
102 | foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_int_e" gsl_sf_fermi_dirac_int_e :: Int -> Double -> Ptr Double -> IO(Int) | ||
103 | |||
104 | -- | wrapper for double gsl_sf_fermi_dirac_int(int j,double x); | ||
105 | -- | ||
106 | -- <http://www.google.com/search?q=gsl_sf_fermi_dirac_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
107 | fermi_dirac_int :: Int -> Double -> Double | ||
108 | fermi_dirac_int = gsl_sf_fermi_dirac_int | ||
109 | foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_int" gsl_sf_fermi_dirac_int :: Int -> Double -> Double | ||
110 | |||
111 | -- | wrapper for int gsl_sf_fermi_dirac_mhalf_e(double x,gsl_sf_result* result); | ||
112 | -- | ||
113 | -- <http://www.google.com/search?q=gsl_sf_fermi_dirac_mhalf_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
114 | fermi_dirac_mhalf_e :: Double -> (Double,Double) | ||
115 | fermi_dirac_mhalf_e x = createSFR "fermi_dirac_mhalf_e" $ gsl_sf_fermi_dirac_mhalf_e x | ||
116 | foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_mhalf_e" gsl_sf_fermi_dirac_mhalf_e :: Double -> Ptr Double -> IO(Int) | ||
117 | |||
118 | -- | wrapper for double gsl_sf_fermi_dirac_mhalf(double x); | ||
119 | -- | ||
120 | -- <http://www.google.com/search?q=gsl_sf_fermi_dirac_mhalf&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
121 | fermi_dirac_mhalf :: Double -> Double | ||
122 | fermi_dirac_mhalf = gsl_sf_fermi_dirac_mhalf | ||
123 | foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_mhalf" gsl_sf_fermi_dirac_mhalf :: Double -> Double | ||
124 | |||
125 | -- | wrapper for int gsl_sf_fermi_dirac_half_e(double x,gsl_sf_result* result); | ||
126 | -- | ||
127 | -- <http://www.google.com/search?q=gsl_sf_fermi_dirac_half_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
128 | fermi_dirac_half_e :: Double -> (Double,Double) | ||
129 | fermi_dirac_half_e x = createSFR "fermi_dirac_half_e" $ gsl_sf_fermi_dirac_half_e x | ||
130 | foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_half_e" gsl_sf_fermi_dirac_half_e :: Double -> Ptr Double -> IO(Int) | ||
131 | |||
132 | -- | wrapper for double gsl_sf_fermi_dirac_half(double x); | ||
133 | -- | ||
134 | -- <http://www.google.com/search?q=gsl_sf_fermi_dirac_half&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
135 | fermi_dirac_half :: Double -> Double | ||
136 | fermi_dirac_half = gsl_sf_fermi_dirac_half | ||
137 | foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_half" gsl_sf_fermi_dirac_half :: Double -> Double | ||
138 | |||
139 | -- | wrapper for int gsl_sf_fermi_dirac_3half_e(double x,gsl_sf_result* result); | ||
140 | -- | ||
141 | -- <http://www.google.com/search?q=gsl_sf_fermi_dirac_3half_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
142 | fermi_dirac_3half_e :: Double -> (Double,Double) | ||
143 | fermi_dirac_3half_e x = createSFR "fermi_dirac_3half_e" $ gsl_sf_fermi_dirac_3half_e x | ||
144 | foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_3half_e" gsl_sf_fermi_dirac_3half_e :: Double -> Ptr Double -> IO(Int) | ||
145 | |||
146 | -- | wrapper for double gsl_sf_fermi_dirac_3half(double x); | ||
147 | -- | ||
148 | -- <http://www.google.com/search?q=gsl_sf_fermi_dirac_3half&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
149 | fermi_dirac_3half :: Double -> Double | ||
150 | fermi_dirac_3half = gsl_sf_fermi_dirac_3half | ||
151 | foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_3half" gsl_sf_fermi_dirac_3half :: Double -> Double | ||
152 | |||
153 | -- | wrapper for int gsl_sf_fermi_dirac_inc_0_e(double x,double b,gsl_sf_result* result); | ||
154 | -- | ||
155 | -- <http://www.google.com/search?q=gsl_sf_fermi_dirac_inc_0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
156 | fermi_dirac_inc_0_e :: Double -> Double -> (Double,Double) | ||
157 | fermi_dirac_inc_0_e x b = createSFR "fermi_dirac_inc_0_e" $ gsl_sf_fermi_dirac_inc_0_e x b | ||
158 | foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_inc_0_e" gsl_sf_fermi_dirac_inc_0_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
159 | |||
160 | -- | wrapper for double gsl_sf_fermi_dirac_inc_0(double x,double b); | ||
161 | -- | ||
162 | -- <http://www.google.com/search?q=gsl_sf_fermi_dirac_inc_0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
163 | fermi_dirac_inc_0 :: Double -> Double -> Double | ||
164 | fermi_dirac_inc_0 = gsl_sf_fermi_dirac_inc_0 | ||
165 | foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_inc_0" gsl_sf_fermi_dirac_inc_0 :: Double -> Double -> Double | ||
diff --git a/lib/GSL/Special/Gamma.hs b/lib/GSL/Special/Gamma.hs deleted file mode 100644 index ae5010d..0000000 --- a/lib/GSL/Special/Gamma.hs +++ /dev/null | |||
@@ -1,362 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Gamma | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.google.com/search?q=gsl_sf_gamma.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Gamma( | ||
18 | lngamma_e | ||
19 | , lngamma | ||
20 | , gamma_e | ||
21 | , gamma | ||
22 | , gammastar_e | ||
23 | , gammastar | ||
24 | , gammainv_e | ||
25 | , gammainv | ||
26 | , taylorcoeff_e | ||
27 | , taylorcoeff | ||
28 | , fact_e | ||
29 | , fact | ||
30 | , doublefact_e | ||
31 | , doublefact | ||
32 | , lnfact_e | ||
33 | , lnfact | ||
34 | , lndoublefact_e | ||
35 | , lndoublefact | ||
36 | , lnchoose_e | ||
37 | , lnchoose | ||
38 | , choose_e | ||
39 | , choose | ||
40 | , lnpoch_e | ||
41 | , lnpoch | ||
42 | , poch_e | ||
43 | , poch | ||
44 | , pochrel_e | ||
45 | , pochrel | ||
46 | , gamma_inc_Q_e | ||
47 | , gamma_inc_Q | ||
48 | , gamma_inc_P_e | ||
49 | , gamma_inc_P | ||
50 | , gamma_inc_e | ||
51 | , gamma_inc | ||
52 | , lnbeta_e | ||
53 | , lnbeta | ||
54 | , beta_e | ||
55 | , beta | ||
56 | , beta_inc_e | ||
57 | , beta_inc | ||
58 | ) where | ||
59 | |||
60 | import Foreign(Ptr) | ||
61 | import GSL.Special.Internal | ||
62 | |||
63 | -- | wrapper for int gsl_sf_lngamma_e(double x,gsl_sf_result* result); | ||
64 | -- | ||
65 | -- <http://www.google.com/search?q=gsl_sf_lngamma_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
66 | lngamma_e :: Double -> (Double,Double) | ||
67 | lngamma_e x = createSFR "lngamma_e" $ gsl_sf_lngamma_e x | ||
68 | foreign import ccall "gamma.h gsl_sf_lngamma_e" gsl_sf_lngamma_e :: Double -> Ptr Double -> IO(Int) | ||
69 | |||
70 | -- | wrapper for double gsl_sf_lngamma(double x); | ||
71 | -- | ||
72 | -- <http://www.google.com/search?q=gsl_sf_lngamma&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
73 | lngamma :: Double -> Double | ||
74 | lngamma = gsl_sf_lngamma | ||
75 | foreign import ccall "gamma.h gsl_sf_lngamma" gsl_sf_lngamma :: Double -> Double | ||
76 | |||
77 | -- | wrapper for int gsl_sf_lngamma_sgn_e(double x,gsl_sf_result* result_lg,double* sgn); | ||
78 | -- | ||
79 | -- <http://www.google.com/search?q=gsl_sf_lngamma_sgn_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
80 | lngamma_sgn_e :: Double -> Ptr Double -> Ptr Double -> Int | ||
81 | lngamma_sgn_e = gsl_sf_lngamma_sgn_e | ||
82 | foreign import ccall "gamma.h gsl_sf_lngamma_sgn_e" gsl_sf_lngamma_sgn_e :: Double -> Ptr Double -> Ptr Double -> Int | ||
83 | |||
84 | -- | wrapper for int gsl_sf_gamma_e(double x,gsl_sf_result* result); | ||
85 | -- | ||
86 | -- <http://www.google.com/search?q=gsl_sf_gamma_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
87 | gamma_e :: Double -> (Double,Double) | ||
88 | gamma_e x = createSFR "gamma_e" $ gsl_sf_gamma_e x | ||
89 | foreign import ccall "gamma.h gsl_sf_gamma_e" gsl_sf_gamma_e :: Double -> Ptr Double -> IO(Int) | ||
90 | |||
91 | -- | wrapper for double gsl_sf_gamma(double x); | ||
92 | -- | ||
93 | -- <http://www.google.com/search?q=gsl_sf_gamma&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
94 | gamma :: Double -> Double | ||
95 | gamma = gsl_sf_gamma | ||
96 | foreign import ccall "gamma.h gsl_sf_gamma" gsl_sf_gamma :: Double -> Double | ||
97 | |||
98 | -- | wrapper for int gsl_sf_gammastar_e(double x,gsl_sf_result* result); | ||
99 | -- | ||
100 | -- <http://www.google.com/search?q=gsl_sf_gammastar_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
101 | gammastar_e :: Double -> (Double,Double) | ||
102 | gammastar_e x = createSFR "gammastar_e" $ gsl_sf_gammastar_e x | ||
103 | foreign import ccall "gamma.h gsl_sf_gammastar_e" gsl_sf_gammastar_e :: Double -> Ptr Double -> IO(Int) | ||
104 | |||
105 | -- | wrapper for double gsl_sf_gammastar(double x); | ||
106 | -- | ||
107 | -- <http://www.google.com/search?q=gsl_sf_gammastar&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
108 | gammastar :: Double -> Double | ||
109 | gammastar = gsl_sf_gammastar | ||
110 | foreign import ccall "gamma.h gsl_sf_gammastar" gsl_sf_gammastar :: Double -> Double | ||
111 | |||
112 | -- | wrapper for int gsl_sf_gammainv_e(double x,gsl_sf_result* result); | ||
113 | -- | ||
114 | -- <http://www.google.com/search?q=gsl_sf_gammainv_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
115 | gammainv_e :: Double -> (Double,Double) | ||
116 | gammainv_e x = createSFR "gammainv_e" $ gsl_sf_gammainv_e x | ||
117 | foreign import ccall "gamma.h gsl_sf_gammainv_e" gsl_sf_gammainv_e :: Double -> Ptr Double -> IO(Int) | ||
118 | |||
119 | -- | wrapper for double gsl_sf_gammainv(double x); | ||
120 | -- | ||
121 | -- <http://www.google.com/search?q=gsl_sf_gammainv&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
122 | gammainv :: Double -> Double | ||
123 | gammainv = gsl_sf_gammainv | ||
124 | foreign import ccall "gamma.h gsl_sf_gammainv" gsl_sf_gammainv :: Double -> Double | ||
125 | |||
126 | -- | wrapper for int gsl_sf_lngamma_complex_e(double zr,double zi,gsl_sf_result* lnr,gsl_sf_result* arg); | ||
127 | -- | ||
128 | -- <http://www.google.com/search?q=gsl_sf_lngamma_complex_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
129 | lngamma_complex_e :: Double -> Double -> Ptr Double -> (Double,Double) | ||
130 | lngamma_complex_e zr zi lnr = createSFR "lngamma_complex_e" $ gsl_sf_lngamma_complex_e zr zi lnr | ||
131 | foreign import ccall "gamma.h gsl_sf_lngamma_complex_e" gsl_sf_lngamma_complex_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) | ||
132 | |||
133 | -- | wrapper for int gsl_sf_taylorcoeff_e(int n,double x,gsl_sf_result* result); | ||
134 | -- | ||
135 | -- <http://www.google.com/search?q=gsl_sf_taylorcoeff_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
136 | taylorcoeff_e :: Int -> Double -> (Double,Double) | ||
137 | taylorcoeff_e n x = createSFR "taylorcoeff_e" $ gsl_sf_taylorcoeff_e n x | ||
138 | foreign import ccall "gamma.h gsl_sf_taylorcoeff_e" gsl_sf_taylorcoeff_e :: Int -> Double -> Ptr Double -> IO(Int) | ||
139 | |||
140 | -- | wrapper for double gsl_sf_taylorcoeff(int n,double x); | ||
141 | -- | ||
142 | -- <http://www.google.com/search?q=gsl_sf_taylorcoeff&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
143 | taylorcoeff :: Int -> Double -> Double | ||
144 | taylorcoeff = gsl_sf_taylorcoeff | ||
145 | foreign import ccall "gamma.h gsl_sf_taylorcoeff" gsl_sf_taylorcoeff :: Int -> Double -> Double | ||
146 | |||
147 | -- | wrapper for int gsl_sf_fact_e(int n,gsl_sf_result* result); | ||
148 | -- | ||
149 | -- <http://www.google.com/search?q=gsl_sf_fact_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
150 | fact_e :: Int -> (Double,Double) | ||
151 | fact_e n = createSFR "fact_e" $ gsl_sf_fact_e n | ||
152 | foreign import ccall "gamma.h gsl_sf_fact_e" gsl_sf_fact_e :: Int -> Ptr Double -> IO(Int) | ||
153 | |||
154 | -- | wrapper for double gsl_sf_fact(int n); | ||
155 | -- | ||
156 | -- <http://www.google.com/search?q=gsl_sf_fact&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
157 | fact :: Int -> Double | ||
158 | fact = gsl_sf_fact | ||
159 | foreign import ccall "gamma.h gsl_sf_fact" gsl_sf_fact :: Int -> Double | ||
160 | |||
161 | -- | wrapper for int gsl_sf_doublefact_e(int n,gsl_sf_result* result); | ||
162 | -- | ||
163 | -- <http://www.google.com/search?q=gsl_sf_doublefact_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
164 | doublefact_e :: Int -> (Double,Double) | ||
165 | doublefact_e n = createSFR "doublefact_e" $ gsl_sf_doublefact_e n | ||
166 | foreign import ccall "gamma.h gsl_sf_doublefact_e" gsl_sf_doublefact_e :: Int -> Ptr Double -> IO(Int) | ||
167 | |||
168 | -- | wrapper for double gsl_sf_doublefact(int n); | ||
169 | -- | ||
170 | -- <http://www.google.com/search?q=gsl_sf_doublefact&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
171 | doublefact :: Int -> Double | ||
172 | doublefact = gsl_sf_doublefact | ||
173 | foreign import ccall "gamma.h gsl_sf_doublefact" gsl_sf_doublefact :: Int -> Double | ||
174 | |||
175 | -- | wrapper for int gsl_sf_lnfact_e(int n,gsl_sf_result* result); | ||
176 | -- | ||
177 | -- <http://www.google.com/search?q=gsl_sf_lnfact_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
178 | lnfact_e :: Int -> (Double,Double) | ||
179 | lnfact_e n = createSFR "lnfact_e" $ gsl_sf_lnfact_e n | ||
180 | foreign import ccall "gamma.h gsl_sf_lnfact_e" gsl_sf_lnfact_e :: Int -> Ptr Double -> IO(Int) | ||
181 | |||
182 | -- | wrapper for double gsl_sf_lnfact(int n); | ||
183 | -- | ||
184 | -- <http://www.google.com/search?q=gsl_sf_lnfact&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
185 | lnfact :: Int -> Double | ||
186 | lnfact = gsl_sf_lnfact | ||
187 | foreign import ccall "gamma.h gsl_sf_lnfact" gsl_sf_lnfact :: Int -> Double | ||
188 | |||
189 | -- | wrapper for int gsl_sf_lndoublefact_e(int n,gsl_sf_result* result); | ||
190 | -- | ||
191 | -- <http://www.google.com/search?q=gsl_sf_lndoublefact_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
192 | lndoublefact_e :: Int -> (Double,Double) | ||
193 | lndoublefact_e n = createSFR "lndoublefact_e" $ gsl_sf_lndoublefact_e n | ||
194 | foreign import ccall "gamma.h gsl_sf_lndoublefact_e" gsl_sf_lndoublefact_e :: Int -> Ptr Double -> IO(Int) | ||
195 | |||
196 | -- | wrapper for double gsl_sf_lndoublefact(int n); | ||
197 | -- | ||
198 | -- <http://www.google.com/search?q=gsl_sf_lndoublefact&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
199 | lndoublefact :: Int -> Double | ||
200 | lndoublefact = gsl_sf_lndoublefact | ||
201 | foreign import ccall "gamma.h gsl_sf_lndoublefact" gsl_sf_lndoublefact :: Int -> Double | ||
202 | |||
203 | -- | wrapper for int gsl_sf_lnchoose_e(int n,int m,gsl_sf_result* result); | ||
204 | -- | ||
205 | -- <http://www.google.com/search?q=gsl_sf_lnchoose_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
206 | lnchoose_e :: Int -> Int -> (Double,Double) | ||
207 | lnchoose_e n m = createSFR "lnchoose_e" $ gsl_sf_lnchoose_e n m | ||
208 | foreign import ccall "gamma.h gsl_sf_lnchoose_e" gsl_sf_lnchoose_e :: Int -> Int -> Ptr Double -> IO(Int) | ||
209 | |||
210 | -- | wrapper for double gsl_sf_lnchoose(int n,int m); | ||
211 | -- | ||
212 | -- <http://www.google.com/search?q=gsl_sf_lnchoose&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
213 | lnchoose :: Int -> Int -> Double | ||
214 | lnchoose = gsl_sf_lnchoose | ||
215 | foreign import ccall "gamma.h gsl_sf_lnchoose" gsl_sf_lnchoose :: Int -> Int -> Double | ||
216 | |||
217 | -- | wrapper for int gsl_sf_choose_e(int n,int m,gsl_sf_result* result); | ||
218 | -- | ||
219 | -- <http://www.google.com/search?q=gsl_sf_choose_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
220 | choose_e :: Int -> Int -> (Double,Double) | ||
221 | choose_e n m = createSFR "choose_e" $ gsl_sf_choose_e n m | ||
222 | foreign import ccall "gamma.h gsl_sf_choose_e" gsl_sf_choose_e :: Int -> Int -> Ptr Double -> IO(Int) | ||
223 | |||
224 | -- | wrapper for double gsl_sf_choose(int n,int m); | ||
225 | -- | ||
226 | -- <http://www.google.com/search?q=gsl_sf_choose&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
227 | choose :: Int -> Int -> Double | ||
228 | choose = gsl_sf_choose | ||
229 | foreign import ccall "gamma.h gsl_sf_choose" gsl_sf_choose :: Int -> Int -> Double | ||
230 | |||
231 | -- | wrapper for int gsl_sf_lnpoch_e(double a,double x,gsl_sf_result* result); | ||
232 | -- | ||
233 | -- <http://www.google.com/search?q=gsl_sf_lnpoch_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
234 | lnpoch_e :: Double -> Double -> (Double,Double) | ||
235 | lnpoch_e a x = createSFR "lnpoch_e" $ gsl_sf_lnpoch_e a x | ||
236 | foreign import ccall "gamma.h gsl_sf_lnpoch_e" gsl_sf_lnpoch_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
237 | |||
238 | -- | wrapper for double gsl_sf_lnpoch(double a,double x); | ||
239 | -- | ||
240 | -- <http://www.google.com/search?q=gsl_sf_lnpoch&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
241 | lnpoch :: Double -> Double -> Double | ||
242 | lnpoch = gsl_sf_lnpoch | ||
243 | foreign import ccall "gamma.h gsl_sf_lnpoch" gsl_sf_lnpoch :: Double -> Double -> Double | ||
244 | |||
245 | -- | wrapper for int gsl_sf_lnpoch_sgn_e(double a,double x,gsl_sf_result* result,double* sgn); | ||
246 | -- | ||
247 | -- <http://www.google.com/search?q=gsl_sf_lnpoch_sgn_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
248 | lnpoch_sgn_e :: Double -> Double -> Ptr Double -> Ptr Double -> Int | ||
249 | lnpoch_sgn_e = gsl_sf_lnpoch_sgn_e | ||
250 | foreign import ccall "gamma.h gsl_sf_lnpoch_sgn_e" gsl_sf_lnpoch_sgn_e :: Double -> Double -> Ptr Double -> Ptr Double -> Int | ||
251 | |||
252 | -- | wrapper for int gsl_sf_poch_e(double a,double x,gsl_sf_result* result); | ||
253 | -- | ||
254 | -- <http://www.google.com/search?q=gsl_sf_poch_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
255 | poch_e :: Double -> Double -> (Double,Double) | ||
256 | poch_e a x = createSFR "poch_e" $ gsl_sf_poch_e a x | ||
257 | foreign import ccall "gamma.h gsl_sf_poch_e" gsl_sf_poch_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
258 | |||
259 | -- | wrapper for double gsl_sf_poch(double a,double x); | ||
260 | -- | ||
261 | -- <http://www.google.com/search?q=gsl_sf_poch&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
262 | poch :: Double -> Double -> Double | ||
263 | poch = gsl_sf_poch | ||
264 | foreign import ccall "gamma.h gsl_sf_poch" gsl_sf_poch :: Double -> Double -> Double | ||
265 | |||
266 | -- | wrapper for int gsl_sf_pochrel_e(double a,double x,gsl_sf_result* result); | ||
267 | -- | ||
268 | -- <http://www.google.com/search?q=gsl_sf_pochrel_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
269 | pochrel_e :: Double -> Double -> (Double,Double) | ||
270 | pochrel_e a x = createSFR "pochrel_e" $ gsl_sf_pochrel_e a x | ||
271 | foreign import ccall "gamma.h gsl_sf_pochrel_e" gsl_sf_pochrel_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
272 | |||
273 | -- | wrapper for double gsl_sf_pochrel(double a,double x); | ||
274 | -- | ||
275 | -- <http://www.google.com/search?q=gsl_sf_pochrel&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
276 | pochrel :: Double -> Double -> Double | ||
277 | pochrel = gsl_sf_pochrel | ||
278 | foreign import ccall "gamma.h gsl_sf_pochrel" gsl_sf_pochrel :: Double -> Double -> Double | ||
279 | |||
280 | -- | wrapper for int gsl_sf_gamma_inc_Q_e(double a,double x,gsl_sf_result* result); | ||
281 | -- | ||
282 | -- <http://www.google.com/search?q=gsl_sf_gamma_inc_Q_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
283 | gamma_inc_Q_e :: Double -> Double -> (Double,Double) | ||
284 | gamma_inc_Q_e a x = createSFR "gamma_inc_Q_e" $ gsl_sf_gamma_inc_Q_e a x | ||
285 | foreign import ccall "gamma.h gsl_sf_gamma_inc_Q_e" gsl_sf_gamma_inc_Q_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
286 | |||
287 | -- | wrapper for double gsl_sf_gamma_inc_Q(double a,double x); | ||
288 | -- | ||
289 | -- <http://www.google.com/search?q=gsl_sf_gamma_inc_Q&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
290 | gamma_inc_Q :: Double -> Double -> Double | ||
291 | gamma_inc_Q = gsl_sf_gamma_inc_Q | ||
292 | foreign import ccall "gamma.h gsl_sf_gamma_inc_Q" gsl_sf_gamma_inc_Q :: Double -> Double -> Double | ||
293 | |||
294 | -- | wrapper for int gsl_sf_gamma_inc_P_e(double a,double x,gsl_sf_result* result); | ||
295 | -- | ||
296 | -- <http://www.google.com/search?q=gsl_sf_gamma_inc_P_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
297 | gamma_inc_P_e :: Double -> Double -> (Double,Double) | ||
298 | gamma_inc_P_e a x = createSFR "gamma_inc_P_e" $ gsl_sf_gamma_inc_P_e a x | ||
299 | foreign import ccall "gamma.h gsl_sf_gamma_inc_P_e" gsl_sf_gamma_inc_P_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
300 | |||
301 | -- | wrapper for double gsl_sf_gamma_inc_P(double a,double x); | ||
302 | -- | ||
303 | -- <http://www.google.com/search?q=gsl_sf_gamma_inc_P&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
304 | gamma_inc_P :: Double -> Double -> Double | ||
305 | gamma_inc_P = gsl_sf_gamma_inc_P | ||
306 | foreign import ccall "gamma.h gsl_sf_gamma_inc_P" gsl_sf_gamma_inc_P :: Double -> Double -> Double | ||
307 | |||
308 | -- | wrapper for int gsl_sf_gamma_inc_e(double a,double x,gsl_sf_result* result); | ||
309 | -- | ||
310 | -- <http://www.google.com/search?q=gsl_sf_gamma_inc_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
311 | gamma_inc_e :: Double -> Double -> (Double,Double) | ||
312 | gamma_inc_e a x = createSFR "gamma_inc_e" $ gsl_sf_gamma_inc_e a x | ||
313 | foreign import ccall "gamma.h gsl_sf_gamma_inc_e" gsl_sf_gamma_inc_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
314 | |||
315 | -- | wrapper for double gsl_sf_gamma_inc(double a,double x); | ||
316 | -- | ||
317 | -- <http://www.google.com/search?q=gsl_sf_gamma_inc&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
318 | gamma_inc :: Double -> Double -> Double | ||
319 | gamma_inc = gsl_sf_gamma_inc | ||
320 | foreign import ccall "gamma.h gsl_sf_gamma_inc" gsl_sf_gamma_inc :: Double -> Double -> Double | ||
321 | |||
322 | -- | wrapper for int gsl_sf_lnbeta_e(double a,double b,gsl_sf_result* result); | ||
323 | -- | ||
324 | -- <http://www.google.com/search?q=gsl_sf_lnbeta_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
325 | lnbeta_e :: Double -> Double -> (Double,Double) | ||
326 | lnbeta_e a b = createSFR "lnbeta_e" $ gsl_sf_lnbeta_e a b | ||
327 | foreign import ccall "gamma.h gsl_sf_lnbeta_e" gsl_sf_lnbeta_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
328 | |||
329 | -- | wrapper for double gsl_sf_lnbeta(double a,double b); | ||
330 | -- | ||
331 | -- <http://www.google.com/search?q=gsl_sf_lnbeta&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
332 | lnbeta :: Double -> Double -> Double | ||
333 | lnbeta = gsl_sf_lnbeta | ||
334 | foreign import ccall "gamma.h gsl_sf_lnbeta" gsl_sf_lnbeta :: Double -> Double -> Double | ||
335 | |||
336 | -- | wrapper for int gsl_sf_beta_e(double a,double b,gsl_sf_result* result); | ||
337 | -- | ||
338 | -- <http://www.google.com/search?q=gsl_sf_beta_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
339 | beta_e :: Double -> Double -> (Double,Double) | ||
340 | beta_e a b = createSFR "beta_e" $ gsl_sf_beta_e a b | ||
341 | foreign import ccall "gamma.h gsl_sf_beta_e" gsl_sf_beta_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
342 | |||
343 | -- | wrapper for double gsl_sf_beta(double a,double b); | ||
344 | -- | ||
345 | -- <http://www.google.com/search?q=gsl_sf_beta&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
346 | beta :: Double -> Double -> Double | ||
347 | beta = gsl_sf_beta | ||
348 | foreign import ccall "gamma.h gsl_sf_beta" gsl_sf_beta :: Double -> Double -> Double | ||
349 | |||
350 | -- | wrapper for int gsl_sf_beta_inc_e(double a,double b,double x,gsl_sf_result* result); | ||
351 | -- | ||
352 | -- <http://www.google.com/search?q=gsl_sf_beta_inc_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
353 | beta_inc_e :: Double -> Double -> Double -> (Double,Double) | ||
354 | beta_inc_e a b x = createSFR "beta_inc_e" $ gsl_sf_beta_inc_e a b x | ||
355 | foreign import ccall "gamma.h gsl_sf_beta_inc_e" gsl_sf_beta_inc_e :: Double -> Double -> Double -> Ptr Double -> IO(Int) | ||
356 | |||
357 | -- | wrapper for double gsl_sf_beta_inc(double a,double b,double x); | ||
358 | -- | ||
359 | -- <http://www.google.com/search?q=gsl_sf_beta_inc&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
360 | beta_inc :: Double -> Double -> Double -> Double | ||
361 | beta_inc = gsl_sf_beta_inc | ||
362 | foreign import ccall "gamma.h gsl_sf_beta_inc" gsl_sf_beta_inc :: Double -> Double -> Double -> Double | ||
diff --git a/lib/GSL/Special/Gegenbauer.hs b/lib/GSL/Special/Gegenbauer.hs deleted file mode 100644 index 9667042..0000000 --- a/lib/GSL/Special/Gegenbauer.hs +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Gegenbauer | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.google.com/search?q=gsl_sf_gegenbauer.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Gegenbauer( | ||
18 | gegenpoly_1_e | ||
19 | , gegenpoly_2_e | ||
20 | , gegenpoly_3_e | ||
21 | , gegenpoly_1 | ||
22 | , gegenpoly_2 | ||
23 | , gegenpoly_3 | ||
24 | , gegenpoly_n_e | ||
25 | , gegenpoly_n | ||
26 | ) where | ||
27 | |||
28 | import Foreign(Ptr) | ||
29 | import GSL.Special.Internal | ||
30 | |||
31 | -- | wrapper for int gsl_sf_gegenpoly_1_e(double lambda,double x,gsl_sf_result* result); | ||
32 | -- | ||
33 | -- <http://www.google.com/search?q=gsl_sf_gegenpoly_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
34 | gegenpoly_1_e :: Double -> Double -> (Double,Double) | ||
35 | gegenpoly_1_e lambda x = createSFR "gegenpoly_1_e" $ gsl_sf_gegenpoly_1_e lambda x | ||
36 | foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_1_e" gsl_sf_gegenpoly_1_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
37 | |||
38 | -- | wrapper for int gsl_sf_gegenpoly_2_e(double lambda,double x,gsl_sf_result* result); | ||
39 | -- | ||
40 | -- <http://www.google.com/search?q=gsl_sf_gegenpoly_2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
41 | gegenpoly_2_e :: Double -> Double -> (Double,Double) | ||
42 | gegenpoly_2_e lambda x = createSFR "gegenpoly_2_e" $ gsl_sf_gegenpoly_2_e lambda x | ||
43 | foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_2_e" gsl_sf_gegenpoly_2_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
44 | |||
45 | -- | wrapper for int gsl_sf_gegenpoly_3_e(double lambda,double x,gsl_sf_result* result); | ||
46 | -- | ||
47 | -- <http://www.google.com/search?q=gsl_sf_gegenpoly_3_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
48 | gegenpoly_3_e :: Double -> Double -> (Double,Double) | ||
49 | gegenpoly_3_e lambda x = createSFR "gegenpoly_3_e" $ gsl_sf_gegenpoly_3_e lambda x | ||
50 | foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_3_e" gsl_sf_gegenpoly_3_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
51 | |||
52 | -- | wrapper for double gsl_sf_gegenpoly_1(double lambda,double x); | ||
53 | -- | ||
54 | -- <http://www.google.com/search?q=gsl_sf_gegenpoly_1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
55 | gegenpoly_1 :: Double -> Double -> Double | ||
56 | gegenpoly_1 = gsl_sf_gegenpoly_1 | ||
57 | foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_1" gsl_sf_gegenpoly_1 :: Double -> Double -> Double | ||
58 | |||
59 | -- | wrapper for double gsl_sf_gegenpoly_2(double lambda,double x); | ||
60 | -- | ||
61 | -- <http://www.google.com/search?q=gsl_sf_gegenpoly_2&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
62 | gegenpoly_2 :: Double -> Double -> Double | ||
63 | gegenpoly_2 = gsl_sf_gegenpoly_2 | ||
64 | foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_2" gsl_sf_gegenpoly_2 :: Double -> Double -> Double | ||
65 | |||
66 | -- | wrapper for double gsl_sf_gegenpoly_3(double lambda,double x); | ||
67 | -- | ||
68 | -- <http://www.google.com/search?q=gsl_sf_gegenpoly_3&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
69 | gegenpoly_3 :: Double -> Double -> Double | ||
70 | gegenpoly_3 = gsl_sf_gegenpoly_3 | ||
71 | foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_3" gsl_sf_gegenpoly_3 :: Double -> Double -> Double | ||
72 | |||
73 | -- | wrapper for int gsl_sf_gegenpoly_n_e(int n,double lambda,double x,gsl_sf_result* result); | ||
74 | -- | ||
75 | -- <http://www.google.com/search?q=gsl_sf_gegenpoly_n_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
76 | gegenpoly_n_e :: Int -> Double -> Double -> (Double,Double) | ||
77 | gegenpoly_n_e n lambda x = createSFR "gegenpoly_n_e" $ gsl_sf_gegenpoly_n_e n lambda x | ||
78 | foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_n_e" gsl_sf_gegenpoly_n_e :: Int -> Double -> Double -> Ptr Double -> IO(Int) | ||
79 | |||
80 | -- | wrapper for double gsl_sf_gegenpoly_n(int n,double lambda,double x); | ||
81 | -- | ||
82 | -- <http://www.google.com/search?q=gsl_sf_gegenpoly_n&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
83 | gegenpoly_n :: Int -> Double -> Double -> Double | ||
84 | gegenpoly_n = gsl_sf_gegenpoly_n | ||
85 | foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_n" gsl_sf_gegenpoly_n :: Int -> Double -> Double -> Double | ||
86 | |||
87 | -- | wrapper for int gsl_sf_gegenpoly_array(int nmax,double lambda,double x,double* result_array); | ||
88 | -- | ||
89 | -- <http://www.google.com/search?q=gsl_sf_gegenpoly_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
90 | gegenpoly_array :: Int -> Double -> Double -> Ptr Double -> Int | ||
91 | gegenpoly_array = gsl_sf_gegenpoly_array | ||
92 | foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_array" gsl_sf_gegenpoly_array :: Int -> Double -> Double -> Ptr Double -> Int | ||
diff --git a/lib/GSL/Special/Hyperg.hs b/lib/GSL/Special/Hyperg.hs deleted file mode 100644 index f9551eb..0000000 --- a/lib/GSL/Special/Hyperg.hs +++ /dev/null | |||
@@ -1,197 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Hyperg | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.google.com/search?q=gsl_sf_hyperg.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Hyperg( | ||
18 | hyperg_0F1_e | ||
19 | , hyperg_0F1 | ||
20 | , hyperg_1F1_int_e | ||
21 | , hyperg_1F1_int | ||
22 | , hyperg_1F1_e | ||
23 | , hyperg_1F1 | ||
24 | , hyperg_U_int_e | ||
25 | , hyperg_U_int | ||
26 | , hyperg_U_int_e10_e | ||
27 | , hyperg_U_e | ||
28 | , hyperg_U | ||
29 | , hyperg_U_e10_e | ||
30 | , hyperg_2F1_e | ||
31 | , hyperg_2F1 | ||
32 | , hyperg_2F1_conj_e | ||
33 | , hyperg_2F1_conj | ||
34 | , hyperg_2F1_renorm_e | ||
35 | , hyperg_2F1_renorm | ||
36 | , hyperg_2F1_conj_renorm_e | ||
37 | , hyperg_2F1_conj_renorm | ||
38 | , hyperg_2F0_e | ||
39 | , hyperg_2F0 | ||
40 | ) where | ||
41 | |||
42 | import Foreign(Ptr) | ||
43 | import GSL.Special.Internal | ||
44 | |||
45 | -- | wrapper for int gsl_sf_hyperg_0F1_e(double c,double x,gsl_sf_result* result); | ||
46 | -- | ||
47 | -- <http://www.google.com/search?q=gsl_sf_hyperg_0F1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
48 | hyperg_0F1_e :: Double -> Double -> (Double,Double) | ||
49 | hyperg_0F1_e c x = createSFR "hyperg_0F1_e" $ gsl_sf_hyperg_0F1_e c x | ||
50 | foreign import ccall "hyperg.h gsl_sf_hyperg_0F1_e" gsl_sf_hyperg_0F1_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
51 | |||
52 | -- | wrapper for double gsl_sf_hyperg_0F1(double c,double x); | ||
53 | -- | ||
54 | -- <http://www.google.com/search?q=gsl_sf_hyperg_0F1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
55 | hyperg_0F1 :: Double -> Double -> Double | ||
56 | hyperg_0F1 = gsl_sf_hyperg_0F1 | ||
57 | foreign import ccall "hyperg.h gsl_sf_hyperg_0F1" gsl_sf_hyperg_0F1 :: Double -> Double -> Double | ||
58 | |||
59 | -- | wrapper for int gsl_sf_hyperg_1F1_int_e(int m,int n,double x,gsl_sf_result* result); | ||
60 | -- | ||
61 | -- <http://www.google.com/search?q=gsl_sf_hyperg_1F1_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
62 | hyperg_1F1_int_e :: Int -> Int -> Double -> (Double,Double) | ||
63 | hyperg_1F1_int_e m n x = createSFR "hyperg_1F1_int_e" $ gsl_sf_hyperg_1F1_int_e m n x | ||
64 | foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_int_e" gsl_sf_hyperg_1F1_int_e :: Int -> Int -> Double -> Ptr Double -> IO(Int) | ||
65 | |||
66 | -- | wrapper for double gsl_sf_hyperg_1F1_int(int m,int n,double x); | ||
67 | -- | ||
68 | -- <http://www.google.com/search?q=gsl_sf_hyperg_1F1_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
69 | hyperg_1F1_int :: Int -> Int -> Double -> Double | ||
70 | hyperg_1F1_int = gsl_sf_hyperg_1F1_int | ||
71 | foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_int" gsl_sf_hyperg_1F1_int :: Int -> Int -> Double -> Double | ||
72 | |||
73 | -- | wrapper for int gsl_sf_hyperg_1F1_e(double a,double b,double x,gsl_sf_result* result); | ||
74 | -- | ||
75 | -- <http://www.google.com/search?q=gsl_sf_hyperg_1F1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
76 | hyperg_1F1_e :: Double -> Double -> Double -> (Double,Double) | ||
77 | hyperg_1F1_e a b x = createSFR "hyperg_1F1_e" $ gsl_sf_hyperg_1F1_e a b x | ||
78 | foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_e" gsl_sf_hyperg_1F1_e :: Double -> Double -> Double -> Ptr Double -> IO(Int) | ||
79 | |||
80 | -- | wrapper for double gsl_sf_hyperg_1F1(double a,double b,double x); | ||
81 | -- | ||
82 | -- <http://www.google.com/search?q=gsl_sf_hyperg_1F1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
83 | hyperg_1F1 :: Double -> Double -> Double -> Double | ||
84 | hyperg_1F1 = gsl_sf_hyperg_1F1 | ||
85 | foreign import ccall "hyperg.h gsl_sf_hyperg_1F1" gsl_sf_hyperg_1F1 :: Double -> Double -> Double -> Double | ||
86 | |||
87 | -- | wrapper for int gsl_sf_hyperg_U_int_e(int m,int n,double x,gsl_sf_result* result); | ||
88 | -- | ||
89 | -- <http://www.google.com/search?q=gsl_sf_hyperg_U_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
90 | hyperg_U_int_e :: Int -> Int -> Double -> (Double,Double) | ||
91 | hyperg_U_int_e m n x = createSFR "hyperg_U_int_e" $ gsl_sf_hyperg_U_int_e m n x | ||
92 | foreign import ccall "hyperg.h gsl_sf_hyperg_U_int_e" gsl_sf_hyperg_U_int_e :: Int -> Int -> Double -> Ptr Double -> IO(Int) | ||
93 | |||
94 | -- | wrapper for double gsl_sf_hyperg_U_int(int m,int n,double x); | ||
95 | -- | ||
96 | -- <http://www.google.com/search?q=gsl_sf_hyperg_U_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
97 | hyperg_U_int :: Int -> Int -> Double -> Double | ||
98 | hyperg_U_int = gsl_sf_hyperg_U_int | ||
99 | foreign import ccall "hyperg.h gsl_sf_hyperg_U_int" gsl_sf_hyperg_U_int :: Int -> Int -> Double -> Double | ||
100 | |||
101 | -- | wrapper for int gsl_sf_hyperg_U_int_e10_e(int m,int n,double x,gsl_sf_result_e10* result); | ||
102 | -- | ||
103 | -- <http://www.google.com/search?q=gsl_sf_hyperg_U_int_e10_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
104 | hyperg_U_int_e10_e :: Int -> Int -> Double -> (Double,Int,Double) | ||
105 | hyperg_U_int_e10_e m n x = createSFR_E10 "hyperg_U_int_e10_e" $ gsl_sf_hyperg_U_int_e10_e m n x | ||
106 | foreign import ccall "hyperg.h gsl_sf_hyperg_U_int_e10_e" gsl_sf_hyperg_U_int_e10_e :: Int -> Int -> Double -> Ptr () -> IO(Int) | ||
107 | |||
108 | -- | wrapper for int gsl_sf_hyperg_U_e(double a,double b,double x,gsl_sf_result* result); | ||
109 | -- | ||
110 | -- <http://www.google.com/search?q=gsl_sf_hyperg_U_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
111 | hyperg_U_e :: Double -> Double -> Double -> (Double,Double) | ||
112 | hyperg_U_e a b x = createSFR "hyperg_U_e" $ gsl_sf_hyperg_U_e a b x | ||
113 | foreign import ccall "hyperg.h gsl_sf_hyperg_U_e" gsl_sf_hyperg_U_e :: Double -> Double -> Double -> Ptr Double -> IO(Int) | ||
114 | |||
115 | -- | wrapper for double gsl_sf_hyperg_U(double a,double b,double x); | ||
116 | -- | ||
117 | -- <http://www.google.com/search?q=gsl_sf_hyperg_U&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
118 | hyperg_U :: Double -> Double -> Double -> Double | ||
119 | hyperg_U = gsl_sf_hyperg_U | ||
120 | foreign import ccall "hyperg.h gsl_sf_hyperg_U" gsl_sf_hyperg_U :: Double -> Double -> Double -> Double | ||
121 | |||
122 | -- | wrapper for int gsl_sf_hyperg_U_e10_e(double a,double b,double x,gsl_sf_result_e10* result); | ||
123 | -- | ||
124 | -- <http://www.google.com/search?q=gsl_sf_hyperg_U_e10_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
125 | hyperg_U_e10_e :: Double -> Double -> Double -> (Double,Int,Double) | ||
126 | hyperg_U_e10_e a b x = createSFR_E10 "hyperg_U_e10_e" $ gsl_sf_hyperg_U_e10_e a b x | ||
127 | foreign import ccall "hyperg.h gsl_sf_hyperg_U_e10_e" gsl_sf_hyperg_U_e10_e :: Double -> Double -> Double -> Ptr () -> IO(Int) | ||
128 | |||
129 | -- | wrapper for int gsl_sf_hyperg_2F1_e(double a,double b,double c,double x,gsl_sf_result* result); | ||
130 | -- | ||
131 | -- <http://www.google.com/search?q=gsl_sf_hyperg_2F1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
132 | hyperg_2F1_e :: Double -> Double -> Double -> Double -> (Double,Double) | ||
133 | hyperg_2F1_e a b c x = createSFR "hyperg_2F1_e" $ gsl_sf_hyperg_2F1_e a b c x | ||
134 | foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_e" gsl_sf_hyperg_2F1_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int) | ||
135 | |||
136 | -- | wrapper for double gsl_sf_hyperg_2F1(double a,double b,double c,double x); | ||
137 | -- | ||
138 | -- <http://www.google.com/search?q=gsl_sf_hyperg_2F1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
139 | hyperg_2F1 :: Double -> Double -> Double -> Double -> Double | ||
140 | hyperg_2F1 = gsl_sf_hyperg_2F1 | ||
141 | foreign import ccall "hyperg.h gsl_sf_hyperg_2F1" gsl_sf_hyperg_2F1 :: Double -> Double -> Double -> Double -> Double | ||
142 | |||
143 | -- | wrapper for int gsl_sf_hyperg_2F1_conj_e(double aR,double aI,double c,double x,gsl_sf_result* result); | ||
144 | -- | ||
145 | -- <http://www.google.com/search?q=gsl_sf_hyperg_2F1_conj_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
146 | hyperg_2F1_conj_e :: Double -> Double -> Double -> Double -> (Double,Double) | ||
147 | hyperg_2F1_conj_e aR aI c x = createSFR "hyperg_2F1_conj_e" $ gsl_sf_hyperg_2F1_conj_e aR aI c x | ||
148 | foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_conj_e" gsl_sf_hyperg_2F1_conj_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int) | ||
149 | |||
150 | -- | wrapper for double gsl_sf_hyperg_2F1_conj(double aR,double aI,double c,double x); | ||
151 | -- | ||
152 | -- <http://www.google.com/search?q=gsl_sf_hyperg_2F1_conj&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
153 | hyperg_2F1_conj :: Double -> Double -> Double -> Double -> Double | ||
154 | hyperg_2F1_conj = gsl_sf_hyperg_2F1_conj | ||
155 | foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_conj" gsl_sf_hyperg_2F1_conj :: Double -> Double -> Double -> Double -> Double | ||
156 | |||
157 | -- | wrapper for int gsl_sf_hyperg_2F1_renorm_e(double a,double b,double c,double x,gsl_sf_result* result); | ||
158 | -- | ||
159 | -- <http://www.google.com/search?q=gsl_sf_hyperg_2F1_renorm_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
160 | hyperg_2F1_renorm_e :: Double -> Double -> Double -> Double -> (Double,Double) | ||
161 | hyperg_2F1_renorm_e a b c x = createSFR "hyperg_2F1_renorm_e" $ gsl_sf_hyperg_2F1_renorm_e a b c x | ||
162 | foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_renorm_e" gsl_sf_hyperg_2F1_renorm_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int) | ||
163 | |||
164 | -- | wrapper for double gsl_sf_hyperg_2F1_renorm(double a,double b,double c,double x); | ||
165 | -- | ||
166 | -- <http://www.google.com/search?q=gsl_sf_hyperg_2F1_renorm&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
167 | hyperg_2F1_renorm :: Double -> Double -> Double -> Double -> Double | ||
168 | hyperg_2F1_renorm = gsl_sf_hyperg_2F1_renorm | ||
169 | foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_renorm" gsl_sf_hyperg_2F1_renorm :: Double -> Double -> Double -> Double -> Double | ||
170 | |||
171 | -- | wrapper for int gsl_sf_hyperg_2F1_conj_renorm_e(double aR,double aI,double c,double x,gsl_sf_result* result); | ||
172 | -- | ||
173 | -- <http://www.google.com/search?q=gsl_sf_hyperg_2F1_conj_renorm_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
174 | hyperg_2F1_conj_renorm_e :: Double -> Double -> Double -> Double -> (Double,Double) | ||
175 | hyperg_2F1_conj_renorm_e aR aI c x = createSFR "hyperg_2F1_conj_renorm_e" $ gsl_sf_hyperg_2F1_conj_renorm_e aR aI c x | ||
176 | foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_conj_renorm_e" gsl_sf_hyperg_2F1_conj_renorm_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int) | ||
177 | |||
178 | -- | wrapper for double gsl_sf_hyperg_2F1_conj_renorm(double aR,double aI,double c,double x); | ||
179 | -- | ||
180 | -- <http://www.google.com/search?q=gsl_sf_hyperg_2F1_conj_renorm&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
181 | hyperg_2F1_conj_renorm :: Double -> Double -> Double -> Double -> Double | ||
182 | hyperg_2F1_conj_renorm = gsl_sf_hyperg_2F1_conj_renorm | ||
183 | foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_conj_renorm" gsl_sf_hyperg_2F1_conj_renorm :: Double -> Double -> Double -> Double -> Double | ||
184 | |||
185 | -- | wrapper for int gsl_sf_hyperg_2F0_e(double a,double b,double x,gsl_sf_result* result); | ||
186 | -- | ||
187 | -- <http://www.google.com/search?q=gsl_sf_hyperg_2F0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
188 | hyperg_2F0_e :: Double -> Double -> Double -> (Double,Double) | ||
189 | hyperg_2F0_e a b x = createSFR "hyperg_2F0_e" $ gsl_sf_hyperg_2F0_e a b x | ||
190 | foreign import ccall "hyperg.h gsl_sf_hyperg_2F0_e" gsl_sf_hyperg_2F0_e :: Double -> Double -> Double -> Ptr Double -> IO(Int) | ||
191 | |||
192 | -- | wrapper for double gsl_sf_hyperg_2F0(double a,double b,double x); | ||
193 | -- | ||
194 | -- <http://www.google.com/search?q=gsl_sf_hyperg_2F0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
195 | hyperg_2F0 :: Double -> Double -> Double -> Double | ||
196 | hyperg_2F0 = gsl_sf_hyperg_2F0 | ||
197 | foreign import ccall "hyperg.h gsl_sf_hyperg_2F0" gsl_sf_hyperg_2F0 :: Double -> Double -> Double -> Double | ||
diff --git a/lib/GSL/Special/Internal.hs b/lib/GSL/Special/Internal.hs deleted file mode 100644 index 8d81c72..0000000 --- a/lib/GSL/Special/Internal.hs +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | {-# OPTIONS #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | {- | | ||
4 | Module : GSL.Special.Internal | ||
5 | Copyright : (c) Alberto Ruiz 2007 | ||
6 | License : GPL-style | ||
7 | |||
8 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
9 | Stability : provisional | ||
10 | Portability : uses ffi | ||
11 | |||
12 | Support for Special functions. | ||
13 | |||
14 | <http://www.gnu.org/software/gsl/manual/html_node/Special-Functions.html#Special-Functions> | ||
15 | -} | ||
16 | ----------------------------------------------------------------------------- | ||
17 | |||
18 | module GSL.Special.Internal ( | ||
19 | createSFR, | ||
20 | createSFR_E10, | ||
21 | Precision(..), | ||
22 | Gsl_mode_t, | ||
23 | Size_t, | ||
24 | precCode | ||
25 | ) | ||
26 | where | ||
27 | |||
28 | import Foreign | ||
29 | import Data.Packed.Internal(check,(//)) | ||
30 | |||
31 | |||
32 | data Precision = PrecDouble | PrecSingle | PrecApprox | ||
33 | |||
34 | precCode :: Precision -> Int | ||
35 | precCode PrecDouble = 0 | ||
36 | precCode PrecSingle = 1 | ||
37 | precCode PrecApprox = 2 | ||
38 | |||
39 | type Gsl_mode_t = Int | ||
40 | |||
41 | type Size_t = Int | ||
42 | |||
43 | ---------------------------------------------------------------- | ||
44 | -- | access to a sf_result | ||
45 | createSFR :: Storable a => String -> (Ptr a -> IO Int) -> (a, a) | ||
46 | createSFR s f = unsafePerformIO $ do | ||
47 | p <- mallocArray 2 | ||
48 | f p // check s [] | ||
49 | [val,err] <- peekArray 2 p | ||
50 | free p | ||
51 | return (val,err) | ||
52 | |||
53 | |||
54 | --------------------------------------------------------------------- | ||
55 | -- the sf_result_e10 contains two doubles and the exponent | ||
56 | |||
57 | -- | acces to sf_result_e10 | ||
58 | createSFR_E10 :: (Storable t2, Storable t3, Storable t1) => String -> (Ptr a -> IO Int) -> (t1, t2, t3) | ||
59 | createSFR_E10 s f = unsafePerformIO $ do | ||
60 | let sd = sizeOf (0::Double) | ||
61 | let si = sizeOf (0::Int) | ||
62 | p <- mallocBytes (2*sd + si) | ||
63 | f p // check s [] | ||
64 | val <- peekByteOff p 0 | ||
65 | err <- peekByteOff p sd | ||
66 | expo <- peekByteOff p (2*sd) | ||
67 | free p | ||
68 | return (val,expo,err) | ||
diff --git a/lib/GSL/Special/Laguerre.hs b/lib/GSL/Special/Laguerre.hs deleted file mode 100644 index f5ab85e..0000000 --- a/lib/GSL/Special/Laguerre.hs +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Laguerre | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.google.com/search?q=gsl_sf_laguerre.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Laguerre( | ||
18 | laguerre_1_e | ||
19 | , laguerre_2_e | ||
20 | , laguerre_3_e | ||
21 | , laguerre_1 | ||
22 | , laguerre_2 | ||
23 | , laguerre_3 | ||
24 | , laguerre_n_e | ||
25 | , laguerre_n | ||
26 | ) where | ||
27 | |||
28 | import Foreign(Ptr) | ||
29 | import GSL.Special.Internal | ||
30 | |||
31 | -- | wrapper for int gsl_sf_laguerre_1_e(double a,double x,gsl_sf_result* result); | ||
32 | -- | ||
33 | -- <http://www.google.com/search?q=gsl_sf_laguerre_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
34 | laguerre_1_e :: Double -> Double -> (Double,Double) | ||
35 | laguerre_1_e a x = createSFR "laguerre_1_e" $ gsl_sf_laguerre_1_e a x | ||
36 | foreign import ccall "laguerre.h gsl_sf_laguerre_1_e" gsl_sf_laguerre_1_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
37 | |||
38 | -- | wrapper for int gsl_sf_laguerre_2_e(double a,double x,gsl_sf_result* result); | ||
39 | -- | ||
40 | -- <http://www.google.com/search?q=gsl_sf_laguerre_2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
41 | laguerre_2_e :: Double -> Double -> (Double,Double) | ||
42 | laguerre_2_e a x = createSFR "laguerre_2_e" $ gsl_sf_laguerre_2_e a x | ||
43 | foreign import ccall "laguerre.h gsl_sf_laguerre_2_e" gsl_sf_laguerre_2_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
44 | |||
45 | -- | wrapper for int gsl_sf_laguerre_3_e(double a,double x,gsl_sf_result* result); | ||
46 | -- | ||
47 | -- <http://www.google.com/search?q=gsl_sf_laguerre_3_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
48 | laguerre_3_e :: Double -> Double -> (Double,Double) | ||
49 | laguerre_3_e a x = createSFR "laguerre_3_e" $ gsl_sf_laguerre_3_e a x | ||
50 | foreign import ccall "laguerre.h gsl_sf_laguerre_3_e" gsl_sf_laguerre_3_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
51 | |||
52 | -- | wrapper for double gsl_sf_laguerre_1(double a,double x); | ||
53 | -- | ||
54 | -- <http://www.google.com/search?q=gsl_sf_laguerre_1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
55 | laguerre_1 :: Double -> Double -> Double | ||
56 | laguerre_1 = gsl_sf_laguerre_1 | ||
57 | foreign import ccall "laguerre.h gsl_sf_laguerre_1" gsl_sf_laguerre_1 :: Double -> Double -> Double | ||
58 | |||
59 | -- | wrapper for double gsl_sf_laguerre_2(double a,double x); | ||
60 | -- | ||
61 | -- <http://www.google.com/search?q=gsl_sf_laguerre_2&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
62 | laguerre_2 :: Double -> Double -> Double | ||
63 | laguerre_2 = gsl_sf_laguerre_2 | ||
64 | foreign import ccall "laguerre.h gsl_sf_laguerre_2" gsl_sf_laguerre_2 :: Double -> Double -> Double | ||
65 | |||
66 | -- | wrapper for double gsl_sf_laguerre_3(double a,double x); | ||
67 | -- | ||
68 | -- <http://www.google.com/search?q=gsl_sf_laguerre_3&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
69 | laguerre_3 :: Double -> Double -> Double | ||
70 | laguerre_3 = gsl_sf_laguerre_3 | ||
71 | foreign import ccall "laguerre.h gsl_sf_laguerre_3" gsl_sf_laguerre_3 :: Double -> Double -> Double | ||
72 | |||
73 | -- | wrapper for int gsl_sf_laguerre_n_e(int n,double a,double x,gsl_sf_result* result); | ||
74 | -- | ||
75 | -- <http://www.google.com/search?q=gsl_sf_laguerre_n_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
76 | laguerre_n_e :: Int -> Double -> Double -> (Double,Double) | ||
77 | laguerre_n_e n a x = createSFR "laguerre_n_e" $ gsl_sf_laguerre_n_e n a x | ||
78 | foreign import ccall "laguerre.h gsl_sf_laguerre_n_e" gsl_sf_laguerre_n_e :: Int -> Double -> Double -> Ptr Double -> IO(Int) | ||
79 | |||
80 | -- | wrapper for double gsl_sf_laguerre_n(int n,double a,double x); | ||
81 | -- | ||
82 | -- <http://www.google.com/search?q=gsl_sf_laguerre_n&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
83 | laguerre_n :: Int -> Double -> Double -> Double | ||
84 | laguerre_n = gsl_sf_laguerre_n | ||
85 | foreign import ccall "laguerre.h gsl_sf_laguerre_n" gsl_sf_laguerre_n :: Int -> Double -> Double -> Double | ||
diff --git a/lib/GSL/Special/Lambert.hs b/lib/GSL/Special/Lambert.hs deleted file mode 100644 index 5e8fed9..0000000 --- a/lib/GSL/Special/Lambert.hs +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Lambert | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.google.com/search?q=gsl_sf_lambert.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Lambert( | ||
18 | lambert_W0_e | ||
19 | , lambert_W0 | ||
20 | , lambert_Wm1_e | ||
21 | , lambert_Wm1 | ||
22 | ) where | ||
23 | |||
24 | import Foreign(Ptr) | ||
25 | import GSL.Special.Internal | ||
26 | |||
27 | -- | wrapper for int gsl_sf_lambert_W0_e(double x,gsl_sf_result* result); | ||
28 | -- | ||
29 | -- <http://www.google.com/search?q=gsl_sf_lambert_W0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
30 | lambert_W0_e :: Double -> (Double,Double) | ||
31 | lambert_W0_e x = createSFR "lambert_W0_e" $ gsl_sf_lambert_W0_e x | ||
32 | foreign import ccall "lambert.h gsl_sf_lambert_W0_e" gsl_sf_lambert_W0_e :: Double -> Ptr Double -> IO(Int) | ||
33 | |||
34 | -- | wrapper for double gsl_sf_lambert_W0(double x); | ||
35 | -- | ||
36 | -- <http://www.google.com/search?q=gsl_sf_lambert_W0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
37 | lambert_W0 :: Double -> Double | ||
38 | lambert_W0 = gsl_sf_lambert_W0 | ||
39 | foreign import ccall "lambert.h gsl_sf_lambert_W0" gsl_sf_lambert_W0 :: Double -> Double | ||
40 | |||
41 | -- | wrapper for int gsl_sf_lambert_Wm1_e(double x,gsl_sf_result* result); | ||
42 | -- | ||
43 | -- <http://www.google.com/search?q=gsl_sf_lambert_Wm1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
44 | lambert_Wm1_e :: Double -> (Double,Double) | ||
45 | lambert_Wm1_e x = createSFR "lambert_Wm1_e" $ gsl_sf_lambert_Wm1_e x | ||
46 | foreign import ccall "lambert.h gsl_sf_lambert_Wm1_e" gsl_sf_lambert_Wm1_e :: Double -> Ptr Double -> IO(Int) | ||
47 | |||
48 | -- | wrapper for double gsl_sf_lambert_Wm1(double x); | ||
49 | -- | ||
50 | -- <http://www.google.com/search?q=gsl_sf_lambert_Wm1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
51 | lambert_Wm1 :: Double -> Double | ||
52 | lambert_Wm1 = gsl_sf_lambert_Wm1 | ||
53 | foreign import ccall "lambert.h gsl_sf_lambert_Wm1" gsl_sf_lambert_Wm1 :: Double -> Double | ||
diff --git a/lib/GSL/Special/Legendre.hs b/lib/GSL/Special/Legendre.hs deleted file mode 100644 index 70315e9..0000000 --- a/lib/GSL/Special/Legendre.hs +++ /dev/null | |||
@@ -1,278 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Legendre | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.gnu.org/software/gsl/manual/html_node/Legendre-Functions-and-Spherical-Harmonics.html> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Legendre( | ||
18 | legendre_Pl_e | ||
19 | , legendre_Pl | ||
20 | , legendre_P1_e | ||
21 | , legendre_P2_e | ||
22 | , legendre_P3_e | ||
23 | , legendre_P1 | ||
24 | , legendre_P2 | ||
25 | , legendre_P3 | ||
26 | , legendre_Q0_e | ||
27 | , legendre_Q0 | ||
28 | , legendre_Q1_e | ||
29 | , legendre_Q1 | ||
30 | , legendre_Ql_e | ||
31 | , legendre_Ql | ||
32 | , legendre_Plm_e | ||
33 | , legendre_Plm | ||
34 | , legendre_sphPlm_e | ||
35 | , legendre_sphPlm | ||
36 | , legendre_array_size | ||
37 | , conicalP_half_e | ||
38 | , conicalP_half | ||
39 | , conicalP_mhalf_e | ||
40 | , conicalP_mhalf | ||
41 | , conicalP_0_e | ||
42 | , conicalP_0 | ||
43 | , conicalP_1_e | ||
44 | , conicalP_1 | ||
45 | , conicalP_sph_reg_e | ||
46 | , conicalP_sph_reg | ||
47 | , conicalP_cyl_reg_e | ||
48 | , conicalP_cyl_reg | ||
49 | , legendre_H3d_0_e | ||
50 | , legendre_H3d_0 | ||
51 | , legendre_H3d_1_e | ||
52 | , legendre_H3d_1 | ||
53 | , legendre_H3d_e | ||
54 | , legendre_H3d | ||
55 | ) where | ||
56 | |||
57 | import Foreign(Ptr) | ||
58 | import GSL.Special.Internal | ||
59 | |||
60 | -- | wrapper for int gsl_sf_legendre_Pl_e(int l,double x,gsl_sf_result* result); | ||
61 | legendre_Pl_e :: Int -> Double -> (Double,Double) | ||
62 | legendre_Pl_e l x = createSFR "legendre_Pl_e" $ gsl_sf_legendre_Pl_e l x | ||
63 | foreign import ccall "legendre.h gsl_sf_legendre_Pl_e" gsl_sf_legendre_Pl_e :: Int -> Double -> Ptr Double -> IO(Int) | ||
64 | |||
65 | -- | wrapper for double gsl_sf_legendre_Pl(int l,double x); | ||
66 | legendre_Pl :: Int -> Double -> Double | ||
67 | legendre_Pl = gsl_sf_legendre_Pl | ||
68 | foreign import ccall "legendre.h gsl_sf_legendre_Pl" gsl_sf_legendre_Pl :: Int -> Double -> Double | ||
69 | |||
70 | -- | wrapper for int gsl_sf_legendre_Pl_array(int lmax,double x,double* result_array); | ||
71 | legendre_Pl_array :: Int -> Double -> Ptr Double -> Int | ||
72 | legendre_Pl_array = gsl_sf_legendre_Pl_array | ||
73 | foreign import ccall "legendre.h gsl_sf_legendre_Pl_array" gsl_sf_legendre_Pl_array :: Int -> Double -> Ptr Double -> Int | ||
74 | |||
75 | -- | wrapper for int gsl_sf_legendre_Pl_deriv_array(int lmax,double x,double* result_array,double* result_deriv_array); | ||
76 | legendre_Pl_deriv_array :: Int -> Double -> Ptr Double -> Ptr Double -> Int | ||
77 | legendre_Pl_deriv_array = gsl_sf_legendre_Pl_deriv_array | ||
78 | foreign import ccall "legendre.h gsl_sf_legendre_Pl_deriv_array" gsl_sf_legendre_Pl_deriv_array :: Int -> Double -> Ptr Double -> Ptr Double -> Int | ||
79 | |||
80 | -- | wrapper for int gsl_sf_legendre_P1_e(double x,gsl_sf_result* result); | ||
81 | legendre_P1_e :: Double -> (Double,Double) | ||
82 | legendre_P1_e x = createSFR "legendre_P1_e" $ gsl_sf_legendre_P1_e x | ||
83 | foreign import ccall "legendre.h gsl_sf_legendre_P1_e" gsl_sf_legendre_P1_e :: Double -> Ptr Double -> IO(Int) | ||
84 | |||
85 | -- | wrapper for int gsl_sf_legendre_P2_e(double x,gsl_sf_result* result); | ||
86 | legendre_P2_e :: Double -> (Double,Double) | ||
87 | legendre_P2_e x = createSFR "legendre_P2_e" $ gsl_sf_legendre_P2_e x | ||
88 | foreign import ccall "legendre.h gsl_sf_legendre_P2_e" gsl_sf_legendre_P2_e :: Double -> Ptr Double -> IO(Int) | ||
89 | |||
90 | -- | wrapper for int gsl_sf_legendre_P3_e(double x,gsl_sf_result* result); | ||
91 | legendre_P3_e :: Double -> (Double,Double) | ||
92 | legendre_P3_e x = createSFR "legendre_P3_e" $ gsl_sf_legendre_P3_e x | ||
93 | foreign import ccall "legendre.h gsl_sf_legendre_P3_e" gsl_sf_legendre_P3_e :: Double -> Ptr Double -> IO(Int) | ||
94 | |||
95 | -- | wrapper for double gsl_sf_legendre_P1(double x); | ||
96 | legendre_P1 :: Double -> Double | ||
97 | legendre_P1 = gsl_sf_legendre_P1 | ||
98 | foreign import ccall "legendre.h gsl_sf_legendre_P1" gsl_sf_legendre_P1 :: Double -> Double | ||
99 | |||
100 | -- | wrapper for double gsl_sf_legendre_P2(double x); | ||
101 | legendre_P2 :: Double -> Double | ||
102 | legendre_P2 = gsl_sf_legendre_P2 | ||
103 | foreign import ccall "legendre.h gsl_sf_legendre_P2" gsl_sf_legendre_P2 :: Double -> Double | ||
104 | |||
105 | -- | wrapper for double gsl_sf_legendre_P3(double x); | ||
106 | legendre_P3 :: Double -> Double | ||
107 | legendre_P3 = gsl_sf_legendre_P3 | ||
108 | foreign import ccall "legendre.h gsl_sf_legendre_P3" gsl_sf_legendre_P3 :: Double -> Double | ||
109 | |||
110 | -- | wrapper for int gsl_sf_legendre_Q0_e(double x,gsl_sf_result* result); | ||
111 | legendre_Q0_e :: Double -> (Double,Double) | ||
112 | legendre_Q0_e x = createSFR "legendre_Q0_e" $ gsl_sf_legendre_Q0_e x | ||
113 | foreign import ccall "legendre.h gsl_sf_legendre_Q0_e" gsl_sf_legendre_Q0_e :: Double -> Ptr Double -> IO(Int) | ||
114 | |||
115 | -- | wrapper for double gsl_sf_legendre_Q0(double x); | ||
116 | legendre_Q0 :: Double -> Double | ||
117 | legendre_Q0 = gsl_sf_legendre_Q0 | ||
118 | foreign import ccall "legendre.h gsl_sf_legendre_Q0" gsl_sf_legendre_Q0 :: Double -> Double | ||
119 | |||
120 | -- | wrapper for int gsl_sf_legendre_Q1_e(double x,gsl_sf_result* result); | ||
121 | legendre_Q1_e :: Double -> (Double,Double) | ||
122 | legendre_Q1_e x = createSFR "legendre_Q1_e" $ gsl_sf_legendre_Q1_e x | ||
123 | foreign import ccall "legendre.h gsl_sf_legendre_Q1_e" gsl_sf_legendre_Q1_e :: Double -> Ptr Double -> IO(Int) | ||
124 | |||
125 | -- | wrapper for double gsl_sf_legendre_Q1(double x); | ||
126 | legendre_Q1 :: Double -> Double | ||
127 | legendre_Q1 = gsl_sf_legendre_Q1 | ||
128 | foreign import ccall "legendre.h gsl_sf_legendre_Q1" gsl_sf_legendre_Q1 :: Double -> Double | ||
129 | |||
130 | -- | wrapper for int gsl_sf_legendre_Ql_e(int l,double x,gsl_sf_result* result); | ||
131 | legendre_Ql_e :: Int -> Double -> (Double,Double) | ||
132 | legendre_Ql_e l x = createSFR "legendre_Ql_e" $ gsl_sf_legendre_Ql_e l x | ||
133 | foreign import ccall "legendre.h gsl_sf_legendre_Ql_e" gsl_sf_legendre_Ql_e :: Int -> Double -> Ptr Double -> IO(Int) | ||
134 | |||
135 | -- | wrapper for double gsl_sf_legendre_Ql(int l,double x); | ||
136 | legendre_Ql :: Int -> Double -> Double | ||
137 | legendre_Ql = gsl_sf_legendre_Ql | ||
138 | foreign import ccall "legendre.h gsl_sf_legendre_Ql" gsl_sf_legendre_Ql :: Int -> Double -> Double | ||
139 | |||
140 | -- | wrapper for int gsl_sf_legendre_Plm_e(int l,int m,double x,gsl_sf_result* result); | ||
141 | legendre_Plm_e :: Int -> Int -> Double -> (Double,Double) | ||
142 | legendre_Plm_e l m x = createSFR "legendre_Plm_e" $ gsl_sf_legendre_Plm_e l m x | ||
143 | foreign import ccall "legendre.h gsl_sf_legendre_Plm_e" gsl_sf_legendre_Plm_e :: Int -> Int -> Double -> Ptr Double -> IO(Int) | ||
144 | |||
145 | -- | wrapper for double gsl_sf_legendre_Plm(int l,int m,double x); | ||
146 | legendre_Plm :: Int -> Int -> Double -> Double | ||
147 | legendre_Plm = gsl_sf_legendre_Plm | ||
148 | foreign import ccall "legendre.h gsl_sf_legendre_Plm" gsl_sf_legendre_Plm :: Int -> Int -> Double -> Double | ||
149 | |||
150 | -- | wrapper for int gsl_sf_legendre_Plm_array(int lmax,int m,double x,double* result_array); | ||
151 | legendre_Plm_array :: Int -> Int -> Double -> Ptr Double -> Int | ||
152 | legendre_Plm_array = gsl_sf_legendre_Plm_array | ||
153 | foreign import ccall "legendre.h gsl_sf_legendre_Plm_array" gsl_sf_legendre_Plm_array :: Int -> Int -> Double -> Ptr Double -> Int | ||
154 | |||
155 | -- | wrapper for int gsl_sf_legendre_Plm_deriv_array(int lmax,int m,double x,double* result_array,double* result_deriv_array); | ||
156 | legendre_Plm_deriv_array :: Int -> Int -> Double -> Ptr Double -> Ptr Double -> Int | ||
157 | legendre_Plm_deriv_array = gsl_sf_legendre_Plm_deriv_array | ||
158 | foreign import ccall "legendre.h gsl_sf_legendre_Plm_deriv_array" gsl_sf_legendre_Plm_deriv_array :: Int -> Int -> Double -> Ptr Double -> Ptr Double -> Int | ||
159 | |||
160 | -- | wrapper for int gsl_sf_legendre_sphPlm_e(int l,int m,double x,gsl_sf_result* result); | ||
161 | legendre_sphPlm_e :: Int -> Int -> Double -> (Double,Double) | ||
162 | legendre_sphPlm_e l m x = createSFR "legendre_sphPlm_e" $ gsl_sf_legendre_sphPlm_e l m x | ||
163 | foreign import ccall "legendre.h gsl_sf_legendre_sphPlm_e" gsl_sf_legendre_sphPlm_e :: Int -> Int -> Double -> Ptr Double -> IO(Int) | ||
164 | |||
165 | -- | wrapper for double gsl_sf_legendre_sphPlm(int l,int m,double x); | ||
166 | legendre_sphPlm :: Int -> Int -> Double -> Double | ||
167 | legendre_sphPlm = gsl_sf_legendre_sphPlm | ||
168 | foreign import ccall "legendre.h gsl_sf_legendre_sphPlm" gsl_sf_legendre_sphPlm :: Int -> Int -> Double -> Double | ||
169 | |||
170 | -- | wrapper for int gsl_sf_legendre_sphPlm_array(int lmax,int m,double x,double* result_array); | ||
171 | legendre_sphPlm_array :: Int -> Int -> Double -> Ptr Double -> Int | ||
172 | legendre_sphPlm_array = gsl_sf_legendre_sphPlm_array | ||
173 | foreign import ccall "legendre.h gsl_sf_legendre_sphPlm_array" gsl_sf_legendre_sphPlm_array :: Int -> Int -> Double -> Ptr Double -> Int | ||
174 | |||
175 | -- | wrapper for int gsl_sf_legendre_sphPlm_deriv_array(int lmax,int m,double x,double* result_array,double* result_deriv_array); | ||
176 | legendre_sphPlm_deriv_array :: Int -> Int -> Double -> Ptr Double -> Ptr Double -> Int | ||
177 | legendre_sphPlm_deriv_array = gsl_sf_legendre_sphPlm_deriv_array | ||
178 | foreign import ccall "legendre.h gsl_sf_legendre_sphPlm_deriv_array" gsl_sf_legendre_sphPlm_deriv_array :: Int -> Int -> Double -> Ptr Double -> Ptr Double -> Int | ||
179 | |||
180 | -- | wrapper for int gsl_sf_legendre_array_size(int lmax,int m); | ||
181 | legendre_array_size :: Int -> Int -> Int | ||
182 | legendre_array_size = gsl_sf_legendre_array_size | ||
183 | foreign import ccall "legendre.h gsl_sf_legendre_array_size" gsl_sf_legendre_array_size :: Int -> Int -> Int | ||
184 | |||
185 | -- | wrapper for int gsl_sf_conicalP_half_e(double lambda,double x,gsl_sf_result* result); | ||
186 | conicalP_half_e :: Double -> Double -> (Double,Double) | ||
187 | conicalP_half_e lambda x = createSFR "conicalP_half_e" $ gsl_sf_conicalP_half_e lambda x | ||
188 | foreign import ccall "legendre.h gsl_sf_conicalP_half_e" gsl_sf_conicalP_half_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
189 | |||
190 | -- | wrapper for double gsl_sf_conicalP_half(double lambda,double x); | ||
191 | conicalP_half :: Double -> Double -> Double | ||
192 | conicalP_half = gsl_sf_conicalP_half | ||
193 | foreign import ccall "legendre.h gsl_sf_conicalP_half" gsl_sf_conicalP_half :: Double -> Double -> Double | ||
194 | |||
195 | -- | wrapper for int gsl_sf_conicalP_mhalf_e(double lambda,double x,gsl_sf_result* result); | ||
196 | conicalP_mhalf_e :: Double -> Double -> (Double,Double) | ||
197 | conicalP_mhalf_e lambda x = createSFR "conicalP_mhalf_e" $ gsl_sf_conicalP_mhalf_e lambda x | ||
198 | foreign import ccall "legendre.h gsl_sf_conicalP_mhalf_e" gsl_sf_conicalP_mhalf_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
199 | |||
200 | -- | wrapper for double gsl_sf_conicalP_mhalf(double lambda,double x); | ||
201 | conicalP_mhalf :: Double -> Double -> Double | ||
202 | conicalP_mhalf = gsl_sf_conicalP_mhalf | ||
203 | foreign import ccall "legendre.h gsl_sf_conicalP_mhalf" gsl_sf_conicalP_mhalf :: Double -> Double -> Double | ||
204 | |||
205 | -- | wrapper for int gsl_sf_conicalP_0_e(double lambda,double x,gsl_sf_result* result); | ||
206 | conicalP_0_e :: Double -> Double -> (Double,Double) | ||
207 | conicalP_0_e lambda x = createSFR "conicalP_0_e" $ gsl_sf_conicalP_0_e lambda x | ||
208 | foreign import ccall "legendre.h gsl_sf_conicalP_0_e" gsl_sf_conicalP_0_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
209 | |||
210 | -- | wrapper for double gsl_sf_conicalP_0(double lambda,double x); | ||
211 | conicalP_0 :: Double -> Double -> Double | ||
212 | conicalP_0 = gsl_sf_conicalP_0 | ||
213 | foreign import ccall "legendre.h gsl_sf_conicalP_0" gsl_sf_conicalP_0 :: Double -> Double -> Double | ||
214 | |||
215 | -- | wrapper for int gsl_sf_conicalP_1_e(double lambda,double x,gsl_sf_result* result); | ||
216 | conicalP_1_e :: Double -> Double -> (Double,Double) | ||
217 | conicalP_1_e lambda x = createSFR "conicalP_1_e" $ gsl_sf_conicalP_1_e lambda x | ||
218 | foreign import ccall "legendre.h gsl_sf_conicalP_1_e" gsl_sf_conicalP_1_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
219 | |||
220 | -- | wrapper for double gsl_sf_conicalP_1(double lambda,double x); | ||
221 | conicalP_1 :: Double -> Double -> Double | ||
222 | conicalP_1 = gsl_sf_conicalP_1 | ||
223 | foreign import ccall "legendre.h gsl_sf_conicalP_1" gsl_sf_conicalP_1 :: Double -> Double -> Double | ||
224 | |||
225 | -- | wrapper for int gsl_sf_conicalP_sph_reg_e(int l,double lambda,double x,gsl_sf_result* result); | ||
226 | conicalP_sph_reg_e :: Int -> Double -> Double -> (Double,Double) | ||
227 | conicalP_sph_reg_e l lambda x = createSFR "conicalP_sph_reg_e" $ gsl_sf_conicalP_sph_reg_e l lambda x | ||
228 | foreign import ccall "legendre.h gsl_sf_conicalP_sph_reg_e" gsl_sf_conicalP_sph_reg_e :: Int -> Double -> Double -> Ptr Double -> IO(Int) | ||
229 | |||
230 | -- | wrapper for double gsl_sf_conicalP_sph_reg(int l,double lambda,double x); | ||
231 | conicalP_sph_reg :: Int -> Double -> Double -> Double | ||
232 | conicalP_sph_reg = gsl_sf_conicalP_sph_reg | ||
233 | foreign import ccall "legendre.h gsl_sf_conicalP_sph_reg" gsl_sf_conicalP_sph_reg :: Int -> Double -> Double -> Double | ||
234 | |||
235 | -- | wrapper for int gsl_sf_conicalP_cyl_reg_e(int m,double lambda,double x,gsl_sf_result* result); | ||
236 | conicalP_cyl_reg_e :: Int -> Double -> Double -> (Double,Double) | ||
237 | conicalP_cyl_reg_e m lambda x = createSFR "conicalP_cyl_reg_e" $ gsl_sf_conicalP_cyl_reg_e m lambda x | ||
238 | foreign import ccall "legendre.h gsl_sf_conicalP_cyl_reg_e" gsl_sf_conicalP_cyl_reg_e :: Int -> Double -> Double -> Ptr Double -> IO(Int) | ||
239 | |||
240 | -- | wrapper for double gsl_sf_conicalP_cyl_reg(int m,double lambda,double x); | ||
241 | conicalP_cyl_reg :: Int -> Double -> Double -> Double | ||
242 | conicalP_cyl_reg = gsl_sf_conicalP_cyl_reg | ||
243 | foreign import ccall "legendre.h gsl_sf_conicalP_cyl_reg" gsl_sf_conicalP_cyl_reg :: Int -> Double -> Double -> Double | ||
244 | |||
245 | -- | wrapper for int gsl_sf_legendre_H3d_0_e(double lambda,double eta,gsl_sf_result* result); | ||
246 | legendre_H3d_0_e :: Double -> Double -> (Double,Double) | ||
247 | legendre_H3d_0_e lambda eta = createSFR "legendre_H3d_0_e" $ gsl_sf_legendre_H3d_0_e lambda eta | ||
248 | foreign import ccall "legendre.h gsl_sf_legendre_H3d_0_e" gsl_sf_legendre_H3d_0_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
249 | |||
250 | -- | wrapper for double gsl_sf_legendre_H3d_0(double lambda,double eta); | ||
251 | legendre_H3d_0 :: Double -> Double -> Double | ||
252 | legendre_H3d_0 = gsl_sf_legendre_H3d_0 | ||
253 | foreign import ccall "legendre.h gsl_sf_legendre_H3d_0" gsl_sf_legendre_H3d_0 :: Double -> Double -> Double | ||
254 | |||
255 | -- | wrapper for int gsl_sf_legendre_H3d_1_e(double lambda,double eta,gsl_sf_result* result); | ||
256 | legendre_H3d_1_e :: Double -> Double -> (Double,Double) | ||
257 | legendre_H3d_1_e lambda eta = createSFR "legendre_H3d_1_e" $ gsl_sf_legendre_H3d_1_e lambda eta | ||
258 | foreign import ccall "legendre.h gsl_sf_legendre_H3d_1_e" gsl_sf_legendre_H3d_1_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
259 | |||
260 | -- | wrapper for double gsl_sf_legendre_H3d_1(double lambda,double eta); | ||
261 | legendre_H3d_1 :: Double -> Double -> Double | ||
262 | legendre_H3d_1 = gsl_sf_legendre_H3d_1 | ||
263 | foreign import ccall "legendre.h gsl_sf_legendre_H3d_1" gsl_sf_legendre_H3d_1 :: Double -> Double -> Double | ||
264 | |||
265 | -- | wrapper for int gsl_sf_legendre_H3d_e(int l,double lambda,double eta,gsl_sf_result* result); | ||
266 | legendre_H3d_e :: Int -> Double -> Double -> (Double,Double) | ||
267 | legendre_H3d_e l lambda eta = createSFR "legendre_H3d_e" $ gsl_sf_legendre_H3d_e l lambda eta | ||
268 | foreign import ccall "legendre.h gsl_sf_legendre_H3d_e" gsl_sf_legendre_H3d_e :: Int -> Double -> Double -> Ptr Double -> IO(Int) | ||
269 | |||
270 | -- | wrapper for double gsl_sf_legendre_H3d(int l,double lambda,double eta); | ||
271 | legendre_H3d :: Int -> Double -> Double -> Double | ||
272 | legendre_H3d = gsl_sf_legendre_H3d | ||
273 | foreign import ccall "legendre.h gsl_sf_legendre_H3d" gsl_sf_legendre_H3d :: Int -> Double -> Double -> Double | ||
274 | |||
275 | -- | wrapper for int gsl_sf_legendre_H3d_array(int lmax,double lambda,double eta,double* result_array); | ||
276 | legendre_H3d_array :: Int -> Double -> Double -> Ptr Double -> Int | ||
277 | legendre_H3d_array = gsl_sf_legendre_H3d_array | ||
278 | foreign import ccall "legendre.h gsl_sf_legendre_H3d_array" gsl_sf_legendre_H3d_array :: Int -> Double -> Double -> Ptr Double -> Int | ||
diff --git a/lib/GSL/Special/Log.hs b/lib/GSL/Special/Log.hs deleted file mode 100644 index 0d62e99..0000000 --- a/lib/GSL/Special/Log.hs +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Log | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.gnu.org/software/gsl/manual/html_node/Logarithm-and-Related-Functions.html> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Log( | ||
18 | log_e | ||
19 | , GSL.Special.Log.log | ||
20 | , log_abs_e | ||
21 | , log_abs | ||
22 | , log_1plusx_e | ||
23 | , log_1plusx | ||
24 | , log_1plusx_mx_e | ||
25 | , log_1plusx_mx | ||
26 | ) where | ||
27 | |||
28 | import Foreign(Ptr) | ||
29 | import GSL.Special.Internal | ||
30 | |||
31 | -- | wrapper for int gsl_sf_log_e(double x,gsl_sf_result* result); | ||
32 | log_e :: Double -> (Double,Double) | ||
33 | log_e x = createSFR "log_e" $ gsl_sf_log_e x | ||
34 | foreign import ccall "log.h gsl_sf_log_e" gsl_sf_log_e :: Double -> Ptr Double -> IO(Int) | ||
35 | |||
36 | -- | wrapper for double gsl_sf_log(double x); | ||
37 | log :: Double -> Double | ||
38 | log = gsl_sf_log | ||
39 | foreign import ccall "log.h gsl_sf_log" gsl_sf_log :: Double -> Double | ||
40 | |||
41 | -- | wrapper for int gsl_sf_log_abs_e(double x,gsl_sf_result* result); | ||
42 | log_abs_e :: Double -> (Double,Double) | ||
43 | log_abs_e x = createSFR "log_abs_e" $ gsl_sf_log_abs_e x | ||
44 | foreign import ccall "log.h gsl_sf_log_abs_e" gsl_sf_log_abs_e :: Double -> Ptr Double -> IO(Int) | ||
45 | |||
46 | -- | wrapper for double gsl_sf_log_abs(double x); | ||
47 | log_abs :: Double -> Double | ||
48 | log_abs = gsl_sf_log_abs | ||
49 | foreign import ccall "log.h gsl_sf_log_abs" gsl_sf_log_abs :: Double -> Double | ||
50 | |||
51 | -- | wrapper for int gsl_sf_complex_log_e(double zr,double zi,gsl_sf_result* lnr,gsl_sf_result* theta); | ||
52 | complex_log_e :: Double -> Double -> Ptr Double -> (Double,Double) | ||
53 | complex_log_e zr zi lnr = createSFR "complex_log_e" $ gsl_sf_complex_log_e zr zi lnr | ||
54 | foreign import ccall "log.h gsl_sf_complex_log_e" gsl_sf_complex_log_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) | ||
55 | |||
56 | -- | wrapper for int gsl_sf_log_1plusx_e(double x,gsl_sf_result* result); | ||
57 | log_1plusx_e :: Double -> (Double,Double) | ||
58 | log_1plusx_e x = createSFR "log_1plusx_e" $ gsl_sf_log_1plusx_e x | ||
59 | foreign import ccall "log.h gsl_sf_log_1plusx_e" gsl_sf_log_1plusx_e :: Double -> Ptr Double -> IO(Int) | ||
60 | |||
61 | -- | wrapper for double gsl_sf_log_1plusx(double x); | ||
62 | log_1plusx :: Double -> Double | ||
63 | log_1plusx = gsl_sf_log_1plusx | ||
64 | foreign import ccall "log.h gsl_sf_log_1plusx" gsl_sf_log_1plusx :: Double -> Double | ||
65 | |||
66 | -- | wrapper for int gsl_sf_log_1plusx_mx_e(double x,gsl_sf_result* result); | ||
67 | log_1plusx_mx_e :: Double -> (Double,Double) | ||
68 | log_1plusx_mx_e x = createSFR "log_1plusx_mx_e" $ gsl_sf_log_1plusx_mx_e x | ||
69 | foreign import ccall "log.h gsl_sf_log_1plusx_mx_e" gsl_sf_log_1plusx_mx_e :: Double -> Ptr Double -> IO(Int) | ||
70 | |||
71 | -- | wrapper for double gsl_sf_log_1plusx_mx(double x); | ||
72 | log_1plusx_mx :: Double -> Double | ||
73 | log_1plusx_mx = gsl_sf_log_1plusx_mx | ||
74 | foreign import ccall "log.h gsl_sf_log_1plusx_mx" gsl_sf_log_1plusx_mx :: Double -> Double | ||
diff --git a/lib/GSL/Special/Pow_int.hs b/lib/GSL/Special/Pow_int.hs deleted file mode 100644 index 4142c5b..0000000 --- a/lib/GSL/Special/Pow_int.hs +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Pow_int | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.google.com/search?q=gsl_sf_pow_int.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Pow_int( | ||
18 | pow_int_e | ||
19 | , pow_int | ||
20 | ) where | ||
21 | |||
22 | import Foreign(Ptr) | ||
23 | import GSL.Special.Internal | ||
24 | |||
25 | -- | wrapper for int gsl_sf_pow_int_e(double x,int n,gsl_sf_result* result); | ||
26 | -- | ||
27 | -- <http://www.google.com/search?q=gsl_sf_pow_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
28 | pow_int_e :: Double -> Int -> (Double,Double) | ||
29 | pow_int_e x n = createSFR "pow_int_e" $ gsl_sf_pow_int_e x n | ||
30 | foreign import ccall "pow_int.h gsl_sf_pow_int_e" gsl_sf_pow_int_e :: Double -> Int -> Ptr Double -> IO(Int) | ||
31 | |||
32 | -- | wrapper for double gsl_sf_pow_int(double x,int n); | ||
33 | -- | ||
34 | -- <http://www.google.com/search?q=gsl_sf_pow_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
35 | pow_int :: Double -> Int -> Double | ||
36 | pow_int = gsl_sf_pow_int | ||
37 | foreign import ccall "pow_int.h gsl_sf_pow_int" gsl_sf_pow_int :: Double -> Int -> Double | ||
diff --git a/lib/GSL/Special/Psi.hs b/lib/GSL/Special/Psi.hs deleted file mode 100644 index bee934b..0000000 --- a/lib/GSL/Special/Psi.hs +++ /dev/null | |||
@@ -1,117 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Psi | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.google.com/search?q=gsl_sf_psi.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Psi( | ||
18 | psi_int_e | ||
19 | , psi_int | ||
20 | , psi_e | ||
21 | , psi | ||
22 | , psi_1piy_e | ||
23 | , psi_1piy | ||
24 | , psi_1_int_e | ||
25 | , psi_1_int | ||
26 | , psi_1_e | ||
27 | , psi_1 | ||
28 | , psi_n_e | ||
29 | , psi_n | ||
30 | ) where | ||
31 | |||
32 | import Foreign(Ptr) | ||
33 | import GSL.Special.Internal | ||
34 | |||
35 | -- | wrapper for int gsl_sf_psi_int_e(int n,gsl_sf_result* result); | ||
36 | -- | ||
37 | -- <http://www.google.com/search?q=gsl_sf_psi_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
38 | psi_int_e :: Int -> (Double,Double) | ||
39 | psi_int_e n = createSFR "psi_int_e" $ gsl_sf_psi_int_e n | ||
40 | foreign import ccall "psi.h gsl_sf_psi_int_e" gsl_sf_psi_int_e :: Int -> Ptr Double -> IO(Int) | ||
41 | |||
42 | -- | wrapper for double gsl_sf_psi_int(int n); | ||
43 | -- | ||
44 | -- <http://www.google.com/search?q=gsl_sf_psi_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
45 | psi_int :: Int -> Double | ||
46 | psi_int = gsl_sf_psi_int | ||
47 | foreign import ccall "psi.h gsl_sf_psi_int" gsl_sf_psi_int :: Int -> Double | ||
48 | |||
49 | -- | wrapper for int gsl_sf_psi_e(double x,gsl_sf_result* result); | ||
50 | -- | ||
51 | -- <http://www.google.com/search?q=gsl_sf_psi_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
52 | psi_e :: Double -> (Double,Double) | ||
53 | psi_e x = createSFR "psi_e" $ gsl_sf_psi_e x | ||
54 | foreign import ccall "psi.h gsl_sf_psi_e" gsl_sf_psi_e :: Double -> Ptr Double -> IO(Int) | ||
55 | |||
56 | -- | wrapper for double gsl_sf_psi(double x); | ||
57 | -- | ||
58 | -- <http://www.google.com/search?q=gsl_sf_psi&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
59 | psi :: Double -> Double | ||
60 | psi = gsl_sf_psi | ||
61 | foreign import ccall "psi.h gsl_sf_psi" gsl_sf_psi :: Double -> Double | ||
62 | |||
63 | -- | wrapper for int gsl_sf_psi_1piy_e(double y,gsl_sf_result* result); | ||
64 | -- | ||
65 | -- <http://www.google.com/search?q=gsl_sf_psi_1piy_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
66 | psi_1piy_e :: Double -> (Double,Double) | ||
67 | psi_1piy_e y = createSFR "psi_1piy_e" $ gsl_sf_psi_1piy_e y | ||
68 | foreign import ccall "psi.h gsl_sf_psi_1piy_e" gsl_sf_psi_1piy_e :: Double -> Ptr Double -> IO(Int) | ||
69 | |||
70 | -- | wrapper for double gsl_sf_psi_1piy(double y); | ||
71 | -- | ||
72 | -- <http://www.google.com/search?q=gsl_sf_psi_1piy&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
73 | psi_1piy :: Double -> Double | ||
74 | psi_1piy = gsl_sf_psi_1piy | ||
75 | foreign import ccall "psi.h gsl_sf_psi_1piy" gsl_sf_psi_1piy :: Double -> Double | ||
76 | |||
77 | -- | wrapper for int gsl_sf_psi_1_int_e(int n,gsl_sf_result* result); | ||
78 | -- | ||
79 | -- <http://www.google.com/search?q=gsl_sf_psi_1_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
80 | psi_1_int_e :: Int -> (Double,Double) | ||
81 | psi_1_int_e n = createSFR "psi_1_int_e" $ gsl_sf_psi_1_int_e n | ||
82 | foreign import ccall "psi.h gsl_sf_psi_1_int_e" gsl_sf_psi_1_int_e :: Int -> Ptr Double -> IO(Int) | ||
83 | |||
84 | -- | wrapper for double gsl_sf_psi_1_int(int n); | ||
85 | -- | ||
86 | -- <http://www.google.com/search?q=gsl_sf_psi_1_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
87 | psi_1_int :: Int -> Double | ||
88 | psi_1_int = gsl_sf_psi_1_int | ||
89 | foreign import ccall "psi.h gsl_sf_psi_1_int" gsl_sf_psi_1_int :: Int -> Double | ||
90 | |||
91 | -- | wrapper for int gsl_sf_psi_1_e(double x,gsl_sf_result* result); | ||
92 | -- | ||
93 | -- <http://www.google.com/search?q=gsl_sf_psi_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
94 | psi_1_e :: Double -> (Double,Double) | ||
95 | psi_1_e x = createSFR "psi_1_e" $ gsl_sf_psi_1_e x | ||
96 | foreign import ccall "psi.h gsl_sf_psi_1_e" gsl_sf_psi_1_e :: Double -> Ptr Double -> IO(Int) | ||
97 | |||
98 | -- | wrapper for double gsl_sf_psi_1(double x); | ||
99 | -- | ||
100 | -- <http://www.google.com/search?q=gsl_sf_psi_1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
101 | psi_1 :: Double -> Double | ||
102 | psi_1 = gsl_sf_psi_1 | ||
103 | foreign import ccall "psi.h gsl_sf_psi_1" gsl_sf_psi_1 :: Double -> Double | ||
104 | |||
105 | -- | wrapper for int gsl_sf_psi_n_e(int n,double x,gsl_sf_result* result); | ||
106 | -- | ||
107 | -- <http://www.google.com/search?q=gsl_sf_psi_n_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
108 | psi_n_e :: Int -> Double -> (Double,Double) | ||
109 | psi_n_e n x = createSFR "psi_n_e" $ gsl_sf_psi_n_e n x | ||
110 | foreign import ccall "psi.h gsl_sf_psi_n_e" gsl_sf_psi_n_e :: Int -> Double -> Ptr Double -> IO(Int) | ||
111 | |||
112 | -- | wrapper for double gsl_sf_psi_n(int n,double x); | ||
113 | -- | ||
114 | -- <http://www.google.com/search?q=gsl_sf_psi_n&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
115 | psi_n :: Int -> Double -> Double | ||
116 | psi_n = gsl_sf_psi_n | ||
117 | foreign import ccall "psi.h gsl_sf_psi_n" gsl_sf_psi_n :: Int -> Double -> Double | ||
diff --git a/lib/GSL/Special/Synchrotron.hs b/lib/GSL/Special/Synchrotron.hs deleted file mode 100644 index 2ed484b..0000000 --- a/lib/GSL/Special/Synchrotron.hs +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Synchrotron | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.google.com/search?q=gsl_sf_synchrotron.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Synchrotron( | ||
18 | synchrotron_1_e | ||
19 | , synchrotron_1 | ||
20 | , synchrotron_2_e | ||
21 | , synchrotron_2 | ||
22 | ) where | ||
23 | |||
24 | import Foreign(Ptr) | ||
25 | import GSL.Special.Internal | ||
26 | |||
27 | -- | wrapper for int gsl_sf_synchrotron_1_e(double x,gsl_sf_result* result); | ||
28 | -- | ||
29 | -- <http://www.google.com/search?q=gsl_sf_synchrotron_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
30 | synchrotron_1_e :: Double -> (Double,Double) | ||
31 | synchrotron_1_e x = createSFR "synchrotron_1_e" $ gsl_sf_synchrotron_1_e x | ||
32 | foreign import ccall "synchrotron.h gsl_sf_synchrotron_1_e" gsl_sf_synchrotron_1_e :: Double -> Ptr Double -> IO(Int) | ||
33 | |||
34 | -- | wrapper for double gsl_sf_synchrotron_1(double x); | ||
35 | -- | ||
36 | -- <http://www.google.com/search?q=gsl_sf_synchrotron_1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
37 | synchrotron_1 :: Double -> Double | ||
38 | synchrotron_1 = gsl_sf_synchrotron_1 | ||
39 | foreign import ccall "synchrotron.h gsl_sf_synchrotron_1" gsl_sf_synchrotron_1 :: Double -> Double | ||
40 | |||
41 | -- | wrapper for int gsl_sf_synchrotron_2_e(double x,gsl_sf_result* result); | ||
42 | -- | ||
43 | -- <http://www.google.com/search?q=gsl_sf_synchrotron_2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
44 | synchrotron_2_e :: Double -> (Double,Double) | ||
45 | synchrotron_2_e x = createSFR "synchrotron_2_e" $ gsl_sf_synchrotron_2_e x | ||
46 | foreign import ccall "synchrotron.h gsl_sf_synchrotron_2_e" gsl_sf_synchrotron_2_e :: Double -> Ptr Double -> IO(Int) | ||
47 | |||
48 | -- | wrapper for double gsl_sf_synchrotron_2(double x); | ||
49 | -- | ||
50 | -- <http://www.google.com/search?q=gsl_sf_synchrotron_2&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
51 | synchrotron_2 :: Double -> Double | ||
52 | synchrotron_2 = gsl_sf_synchrotron_2 | ||
53 | foreign import ccall "synchrotron.h gsl_sf_synchrotron_2" gsl_sf_synchrotron_2 :: Double -> Double | ||
diff --git a/lib/GSL/Special/Trig.hs b/lib/GSL/Special/Trig.hs deleted file mode 100644 index 4d37a05..0000000 --- a/lib/GSL/Special/Trig.hs +++ /dev/null | |||
@@ -1,164 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Trig | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.gnu.org/software/gsl/manual/html_node/Trigonometric-Functions.html> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Trig( | ||
18 | sin_e | ||
19 | , GSL.Special.Trig.sin | ||
20 | , cos_e | ||
21 | , GSL.Special.Trig.cos | ||
22 | , hypot_e | ||
23 | , hypot | ||
24 | , sinc_e | ||
25 | , sinc | ||
26 | , lnsinh_e | ||
27 | , lnsinh | ||
28 | , lncosh_e | ||
29 | , lncosh | ||
30 | , sin_err_e | ||
31 | , cos_err_e | ||
32 | , angle_restrict_symm | ||
33 | , angle_restrict_pos | ||
34 | , angle_restrict_symm_err_e | ||
35 | , angle_restrict_pos_err_e | ||
36 | ) where | ||
37 | |||
38 | import Foreign(Ptr) | ||
39 | import GSL.Special.Internal | ||
40 | |||
41 | -- | wrapper for int gsl_sf_sin_e(double x,gsl_sf_result* result); | ||
42 | sin_e :: Double -> (Double,Double) | ||
43 | sin_e x = createSFR "sin_e" $ gsl_sf_sin_e x | ||
44 | foreign import ccall "trig.h gsl_sf_sin_e" gsl_sf_sin_e :: Double -> Ptr Double -> IO(Int) | ||
45 | |||
46 | -- | wrapper for double gsl_sf_sin(double x); | ||
47 | sin :: Double -> Double | ||
48 | sin = gsl_sf_sin | ||
49 | foreign import ccall "trig.h gsl_sf_sin" gsl_sf_sin :: Double -> Double | ||
50 | |||
51 | -- | wrapper for int gsl_sf_cos_e(double x,gsl_sf_result* result); | ||
52 | cos_e :: Double -> (Double,Double) | ||
53 | cos_e x = createSFR "cos_e" $ gsl_sf_cos_e x | ||
54 | foreign import ccall "trig.h gsl_sf_cos_e" gsl_sf_cos_e :: Double -> Ptr Double -> IO(Int) | ||
55 | |||
56 | -- | wrapper for double gsl_sf_cos(double x); | ||
57 | cos :: Double -> Double | ||
58 | cos = gsl_sf_cos | ||
59 | foreign import ccall "trig.h gsl_sf_cos" gsl_sf_cos :: Double -> Double | ||
60 | |||
61 | -- | wrapper for int gsl_sf_hypot_e(double x,double y,gsl_sf_result* result); | ||
62 | hypot_e :: Double -> Double -> (Double,Double) | ||
63 | hypot_e x y = createSFR "hypot_e" $ gsl_sf_hypot_e x y | ||
64 | foreign import ccall "trig.h gsl_sf_hypot_e" gsl_sf_hypot_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
65 | |||
66 | -- | wrapper for double gsl_sf_hypot(double x,double y); | ||
67 | hypot :: Double -> Double -> Double | ||
68 | hypot = gsl_sf_hypot | ||
69 | foreign import ccall "trig.h gsl_sf_hypot" gsl_sf_hypot :: Double -> Double -> Double | ||
70 | |||
71 | -- | wrapper for int gsl_sf_complex_sin_e(double zr,double zi,gsl_sf_result* szr,gsl_sf_result* szi); | ||
72 | complex_sin_e :: Double -> Double -> Ptr Double -> (Double,Double) | ||
73 | complex_sin_e zr zi szr = createSFR "complex_sin_e" $ gsl_sf_complex_sin_e zr zi szr | ||
74 | foreign import ccall "trig.h gsl_sf_complex_sin_e" gsl_sf_complex_sin_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) | ||
75 | |||
76 | -- | wrapper for int gsl_sf_complex_cos_e(double zr,double zi,gsl_sf_result* czr,gsl_sf_result* czi); | ||
77 | complex_cos_e :: Double -> Double -> Ptr Double -> (Double,Double) | ||
78 | complex_cos_e zr zi czr = createSFR "complex_cos_e" $ gsl_sf_complex_cos_e zr zi czr | ||
79 | foreign import ccall "trig.h gsl_sf_complex_cos_e" gsl_sf_complex_cos_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) | ||
80 | |||
81 | -- | wrapper for int gsl_sf_complex_logsin_e(double zr,double zi,gsl_sf_result* lszr,gsl_sf_result* lszi); | ||
82 | complex_logsin_e :: Double -> Double -> Ptr Double -> (Double,Double) | ||
83 | complex_logsin_e zr zi lszr = createSFR "complex_logsin_e" $ gsl_sf_complex_logsin_e zr zi lszr | ||
84 | foreign import ccall "trig.h gsl_sf_complex_logsin_e" gsl_sf_complex_logsin_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) | ||
85 | |||
86 | -- | wrapper for int gsl_sf_sinc_e(double x,gsl_sf_result* result); | ||
87 | sinc_e :: Double -> (Double,Double) | ||
88 | sinc_e x = createSFR "sinc_e" $ gsl_sf_sinc_e x | ||
89 | foreign import ccall "trig.h gsl_sf_sinc_e" gsl_sf_sinc_e :: Double -> Ptr Double -> IO(Int) | ||
90 | |||
91 | -- | wrapper for double gsl_sf_sinc(double x); | ||
92 | sinc :: Double -> Double | ||
93 | sinc = gsl_sf_sinc | ||
94 | foreign import ccall "trig.h gsl_sf_sinc" gsl_sf_sinc :: Double -> Double | ||
95 | |||
96 | -- | wrapper for int gsl_sf_lnsinh_e(double x,gsl_sf_result* result); | ||
97 | lnsinh_e :: Double -> (Double,Double) | ||
98 | lnsinh_e x = createSFR "lnsinh_e" $ gsl_sf_lnsinh_e x | ||
99 | foreign import ccall "trig.h gsl_sf_lnsinh_e" gsl_sf_lnsinh_e :: Double -> Ptr Double -> IO(Int) | ||
100 | |||
101 | -- | wrapper for double gsl_sf_lnsinh(double x); | ||
102 | lnsinh :: Double -> Double | ||
103 | lnsinh = gsl_sf_lnsinh | ||
104 | foreign import ccall "trig.h gsl_sf_lnsinh" gsl_sf_lnsinh :: Double -> Double | ||
105 | |||
106 | -- | wrapper for int gsl_sf_lncosh_e(double x,gsl_sf_result* result); | ||
107 | lncosh_e :: Double -> (Double,Double) | ||
108 | lncosh_e x = createSFR "lncosh_e" $ gsl_sf_lncosh_e x | ||
109 | foreign import ccall "trig.h gsl_sf_lncosh_e" gsl_sf_lncosh_e :: Double -> Ptr Double -> IO(Int) | ||
110 | |||
111 | -- | wrapper for double gsl_sf_lncosh(double x); | ||
112 | lncosh :: Double -> Double | ||
113 | lncosh = gsl_sf_lncosh | ||
114 | foreign import ccall "trig.h gsl_sf_lncosh" gsl_sf_lncosh :: Double -> Double | ||
115 | |||
116 | -- | wrapper for int gsl_sf_polar_to_rect(double r,double theta,gsl_sf_result* x,gsl_sf_result* y); | ||
117 | polar_to_rect :: Double -> Double -> Ptr Double -> (Double,Double) | ||
118 | polar_to_rect r theta x = createSFR "polar_to_rect" $ gsl_sf_polar_to_rect r theta x | ||
119 | foreign import ccall "trig.h gsl_sf_polar_to_rect" gsl_sf_polar_to_rect :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) | ||
120 | |||
121 | -- | wrapper for int gsl_sf_rect_to_polar(double x,double y,gsl_sf_result* r,gsl_sf_result* theta); | ||
122 | rect_to_polar :: Double -> Double -> Ptr Double -> (Double,Double) | ||
123 | rect_to_polar x y r = createSFR "rect_to_polar" $ gsl_sf_rect_to_polar x y r | ||
124 | foreign import ccall "trig.h gsl_sf_rect_to_polar" gsl_sf_rect_to_polar :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) | ||
125 | |||
126 | -- | wrapper for int gsl_sf_sin_err_e(double x,double dx,gsl_sf_result* result); | ||
127 | sin_err_e :: Double -> Double -> (Double,Double) | ||
128 | sin_err_e x dx = createSFR "sin_err_e" $ gsl_sf_sin_err_e x dx | ||
129 | foreign import ccall "trig.h gsl_sf_sin_err_e" gsl_sf_sin_err_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
130 | |||
131 | -- | wrapper for int gsl_sf_cos_err_e(double x,double dx,gsl_sf_result* result); | ||
132 | cos_err_e :: Double -> Double -> (Double,Double) | ||
133 | cos_err_e x dx = createSFR "cos_err_e" $ gsl_sf_cos_err_e x dx | ||
134 | foreign import ccall "trig.h gsl_sf_cos_err_e" gsl_sf_cos_err_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
135 | |||
136 | -- | wrapper for int gsl_sf_angle_restrict_symm_e(double* theta); | ||
137 | angle_restrict_symm_e :: Ptr Double -> Int | ||
138 | angle_restrict_symm_e = gsl_sf_angle_restrict_symm_e | ||
139 | foreign import ccall "trig.h gsl_sf_angle_restrict_symm_e" gsl_sf_angle_restrict_symm_e :: Ptr Double -> Int | ||
140 | |||
141 | -- | wrapper for double gsl_sf_angle_restrict_symm(double theta); | ||
142 | angle_restrict_symm :: Double -> Double | ||
143 | angle_restrict_symm = gsl_sf_angle_restrict_symm | ||
144 | foreign import ccall "trig.h gsl_sf_angle_restrict_symm" gsl_sf_angle_restrict_symm :: Double -> Double | ||
145 | |||
146 | -- | wrapper for int gsl_sf_angle_restrict_pos_e(double* theta); | ||
147 | angle_restrict_pos_e :: Ptr Double -> Int | ||
148 | angle_restrict_pos_e = gsl_sf_angle_restrict_pos_e | ||
149 | foreign import ccall "trig.h gsl_sf_angle_restrict_pos_e" gsl_sf_angle_restrict_pos_e :: Ptr Double -> Int | ||
150 | |||
151 | -- | wrapper for double gsl_sf_angle_restrict_pos(double theta); | ||
152 | angle_restrict_pos :: Double -> Double | ||
153 | angle_restrict_pos = gsl_sf_angle_restrict_pos | ||
154 | foreign import ccall "trig.h gsl_sf_angle_restrict_pos" gsl_sf_angle_restrict_pos :: Double -> Double | ||
155 | |||
156 | -- | wrapper for int gsl_sf_angle_restrict_symm_err_e(double theta,gsl_sf_result* result); | ||
157 | angle_restrict_symm_err_e :: Double -> (Double,Double) | ||
158 | angle_restrict_symm_err_e theta = createSFR "angle_restrict_symm_err_e" $ gsl_sf_angle_restrict_symm_err_e theta | ||
159 | foreign import ccall "trig.h gsl_sf_angle_restrict_symm_err_e" gsl_sf_angle_restrict_symm_err_e :: Double -> Ptr Double -> IO(Int) | ||
160 | |||
161 | -- | wrapper for int gsl_sf_angle_restrict_pos_err_e(double theta,gsl_sf_result* result); | ||
162 | angle_restrict_pos_err_e :: Double -> (Double,Double) | ||
163 | angle_restrict_pos_err_e theta = createSFR "angle_restrict_pos_err_e" $ gsl_sf_angle_restrict_pos_err_e theta | ||
164 | foreign import ccall "trig.h gsl_sf_angle_restrict_pos_err_e" gsl_sf_angle_restrict_pos_err_e :: Double -> Ptr Double -> IO(Int) | ||
diff --git a/lib/GSL/Special/Zeta.hs b/lib/GSL/Special/Zeta.hs deleted file mode 100644 index 01cfdac..0000000 --- a/lib/GSL/Special/Zeta.hs +++ /dev/null | |||
@@ -1,133 +0,0 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Zeta | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.google.com/search?q=gsl_sf_zeta.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Zeta( | ||
18 | zeta_int_e | ||
19 | , zeta_int | ||
20 | , zeta_e | ||
21 | , zeta | ||
22 | , zetam1_e | ||
23 | , zetam1 | ||
24 | , zetam1_int_e | ||
25 | , zetam1_int | ||
26 | , hzeta_e | ||
27 | , hzeta | ||
28 | , eta_int_e | ||
29 | , eta_int | ||
30 | , eta_e | ||
31 | , eta | ||
32 | ) where | ||
33 | |||
34 | import Foreign(Ptr) | ||
35 | import GSL.Special.Internal | ||
36 | |||
37 | -- | wrapper for int gsl_sf_zeta_int_e(int n,gsl_sf_result* result); | ||
38 | -- | ||
39 | -- <http://www.google.com/search?q=gsl_sf_zeta_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
40 | zeta_int_e :: Int -> (Double,Double) | ||
41 | zeta_int_e n = createSFR "zeta_int_e" $ gsl_sf_zeta_int_e n | ||
42 | foreign import ccall "zeta.h gsl_sf_zeta_int_e" gsl_sf_zeta_int_e :: Int -> Ptr Double -> IO(Int) | ||
43 | |||
44 | -- | wrapper for double gsl_sf_zeta_int(int n); | ||
45 | -- | ||
46 | -- <http://www.google.com/search?q=gsl_sf_zeta_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
47 | zeta_int :: Int -> Double | ||
48 | zeta_int = gsl_sf_zeta_int | ||
49 | foreign import ccall "zeta.h gsl_sf_zeta_int" gsl_sf_zeta_int :: Int -> Double | ||
50 | |||
51 | -- | wrapper for int gsl_sf_zeta_e(double s,gsl_sf_result* result); | ||
52 | -- | ||
53 | -- <http://www.google.com/search?q=gsl_sf_zeta_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
54 | zeta_e :: Double -> (Double,Double) | ||
55 | zeta_e s = createSFR "zeta_e" $ gsl_sf_zeta_e s | ||
56 | foreign import ccall "zeta.h gsl_sf_zeta_e" gsl_sf_zeta_e :: Double -> Ptr Double -> IO(Int) | ||
57 | |||
58 | -- | wrapper for double gsl_sf_zeta(double s); | ||
59 | -- | ||
60 | -- <http://www.google.com/search?q=gsl_sf_zeta&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
61 | zeta :: Double -> Double | ||
62 | zeta = gsl_sf_zeta | ||
63 | foreign import ccall "zeta.h gsl_sf_zeta" gsl_sf_zeta :: Double -> Double | ||
64 | |||
65 | -- | wrapper for int gsl_sf_zetam1_e(double s,gsl_sf_result* result); | ||
66 | -- | ||
67 | -- <http://www.google.com/search?q=gsl_sf_zetam1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
68 | zetam1_e :: Double -> (Double,Double) | ||
69 | zetam1_e s = createSFR "zetam1_e" $ gsl_sf_zetam1_e s | ||
70 | foreign import ccall "zeta.h gsl_sf_zetam1_e" gsl_sf_zetam1_e :: Double -> Ptr Double -> IO(Int) | ||
71 | |||
72 | -- | wrapper for double gsl_sf_zetam1(double s); | ||
73 | -- | ||
74 | -- <http://www.google.com/search?q=gsl_sf_zetam1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
75 | zetam1 :: Double -> Double | ||
76 | zetam1 = gsl_sf_zetam1 | ||
77 | foreign import ccall "zeta.h gsl_sf_zetam1" gsl_sf_zetam1 :: Double -> Double | ||
78 | |||
79 | -- | wrapper for int gsl_sf_zetam1_int_e(int s,gsl_sf_result* result); | ||
80 | -- | ||
81 | -- <http://www.google.com/search?q=gsl_sf_zetam1_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
82 | zetam1_int_e :: Int -> (Double,Double) | ||
83 | zetam1_int_e s = createSFR "zetam1_int_e" $ gsl_sf_zetam1_int_e s | ||
84 | foreign import ccall "zeta.h gsl_sf_zetam1_int_e" gsl_sf_zetam1_int_e :: Int -> Ptr Double -> IO(Int) | ||
85 | |||
86 | -- | wrapper for double gsl_sf_zetam1_int(int s); | ||
87 | -- | ||
88 | -- <http://www.google.com/search?q=gsl_sf_zetam1_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
89 | zetam1_int :: Int -> Double | ||
90 | zetam1_int = gsl_sf_zetam1_int | ||
91 | foreign import ccall "zeta.h gsl_sf_zetam1_int" gsl_sf_zetam1_int :: Int -> Double | ||
92 | |||
93 | -- | wrapper for int gsl_sf_hzeta_e(double s,double q,gsl_sf_result* result); | ||
94 | -- | ||
95 | -- <http://www.google.com/search?q=gsl_sf_hzeta_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
96 | hzeta_e :: Double -> Double -> (Double,Double) | ||
97 | hzeta_e s q = createSFR "hzeta_e" $ gsl_sf_hzeta_e s q | ||
98 | foreign import ccall "zeta.h gsl_sf_hzeta_e" gsl_sf_hzeta_e :: Double -> Double -> Ptr Double -> IO(Int) | ||
99 | |||
100 | -- | wrapper for double gsl_sf_hzeta(double s,double q); | ||
101 | -- | ||
102 | -- <http://www.google.com/search?q=gsl_sf_hzeta&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
103 | hzeta :: Double -> Double -> Double | ||
104 | hzeta = gsl_sf_hzeta | ||
105 | foreign import ccall "zeta.h gsl_sf_hzeta" gsl_sf_hzeta :: Double -> Double -> Double | ||
106 | |||
107 | -- | wrapper for int gsl_sf_eta_int_e(int n,gsl_sf_result* result); | ||
108 | -- | ||
109 | -- <http://www.google.com/search?q=gsl_sf_eta_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
110 | eta_int_e :: Int -> (Double,Double) | ||
111 | eta_int_e n = createSFR "eta_int_e" $ gsl_sf_eta_int_e n | ||
112 | foreign import ccall "zeta.h gsl_sf_eta_int_e" gsl_sf_eta_int_e :: Int -> Ptr Double -> IO(Int) | ||
113 | |||
114 | -- | wrapper for double gsl_sf_eta_int(int n); | ||
115 | -- | ||
116 | -- <http://www.google.com/search?q=gsl_sf_eta_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
117 | eta_int :: Int -> Double | ||
118 | eta_int = gsl_sf_eta_int | ||
119 | foreign import ccall "zeta.h gsl_sf_eta_int" gsl_sf_eta_int :: Int -> Double | ||
120 | |||
121 | -- | wrapper for int gsl_sf_eta_e(double s,gsl_sf_result* result); | ||
122 | -- | ||
123 | -- <http://www.google.com/search?q=gsl_sf_eta_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
124 | eta_e :: Double -> (Double,Double) | ||
125 | eta_e s = createSFR "eta_e" $ gsl_sf_eta_e s | ||
126 | foreign import ccall "zeta.h gsl_sf_eta_e" gsl_sf_eta_e :: Double -> Ptr Double -> IO(Int) | ||
127 | |||
128 | -- | wrapper for double gsl_sf_eta(double s); | ||
129 | -- | ||
130 | -- <http://www.google.com/search?q=gsl_sf_eta&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
131 | eta :: Double -> Double | ||
132 | eta = gsl_sf_eta | ||
133 | foreign import ccall "zeta.h gsl_sf_eta" gsl_sf_eta :: Double -> Double | ||
diff --git a/lib/GSL/Special/airy.h b/lib/GSL/Special/airy.h deleted file mode 100644 index e34e012..0000000 --- a/lib/GSL/Special/airy.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | int gsl_sf_airy_Ai_e(double x,int mode,double* result); | ||
2 | double gsl_sf_airy_Ai(double x,int mode); | ||
3 | int gsl_sf_airy_Bi_e(double x,int mode,double* result); | ||
4 | double gsl_sf_airy_Bi(double x,int mode); | ||
5 | int gsl_sf_airy_Ai_scaled_e(double x,int mode,double* result); | ||
6 | double gsl_sf_airy_Ai_scaled(double x,int mode); | ||
7 | int gsl_sf_airy_Bi_scaled_e(double x,int mode,double* result); | ||
8 | double gsl_sf_airy_Bi_scaled(double x,int mode); | ||
9 | int gsl_sf_airy_Ai_deriv_e(double x,int mode,double* result); | ||
10 | double gsl_sf_airy_Ai_deriv(double x,int mode); | ||
11 | int gsl_sf_airy_Bi_deriv_e(double x,int mode,double* result); | ||
12 | double gsl_sf_airy_Bi_deriv(double x,int mode); | ||
13 | int gsl_sf_airy_Ai_deriv_scaled_e(double x,int mode,double* result); | ||
14 | double gsl_sf_airy_Ai_deriv_scaled(double x,int mode); | ||
15 | int gsl_sf_airy_Bi_deriv_scaled_e(double x,int mode,double* result); | ||
16 | double gsl_sf_airy_Bi_deriv_scaled(double x,int mode); | ||
17 | int gsl_sf_airy_zero_Ai_e(int s,double* result); | ||
18 | double gsl_sf_airy_zero_Ai(int s); | ||
19 | int gsl_sf_airy_zero_Bi_e(int s,double* result); | ||
20 | double gsl_sf_airy_zero_Bi(int s); | ||
21 | int gsl_sf_airy_zero_Ai_deriv_e(int s,double* result); | ||
22 | double gsl_sf_airy_zero_Ai_deriv(int s); | ||
23 | int gsl_sf_airy_zero_Bi_deriv_e(int s,double* result); | ||
24 | double gsl_sf_airy_zero_Bi_deriv(int s); | ||
diff --git a/lib/GSL/Special/auto.hs b/lib/GSL/Special/auto.hs deleted file mode 100644 index 0ef7d0a..0000000 --- a/lib/GSL/Special/auto.hs +++ /dev/null | |||
@@ -1,233 +0,0 @@ | |||
1 | -- automatic generation of wrappers for simple GSL special functions | ||
2 | |||
3 | import Text.ParserCombinators.Parsec | ||
4 | import System | ||
5 | import Data.List(intersperse, isPrefixOf) | ||
6 | import Data.Char(toUpper,isUpper,toLower) | ||
7 | |||
8 | data Type = Normal Ident | Pointer Ident deriving (Eq, Show) | ||
9 | |||
10 | type Ident = String | ||
11 | |||
12 | data Header = Header Type Ident [(Type,Ident)] deriving Show | ||
13 | |||
14 | headers f = case parse parseHeaders "" f of | ||
15 | Right l -> l | ||
16 | Left s -> error (show s) | ||
17 | |||
18 | |||
19 | rep (c,r) [] = [] | ||
20 | rep (c,r) f@(x:xs) | ||
21 | | c `isPrefixOf` f = r ++ rep (c,r) (drop (length c) f) | ||
22 | | otherwise = x:(rep (c,r) xs) | ||
23 | |||
24 | |||
25 | fixlong [] = [] | ||
26 | fixlong "\\" = [] | ||
27 | fixlong ('\\':'\n':xs) = xs | ||
28 | fixlong (x:xs) = x : fixlong xs | ||
29 | |||
30 | |||
31 | safe (Header _ _ args) = all ok args | ||
32 | || all ok (init args) && kn (last args) | ||
33 | where ok ((Normal s),_) | s `elem` ["double","float","int","gsl_mode_t"] = True | ||
34 | ok _ = False | ||
35 | kn ((Pointer "gsl_sf_result"),_) = True | ||
36 | kn ((Pointer "gsl_sf_result_e10"),_) = True | ||
37 | kn _ = False | ||
38 | |||
39 | |||
40 | |||
41 | fixC s = rep ("gsl_mode_t","int") $ rep ("gsl_sf_result","double") $ rep ("gsl_sf_result_e10","double") $ s | ||
42 | |||
43 | main = do | ||
44 | args <- getArgs | ||
45 | let name = args!!0 | ||
46 | headerfile = | ||
47 | case args of | ||
48 | [n] -> "/usr/include/gsl/gsl_sf_"++n++".h" | ||
49 | [_,f] -> f | ||
50 | file <- readFile headerfile | ||
51 | |||
52 | putStrLn headerfile | ||
53 | --mapM_ print (headers $ fixlong file) | ||
54 | let parsed = (headers $ fixlong file) | ||
55 | writeFile (name ++".h") (fixC $ unlines $ map showC parsed) | ||
56 | |||
57 | --putStrLn "" | ||
58 | --mapM (\(Header _ n _) -> putStrLn (drop 7 n ++",")) parsed | ||
59 | --putStrLn "" | ||
60 | --mapM_ (putStrLn.showFull (name ++".h")) parsed | ||
61 | let exports = rep (")",") where") $ rep ("(\n","(\n ") $ rep (",\n",", ") $ unlines $ ["("]++intersperse "," (map (\(Header _ n _) -> hName n) (filter safe parsed))++[")"] | ||
62 | let defs = unlines $ map (showFull (name ++".h")) parsed | ||
63 | let imports = "\nimport Foreign(Ptr)\nimport GSL.Special.Internal\n" | ||
64 | let mod = modhead name ++ "module GSL.Special."++ upperFirst name++exports++imports++defs | ||
65 | writeFile (upperFirst name ++ ".hs") mod | ||
66 | |||
67 | |||
68 | google name = "<http://www.google.com/search?q=" | ||
69 | ++name | ||
70 | ++"&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>" | ||
71 | |||
72 | modhead name = replicate 60 '-' ++ "\n" | ||
73 | ++"{- |\n" | ||
74 | ++"Module : GSL.Special."++upperFirst name++"\n" | ||
75 | ++"Copyright : (c) Alberto Ruiz 2006\n" | ||
76 | ++"License : GPL-style\n" | ||
77 | ++"Maintainer : Alberto Ruiz (aruiz at um dot es)\n" | ||
78 | ++"Stability : provisional\n" | ||
79 | ++"Portability : uses ffi\n" | ||
80 | ++"\nWrappers for selected functions described at:\n\n" | ||
81 | ++ google ( "gsl_sf_"++name++".h") | ||
82 | ++"\n\n-}\n" | ||
83 | ++ replicate 60 '-' ++ "\n\n" | ||
84 | |||
85 | upperFirst (x:xs) = toUpper x : xs | ||
86 | |||
87 | comment = do | ||
88 | string "/*" | ||
89 | closecomment | ||
90 | spaces | ||
91 | return "comment" | ||
92 | |||
93 | closecomment = try (string "*/") | ||
94 | <|> (do anyChar | ||
95 | closecomment) | ||
96 | |||
97 | ident = do | ||
98 | spaces | ||
99 | id <- many1 (noneOf "()[]* \n\t,;") | ||
100 | spaces | ||
101 | return id | ||
102 | |||
103 | comment' = between (char '(') (char ')') (many $ noneOf ")") | ||
104 | |||
105 | |||
106 | define = do | ||
107 | string "#" | ||
108 | closedefine | ||
109 | spaces | ||
110 | return "define" | ||
111 | |||
112 | closedefine = try (string "\n") | ||
113 | <|> (do anyChar | ||
114 | closedefine) | ||
115 | |||
116 | marks = do | ||
117 | try (string "__BEGIN_DECLS" >> spaces >> return "begin") | ||
118 | <|> | ||
119 | try (string "__END_DECLS" >> spaces >> return "end") | ||
120 | |||
121 | |||
122 | |||
123 | irrelevant = | ||
124 | try comment | ||
125 | <|> | ||
126 | try define | ||
127 | <|> | ||
128 | marks | ||
129 | |||
130 | |||
131 | parseHeaders = many parseHeader | ||
132 | |||
133 | parseHeader = do | ||
134 | spaces | ||
135 | many irrelevant | ||
136 | spaces | ||
137 | (res,name) <- typ | ||
138 | spaces | ||
139 | args <- between (char '(') (char ')') (sepBy typ (char ',')) | ||
140 | spaces | ||
141 | char ';' | ||
142 | spaces | ||
143 | many irrelevant | ||
144 | return $ Header res name args | ||
145 | |||
146 | typ = try t1 <|> t2 | ||
147 | |||
148 | symbol s = spaces >> string s >> spaces | ||
149 | |||
150 | t1 = do | ||
151 | t <- try (symbol "const" >> symbol "unsigned" >> ident) -- aaagh | ||
152 | <|> | ||
153 | try (symbol "const" >> ident) | ||
154 | <|> | ||
155 | try (symbol "unsigned" >> ident) | ||
156 | <|> ident | ||
157 | n <- ident | ||
158 | return (Normal t,n) | ||
159 | |||
160 | t2 = do | ||
161 | t <- ident | ||
162 | spaces | ||
163 | char '*' | ||
164 | spaces | ||
165 | n <- ident | ||
166 | return (Pointer t,n) | ||
167 | |||
168 | pure (Header _ _ args) | fst (last args) == Pointer "gsl_sf_result" = False | ||
169 | | fst (last args) == Pointer "gsl_sf_result_e10" = False | ||
170 | | otherwise = True | ||
171 | |||
172 | showC (Header t n args) = showCt t ++ " " ++ n ++ "(" ++ (concat $ intersperse "," $ map showCa args) ++ ");" | ||
173 | |||
174 | showCt (Normal s) = s | ||
175 | showCt (Pointer s) = s ++ "*" | ||
176 | |||
177 | showCa (t, a) = showCt t ++" "++ a | ||
178 | |||
179 | showH hc h@(Header t n args) = "foreign import ccall \""++hc++" "++n++"\" "++n++" :: "++ (concat$intersperse" -> "$map showHa args) ++" -> " ++ t' | ||
180 | where t' | pure h = showHt t | ||
181 | | otherwise = "IO("++showHt t++")" | ||
182 | |||
183 | showHt (Normal (s:ss)) = toUpper s : ss | ||
184 | showHt (Pointer "gsl_sf_result") = "Ptr Double" | ||
185 | showHt (Pointer "gsl_sf_result_e10") = "Ptr ()" | ||
186 | showHt (Pointer (s:ss)) = "Ptr "++toUpper s : ss | ||
187 | |||
188 | showHa (t,a) = showHt t | ||
189 | |||
190 | showFull hc h@(Header t n args) = "\n-- | wrapper for "++showC h | ||
191 | ++"\n--\n-- "++google n ++"\n" | ||
192 | ++ boiler h ++"\n" | ||
193 | ++showH hc h | ||
194 | |||
195 | fixmd1 = rep ("Gsl_mode_t","Precision") | ||
196 | fixmd2 = rep ("mode"," (precCode mode)") | ||
197 | |||
198 | boiler h@(Header t n args) | fst (last args) == Pointer "gsl_sf_result" = boilerResult h | ||
199 | | fst (last args) == Pointer "gsl_sf_result_e10" = boilerResultE10 h | ||
200 | | any isMode args = boilerMode h | ||
201 | | otherwise = boilerBasic h | ||
202 | |||
203 | isMode (Normal "gsl_mode_t",_) = True | ||
204 | isMode _ = False | ||
205 | |||
206 | hName n = f $ drop 7 n | ||
207 | where f (s:ss) = toLower s : ss | ||
208 | |||
209 | |||
210 | boilerResult h@(Header t n args) = | ||
211 | hName n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$ map showHa (init args)) ++" -> " ++ "(Double,Double)\n" ++ | ||
212 | hName n ++ " "++ initArgs args ++ | ||
213 | " = createSFR \""++ hName n ++"\" $ " ++ n ++ " "++ (fixmd2 $ initArgs args) | ||
214 | |||
215 | boilerResultE10 h@(Header t n args) = | ||
216 | hName n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$ map showHa (init args)) ++" -> " ++ "(Double,Int,Double)\n" ++ | ||
217 | hName n ++ " "++ initArgs args ++ | ||
218 | " = createSFR_E10 \""++ hName n ++"\" $ " ++ n ++ " "++ (fixmd2 $ initArgs args) | ||
219 | |||
220 | boilerBasic h@(Header t n args) = | ||
221 | hName n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$map showHa args) ++" -> " ++showHt t ++ "\n" ++ | ||
222 | hName n ++ " = " ++fixmd2 n | ||
223 | |||
224 | boilerMode h@(Header t n args) = | ||
225 | hName n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$ map showHa args) ++" -> " ++ showHt t++"\n" ++ | ||
226 | hName n ++ " "++ allArgs args ++ | ||
227 | " = " ++ n ++ " "++ (fixmd2 $ allArgs args) | ||
228 | |||
229 | cVar (v:vs) | isUpper v = toLower v : v : vs | ||
230 | | otherwise = v:vs | ||
231 | |||
232 | allArgs args = unwords (map (cVar.snd) args) | ||
233 | initArgs args = unwords (map (cVar.snd) (init args)) \ No newline at end of file | ||
diff --git a/lib/GSL/Special/autoall.sh b/lib/GSL/Special/autoall.sh deleted file mode 100644 index cb45957..0000000 --- a/lib/GSL/Special/autoall.sh +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | #Airy.hs | ||
4 | # include Precision (..) in the export list | ||
5 | #Exp.hs | ||
6 | # remove extern inline definition, qualify name | ||
7 | #Coupling | ||
8 | # remove deprecated INCORRECT | ||
9 | #Trig.hs | ||
10 | # qualify names | ||
11 | #Legendre.hs | ||
12 | # remove extern inline | ||
13 | #Log.hs | ||
14 | # remove extern inline, qualify name | ||
15 | |||
16 | #runhaskell auto airy | ||
17 | runhaskell auto bessel | ||
18 | runhaskell auto clausen | ||
19 | runhaskell auto coulomb | ||
20 | #runhaskell auto coupling | ||
21 | runhaskell auto dawson | ||
22 | runhaskell auto debye | ||
23 | runhaskell auto dilog | ||
24 | runhaskell auto elementary | ||
25 | runhaskell auto ellint | ||
26 | runhaskell auto erf | ||
27 | #runhaskell auto exp | ||
28 | runhaskell auto expint | ||
29 | runhaskell auto fermi_dirac | ||
30 | runhaskell auto gamma | ||
31 | runhaskell auto gegenbauer | ||
32 | runhaskell auto hyperg | ||
33 | runhaskell auto laguerre | ||
34 | runhaskell auto lambert | ||
35 | #runhaskell auto legendre | ||
36 | #runhaskell auto log | ||
37 | runhaskell auto pow_int | ||
38 | runhaskell auto psi | ||
39 | runhaskell auto synchrotron | ||
40 | #runhaskell auto trig | ||
41 | runhaskell auto zeta \ No newline at end of file | ||
diff --git a/lib/GSL/Special/bessel.h b/lib/GSL/Special/bessel.h deleted file mode 100644 index 5a2445d..0000000 --- a/lib/GSL/Special/bessel.h +++ /dev/null | |||
@@ -1,100 +0,0 @@ | |||
1 | int gsl_sf_bessel_J0_e(double x,double* result); | ||
2 | double gsl_sf_bessel_J0(double x); | ||
3 | int gsl_sf_bessel_J1_e(double x,double* result); | ||
4 | double gsl_sf_bessel_J1(double x); | ||
5 | int gsl_sf_bessel_Jn_e(int n,double x,double* result); | ||
6 | double gsl_sf_bessel_Jn(int n,double x); | ||
7 | int gsl_sf_bessel_Jn_array(int nmin,int nmax,double x,double* result_array); | ||
8 | int gsl_sf_bessel_Y0_e(double x,double* result); | ||
9 | double gsl_sf_bessel_Y0(double x); | ||
10 | int gsl_sf_bessel_Y1_e(double x,double* result); | ||
11 | double gsl_sf_bessel_Y1(double x); | ||
12 | int gsl_sf_bessel_Yn_e(int n,double x,double* result); | ||
13 | double gsl_sf_bessel_Yn(int n,double x); | ||
14 | int gsl_sf_bessel_Yn_array(int nmin,int nmax,double x,double* result_array); | ||
15 | int gsl_sf_bessel_I0_e(double x,double* result); | ||
16 | double gsl_sf_bessel_I0(double x); | ||
17 | int gsl_sf_bessel_I1_e(double x,double* result); | ||
18 | double gsl_sf_bessel_I1(double x); | ||
19 | int gsl_sf_bessel_In_e(int n,double x,double* result); | ||
20 | double gsl_sf_bessel_In(int n,double x); | ||
21 | int gsl_sf_bessel_In_array(int nmin,int nmax,double x,double* result_array); | ||
22 | int gsl_sf_bessel_I0_scaled_e(double x,double* result); | ||
23 | double gsl_sf_bessel_I0_scaled(double x); | ||
24 | int gsl_sf_bessel_I1_scaled_e(double x,double* result); | ||
25 | double gsl_sf_bessel_I1_scaled(double x); | ||
26 | int gsl_sf_bessel_In_scaled_e(int n,double x,double* result); | ||
27 | double gsl_sf_bessel_In_scaled(int n,double x); | ||
28 | int gsl_sf_bessel_In_scaled_array(int nmin,int nmax,double x,double* result_array); | ||
29 | int gsl_sf_bessel_K0_e(double x,double* result); | ||
30 | double gsl_sf_bessel_K0(double x); | ||
31 | int gsl_sf_bessel_K1_e(double x,double* result); | ||
32 | double gsl_sf_bessel_K1(double x); | ||
33 | int gsl_sf_bessel_Kn_e(int n,double x,double* result); | ||
34 | double gsl_sf_bessel_Kn(int n,double x); | ||
35 | int gsl_sf_bessel_Kn_array(int nmin,int nmax,double x,double* result_array); | ||
36 | int gsl_sf_bessel_K0_scaled_e(double x,double* result); | ||
37 | double gsl_sf_bessel_K0_scaled(double x); | ||
38 | int gsl_sf_bessel_K1_scaled_e(double x,double* result); | ||
39 | double gsl_sf_bessel_K1_scaled(double x); | ||
40 | int gsl_sf_bessel_Kn_scaled_e(int n,double x,double* result); | ||
41 | double gsl_sf_bessel_Kn_scaled(int n,double x); | ||
42 | int gsl_sf_bessel_Kn_scaled_array(int nmin,int nmax,double x,double* result_array); | ||
43 | int gsl_sf_bessel_j0_e(double x,double* result); | ||
44 | double gsl_sf_bessel_j0(double x); | ||
45 | int gsl_sf_bessel_j1_e(double x,double* result); | ||
46 | double gsl_sf_bessel_j1(double x); | ||
47 | int gsl_sf_bessel_j2_e(double x,double* result); | ||
48 | double gsl_sf_bessel_j2(double x); | ||
49 | int gsl_sf_bessel_jl_e(int l,double x,double* result); | ||
50 | double gsl_sf_bessel_jl(int l,double x); | ||
51 | int gsl_sf_bessel_jl_array(int lmax,double x,double* result_array); | ||
52 | int gsl_sf_bessel_jl_steed_array(int lmax,double x,double* jl_x_array); | ||
53 | int gsl_sf_bessel_y0_e(double x,double* result); | ||
54 | double gsl_sf_bessel_y0(double x); | ||
55 | int gsl_sf_bessel_y1_e(double x,double* result); | ||
56 | double gsl_sf_bessel_y1(double x); | ||
57 | int gsl_sf_bessel_y2_e(double x,double* result); | ||
58 | double gsl_sf_bessel_y2(double x); | ||
59 | int gsl_sf_bessel_yl_e(int l,double x,double* result); | ||
60 | double gsl_sf_bessel_yl(int l,double x); | ||
61 | int gsl_sf_bessel_yl_array(int lmax,double x,double* result_array); | ||
62 | int gsl_sf_bessel_i0_scaled_e(double x,double* result); | ||
63 | double gsl_sf_bessel_i0_scaled(double x); | ||
64 | int gsl_sf_bessel_i1_scaled_e(double x,double* result); | ||
65 | double gsl_sf_bessel_i1_scaled(double x); | ||
66 | int gsl_sf_bessel_i2_scaled_e(double x,double* result); | ||
67 | double gsl_sf_bessel_i2_scaled(double x); | ||
68 | int gsl_sf_bessel_il_scaled_e(int l,double x,double* result); | ||
69 | double gsl_sf_bessel_il_scaled(int l,double x); | ||
70 | int gsl_sf_bessel_il_scaled_array(int lmax,double x,double* result_array); | ||
71 | int gsl_sf_bessel_k0_scaled_e(double x,double* result); | ||
72 | double gsl_sf_bessel_k0_scaled(double x); | ||
73 | int gsl_sf_bessel_k1_scaled_e(double x,double* result); | ||
74 | double gsl_sf_bessel_k1_scaled(double x); | ||
75 | int gsl_sf_bessel_k2_scaled_e(double x,double* result); | ||
76 | double gsl_sf_bessel_k2_scaled(double x); | ||
77 | int gsl_sf_bessel_kl_scaled_e(int l,double x,double* result); | ||
78 | double gsl_sf_bessel_kl_scaled(int l,double x); | ||
79 | int gsl_sf_bessel_kl_scaled_array(int lmax,double x,double* result_array); | ||
80 | int gsl_sf_bessel_Jnu_e(double nu,double x,double* result); | ||
81 | double gsl_sf_bessel_Jnu(double nu,double x); | ||
82 | int gsl_sf_bessel_Ynu_e(double nu,double x,double* result); | ||
83 | double gsl_sf_bessel_Ynu(double nu,double x); | ||
84 | int gsl_sf_bessel_sequence_Jnu_e(double nu,int mode,size_t size,double* v); | ||
85 | int gsl_sf_bessel_Inu_scaled_e(double nu,double x,double* result); | ||
86 | double gsl_sf_bessel_Inu_scaled(double nu,double x); | ||
87 | int gsl_sf_bessel_Inu_e(double nu,double x,double* result); | ||
88 | double gsl_sf_bessel_Inu(double nu,double x); | ||
89 | int gsl_sf_bessel_Knu_scaled_e(double nu,double x,double* result); | ||
90 | double gsl_sf_bessel_Knu_scaled(double nu,double x); | ||
91 | int gsl_sf_bessel_Knu_e(double nu,double x,double* result); | ||
92 | double gsl_sf_bessel_Knu(double nu,double x); | ||
93 | int gsl_sf_bessel_lnKnu_e(double nu,double x,double* result); | ||
94 | double gsl_sf_bessel_lnKnu(double nu,double x); | ||
95 | int gsl_sf_bessel_zero_J0_e(int s,double* result); | ||
96 | double gsl_sf_bessel_zero_J0(int s); | ||
97 | int gsl_sf_bessel_zero_J1_e(int s,double* result); | ||
98 | double gsl_sf_bessel_zero_J1(int s); | ||
99 | int gsl_sf_bessel_zero_Jnu_e(double nu,int s,double* result); | ||
100 | double gsl_sf_bessel_zero_Jnu(double nu,int s); | ||
diff --git a/lib/GSL/Special/clausen.h b/lib/GSL/Special/clausen.h deleted file mode 100644 index 9f0225b..0000000 --- a/lib/GSL/Special/clausen.h +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | int gsl_sf_clausen_e(double x,double* result); | ||
2 | double gsl_sf_clausen(double x); | ||
diff --git a/lib/GSL/Special/coulomb.h b/lib/GSL/Special/coulomb.h deleted file mode 100644 index 2551081..0000000 --- a/lib/GSL/Special/coulomb.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | int gsl_sf_hydrogenicR_1_e(double Z,double r,double* result); | ||
2 | double gsl_sf_hydrogenicR_1(double Z,double r); | ||
3 | int gsl_sf_hydrogenicR_e(int n,int l,double Z,double r,double* result); | ||
4 | double gsl_sf_hydrogenicR(int n,int l,double Z,double r); | ||
5 | int gsl_sf_coulomb_wave_FG_e(double eta,double x,double lam_F,int k_lam_G,double* F,double* Fp,double* G,double* Gp,double* exp_F,double* exp_G); | ||
6 | int gsl_sf_coulomb_wave_F_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent); | ||
7 | int gsl_sf_coulomb_wave_FG_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* gc_array,double* F_exponent,double* G_exponent); | ||
8 | int gsl_sf_coulomb_wave_FGp_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* fcp_array,double* gc_array,double* gcp_array,double* F_exponent,double* G_exponent); | ||
9 | int gsl_sf_coulomb_wave_sphF_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent); | ||
10 | int gsl_sf_coulomb_CL_e(double L,double eta,double* result); | ||
11 | int gsl_sf_coulomb_CL_array(double Lmin,int kmax,double eta,double* cl); | ||
diff --git a/lib/GSL/Special/coupling.h b/lib/GSL/Special/coupling.h deleted file mode 100644 index 17de964..0000000 --- a/lib/GSL/Special/coupling.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | int gsl_sf_coupling_3j_e(int two_ja,int two_jb,int two_jc,int two_ma,int two_mb,int two_mc,double* result); | ||
2 | double gsl_sf_coupling_3j(int two_ja,int two_jb,int two_jc,int two_ma,int two_mb,int two_mc); | ||
3 | int gsl_sf_coupling_6j_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,double* result); | ||
4 | double gsl_sf_coupling_6j(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf); | ||
5 | int gsl_sf_coupling_RacahW_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,double* result); | ||
6 | double gsl_sf_coupling_RacahW(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf); | ||
7 | int gsl_sf_coupling_9j_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,int two_jg,int two_jh,int two_ji,double* result); | ||
8 | double gsl_sf_coupling_9j(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,int two_jg,int two_jh,int two_ji); | ||
9 | int gsl_sf_coupling_6j_INCORRECT_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,double* result); | ||
10 | double gsl_sf_coupling_6j_INCORRECT(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf); | ||
diff --git a/lib/GSL/Special/dawson.h b/lib/GSL/Special/dawson.h deleted file mode 100644 index 5f878b5..0000000 --- a/lib/GSL/Special/dawson.h +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | int gsl_sf_dawson_e(double x,double* result); | ||
2 | double gsl_sf_dawson(double x); | ||
diff --git a/lib/GSL/Special/debye.h b/lib/GSL/Special/debye.h deleted file mode 100644 index 2424b63..0000000 --- a/lib/GSL/Special/debye.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | int gsl_sf_debye_1_e(double x,double* result); | ||
2 | double gsl_sf_debye_1(double x); | ||
3 | int gsl_sf_debye_2_e(double x,double* result); | ||
4 | double gsl_sf_debye_2(double x); | ||
5 | int gsl_sf_debye_3_e(double x,double* result); | ||
6 | double gsl_sf_debye_3(double x); | ||
7 | int gsl_sf_debye_4_e(double x,double* result); | ||
8 | double gsl_sf_debye_4(double x); | ||
diff --git a/lib/GSL/Special/dilog.h b/lib/GSL/Special/dilog.h deleted file mode 100644 index ce1599e..0000000 --- a/lib/GSL/Special/dilog.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | int gsl_sf_dilog_e(double x,double* result); | ||
2 | double gsl_sf_dilog(double x); | ||
3 | int gsl_sf_complex_dilog_xy_e(double x,double y,double* result_re,double* result_im); | ||
4 | int gsl_sf_complex_dilog_e(double r,double theta,double* result_re,double* result_im); | ||
5 | int gsl_sf_complex_spence_xy_e(double x,double y,double* real_sp,double* imag_sp); | ||
diff --git a/lib/GSL/Special/elementary.h b/lib/GSL/Special/elementary.h deleted file mode 100644 index bf5adf8..0000000 --- a/lib/GSL/Special/elementary.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | int gsl_sf_multiply_e(double x,double y,double* result); | ||
2 | double gsl_sf_multiply(double x,double y); | ||
3 | int gsl_sf_multiply_err_e(double x,double dx,double y,double dy,double* result); | ||
diff --git a/lib/GSL/Special/ellint.h b/lib/GSL/Special/ellint.h deleted file mode 100644 index 5329c6c..0000000 --- a/lib/GSL/Special/ellint.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | int gsl_sf_ellint_Kcomp_e(double k,int mode,double* result); | ||
2 | double gsl_sf_ellint_Kcomp(double k,int mode); | ||
3 | int gsl_sf_ellint_Ecomp_e(double k,int mode,double* result); | ||
4 | double gsl_sf_ellint_Ecomp(double k,int mode); | ||
5 | int gsl_sf_ellint_F_e(double phi,double k,int mode,double* result); | ||
6 | double gsl_sf_ellint_F(double phi,double k,int mode); | ||
7 | int gsl_sf_ellint_E_e(double phi,double k,int mode,double* result); | ||
8 | double gsl_sf_ellint_E(double phi,double k,int mode); | ||
9 | int gsl_sf_ellint_P_e(double phi,double k,double n,int mode,double* result); | ||
10 | double gsl_sf_ellint_P(double phi,double k,double n,int mode); | ||
11 | int gsl_sf_ellint_D_e(double phi,double k,double n,int mode,double* result); | ||
12 | double gsl_sf_ellint_D(double phi,double k,double n,int mode); | ||
13 | int gsl_sf_ellint_RC_e(double x,double y,int mode,double* result); | ||
14 | double gsl_sf_ellint_RC(double x,double y,int mode); | ||
15 | int gsl_sf_ellint_RD_e(double x,double y,double z,int mode,double* result); | ||
16 | double gsl_sf_ellint_RD(double x,double y,double z,int mode); | ||
17 | int gsl_sf_ellint_RF_e(double x,double y,double z,int mode,double* result); | ||
18 | double gsl_sf_ellint_RF(double x,double y,double z,int mode); | ||
19 | int gsl_sf_ellint_RJ_e(double x,double y,double z,double p,int mode,double* result); | ||
20 | double gsl_sf_ellint_RJ(double x,double y,double z,double p,int mode); | ||
diff --git a/lib/GSL/Special/erf.h b/lib/GSL/Special/erf.h deleted file mode 100644 index 17369cf..0000000 --- a/lib/GSL/Special/erf.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | int gsl_sf_erfc_e(double x,double* result); | ||
2 | double gsl_sf_erfc(double x); | ||
3 | int gsl_sf_log_erfc_e(double x,double* result); | ||
4 | double gsl_sf_log_erfc(double x); | ||
5 | int gsl_sf_erf_e(double x,double* result); | ||
6 | double gsl_sf_erf(double x); | ||
7 | int gsl_sf_erf_Z_e(double x,double* result); | ||
8 | int gsl_sf_erf_Q_e(double x,double* result); | ||
9 | double gsl_sf_erf_Z(double x); | ||
10 | double gsl_sf_erf_Q(double x); | ||
11 | int gsl_sf_hazard_e(double x,double* result); | ||
12 | double gsl_sf_hazard(double x); | ||
diff --git a/lib/GSL/Special/exp.h b/lib/GSL/Special/exp.h deleted file mode 100644 index 20062f0..0000000 --- a/lib/GSL/Special/exp.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | int gsl_sf_exp_e(double x,double* result); | ||
2 | double gsl_sf_exp(double x); | ||
3 | int gsl_sf_exp_e10_e(double x,double* result); | ||
4 | int gsl_sf_exp_mult_e(double x,double y,double* result); | ||
5 | double gsl_sf_exp_mult(double x,double y); | ||
6 | int gsl_sf_exp_mult_e10_e(double x,double y,double* result); | ||
7 | int gsl_sf_expm1_e(double x,double* result); | ||
8 | double gsl_sf_expm1(double x); | ||
9 | int gsl_sf_exprel_e(double x,double* result); | ||
10 | double gsl_sf_exprel(double x); | ||
11 | int gsl_sf_exprel_2_e(double x,double* result); | ||
12 | double gsl_sf_exprel_2(double x); | ||
13 | int gsl_sf_exprel_n_e(int n,double x,double* result); | ||
14 | double gsl_sf_exprel_n(int n,double x); | ||
15 | int gsl_sf_exp_err_e(double x,double dx,double* result); | ||
16 | int gsl_sf_exp_err_e10_e(double x,double dx,double* result); | ||
17 | int gsl_sf_exp_mult_err_e(double x,double dx,double y,double dy,double* result); | ||
18 | int gsl_sf_exp_mult_err_e10_e(double x,double dx,double y,double dy,double* result); | ||
diff --git a/lib/GSL/Special/expint.h b/lib/GSL/Special/expint.h deleted file mode 100644 index 1dd469f..0000000 --- a/lib/GSL/Special/expint.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | int gsl_sf_expint_E1_e(double x,double* result); | ||
2 | double gsl_sf_expint_E1(double x); | ||
3 | int gsl_sf_expint_E2_e(double x,double* result); | ||
4 | double gsl_sf_expint_E2(double x); | ||
5 | int gsl_sf_expint_E1_scaled_e(double x,double* result); | ||
6 | double gsl_sf_expint_E1_scaled(double x); | ||
7 | int gsl_sf_expint_E2_scaled_e(double x,double* result); | ||
8 | double gsl_sf_expint_E2_scaled(double x); | ||
9 | int gsl_sf_expint_Ei_e(double x,double* result); | ||
10 | double gsl_sf_expint_Ei(double x); | ||
11 | int gsl_sf_expint_Ei_scaled_e(double x,double* result); | ||
12 | double gsl_sf_expint_Ei_scaled(double x); | ||
13 | int gsl_sf_Shi_e(double x,double* result); | ||
14 | double gsl_sf_Shi(double x); | ||
15 | int gsl_sf_Chi_e(double x,double* result); | ||
16 | double gsl_sf_Chi(double x); | ||
17 | int gsl_sf_expint_3_e(double x,double* result); | ||
18 | double gsl_sf_expint_3(double x); | ||
19 | int gsl_sf_Si_e(double x,double* result); | ||
20 | double gsl_sf_Si(double x); | ||
21 | int gsl_sf_Ci_e(double x,double* result); | ||
22 | double gsl_sf_Ci(double x); | ||
23 | int gsl_sf_atanint_e(double x,double* result); | ||
24 | double gsl_sf_atanint(double x); | ||
diff --git a/lib/GSL/Special/fermi_dirac.h b/lib/GSL/Special/fermi_dirac.h deleted file mode 100644 index 7a4c757..0000000 --- a/lib/GSL/Special/fermi_dirac.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | int gsl_sf_fermi_dirac_m1_e(double x,double* result); | ||
2 | double gsl_sf_fermi_dirac_m1(double x); | ||
3 | int gsl_sf_fermi_dirac_0_e(double x,double* result); | ||
4 | double gsl_sf_fermi_dirac_0(double x); | ||
5 | int gsl_sf_fermi_dirac_1_e(double x,double* result); | ||
6 | double gsl_sf_fermi_dirac_1(double x); | ||
7 | int gsl_sf_fermi_dirac_2_e(double x,double* result); | ||
8 | double gsl_sf_fermi_dirac_2(double x); | ||
9 | int gsl_sf_fermi_dirac_int_e(int j,double x,double* result); | ||
10 | double gsl_sf_fermi_dirac_int(int j,double x); | ||
11 | int gsl_sf_fermi_dirac_mhalf_e(double x,double* result); | ||
12 | double gsl_sf_fermi_dirac_mhalf(double x); | ||
13 | int gsl_sf_fermi_dirac_half_e(double x,double* result); | ||
14 | double gsl_sf_fermi_dirac_half(double x); | ||
15 | int gsl_sf_fermi_dirac_3half_e(double x,double* result); | ||
16 | double gsl_sf_fermi_dirac_3half(double x); | ||
17 | int gsl_sf_fermi_dirac_inc_0_e(double x,double b,double* result); | ||
18 | double gsl_sf_fermi_dirac_inc_0(double x,double b); | ||
diff --git a/lib/GSL/Special/gamma.h b/lib/GSL/Special/gamma.h deleted file mode 100644 index c5cc417..0000000 --- a/lib/GSL/Special/gamma.h +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | int gsl_sf_lngamma_e(double x,double* result); | ||
2 | double gsl_sf_lngamma(double x); | ||
3 | int gsl_sf_lngamma_sgn_e(double x,double* result_lg,double* sgn); | ||
4 | int gsl_sf_gamma_e(double x,double* result); | ||
5 | double gsl_sf_gamma(double x); | ||
6 | int gsl_sf_gammastar_e(double x,double* result); | ||
7 | double gsl_sf_gammastar(double x); | ||
8 | int gsl_sf_gammainv_e(double x,double* result); | ||
9 | double gsl_sf_gammainv(double x); | ||
10 | int gsl_sf_lngamma_complex_e(double zr,double zi,double* lnr,double* arg); | ||
11 | int gsl_sf_taylorcoeff_e(int n,double x,double* result); | ||
12 | double gsl_sf_taylorcoeff(int n,double x); | ||
13 | int gsl_sf_fact_e(int n,double* result); | ||
14 | double gsl_sf_fact(int n); | ||
15 | int gsl_sf_doublefact_e(int n,double* result); | ||
16 | double gsl_sf_doublefact(int n); | ||
17 | int gsl_sf_lnfact_e(int n,double* result); | ||
18 | double gsl_sf_lnfact(int n); | ||
19 | int gsl_sf_lndoublefact_e(int n,double* result); | ||
20 | double gsl_sf_lndoublefact(int n); | ||
21 | int gsl_sf_lnchoose_e(int n,int m,double* result); | ||
22 | double gsl_sf_lnchoose(int n,int m); | ||
23 | int gsl_sf_choose_e(int n,int m,double* result); | ||
24 | double gsl_sf_choose(int n,int m); | ||
25 | int gsl_sf_lnpoch_e(double a,double x,double* result); | ||
26 | double gsl_sf_lnpoch(double a,double x); | ||
27 | int gsl_sf_lnpoch_sgn_e(double a,double x,double* result,double* sgn); | ||
28 | int gsl_sf_poch_e(double a,double x,double* result); | ||
29 | double gsl_sf_poch(double a,double x); | ||
30 | int gsl_sf_pochrel_e(double a,double x,double* result); | ||
31 | double gsl_sf_pochrel(double a,double x); | ||
32 | int gsl_sf_gamma_inc_Q_e(double a,double x,double* result); | ||
33 | double gsl_sf_gamma_inc_Q(double a,double x); | ||
34 | int gsl_sf_gamma_inc_P_e(double a,double x,double* result); | ||
35 | double gsl_sf_gamma_inc_P(double a,double x); | ||
36 | int gsl_sf_gamma_inc_e(double a,double x,double* result); | ||
37 | double gsl_sf_gamma_inc(double a,double x); | ||
38 | int gsl_sf_lnbeta_e(double a,double b,double* result); | ||
39 | double gsl_sf_lnbeta(double a,double b); | ||
40 | int gsl_sf_beta_e(double a,double b,double* result); | ||
41 | double gsl_sf_beta(double a,double b); | ||
42 | int gsl_sf_beta_inc_e(double a,double b,double x,double* result); | ||
43 | double gsl_sf_beta_inc(double a,double b,double x); | ||
diff --git a/lib/GSL/Special/gegenbauer.h b/lib/GSL/Special/gegenbauer.h deleted file mode 100644 index 228cbd3..0000000 --- a/lib/GSL/Special/gegenbauer.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | int gsl_sf_gegenpoly_1_e(double lambda,double x,double* result); | ||
2 | int gsl_sf_gegenpoly_2_e(double lambda,double x,double* result); | ||
3 | int gsl_sf_gegenpoly_3_e(double lambda,double x,double* result); | ||
4 | double gsl_sf_gegenpoly_1(double lambda,double x); | ||
5 | double gsl_sf_gegenpoly_2(double lambda,double x); | ||
6 | double gsl_sf_gegenpoly_3(double lambda,double x); | ||
7 | int gsl_sf_gegenpoly_n_e(int n,double lambda,double x,double* result); | ||
8 | double gsl_sf_gegenpoly_n(int n,double lambda,double x); | ||
9 | int gsl_sf_gegenpoly_array(int nmax,double lambda,double x,double* result_array); | ||
diff --git a/lib/GSL/Special/gsl_sf_exp.h b/lib/GSL/Special/gsl_sf_exp.h deleted file mode 100644 index b1f0d89..0000000 --- a/lib/GSL/Special/gsl_sf_exp.h +++ /dev/null | |||
@@ -1,146 +0,0 @@ | |||
1 | /* specfunc/gsl_sf_exp.h | ||
2 | * | ||
3 | * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or (at | ||
8 | * your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, but | ||
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | * General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | /* Author: G. Jungman */ | ||
21 | |||
22 | #ifndef __GSL_SF_EXP_H__ | ||
23 | #define __GSL_SF_EXP_H__ | ||
24 | |||
25 | #include <gsl/gsl_sf_result.h> | ||
26 | #include <gsl/gsl_precision.h> | ||
27 | |||
28 | #undef __BEGIN_DECLS | ||
29 | #undef __END_DECLS | ||
30 | #ifdef __cplusplus | ||
31 | # define __BEGIN_DECLS extern "C" { | ||
32 | # define __END_DECLS } | ||
33 | #else | ||
34 | # define __BEGIN_DECLS /* empty */ | ||
35 | # define __END_DECLS /* empty */ | ||
36 | #endif | ||
37 | |||
38 | __BEGIN_DECLS | ||
39 | |||
40 | /* Provide an exp() function with GSL semantics, | ||
41 | * i.e. with proper error checking, etc. | ||
42 | * | ||
43 | * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW | ||
44 | */ | ||
45 | int gsl_sf_exp_e(const double x, gsl_sf_result * result); | ||
46 | double gsl_sf_exp(const double x); | ||
47 | |||
48 | |||
49 | /* Exp(x) | ||
50 | * | ||
51 | * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW | ||
52 | */ | ||
53 | int gsl_sf_exp_e10_e(const double x, gsl_sf_result_e10 * result); | ||
54 | |||
55 | |||
56 | /* Exponentiate and multiply by a given factor: y * Exp(x) | ||
57 | * | ||
58 | * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW | ||
59 | */ | ||
60 | int gsl_sf_exp_mult_e(const double x, const double y, gsl_sf_result * result); | ||
61 | double gsl_sf_exp_mult(const double x, const double y); | ||
62 | |||
63 | |||
64 | /* Exponentiate and multiply by a given factor: y * Exp(x) | ||
65 | * | ||
66 | * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW | ||
67 | */ | ||
68 | int gsl_sf_exp_mult_e10_e(const double x, const double y, gsl_sf_result_e10 * result); | ||
69 | |||
70 | |||
71 | /* exp(x)-1 | ||
72 | * | ||
73 | * exceptions: GSL_EOVRFLW | ||
74 | */ | ||
75 | int gsl_sf_expm1_e(const double x, gsl_sf_result * result); | ||
76 | double gsl_sf_expm1(const double x); | ||
77 | |||
78 | |||
79 | /* (exp(x)-1)/x = 1 + x/2 + x^2/(2*3) + x^3/(2*3*4) + ... | ||
80 | * | ||
81 | * exceptions: GSL_EOVRFLW | ||
82 | */ | ||
83 | int gsl_sf_exprel_e(const double x, gsl_sf_result * result); | ||
84 | double gsl_sf_exprel(const double x); | ||
85 | |||
86 | |||
87 | /* 2(exp(x)-1-x)/x^2 = 1 + x/3 + x^2/(3*4) + x^3/(3*4*5) + ... | ||
88 | * | ||
89 | * exceptions: GSL_EOVRFLW | ||
90 | */ | ||
91 | int gsl_sf_exprel_2_e(double x, gsl_sf_result * result); | ||
92 | double gsl_sf_exprel_2(const double x); | ||
93 | |||
94 | |||
95 | /* Similarly for the N-th generalization of | ||
96 | * the above. The so-called N-relative exponential | ||
97 | * | ||
98 | * exprel_N(x) = N!/x^N (exp(x) - Sum[x^k/k!, {k,0,N-1}]) | ||
99 | * = 1 + x/(N+1) + x^2/((N+1)(N+2)) + ... | ||
100 | * = 1F1(1,1+N,x) | ||
101 | */ | ||
102 | int gsl_sf_exprel_n_e(const int n, const double x, gsl_sf_result * result); | ||
103 | double gsl_sf_exprel_n(const int n, const double x); | ||
104 | |||
105 | |||
106 | /* Exponentiate a quantity with an associated error. | ||
107 | */ | ||
108 | int gsl_sf_exp_err_e(const double x, const double dx, gsl_sf_result * result); | ||
109 | |||
110 | /* Exponentiate a quantity with an associated error. | ||
111 | */ | ||
112 | int gsl_sf_exp_err_e10_e(const double x, const double dx, gsl_sf_result_e10 * result); | ||
113 | |||
114 | |||
115 | /* Exponentiate and multiply by a given factor: y * Exp(x), | ||
116 | * for quantities with associated errors. | ||
117 | * | ||
118 | * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW | ||
119 | */ | ||
120 | int gsl_sf_exp_mult_err_e(const double x, const double dx, const double y, const double dy, gsl_sf_result * result); | ||
121 | |||
122 | |||
123 | /* Exponentiate and multiply by a given factor: y * Exp(x), | ||
124 | * for quantities with associated errors. | ||
125 | * | ||
126 | * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW | ||
127 | */ | ||
128 | int gsl_sf_exp_mult_err_e10_e(const double x, const double dx, const double y, const double dy, gsl_sf_result_e10 * result); | ||
129 | |||
130 | __END_DECLS | ||
131 | |||
132 | |||
133 | #ifdef HAVE_INLINE | ||
134 | #include <gsl/gsl_math.h> | ||
135 | #include <gsl/gsl_errno.h> | ||
136 | |||
137 | __BEGIN_DECLS | ||
138 | |||
139 | |||
140 | |||
141 | __END_DECLS | ||
142 | |||
143 | #endif /* HAVE_INLINE */ | ||
144 | |||
145 | |||
146 | #endif /* __GSL_SF_EXP_H__ */ | ||
diff --git a/lib/GSL/Special/gsl_sf_log.h b/lib/GSL/Special/gsl_sf_log.h deleted file mode 100644 index 5225d05..0000000 --- a/lib/GSL/Special/gsl_sf_log.h +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | /* specfunc/gsl_sf_log.h | ||
2 | * | ||
3 | * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or (at | ||
8 | * your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, but | ||
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | * General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | /* Author: G. Jungman */ | ||
21 | |||
22 | #ifndef __GSL_SF_LOG_H__ | ||
23 | #define __GSL_SF_LOG_H__ | ||
24 | |||
25 | #include <gsl/gsl_sf_result.h> | ||
26 | |||
27 | #undef __BEGIN_DECLS | ||
28 | #undef __END_DECLS | ||
29 | #ifdef __cplusplus | ||
30 | # define __BEGIN_DECLS extern "C" { | ||
31 | # define __END_DECLS } | ||
32 | #else | ||
33 | # define __BEGIN_DECLS /* empty */ | ||
34 | # define __END_DECLS /* empty */ | ||
35 | #endif | ||
36 | |||
37 | __BEGIN_DECLS | ||
38 | |||
39 | |||
40 | /* Provide a logarithm function with GSL semantics. | ||
41 | * | ||
42 | * exceptions: GSL_EDOM | ||
43 | */ | ||
44 | int gsl_sf_log_e(const double x, gsl_sf_result * result); | ||
45 | double gsl_sf_log(const double x); | ||
46 | |||
47 | |||
48 | /* Log(|x|) | ||
49 | * | ||
50 | * exceptions: GSL_EDOM | ||
51 | */ | ||
52 | int gsl_sf_log_abs_e(const double x, gsl_sf_result * result); | ||
53 | double gsl_sf_log_abs(const double x); | ||
54 | |||
55 | |||
56 | /* Complex Logarithm | ||
57 | * exp(lnr + I theta) = zr + I zi | ||
58 | * Returns argument in [-pi,pi]. | ||
59 | * | ||
60 | * exceptions: GSL_EDOM | ||
61 | */ | ||
62 | int gsl_sf_complex_log_e(const double zr, const double zi, gsl_sf_result * lnr, gsl_sf_result * theta); | ||
63 | |||
64 | |||
65 | /* Log(1 + x) | ||
66 | * | ||
67 | * exceptions: GSL_EDOM | ||
68 | */ | ||
69 | int gsl_sf_log_1plusx_e(const double x, gsl_sf_result * result); | ||
70 | double gsl_sf_log_1plusx(const double x); | ||
71 | |||
72 | |||
73 | /* Log(1 + x) - x | ||
74 | * | ||
75 | * exceptions: GSL_EDOM | ||
76 | */ | ||
77 | int gsl_sf_log_1plusx_mx_e(const double x, gsl_sf_result * result); | ||
78 | double gsl_sf_log_1plusx_mx(const double x); | ||
79 | |||
80 | |||
81 | #ifdef HAVE_INLINE | ||
82 | #include <gsl/gsl_math.h> | ||
83 | #include <gsl/gsl_errno.h> | ||
84 | |||
85 | #endif /* HAVE_INLINE */ | ||
86 | |||
87 | |||
88 | __END_DECLS | ||
89 | |||
90 | #endif /* __GSL_SF_LOG_H__ */ | ||
diff --git a/lib/GSL/Special/hyperg.h b/lib/GSL/Special/hyperg.h deleted file mode 100644 index aa59106..0000000 --- a/lib/GSL/Special/hyperg.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | int gsl_sf_hyperg_0F1_e(double c,double x,double* result); | ||
2 | double gsl_sf_hyperg_0F1(double c,double x); | ||
3 | int gsl_sf_hyperg_1F1_int_e(int m,int n,double x,double* result); | ||
4 | double gsl_sf_hyperg_1F1_int(int m,int n,double x); | ||
5 | int gsl_sf_hyperg_1F1_e(double a,double b,double x,double* result); | ||
6 | double gsl_sf_hyperg_1F1(double a,double b,double x); | ||
7 | int gsl_sf_hyperg_U_int_e(int m,int n,double x,double* result); | ||
8 | double gsl_sf_hyperg_U_int(int m,int n,double x); | ||
9 | int gsl_sf_hyperg_U_int_e10_e(int m,int n,double x,double* result); | ||
10 | int gsl_sf_hyperg_U_e(double a,double b,double x,double* result); | ||
11 | double gsl_sf_hyperg_U(double a,double b,double x); | ||
12 | int gsl_sf_hyperg_U_e10_e(double a,double b,double x,double* result); | ||
13 | int gsl_sf_hyperg_2F1_e(double a,double b,double c,double x,double* result); | ||
14 | double gsl_sf_hyperg_2F1(double a,double b,double c,double x); | ||
15 | int gsl_sf_hyperg_2F1_conj_e(double aR,double aI,double c,double x,double* result); | ||
16 | double gsl_sf_hyperg_2F1_conj(double aR,double aI,double c,double x); | ||
17 | int gsl_sf_hyperg_2F1_renorm_e(double a,double b,double c,double x,double* result); | ||
18 | double gsl_sf_hyperg_2F1_renorm(double a,double b,double c,double x); | ||
19 | int gsl_sf_hyperg_2F1_conj_renorm_e(double aR,double aI,double c,double x,double* result); | ||
20 | double gsl_sf_hyperg_2F1_conj_renorm(double aR,double aI,double c,double x); | ||
21 | int gsl_sf_hyperg_2F0_e(double a,double b,double x,double* result); | ||
22 | double gsl_sf_hyperg_2F0(double a,double b,double x); | ||
diff --git a/lib/GSL/Special/laguerre.h b/lib/GSL/Special/laguerre.h deleted file mode 100644 index 6275a05..0000000 --- a/lib/GSL/Special/laguerre.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | int gsl_sf_laguerre_1_e(double a,double x,double* result); | ||
2 | int gsl_sf_laguerre_2_e(double a,double x,double* result); | ||
3 | int gsl_sf_laguerre_3_e(double a,double x,double* result); | ||
4 | double gsl_sf_laguerre_1(double a,double x); | ||
5 | double gsl_sf_laguerre_2(double a,double x); | ||
6 | double gsl_sf_laguerre_3(double a,double x); | ||
7 | int gsl_sf_laguerre_n_e(int n,double a,double x,double* result); | ||
8 | double gsl_sf_laguerre_n(int n,double a,double x); | ||
diff --git a/lib/GSL/Special/lambert.h b/lib/GSL/Special/lambert.h deleted file mode 100644 index df90d11..0000000 --- a/lib/GSL/Special/lambert.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | int gsl_sf_lambert_W0_e(double x,double* result); | ||
2 | double gsl_sf_lambert_W0(double x); | ||
3 | int gsl_sf_lambert_Wm1_e(double x,double* result); | ||
4 | double gsl_sf_lambert_Wm1(double x); | ||
diff --git a/lib/GSL/Special/legendre.h b/lib/GSL/Special/legendre.h deleted file mode 100644 index aebe84f..0000000 --- a/lib/GSL/Special/legendre.h +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | int gsl_sf_legendre_Pl_e(int l,double x,double* result); | ||
2 | double gsl_sf_legendre_Pl(int l,double x); | ||
3 | int gsl_sf_legendre_Pl_array(int lmax,double x,double* result_array); | ||
4 | int gsl_sf_legendre_Pl_deriv_array(int lmax,double x,double* result_array,double* result_deriv_array); | ||
5 | int gsl_sf_legendre_P1_e(double x,double* result); | ||
6 | int gsl_sf_legendre_P2_e(double x,double* result); | ||
7 | int gsl_sf_legendre_P3_e(double x,double* result); | ||
8 | double gsl_sf_legendre_P1(double x); | ||
9 | double gsl_sf_legendre_P2(double x); | ||
10 | double gsl_sf_legendre_P3(double x); | ||
11 | int gsl_sf_legendre_Q0_e(double x,double* result); | ||
12 | double gsl_sf_legendre_Q0(double x); | ||
13 | int gsl_sf_legendre_Q1_e(double x,double* result); | ||
14 | double gsl_sf_legendre_Q1(double x); | ||
15 | int gsl_sf_legendre_Ql_e(int l,double x,double* result); | ||
16 | double gsl_sf_legendre_Ql(int l,double x); | ||
17 | int gsl_sf_legendre_Plm_e(int l,int m,double x,double* result); | ||
18 | double gsl_sf_legendre_Plm(int l,int m,double x); | ||
19 | int gsl_sf_legendre_Plm_array(int lmax,int m,double x,double* result_array); | ||
20 | int gsl_sf_legendre_Plm_deriv_array(int lmax,int m,double x,double* result_array,double* result_deriv_array); | ||
21 | int gsl_sf_legendre_sphPlm_e(int l,int m,double x,double* result); | ||
22 | double gsl_sf_legendre_sphPlm(int l,int m,double x); | ||
23 | int gsl_sf_legendre_sphPlm_array(int lmax,int m,double x,double* result_array); | ||
24 | int gsl_sf_legendre_sphPlm_deriv_array(int lmax,int m,double x,double* result_array,double* result_deriv_array); | ||
25 | int gsl_sf_legendre_array_size(int lmax,int m); | ||
26 | int gsl_sf_conicalP_half_e(double lambda,double x,double* result); | ||
27 | double gsl_sf_conicalP_half(double lambda,double x); | ||
28 | int gsl_sf_conicalP_mhalf_e(double lambda,double x,double* result); | ||
29 | double gsl_sf_conicalP_mhalf(double lambda,double x); | ||
30 | int gsl_sf_conicalP_0_e(double lambda,double x,double* result); | ||
31 | double gsl_sf_conicalP_0(double lambda,double x); | ||
32 | int gsl_sf_conicalP_1_e(double lambda,double x,double* result); | ||
33 | double gsl_sf_conicalP_1(double lambda,double x); | ||
34 | int gsl_sf_conicalP_sph_reg_e(int l,double lambda,double x,double* result); | ||
35 | double gsl_sf_conicalP_sph_reg(int l,double lambda,double x); | ||
36 | int gsl_sf_conicalP_cyl_reg_e(int m,double lambda,double x,double* result); | ||
37 | double gsl_sf_conicalP_cyl_reg(int m,double lambda,double x); | ||
38 | int gsl_sf_legendre_H3d_0_e(double lambda,double eta,double* result); | ||
39 | double gsl_sf_legendre_H3d_0(double lambda,double eta); | ||
40 | int gsl_sf_legendre_H3d_1_e(double lambda,double eta,double* result); | ||
41 | double gsl_sf_legendre_H3d_1(double lambda,double eta); | ||
42 | int gsl_sf_legendre_H3d_e(int l,double lambda,double eta,double* result); | ||
43 | double gsl_sf_legendre_H3d(int l,double lambda,double eta); | ||
44 | int gsl_sf_legendre_H3d_array(int lmax,double lambda,double eta,double* result_array); | ||
diff --git a/lib/GSL/Special/log.h b/lib/GSL/Special/log.h deleted file mode 100644 index 5713845..0000000 --- a/lib/GSL/Special/log.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | int gsl_sf_log_e(double x,double* result); | ||
2 | double gsl_sf_log(double x); | ||
3 | int gsl_sf_log_abs_e(double x,double* result); | ||
4 | double gsl_sf_log_abs(double x); | ||
5 | int gsl_sf_complex_log_e(double zr,double zi,double* lnr,double* theta); | ||
6 | int gsl_sf_log_1plusx_e(double x,double* result); | ||
7 | double gsl_sf_log_1plusx(double x); | ||
8 | int gsl_sf_log_1plusx_mx_e(double x,double* result); | ||
9 | double gsl_sf_log_1plusx_mx(double x); | ||
diff --git a/lib/GSL/Special/pow_int.h b/lib/GSL/Special/pow_int.h deleted file mode 100644 index aba8bc9..0000000 --- a/lib/GSL/Special/pow_int.h +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | int gsl_sf_pow_int_e(double x,int n,double* result); | ||
2 | double gsl_sf_pow_int(double x,int n); | ||
diff --git a/lib/GSL/Special/psi.h b/lib/GSL/Special/psi.h deleted file mode 100644 index 589eb34..0000000 --- a/lib/GSL/Special/psi.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | int gsl_sf_psi_int_e(int n,double* result); | ||
2 | double gsl_sf_psi_int(int n); | ||
3 | int gsl_sf_psi_e(double x,double* result); | ||
4 | double gsl_sf_psi(double x); | ||
5 | int gsl_sf_psi_1piy_e(double y,double* result); | ||
6 | double gsl_sf_psi_1piy(double y); | ||
7 | int gsl_sf_psi_1_int_e(int n,double* result); | ||
8 | double gsl_sf_psi_1_int(int n); | ||
9 | int gsl_sf_psi_1_e(double x,double* result); | ||
10 | double gsl_sf_psi_1(double x); | ||
11 | int gsl_sf_psi_n_e(int n,double x,double* result); | ||
12 | double gsl_sf_psi_n(int n,double x); | ||
diff --git a/lib/GSL/Special/synchrotron.h b/lib/GSL/Special/synchrotron.h deleted file mode 100644 index 786401c..0000000 --- a/lib/GSL/Special/synchrotron.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | int gsl_sf_synchrotron_1_e(double x,double* result); | ||
2 | double gsl_sf_synchrotron_1(double x); | ||
3 | int gsl_sf_synchrotron_2_e(double x,double* result); | ||
4 | double gsl_sf_synchrotron_2(double x); | ||
diff --git a/lib/GSL/Special/trig.h b/lib/GSL/Special/trig.h deleted file mode 100644 index 50677f2..0000000 --- a/lib/GSL/Special/trig.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | int gsl_sf_sin_e(double x,double* result); | ||
2 | double gsl_sf_sin(double x); | ||
3 | int gsl_sf_cos_e(double x,double* result); | ||
4 | double gsl_sf_cos(double x); | ||
5 | int gsl_sf_hypot_e(double x,double y,double* result); | ||
6 | double gsl_sf_hypot(double x,double y); | ||
7 | int gsl_sf_complex_sin_e(double zr,double zi,double* szr,double* szi); | ||
8 | int gsl_sf_complex_cos_e(double zr,double zi,double* czr,double* czi); | ||
9 | int gsl_sf_complex_logsin_e(double zr,double zi,double* lszr,double* lszi); | ||
10 | int gsl_sf_sinc_e(double x,double* result); | ||
11 | double gsl_sf_sinc(double x); | ||
12 | int gsl_sf_lnsinh_e(double x,double* result); | ||
13 | double gsl_sf_lnsinh(double x); | ||
14 | int gsl_sf_lncosh_e(double x,double* result); | ||
15 | double gsl_sf_lncosh(double x); | ||
16 | int gsl_sf_polar_to_rect(double r,double theta,double* x,double* y); | ||
17 | int gsl_sf_rect_to_polar(double x,double y,double* r,double* theta); | ||
18 | int gsl_sf_sin_err_e(double x,double dx,double* result); | ||
19 | int gsl_sf_cos_err_e(double x,double dx,double* result); | ||
20 | int gsl_sf_angle_restrict_symm_e(double* theta); | ||
21 | double gsl_sf_angle_restrict_symm(double theta); | ||
22 | int gsl_sf_angle_restrict_pos_e(double* theta); | ||
23 | double gsl_sf_angle_restrict_pos(double theta); | ||
24 | int gsl_sf_angle_restrict_symm_err_e(double theta,double* result); | ||
25 | int gsl_sf_angle_restrict_pos_err_e(double theta,double* result); | ||
diff --git a/lib/GSL/Special/zeta.h b/lib/GSL/Special/zeta.h deleted file mode 100644 index b961ece..0000000 --- a/lib/GSL/Special/zeta.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | int gsl_sf_zeta_int_e(int n,double* result); | ||
2 | double gsl_sf_zeta_int(int n); | ||
3 | int gsl_sf_zeta_e(double s,double* result); | ||
4 | double gsl_sf_zeta(double s); | ||
5 | int gsl_sf_zetam1_e(double s,double* result); | ||
6 | double gsl_sf_zetam1(double s); | ||
7 | int gsl_sf_zetam1_int_e(int s,double* result); | ||
8 | double gsl_sf_zetam1_int(int s); | ||
9 | int gsl_sf_hzeta_e(double s,double q,double* result); | ||
10 | double gsl_sf_hzeta(double s,double q); | ||
11 | int gsl_sf_eta_int_e(int n,double* result); | ||
12 | double gsl_sf_eta_int(int n); | ||
13 | int gsl_sf_eta_e(double s,double* result); | ||
14 | double gsl_sf_eta(double s); | ||
diff --git a/lib/GSL/Vector.hs b/lib/GSL/Vector.hs deleted file mode 100644 index b405ff8..0000000 --- a/lib/GSL/Vector.hs +++ /dev/null | |||
@@ -1,144 +0,0 @@ | |||
1 | {-# OPTIONS_GHC -fglasgow-exts #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | -- | | ||
4 | -- Module : GSL.Vector | ||
5 | -- Copyright : (c) Alberto Ruiz 2007 | ||
6 | -- License : GPL-style | ||
7 | -- | ||
8 | -- Maintainer : Alberto Ruiz <aruiz@um.es> | ||
9 | -- Stability : provisional | ||
10 | -- Portability : portable (uses FFI) | ||
11 | -- | ||
12 | -- Vector operations | ||
13 | -- | ||
14 | ----------------------------------------------------------------------------- | ||
15 | |||
16 | module GSL.Vector ( | ||
17 | FunCodeS(..), toScalarR, | ||
18 | FunCodeV(..), vectorMapR, vectorMapC, | ||
19 | FunCodeSV(..), vectorMapValR, vectorMapValC, | ||
20 | FunCodeVV(..), vectorZipR, vectorZipC | ||
21 | ) where | ||
22 | |||
23 | import Data.Packed.Internal.Common | ||
24 | import Data.Packed.Internal.Vector | ||
25 | |||
26 | import Complex | ||
27 | import Foreign | ||
28 | |||
29 | data FunCodeV = Sin | ||
30 | | Cos | ||
31 | | Tan | ||
32 | | Abs | ||
33 | | ASin | ||
34 | | ACos | ||
35 | | ATan | ||
36 | | Sinh | ||
37 | | Cosh | ||
38 | | Tanh | ||
39 | | ASinh | ||
40 | | ACosh | ||
41 | | ATanh | ||
42 | | Exp | ||
43 | | Log | ||
44 | | Sign | ||
45 | | Sqrt | ||
46 | deriving Enum | ||
47 | |||
48 | data FunCodeSV = Scale | ||
49 | | Recip | ||
50 | | AddConstant | ||
51 | | Negate | ||
52 | | PowSV | ||
53 | | PowVS | ||
54 | deriving Enum | ||
55 | |||
56 | data FunCodeVV = Add | ||
57 | | Sub | ||
58 | | Mul | ||
59 | | Div | ||
60 | | Pow | ||
61 | | ATan2 | ||
62 | deriving Enum | ||
63 | |||
64 | data FunCodeS = Norm2 | ||
65 | | AbsSum | ||
66 | | MaxIdx | ||
67 | | Max | ||
68 | | MinIdx | ||
69 | | Min | ||
70 | deriving Enum | ||
71 | |||
72 | ------------------------------------------------------------------ | ||
73 | |||
74 | toScalarAux fun code v = unsafePerformIO $ do | ||
75 | r <- createVector 1 | ||
76 | fun (fromEnum code) // vec v // vec r // check "toScalarAux" [v] | ||
77 | return (r `at` 0) | ||
78 | |||
79 | vectorMapAux fun code v = unsafePerformIO $ do | ||
80 | r <- createVector (dim v) | ||
81 | fun (fromEnum code) // vec v // vec r // check "vectorMapAux" [v] | ||
82 | return r | ||
83 | |||
84 | vectorMapValAux fun code val v = unsafePerformIO $ do | ||
85 | r <- createVector (dim v) | ||
86 | pval <- newArray [val] | ||
87 | fun (fromEnum code) pval // vec v // vec r // check "vectorMapValAux" [v] | ||
88 | free pval | ||
89 | return r | ||
90 | |||
91 | vectorZipAux fun code u v = unsafePerformIO $ do | ||
92 | r <- createVector (dim u) | ||
93 | fun (fromEnum code) // vec u // vec v // vec r // check "vectorZipAux" [u,v] | ||
94 | return r | ||
95 | |||
96 | --------------------------------------------------------------------- | ||
97 | |||
98 | -- | obtains different functions of a vector: norm1, norm2, max, min, posmax, posmin, etc. | ||
99 | toScalarR :: FunCodeS -> Vector Double -> Double | ||
100 | toScalarR oper = toScalarAux c_toScalarR (fromEnum oper) | ||
101 | |||
102 | foreign import ccall safe "gsl-aux.h toScalarR" c_toScalarR :: Int -> TVV | ||
103 | |||
104 | ------------------------------------------------------------------ | ||
105 | |||
106 | -- | map of real vectors with given function | ||
107 | vectorMapR :: FunCodeV -> Vector Double -> Vector Double | ||
108 | vectorMapR = vectorMapAux c_vectorMapR | ||
109 | |||
110 | foreign import ccall safe "gsl-aux.h mapR" c_vectorMapR :: Int -> TVV | ||
111 | |||
112 | -- | map of complex vectors with given function | ||
113 | vectorMapC :: FunCodeV -> Vector (Complex Double) -> Vector (Complex Double) | ||
114 | vectorMapC oper = vectorMapAux c_vectorMapC (fromEnum oper) | ||
115 | |||
116 | foreign import ccall safe "gsl-aux.h mapC" c_vectorMapC :: Int -> TCVCV | ||
117 | |||
118 | ------------------------------------------------------------------- | ||
119 | |||
120 | -- | map of real vectors with given function | ||
121 | vectorMapValR :: FunCodeSV -> Double -> Vector Double -> Vector Double | ||
122 | vectorMapValR oper = vectorMapValAux c_vectorMapValR (fromEnum oper) | ||
123 | |||
124 | foreign import ccall safe "gsl-aux.h mapValR" c_vectorMapValR :: Int -> Ptr Double -> TVV | ||
125 | |||
126 | -- | map of complex vectors with given function | ||
127 | vectorMapValC :: FunCodeSV -> Complex Double -> Vector (Complex Double) -> Vector (Complex Double) | ||
128 | vectorMapValC = vectorMapValAux c_vectorMapValC | ||
129 | |||
130 | foreign import ccall safe "gsl-aux.h mapValC" c_vectorMapValC :: Int -> Ptr (Complex Double) -> TCVCV | ||
131 | |||
132 | ------------------------------------------------------------------- | ||
133 | |||
134 | -- | elementwise operation on real vectors | ||
135 | vectorZipR :: FunCodeVV -> Vector Double -> Vector Double -> Vector Double | ||
136 | vectorZipR = vectorZipAux c_vectorZipR | ||
137 | |||
138 | foreign import ccall safe "gsl-aux.h zipR" c_vectorZipR :: Int -> TVVV | ||
139 | |||
140 | -- | elementwise operation on complex vectors | ||
141 | vectorZipC :: FunCodeVV -> Vector (Complex Double) -> Vector (Complex Double) -> Vector (Complex Double) | ||
142 | vectorZipC = vectorZipAux c_vectorZipC | ||
143 | |||
144 | foreign import ccall safe "gsl-aux.h zipC" c_vectorZipC :: Int -> TCVCVCV | ||
diff --git a/lib/GSL/gsl-aux.c b/lib/GSL/gsl-aux.c deleted file mode 100644 index c602d5e..0000000 --- a/lib/GSL/gsl-aux.c +++ /dev/null | |||
@@ -1,743 +0,0 @@ | |||
1 | #include "gsl-aux.h" | ||
2 | #include <gsl/gsl_blas.h> | ||
3 | #include <gsl/gsl_linalg.h> | ||
4 | #include <gsl/gsl_matrix.h> | ||
5 | #include <gsl/gsl_math.h> | ||
6 | #include <gsl/gsl_errno.h> | ||
7 | #include <gsl/gsl_fft_complex.h> | ||
8 | #include <gsl/gsl_eigen.h> | ||
9 | #include <gsl/gsl_integration.h> | ||
10 | #include <gsl/gsl_deriv.h> | ||
11 | #include <gsl/gsl_poly.h> | ||
12 | #include <gsl/gsl_multimin.h> | ||
13 | #include <gsl/gsl_complex.h> | ||
14 | #include <gsl/gsl_complex_math.h> | ||
15 | #include <string.h> | ||
16 | #include <stdio.h> | ||
17 | |||
18 | #define MACRO(B) do {B} while (0) | ||
19 | #define ERROR(CODE) MACRO(return CODE;) | ||
20 | #define REQUIRES(COND, CODE) MACRO(if(!(COND)) {ERROR(CODE);}) | ||
21 | #define OK return 0; | ||
22 | |||
23 | #define MIN(A,B) ((A)<(B)?(A):(B)) | ||
24 | #define MAX(A,B) ((A)>(B)?(A):(B)) | ||
25 | |||
26 | #ifdef DBG | ||
27 | #define DEBUGMSG(M) printf("*** calling aux C function: %s\n",M); | ||
28 | #else | ||
29 | #define DEBUGMSG(M) | ||
30 | #endif | ||
31 | |||
32 | #define CHECK(RES,CODE) MACRO(if(RES) return CODE;) | ||
33 | |||
34 | #ifdef DBG | ||
35 | #define DEBUGMAT(MSG,X) printf(MSG" = \n"); gsl_matrix_fprintf(stdout,X,"%f"); printf("\n"); | ||
36 | #else | ||
37 | #define DEBUGMAT(MSG,X) | ||
38 | #endif | ||
39 | |||
40 | #ifdef DBG | ||
41 | #define DEBUGVEC(MSG,X) printf(MSG" = \n"); gsl_vector_fprintf(stdout,X,"%f"); printf("\n"); | ||
42 | #else | ||
43 | #define DEBUGVEC(MSG,X) | ||
44 | #endif | ||
45 | |||
46 | #define DVVIEW(A) gsl_vector_view A = gsl_vector_view_array(A##p,A##n) | ||
47 | #define DMVIEW(A) gsl_matrix_view A = gsl_matrix_view_array(A##p,A##r,A##c) | ||
48 | #define CVVIEW(A) gsl_vector_complex_view A = gsl_vector_complex_view_array((double*)A##p,A##n) | ||
49 | #define CMVIEW(A) gsl_matrix_complex_view A = gsl_matrix_complex_view_array((double*)A##p,A##r,A##c) | ||
50 | #define KDVVIEW(A) gsl_vector_const_view A = gsl_vector_const_view_array(A##p,A##n) | ||
51 | #define KDMVIEW(A) gsl_matrix_const_view A = gsl_matrix_const_view_array(A##p,A##r,A##c) | ||
52 | #define KCVVIEW(A) gsl_vector_complex_const_view A = gsl_vector_complex_const_view_array((double*)A##p,A##n) | ||
53 | #define KCMVIEW(A) gsl_matrix_complex_const_view A = gsl_matrix_complex_const_view_array((double*)A##p,A##r,A##c) | ||
54 | |||
55 | #define V(a) (&a.vector) | ||
56 | #define M(a) (&a.matrix) | ||
57 | |||
58 | #define GCVEC(A) int A##n, gsl_complex*A##p | ||
59 | #define KGCVEC(A) int A##n, const gsl_complex*A##p | ||
60 | |||
61 | #define BAD_SIZE 2000 | ||
62 | #define BAD_CODE 2001 | ||
63 | #define MEM 2002 | ||
64 | #define BAD_FILE 2003 | ||
65 | |||
66 | |||
67 | void no_abort_on_error() { | ||
68 | gsl_set_error_handler_off(); | ||
69 | } | ||
70 | |||
71 | |||
72 | int toScalarR(int code, KRVEC(x), RVEC(r)) { | ||
73 | REQUIRES(rn==1,BAD_SIZE); | ||
74 | DEBUGMSG("toScalarR"); | ||
75 | KDVVIEW(x); | ||
76 | double res; | ||
77 | switch(code) { | ||
78 | case 0: { res = gsl_blas_dnrm2(V(x)); break; } | ||
79 | case 1: { res = gsl_blas_dasum(V(x)); break; } | ||
80 | case 2: { res = gsl_vector_max_index(V(x)); break; } | ||
81 | case 3: { res = gsl_vector_max(V(x)); break; } | ||
82 | case 4: { res = gsl_vector_min_index(V(x)); break; } | ||
83 | case 5: { res = gsl_vector_min(V(x)); break; } | ||
84 | default: ERROR(BAD_CODE); | ||
85 | } | ||
86 | rp[0] = res; | ||
87 | OK | ||
88 | } | ||
89 | |||
90 | |||
91 | inline double sign(double x) { | ||
92 | if(x>0) { | ||
93 | return +1.0; | ||
94 | } else if (x<0) { | ||
95 | return -1.0; | ||
96 | } else { | ||
97 | return 0.0; | ||
98 | } | ||
99 | } | ||
100 | |||
101 | |||
102 | #define OP(C,F) case C: { for(k=0;k<xn;k++) rp[k] = F(xp[k]); OK } | ||
103 | #define OPV(C,E) case C: { for(k=0;k<xn;k++) rp[k] = E; OK } | ||
104 | int mapR(int code, KRVEC(x), RVEC(r)) { | ||
105 | int k; | ||
106 | REQUIRES(xn == rn,BAD_SIZE); | ||
107 | DEBUGMSG("mapR"); | ||
108 | switch (code) { | ||
109 | OP(0,sin) | ||
110 | OP(1,cos) | ||
111 | OP(2,tan) | ||
112 | OP(3,fabs) | ||
113 | OP(4,asin) | ||
114 | OP(5,acos) | ||
115 | OP(6,atan) /* atan2 mediante vectorZip */ | ||
116 | OP(7,sinh) | ||
117 | OP(8,cosh) | ||
118 | OP(9,tanh) | ||
119 | OP(10,asinh) | ||
120 | OP(11,acosh) | ||
121 | OP(12,atanh) | ||
122 | OP(13,exp) | ||
123 | OP(14,log) | ||
124 | OP(15,sign) | ||
125 | OP(16,sqrt) | ||
126 | default: ERROR(BAD_CODE); | ||
127 | } | ||
128 | } | ||
129 | |||
130 | int mapCAux(int code, KGCVEC(x), GCVEC(r)) { | ||
131 | int k; | ||
132 | REQUIRES(xn == rn,BAD_SIZE); | ||
133 | DEBUGMSG("mapC"); | ||
134 | switch (code) { | ||
135 | OP(0,gsl_complex_sin) | ||
136 | OP(1,gsl_complex_cos) | ||
137 | OP(2,gsl_complex_tan) | ||
138 | |||
139 | OP(4,gsl_complex_arcsin) | ||
140 | OP(5,gsl_complex_arccos) | ||
141 | OP(6,gsl_complex_arctan) | ||
142 | OP(7,gsl_complex_sinh) | ||
143 | OP(8,gsl_complex_cosh) | ||
144 | OP(9,gsl_complex_tanh) | ||
145 | OP(10,gsl_complex_arcsinh) | ||
146 | OP(11,gsl_complex_arccosh) | ||
147 | OP(12,gsl_complex_arctanh) | ||
148 | OP(13,gsl_complex_exp) | ||
149 | OP(14,gsl_complex_log) | ||
150 | |||
151 | OP(16,gsl_complex_sqrt) | ||
152 | |||
153 | // gsl_complex_arg | ||
154 | // gsl_complex_abs | ||
155 | default: ERROR(BAD_CODE); | ||
156 | } | ||
157 | } | ||
158 | |||
159 | int mapC(int code, KCVEC(x), CVEC(r)) { | ||
160 | return mapCAux(code, xn, (gsl_complex*)xp, rn, (gsl_complex*)rp); | ||
161 | } | ||
162 | |||
163 | |||
164 | /* | ||
165 | int scaleR(double* alpha, KRVEC(x), RVEC(r)) { | ||
166 | REQUIRES(xn == rn,BAD_SIZE); | ||
167 | DEBUGMSG("scaleR"); | ||
168 | KDVVIEW(x); | ||
169 | DVVIEW(r); | ||
170 | CHECK( gsl_vector_memcpy(V(r),V(x)) , MEM); | ||
171 | int res = gsl_vector_scale(V(r),*alpha); | ||
172 | CHECK(res,res); | ||
173 | OK | ||
174 | } | ||
175 | |||
176 | int scaleC(gsl_complex *alpha, KCVEC(x), CVEC(r)) { | ||
177 | REQUIRES(xn == rn,BAD_SIZE); | ||
178 | DEBUGMSG("scaleC"); | ||
179 | //KCVVIEW(x); | ||
180 | CVVIEW(r); | ||
181 | gsl_vector_const_view vrx = gsl_vector_const_view_array((double*)xp,xn*2); | ||
182 | gsl_vector_view vrr = gsl_vector_view_array((double*)rp,rn*2); | ||
183 | CHECK(gsl_vector_memcpy(V(vrr),V(vrx)) , MEM); | ||
184 | gsl_blas_zscal(*alpha,V(r)); // void ! | ||
185 | int res = 0; | ||
186 | CHECK(res,res); | ||
187 | OK | ||
188 | } | ||
189 | |||
190 | int addConstantR(double offs, KRVEC(x), RVEC(r)) { | ||
191 | REQUIRES(xn == rn,BAD_SIZE); | ||
192 | DEBUGMSG("addConstantR"); | ||
193 | KDVVIEW(x); | ||
194 | DVVIEW(r); | ||
195 | CHECK(gsl_vector_memcpy(V(r),V(x)), MEM); | ||
196 | int res = gsl_vector_add_constant(V(r),offs); | ||
197 | CHECK(res,res); | ||
198 | OK | ||
199 | } | ||
200 | |||
201 | */ | ||
202 | |||
203 | |||
204 | |||
205 | int mapValR(int code, double* pval, KRVEC(x), RVEC(r)) { | ||
206 | int k; | ||
207 | double val = *pval; | ||
208 | REQUIRES(xn == rn,BAD_SIZE); | ||
209 | DEBUGMSG("mapValR"); | ||
210 | switch (code) { | ||
211 | OPV(0,val*xp[k]) | ||
212 | OPV(1,val/xp[k]) | ||
213 | OPV(2,val+xp[k]) | ||
214 | OPV(3,val-xp[k]) | ||
215 | OPV(4,pow(val,xp[k])) | ||
216 | OPV(5,pow(xp[k],val)) | ||
217 | default: ERROR(BAD_CODE); | ||
218 | } | ||
219 | } | ||
220 | |||
221 | int mapValCAux(int code, gsl_complex* pval, KGCVEC(x), GCVEC(r)) { | ||
222 | int k; | ||
223 | gsl_complex val = *pval; | ||
224 | REQUIRES(xn == rn,BAD_SIZE); | ||
225 | DEBUGMSG("mapValC"); | ||
226 | switch (code) { | ||
227 | OPV(0,gsl_complex_mul(val,xp[k])) | ||
228 | OPV(1,gsl_complex_div(val,xp[k])) | ||
229 | OPV(2,gsl_complex_add(val,xp[k])) | ||
230 | OPV(3,gsl_complex_sub(val,xp[k])) | ||
231 | OPV(4,gsl_complex_pow(val,xp[k])) | ||
232 | OPV(5,gsl_complex_pow(xp[k],val)) | ||
233 | default: ERROR(BAD_CODE); | ||
234 | } | ||
235 | } | ||
236 | |||
237 | int mapValC(int code, gsl_complex* val, KCVEC(x), CVEC(r)) { | ||
238 | return mapValCAux(code, val, xn, (gsl_complex*)xp, rn, (gsl_complex*)rp); | ||
239 | } | ||
240 | |||
241 | |||
242 | #define OPZE(C,msg,E) case C: {DEBUGMSG(msg) for(k=0;k<an;k++) rp[k] = E(ap[k],bp[k]); OK } | ||
243 | #define OPZV(C,msg,E) case C: {DEBUGMSG(msg) res = E(V(r),V(b)); CHECK(res,res); OK } | ||
244 | int zipR(int code, KRVEC(a), KRVEC(b), RVEC(r)) { | ||
245 | REQUIRES(an == bn && an == rn, BAD_SIZE); | ||
246 | int k; | ||
247 | switch(code) { | ||
248 | OPZE(4,"zipR Pow",pow) | ||
249 | OPZE(5,"zipR ATan2",atan2) | ||
250 | } | ||
251 | KDVVIEW(a); | ||
252 | KDVVIEW(b); | ||
253 | DVVIEW(r); | ||
254 | gsl_vector_memcpy(V(r),V(a)); | ||
255 | int res; | ||
256 | switch(code) { | ||
257 | OPZV(0,"zipR Add",gsl_vector_add) | ||
258 | OPZV(1,"zipR Sub",gsl_vector_sub) | ||
259 | OPZV(2,"zipR Mul",gsl_vector_mul) | ||
260 | OPZV(3,"zipR Div",gsl_vector_div) | ||
261 | default: ERROR(BAD_CODE); | ||
262 | } | ||
263 | } | ||
264 | |||
265 | |||
266 | int zipCAux(int code, KGCVEC(a), KGCVEC(b), GCVEC(r)) { | ||
267 | REQUIRES(an == bn && an == rn, BAD_SIZE); | ||
268 | int k; | ||
269 | switch(code) { | ||
270 | OPZE(0,"zipC Add",gsl_complex_add) | ||
271 | OPZE(1,"zipC Sub",gsl_complex_sub) | ||
272 | OPZE(2,"zipC Mul",gsl_complex_mul) | ||
273 | OPZE(3,"zipC Div",gsl_complex_div) | ||
274 | OPZE(4,"zipC Pow",gsl_complex_pow) | ||
275 | //OPZE(5,"zipR ATan2",atan2) | ||
276 | } | ||
277 | //KCVVIEW(a); | ||
278 | //KCVVIEW(b); | ||
279 | //CVVIEW(r); | ||
280 | //gsl_vector_memcpy(V(r),V(a)); | ||
281 | //int res; | ||
282 | switch(code) { | ||
283 | default: ERROR(BAD_CODE); | ||
284 | } | ||
285 | } | ||
286 | |||
287 | |||
288 | int zipC(int code, KCVEC(a), KCVEC(b), CVEC(r)) { | ||
289 | return zipCAux(code, an, (gsl_complex*)ap, bn, (gsl_complex*)bp, rn, (gsl_complex*)rp); | ||
290 | } | ||
291 | |||
292 | |||
293 | |||
294 | |||
295 | int luSolveR(KRMAT(a),KRMAT(b),RMAT(r)) { | ||
296 | REQUIRES(ar==ac && ac==br && ar==rr && bc==rc,BAD_SIZE); | ||
297 | DEBUGMSG("luSolveR"); | ||
298 | KDMVIEW(a); | ||
299 | KDMVIEW(b); | ||
300 | DMVIEW(r); | ||
301 | int res; | ||
302 | gsl_matrix *LU = gsl_matrix_alloc(ar,ar); | ||
303 | CHECK(!LU,MEM); | ||
304 | int s; | ||
305 | gsl_permutation * p = gsl_permutation_alloc (ar); | ||
306 | CHECK(!p,MEM); | ||
307 | CHECK(gsl_matrix_memcpy(LU,M(a)),MEM); | ||
308 | res = gsl_linalg_LU_decomp(LU, p, &s); | ||
309 | CHECK(res,res); | ||
310 | int c; | ||
311 | |||
312 | for (c=0; c<bc; c++) { | ||
313 | gsl_vector_const_view colb = gsl_matrix_const_column (M(b), c); | ||
314 | gsl_vector_view colr = gsl_matrix_column (M(r), c); | ||
315 | res = gsl_linalg_LU_solve (LU, p, V(colb), V(colr)); | ||
316 | CHECK(res,res); | ||
317 | } | ||
318 | gsl_permutation_free(p); | ||
319 | gsl_matrix_free(LU); | ||
320 | OK | ||
321 | } | ||
322 | |||
323 | |||
324 | int luSolveC(KCMAT(a),KCMAT(b),CMAT(r)) { | ||
325 | REQUIRES(ar==ac && ac==br && ar==rr && bc==rc,BAD_SIZE); | ||
326 | DEBUGMSG("luSolveC"); | ||
327 | KCMVIEW(a); | ||
328 | KCMVIEW(b); | ||
329 | CMVIEW(r); | ||
330 | gsl_matrix_complex *LU = gsl_matrix_complex_alloc(ar,ar); | ||
331 | CHECK(!LU,MEM); | ||
332 | int s; | ||
333 | gsl_permutation * p = gsl_permutation_alloc (ar); | ||
334 | CHECK(!p,MEM); | ||
335 | CHECK(gsl_matrix_complex_memcpy(LU,M(a)),MEM); | ||
336 | int res; | ||
337 | res = gsl_linalg_complex_LU_decomp(LU, p, &s); | ||
338 | CHECK(res,res); | ||
339 | int c; | ||
340 | for (c=0; c<bc; c++) { | ||
341 | gsl_vector_complex_const_view colb = gsl_matrix_complex_const_column (M(b), c); | ||
342 | gsl_vector_complex_view colr = gsl_matrix_complex_column (M(r), c); | ||
343 | res = gsl_linalg_complex_LU_solve (LU, p, V(colb), V(colr)); | ||
344 | CHECK(res,res); | ||
345 | } | ||
346 | gsl_permutation_free(p); | ||
347 | gsl_matrix_complex_free(LU); | ||
348 | OK | ||
349 | } | ||
350 | |||
351 | |||
352 | int luRaux(KRMAT(a),RVEC(b)) { | ||
353 | REQUIRES(ar==ac && bn==ar*ar+ar+1,BAD_SIZE); | ||
354 | DEBUGMSG("luRaux"); | ||
355 | KDMVIEW(a); | ||
356 | //DVVIEW(b); | ||
357 | gsl_matrix_view LU = gsl_matrix_view_array(bp,ar,ac); | ||
358 | int s; | ||
359 | gsl_permutation * p = gsl_permutation_alloc (ar); | ||
360 | CHECK(!p,MEM); | ||
361 | CHECK(gsl_matrix_memcpy(M(LU),M(a)),MEM); | ||
362 | gsl_linalg_LU_decomp(M(LU), p, &s); | ||
363 | bp[ar*ar] = s; | ||
364 | int k; | ||
365 | for (k=0; k<ar; k++) { | ||
366 | bp[ar*ar+k+1] = gsl_permutation_get(p,k); | ||
367 | } | ||
368 | gsl_permutation_free(p); | ||
369 | OK | ||
370 | } | ||
371 | |||
372 | int luCaux(KCMAT(a),CVEC(b)) { | ||
373 | REQUIRES(ar==ac && bn==ar*ar+ar+1,BAD_SIZE); | ||
374 | DEBUGMSG("luCaux"); | ||
375 | KCMVIEW(a); | ||
376 | //DVVIEW(b); | ||
377 | gsl_matrix_complex_view LU = gsl_matrix_complex_view_array((double*)bp,ar,ac); | ||
378 | int s; | ||
379 | gsl_permutation * p = gsl_permutation_alloc (ar); | ||
380 | CHECK(!p,MEM); | ||
381 | CHECK(gsl_matrix_complex_memcpy(M(LU),M(a)),MEM); | ||
382 | int res; | ||
383 | res = gsl_linalg_complex_LU_decomp(M(LU), p, &s); | ||
384 | CHECK(res,res); | ||
385 | ((double*)bp)[2*ar*ar] = s; | ||
386 | ((double*)bp)[2*ar*ar+1] = 0; | ||
387 | int k; | ||
388 | for (k=0; k<ar; k++) { | ||
389 | ((double*)bp)[2*ar*ar+2*k+2] = gsl_permutation_get(p,k); | ||
390 | ((double*)bp)[2*ar*ar+2*k+2+1] = 0; | ||
391 | } | ||
392 | gsl_permutation_free(p); | ||
393 | OK | ||
394 | } | ||
395 | |||
396 | int svd(KRMAT(a),RMAT(u), RVEC(s),RMAT(v)) { | ||
397 | REQUIRES(ar==ur && ac==uc && ac==sn && ac==vr && ac==vc,BAD_SIZE); | ||
398 | DEBUGMSG("svd"); | ||
399 | KDMVIEW(a); | ||
400 | DMVIEW(u); | ||
401 | DVVIEW(s); | ||
402 | DMVIEW(v); | ||
403 | gsl_vector *workv = gsl_vector_alloc(ac); | ||
404 | CHECK(!workv,MEM); | ||
405 | gsl_matrix *workm = gsl_matrix_alloc(ac,ac); | ||
406 | CHECK(!workm,MEM); | ||
407 | CHECK(gsl_matrix_memcpy(M(u),M(a)),MEM); | ||
408 | // int res = gsl_linalg_SV_decomp_jacobi (&U.matrix, &V.matrix, &S.vector); | ||
409 | // doesn't work | ||
410 | //int res = gsl_linalg_SV_decomp (&U.matrix, &V.matrix, &S.vector, workv); | ||
411 | int res = gsl_linalg_SV_decomp_mod (M(u), workm, M(v), V(s), workv); | ||
412 | CHECK(res,res); | ||
413 | //gsl_matrix_transpose(M(v)); | ||
414 | gsl_vector_free(workv); | ||
415 | gsl_matrix_free(workm); | ||
416 | OK | ||
417 | } | ||
418 | |||
419 | |||
420 | // for real symmetric matrices | ||
421 | int eigensystemR(KRMAT(x),RVEC(l),RMAT(v)) { | ||
422 | REQUIRES(xr==xc && xr==ln && xr==vr && vr==vc,BAD_SIZE); | ||
423 | DEBUGMSG("eigensystemR (gsl_eigen_symmv)"); | ||
424 | KDMVIEW(x); | ||
425 | DVVIEW(l); | ||
426 | DMVIEW(v); | ||
427 | gsl_matrix *XC = gsl_matrix_alloc(xr,xr); | ||
428 | gsl_matrix_memcpy(XC,M(x)); // needed because the argument is destroyed | ||
429 | // many thanks to Nico Mahlo for the bug report | ||
430 | gsl_eigen_symmv_workspace * w = gsl_eigen_symmv_alloc (xc); | ||
431 | int res = gsl_eigen_symmv (XC, V(l), M(v), w); | ||
432 | CHECK(res,res); | ||
433 | gsl_eigen_symmv_free (w); | ||
434 | gsl_matrix_free(XC); | ||
435 | gsl_eigen_symmv_sort (V(l), M(v), GSL_EIGEN_SORT_ABS_DESC); | ||
436 | OK | ||
437 | } | ||
438 | |||
439 | // for hermitian matrices | ||
440 | int eigensystemC(KCMAT(x),RVEC(l),CMAT(v)) { | ||
441 | REQUIRES(xr==xc && xr==ln && xr==vr && vr==vc,BAD_SIZE); | ||
442 | DEBUGMSG("eigensystemC"); | ||
443 | KCMVIEW(x); | ||
444 | DVVIEW(l); | ||
445 | CMVIEW(v); | ||
446 | gsl_matrix_complex *XC = gsl_matrix_complex_alloc(xr,xr); | ||
447 | gsl_matrix_complex_memcpy(XC,M(x)); // again needed because the argument is destroyed | ||
448 | gsl_eigen_hermv_workspace * w = gsl_eigen_hermv_alloc (xc); | ||
449 | int res = gsl_eigen_hermv (XC, V(l), M(v), w); | ||
450 | CHECK(res,res); | ||
451 | gsl_eigen_hermv_free (w); | ||
452 | gsl_matrix_complex_free(XC); | ||
453 | gsl_eigen_hermv_sort (V(l), M(v), GSL_EIGEN_SORT_ABS_DESC); | ||
454 | OK | ||
455 | } | ||
456 | |||
457 | int QR(KRMAT(x),RMAT(q),RMAT(r)) { | ||
458 | REQUIRES(xr==rr && xc==rc && qr==qc && xr==qr,BAD_SIZE); | ||
459 | DEBUGMSG("QR"); | ||
460 | KDMVIEW(x); | ||
461 | DMVIEW(q); | ||
462 | DMVIEW(r); | ||
463 | gsl_matrix * a = gsl_matrix_alloc(xr,xc); | ||
464 | gsl_vector * tau = gsl_vector_alloc(MIN(xr,xc)); | ||
465 | gsl_matrix_memcpy(a,M(x)); | ||
466 | int res = gsl_linalg_QR_decomp(a,tau); | ||
467 | CHECK(res,res); | ||
468 | gsl_linalg_QR_unpack(a,tau,M(q),M(r)); | ||
469 | gsl_vector_free(tau); | ||
470 | gsl_matrix_free(a); | ||
471 | OK | ||
472 | } | ||
473 | |||
474 | int cholR(KRMAT(x),RMAT(l)) { | ||
475 | REQUIRES(xr==xc && lr==xr && lr==lc,BAD_SIZE); | ||
476 | DEBUGMSG("cholR"); | ||
477 | KDMVIEW(x); | ||
478 | DMVIEW(l); | ||
479 | gsl_matrix_memcpy(M(l),M(x)); | ||
480 | int res = gsl_linalg_cholesky_decomp(M(l)); | ||
481 | CHECK(res,res); | ||
482 | int r,c; | ||
483 | for (r=0; r<xr-1; r++) { | ||
484 | for(c=r+1; c<xc; c++) { | ||
485 | lp[r*lc+c] = 0.; | ||
486 | } | ||
487 | } | ||
488 | OK | ||
489 | } | ||
490 | |||
491 | int cholC(KCMAT(x),CMAT(l)) { | ||
492 | REQUIRES(xr==xc && lr==xr && lr==lc,BAD_SIZE); | ||
493 | DEBUGMSG("cholC"); | ||
494 | KCMVIEW(x); | ||
495 | CMVIEW(l); | ||
496 | gsl_matrix_complex_memcpy(M(l),M(x)); | ||
497 | int res = 0; // gsl_linalg_complex_cholesky_decomp(M(l)); | ||
498 | CHECK(res,res); | ||
499 | gsl_complex zero = {0.,0.}; | ||
500 | int r,c; | ||
501 | for (r=0; r<xr-1; r++) { | ||
502 | for(c=r+1; c<xc; c++) { | ||
503 | lp[r*lc+c] = zero; | ||
504 | } | ||
505 | } | ||
506 | OK | ||
507 | } | ||
508 | |||
509 | int fft(int code, KCVEC(X), CVEC(R)) { | ||
510 | REQUIRES(Xn == Rn,BAD_SIZE); | ||
511 | DEBUGMSG("fft"); | ||
512 | int s = Xn; | ||
513 | gsl_fft_complex_wavetable * wavetable = gsl_fft_complex_wavetable_alloc (s); | ||
514 | gsl_fft_complex_workspace * workspace = gsl_fft_complex_workspace_alloc (s); | ||
515 | gsl_vector_const_view X = gsl_vector_const_view_array((double*)Xp, 2*Xn); | ||
516 | gsl_vector_view R = gsl_vector_view_array((double*)Rp, 2*Rn); | ||
517 | gsl_blas_dcopy(&X.vector,&R.vector); | ||
518 | if(code==0) { | ||
519 | gsl_fft_complex_forward ((double*)Rp, 1, s, wavetable, workspace); | ||
520 | } else { | ||
521 | gsl_fft_complex_inverse ((double*)Rp, 1, s, wavetable, workspace); | ||
522 | } | ||
523 | gsl_fft_complex_wavetable_free (wavetable); | ||
524 | gsl_fft_complex_workspace_free (workspace); | ||
525 | OK | ||
526 | } | ||
527 | |||
528 | |||
529 | int integrate_qng(double f(double, void*), double a, double b, double prec, | ||
530 | double *result, double*error) { | ||
531 | DEBUGMSG("integrate_qng"); | ||
532 | gsl_function F; | ||
533 | F.function = f; | ||
534 | F.params = NULL; | ||
535 | size_t neval; | ||
536 | int res = gsl_integration_qng (&F, a,b, 0, prec, result, error, &neval); | ||
537 | CHECK(res,res); | ||
538 | OK | ||
539 | } | ||
540 | |||
541 | int integrate_qags(double f(double,void*), double a, double b, double prec, int w, | ||
542 | double *result, double* error) { | ||
543 | DEBUGMSG("integrate_qags"); | ||
544 | gsl_integration_workspace * wk = gsl_integration_workspace_alloc (w); | ||
545 | gsl_function F; | ||
546 | F.function = f; | ||
547 | F.params = NULL; | ||
548 | int res = gsl_integration_qags (&F, a,b, 0, prec, w,wk, result, error); | ||
549 | CHECK(res,res); | ||
550 | gsl_integration_workspace_free (wk); | ||
551 | OK | ||
552 | } | ||
553 | |||
554 | int polySolve(KRVEC(a), CVEC(z)) { | ||
555 | DEBUGMSG("polySolve"); | ||
556 | REQUIRES(an>1,BAD_SIZE); | ||
557 | gsl_poly_complex_workspace * w = gsl_poly_complex_workspace_alloc (an); | ||
558 | int res = gsl_poly_complex_solve ((double*)ap, an, w, (double*)zp); | ||
559 | CHECK(res,res); | ||
560 | gsl_poly_complex_workspace_free (w); | ||
561 | OK; | ||
562 | } | ||
563 | |||
564 | int matrix_fscanf(char*filename, RMAT(a)) { | ||
565 | DEBUGMSG("gsl_matrix_fscanf"); | ||
566 | //printf(filename); printf("\n"); | ||
567 | DMVIEW(a); | ||
568 | FILE * f = fopen(filename,"r"); | ||
569 | CHECK(!f,BAD_FILE); | ||
570 | int res = gsl_matrix_fscanf(f, M(a)); | ||
571 | CHECK(res,res); | ||
572 | fclose (f); | ||
573 | OK | ||
574 | } | ||
575 | |||
576 | //--------------------------------------------------------------- | ||
577 | |||
578 | typedef double Trawfun(int, double*); | ||
579 | |||
580 | double only_f_aux_min(const gsl_vector*x, void *pars) { | ||
581 | Trawfun * f = (Trawfun*) pars; | ||
582 | double* p = (double*)calloc(x->size,sizeof(double)); | ||
583 | int k; | ||
584 | for(k=0;k<x->size;k++) { | ||
585 | p[k] = gsl_vector_get(x,k); | ||
586 | } | ||
587 | double res = f(x->size,p); | ||
588 | free(p); | ||
589 | return res; | ||
590 | } | ||
591 | |||
592 | // this version returns info about intermediate steps | ||
593 | int minimize(double f(int, double*), double tolsize, int maxit, | ||
594 | KRVEC(xi), KRVEC(sz), RMAT(sol)) { | ||
595 | REQUIRES(xin==szn && solr == maxit && solc == 3+xin,BAD_SIZE); | ||
596 | DEBUGMSG("minimizeList (nmsimplex)"); | ||
597 | gsl_multimin_function my_func; | ||
598 | // extract function from pars | ||
599 | my_func.f = only_f_aux_min; | ||
600 | my_func.n = xin; | ||
601 | my_func.params = f; | ||
602 | size_t iter = 0; | ||
603 | int status; | ||
604 | double size; | ||
605 | const gsl_multimin_fminimizer_type *T; | ||
606 | gsl_multimin_fminimizer *s = NULL; | ||
607 | // Initial vertex size vector | ||
608 | KDVVIEW(sz); | ||
609 | // Starting point | ||
610 | KDVVIEW(xi); | ||
611 | // Minimizer nmsimplex, without derivatives | ||
612 | T = gsl_multimin_fminimizer_nmsimplex; | ||
613 | s = gsl_multimin_fminimizer_alloc (T, my_func.n); | ||
614 | gsl_multimin_fminimizer_set (s, &my_func, V(xi), V(sz)); | ||
615 | do { | ||
616 | status = gsl_multimin_fminimizer_iterate (s); | ||
617 | size = gsl_multimin_fminimizer_size (s); | ||
618 | |||
619 | solp[iter*solc+0] = iter; | ||
620 | solp[iter*solc+1] = s->fval; | ||
621 | solp[iter*solc+2] = size; | ||
622 | |||
623 | int k; | ||
624 | for(k=0;k<xin;k++) { | ||
625 | solp[iter*solc+k+3] = gsl_vector_get(s->x,k); | ||
626 | } | ||
627 | status = gsl_multimin_test_size (size, tolsize); | ||
628 | iter++; | ||
629 | } while (status == GSL_CONTINUE && iter < maxit); | ||
630 | int i,j; | ||
631 | for (i=iter; i<solr; i++) { | ||
632 | solp[i*solc+0] = iter; | ||
633 | for(j=1;j<solc;j++) { | ||
634 | solp[i*solc+j]=0.; | ||
635 | } | ||
636 | } | ||
637 | gsl_multimin_fminimizer_free(s); | ||
638 | OK | ||
639 | } | ||
640 | |||
641 | // working with the gradient | ||
642 | |||
643 | typedef struct {double (*f)(int, double*); void (*df)(int, double*, double*);} Tfdf; | ||
644 | |||
645 | double f_aux_min(const gsl_vector*x, void *pars) { | ||
646 | Tfdf * fdf = ((Tfdf*) pars); | ||
647 | double* p = (double*)calloc(x->size,sizeof(double)); | ||
648 | int k; | ||
649 | for(k=0;k<x->size;k++) { | ||
650 | p[k] = gsl_vector_get(x,k); | ||
651 | } | ||
652 | double res = fdf->f(x->size,p); | ||
653 | free(p); | ||
654 | return res; | ||
655 | } | ||
656 | |||
657 | |||
658 | void df_aux_min(const gsl_vector * x, void * pars, gsl_vector * g) { | ||
659 | Tfdf * fdf = ((Tfdf*) pars); | ||
660 | double* p = (double*)calloc(x->size,sizeof(double)); | ||
661 | double* q = (double*)calloc(x->size,sizeof(double)); | ||
662 | int k; | ||
663 | for(k=0;k<x->size;k++) { | ||
664 | p[k] = gsl_vector_get(x,k); | ||
665 | } | ||
666 | |||
667 | fdf->df(x->size,p,q); | ||
668 | |||
669 | for(k=0;k<x->size;k++) { | ||
670 | gsl_vector_set(g,k,q[k]); | ||
671 | } | ||
672 | free(p); | ||
673 | free(q); | ||
674 | } | ||
675 | |||
676 | void fdf_aux_min(const gsl_vector * x, void * pars, double * f, gsl_vector * g) { | ||
677 | *f = f_aux_min(x,pars); | ||
678 | df_aux_min(x,pars,g); | ||
679 | } | ||
680 | |||
681 | // conjugate gradient | ||
682 | int minimizeWithDeriv(double f(int, double*), void df(int, double*, double*), | ||
683 | double initstep, double minimpar, double tolgrad, int maxit, | ||
684 | KRVEC(xi), RMAT(sol)) { | ||
685 | REQUIRES(solr == maxit && solc == 2+xin,BAD_SIZE); | ||
686 | DEBUGMSG("minimizeWithDeriv (conjugate_fr)"); | ||
687 | gsl_multimin_function_fdf my_func; | ||
688 | // extract function from pars | ||
689 | my_func.f = f_aux_min; | ||
690 | my_func.df = df_aux_min; | ||
691 | my_func.fdf = fdf_aux_min; | ||
692 | my_func.n = xin; | ||
693 | Tfdf stfdf; | ||
694 | stfdf.f = f; | ||
695 | stfdf.df = df; | ||
696 | my_func.params = &stfdf; | ||
697 | size_t iter = 0; | ||
698 | int status; | ||
699 | const gsl_multimin_fdfminimizer_type *T; | ||
700 | gsl_multimin_fdfminimizer *s = NULL; | ||
701 | // Starting point | ||
702 | KDVVIEW(xi); | ||
703 | // conjugate gradient fr | ||
704 | T = gsl_multimin_fdfminimizer_conjugate_fr; | ||
705 | s = gsl_multimin_fdfminimizer_alloc (T, my_func.n); | ||
706 | gsl_multimin_fdfminimizer_set (s, &my_func, V(xi), initstep, minimpar); | ||
707 | do { | ||
708 | status = gsl_multimin_fdfminimizer_iterate (s); | ||
709 | solp[iter*solc+0] = iter; | ||
710 | solp[iter*solc+1] = s->f; | ||
711 | int k; | ||
712 | for(k=0;k<xin;k++) { | ||
713 | solp[iter*solc+k+2] = gsl_vector_get(s->x,k); | ||
714 | } | ||
715 | status = gsl_multimin_test_gradient (s->gradient, tolgrad); | ||
716 | iter++; | ||
717 | } while (status == GSL_CONTINUE && iter < maxit); | ||
718 | int i,j; | ||
719 | for (i=iter; i<solr; i++) { | ||
720 | solp[i*solc+0] = iter; | ||
721 | for(j=1;j<solc;j++) { | ||
722 | solp[i*solc+j]=0.; | ||
723 | } | ||
724 | } | ||
725 | gsl_multimin_fdfminimizer_free(s); | ||
726 | OK | ||
727 | } | ||
728 | |||
729 | |||
730 | int deriv(int code, double f(double, void*), double x, double h, double * result, double * abserr) | ||
731 | { | ||
732 | gsl_function F; | ||
733 | F.function = f; | ||
734 | F.params = 0; | ||
735 | |||
736 | if(code==0) return gsl_deriv_central (&F, x, h, result, abserr); | ||
737 | |||
738 | if(code==1) return gsl_deriv_forward (&F, x, h, result, abserr); | ||
739 | |||
740 | if(code==2) return gsl_deriv_backward (&F, x, h, result, abserr); | ||
741 | |||
742 | return 0; | ||
743 | } | ||
diff --git a/lib/GSL/gsl-aux.h b/lib/GSL/gsl-aux.h deleted file mode 100644 index 3ccac25..0000000 --- a/lib/GSL/gsl-aux.h +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | #include <gsl/gsl_complex.h> | ||
2 | |||
3 | #define RVEC(A) int A##n, double*A##p | ||
4 | #define RMAT(A) int A##r, int A##c, double* A##p | ||
5 | #define KRVEC(A) int A##n, const double*A##p | ||
6 | #define KRMAT(A) int A##r, int A##c, const double* A##p | ||
7 | |||
8 | #define CVEC(A) int A##n, gsl_complex*A##p | ||
9 | #define CMAT(A) int A##r, int A##c, gsl_complex* A##p | ||
10 | #define KCVEC(A) int A##n, const gsl_complex*A##p | ||
11 | #define KCMAT(A) int A##r, int A##c, const gsl_complex* A##p | ||
12 | |||
13 | void no_abort_on_error(); | ||
14 | |||
15 | int toScalarR(int code, KRVEC(x), RVEC(r)); | ||
16 | /* norm2, absdif, maximum, posmax, etc. */ | ||
17 | |||
18 | int mapR(int code, KRVEC(x), RVEC(r)); | ||
19 | int mapC(int code, KCVEC(x), CVEC(r)); | ||
20 | /* sin cos tan etc. */ | ||
21 | |||
22 | int mapValR(int code, double*, KRVEC(x), RVEC(r)); | ||
23 | int mapValC(int code, gsl_complex*, KCVEC(x), CVEC(r)); | ||
24 | |||
25 | int zipR(int code, KRVEC(a), KRVEC(b), RVEC(r)); | ||
26 | int zipC(int code, KCVEC(a), KCVEC(b), CVEC(r)); | ||
27 | |||
28 | |||
29 | int luSolveR(KRMAT(a),KRMAT(b),RMAT(r)); | ||
30 | int luSolveC(KCMAT(a),KCMAT(b),CMAT(r)); | ||
31 | int luRaux(KRMAT(a),RVEC(b)); | ||
32 | int luCaux(KCMAT(a),CVEC(b)); | ||
33 | |||
34 | int svd(KRMAT(x),RMAT(u), RVEC(s),RMAT(v)); | ||
35 | |||
36 | int eigensystemR(KRMAT(x),RVEC(l),RMAT(v)); | ||
37 | int eigensystemC(KCMAT(x),RVEC(l),CMAT(v)); | ||
38 | |||
39 | int QR(KRMAT(x),RMAT(q),RMAT(r)); | ||
40 | |||
41 | int cholR(KRMAT(x),RMAT(l)); | ||
42 | |||
43 | int cholC(KCMAT(x),CMAT(l)); | ||
44 | |||
45 | int fft(int code, KCVEC(a), CVEC(b)); | ||
46 | |||
47 | int integrate_qng(double f(double, void*), double a, double b, double prec, | ||
48 | double *result, double*error); | ||
49 | |||
50 | int integrate_qags(double f(double,void*), double a, double b, double prec, int w, | ||
51 | double *result, double* error); | ||
52 | |||
53 | int polySolve(KRVEC(a), CVEC(z)); | ||
54 | |||
55 | int minimize(double f(int, double*), double tolsize, int maxit, | ||
56 | KRVEC(xi), KRVEC(sz), RMAT(sol)); | ||
57 | |||
58 | int minimizeWithDeriv(double f(int, double*), void df(int, double*, double*), | ||
59 | double initstep, double minimpar, double tolgrad, int maxit, | ||
60 | KRVEC(xi), RMAT(sol)); | ||
61 | |||
62 | int deriv(int code, double f(double, void*), double x, double h, double * result, double * abserr); | ||