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/Numeric | |
parent | 768f08d4134a066d773d56a9c03ae688e3850352 (diff) |
LinearAlgebra and GSL moved to Numeric
Diffstat (limited to 'lib/Numeric')
78 files changed, 13721 insertions, 0 deletions
diff --git a/lib/Numeric/GSL.hs b/lib/Numeric/GSL.hs new file mode 100644 index 0000000..4bc3940 --- /dev/null +++ b/lib/Numeric/GSL.hs | |||
@@ -0,0 +1,38 @@ | |||
1 | {- | | ||
2 | |||
3 | Module : Numeric.GSL | ||
4 | Copyright : (c) Alberto Ruiz 2006-7 | ||
5 | License : GPL-style | ||
6 | |||
7 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
8 | Stability : provisional | ||
9 | Portability : uses -fffi and -fglasgow-exts | ||
10 | |||
11 | This module reexports all the available Numeric.GSL functions (except those in "LinearAlgebra"). | ||
12 | |||
13 | -} | ||
14 | |||
15 | module Numeric.GSL ( | ||
16 | module Numeric.GSL.Integration | ||
17 | , module Numeric.GSL.Differentiation | ||
18 | , module Numeric.GSL.Fourier | ||
19 | , module Numeric.GSL.Polynomials | ||
20 | , module Numeric.GSL.Minimization | ||
21 | , module Numeric.GSL.Special | ||
22 | , module Complex | ||
23 | , setErrorHandlerOff | ||
24 | ) where | ||
25 | |||
26 | import Numeric.GSL.Integration | ||
27 | import Numeric.GSL.Differentiation | ||
28 | import Numeric.GSL.Special | ||
29 | import Numeric.GSL.Fourier | ||
30 | import Numeric.GSL.Polynomials | ||
31 | import Numeric.GSL.Minimization | ||
32 | import Complex | ||
33 | import Numeric.GSL.Special | ||
34 | |||
35 | |||
36 | -- | This action removes the GSL default error handler (which aborts the program), so that | ||
37 | -- GSL errors can be handled by Haskell (using Control.Exception) and ghci doesn't abort. | ||
38 | foreign import ccall "GSL/gsl-aux.h no_abort_on_error" setErrorHandlerOff :: IO () | ||
diff --git a/lib/Numeric/GSL/Differentiation.hs b/lib/Numeric/GSL/Differentiation.hs new file mode 100644 index 0000000..e7fea92 --- /dev/null +++ b/lib/Numeric/GSL/Differentiation.hs | |||
@@ -0,0 +1,79 @@ | |||
1 | {-# OPTIONS #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | {- | | ||
4 | Module : Numeric.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 Numeric.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/Numeric/GSL/Fourier.hs b/lib/Numeric/GSL/Fourier.hs new file mode 100644 index 0000000..e975fbf --- /dev/null +++ b/lib/Numeric/GSL/Fourier.hs | |||
@@ -0,0 +1,46 @@ | |||
1 | {-# OPTIONS_GHC -fglasgow-exts #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | {- | | ||
4 | Module : Numeric.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 Numeric.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/Numeric/GSL/Integration.hs b/lib/Numeric/GSL/Integration.hs new file mode 100644 index 0000000..d756417 --- /dev/null +++ b/lib/Numeric/GSL/Integration.hs | |||
@@ -0,0 +1,90 @@ | |||
1 | {-# OPTIONS #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | {- | | ||
4 | Module : Numeric.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 Numeric.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/Numeric/GSL/Matrix.hs b/lib/Numeric/GSL/Matrix.hs new file mode 100644 index 0000000..eb1931a --- /dev/null +++ b/lib/Numeric/GSL/Matrix.hs | |||
@@ -0,0 +1,302 @@ | |||
1 | ----------------------------------------------------------------------------- | ||
2 | -- | | ||
3 | -- Module : Numeric.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 Numeric.GSL (<http://www.gnu.org/software/Numeric.GSL>). | ||
12 | -- | ||
13 | ----------------------------------------------------------------------------- | ||
14 | -- #hide | ||
15 | |||
16 | module Numeric.GSL.Matrix( | ||
17 | eigSg, eigHg, | ||
18 | svdg, | ||
19 | qr, | ||
20 | cholR, -- cholC, | ||
21 | luSolveR, luSolveC, | ||
22 | luR, luC | ||
23 | ) where | ||
24 | |||
25 | import Data.Packed.Internal | ||
26 | import Data.Packed.Matrix(fromLists,ident,takeDiag) | ||
27 | import Numeric.GSL.Vector | ||
28 | import Foreign | ||
29 | import Complex | ||
30 | |||
31 | {- | eigendecomposition of a real symmetric matrix using /gsl_eigen_symmv/. | ||
32 | |||
33 | > > let (l,v) = eigS $ 'fromLists' [[1,2],[2,1]] | ||
34 | > > l | ||
35 | > 3.000 -1.000 | ||
36 | > | ||
37 | > > v | ||
38 | > 0.707 -0.707 | ||
39 | > 0.707 0.707 | ||
40 | > | ||
41 | > > v <> diag l <> trans v | ||
42 | > 1.000 2.000 | ||
43 | > 2.000 1.000 | ||
44 | |||
45 | -} | ||
46 | eigSg :: Matrix Double -> (Vector Double, Matrix Double) | ||
47 | eigSg m | ||
48 | | r == 1 = (fromList [cdat m `at` 0], singleton 1) | ||
49 | | otherwise = unsafePerformIO $ do | ||
50 | l <- createVector r | ||
51 | v <- createMatrix RowMajor r r | ||
52 | c_eigS // mat cdat m // vec l // mat dat v // check "eigSg" [cdat m] | ||
53 | return (l,v) | ||
54 | where r = rows m | ||
55 | foreign import ccall "gsl-aux.h eigensystemR" c_eigS :: TMVM | ||
56 | |||
57 | ------------------------------------------------------------------ | ||
58 | |||
59 | |||
60 | |||
61 | {- | eigendecomposition of a complex hermitian matrix using /gsl_eigen_hermv/ | ||
62 | |||
63 | > > let (l,v) = eigH $ 'fromLists' [[1,2+i],[2-i,3]] | ||
64 | > | ||
65 | > > l | ||
66 | > 4.449 -0.449 | ||
67 | > | ||
68 | > > v | ||
69 | > -0.544 0.839 | ||
70 | > (-0.751,0.375) (-0.487,0.243) | ||
71 | > | ||
72 | > > v <> diag l <> (conjTrans) v | ||
73 | > 1.000 (2.000,1.000) | ||
74 | > (2.000,-1.000) 3.000 | ||
75 | |||
76 | -} | ||
77 | eigHg :: Matrix (Complex Double)-> (Vector Double, Matrix (Complex Double)) | ||
78 | eigHg m | ||
79 | | r == 1 = (fromList [realPart $ cdat m `at` 0], singleton 1) | ||
80 | | otherwise = unsafePerformIO $ do | ||
81 | l <- createVector r | ||
82 | v <- createMatrix RowMajor r r | ||
83 | c_eigH // mat cdat m // vec l // mat dat v // check "eigHg" [cdat m] | ||
84 | return (l,v) | ||
85 | where r = rows m | ||
86 | foreign import ccall "gsl-aux.h eigensystemC" c_eigH :: TCMVCM | ||
87 | |||
88 | |||
89 | {- | Singular value decomposition of a real matrix, using /gsl_linalg_SV_decomp_mod/: | ||
90 | |||
91 | @\> let (u,s,v) = svdg $ 'fromLists' [[1,2,3],[-4,1,7]] | ||
92 | \ | ||
93 | \> u | ||
94 | 0.310 -0.951 | ||
95 | 0.951 0.310 | ||
96 | \ | ||
97 | \> s | ||
98 | 8.497 2.792 | ||
99 | \ | ||
100 | \> v | ||
101 | -0.411 -0.785 | ||
102 | 0.185 -0.570 | ||
103 | 0.893 -0.243 | ||
104 | \ | ||
105 | \> u \<\> 'diag' s \<\> 'trans' v | ||
106 | 1. 2. 3. | ||
107 | -4. 1. 7.@ | ||
108 | |||
109 | -} | ||
110 | svdg :: Matrix Double -> (Matrix Double, Vector Double, Matrix Double) | ||
111 | svdg x = if rows x >= cols x | ||
112 | then svd' x | ||
113 | else (v, s, u) where (u,s,v) = svd' (trans x) | ||
114 | |||
115 | svd' x = unsafePerformIO $ do | ||
116 | u <- createMatrix RowMajor r c | ||
117 | s <- createVector c | ||
118 | v <- createMatrix RowMajor c c | ||
119 | c_svd // mat cdat x // mat dat u // vec s // mat dat v // check "svdg" [cdat x] | ||
120 | return (u,s,v) | ||
121 | where r = rows x | ||
122 | c = cols x | ||
123 | foreign import ccall "gsl-aux.h svd" c_svd :: TMMVM | ||
124 | |||
125 | {- | QR decomposition of a real matrix using /gsl_linalg_QR_decomp/ and /gsl_linalg_QR_unpack/. | ||
126 | |||
127 | @\> let (q,r) = qr $ 'fromLists' [[1,3,5,7],[2,0,-2,4]] | ||
128 | \ | ||
129 | \> q | ||
130 | -0.447 -0.894 | ||
131 | -0.894 0.447 | ||
132 | \ | ||
133 | \> r | ||
134 | -2.236 -1.342 -0.447 -6.708 | ||
135 | 0. -2.683 -5.367 -4.472 | ||
136 | \ | ||
137 | \> q \<\> r | ||
138 | 1.000 3.000 5.000 7.000 | ||
139 | 2.000 0. -2.000 4.000@ | ||
140 | |||
141 | -} | ||
142 | qr :: Matrix Double -> (Matrix Double, Matrix Double) | ||
143 | qr x = unsafePerformIO $ do | ||
144 | q <- createMatrix RowMajor r r | ||
145 | rot <- createMatrix RowMajor r c | ||
146 | c_qr // mat cdat x // mat dat q // mat dat rot // check "qr" [cdat x] | ||
147 | return (q,rot) | ||
148 | where r = rows x | ||
149 | c = cols x | ||
150 | foreign import ccall "gsl-aux.h QR" c_qr :: TMMM | ||
151 | |||
152 | {- | Cholesky decomposition of a symmetric positive definite real matrix using /gsl_linalg_cholesky_decomp/. | ||
153 | |||
154 | @\> chol $ (2><2) [1,2, | ||
155 | 2,9::Double] | ||
156 | (2><2) | ||
157 | [ 1.0, 0.0 | ||
158 | , 2.0, 2.23606797749979 ]@ | ||
159 | |||
160 | -} | ||
161 | cholR :: Matrix Double -> Matrix Double | ||
162 | cholR x = unsafePerformIO $ do | ||
163 | res <- createMatrix RowMajor r r | ||
164 | c_cholR // mat cdat x // mat dat res // check "cholR" [cdat x] | ||
165 | return res | ||
166 | where r = rows x | ||
167 | foreign import ccall "gsl-aux.h cholR" c_cholR :: TMM | ||
168 | |||
169 | cholC :: Matrix (Complex Double) -> Matrix (Complex Double) | ||
170 | cholC x = unsafePerformIO $ do | ||
171 | res <- createMatrix RowMajor r r | ||
172 | c_cholC // mat cdat x // mat dat res // check "cholC" [cdat x] | ||
173 | return res | ||
174 | where r = rows x | ||
175 | foreign import ccall "gsl-aux.h cholC" c_cholC :: TCMCM | ||
176 | |||
177 | |||
178 | -------------------------------------------------------- | ||
179 | |||
180 | {- -| efficient multiplication by the inverse of a matrix (for real matrices) | ||
181 | -} | ||
182 | luSolveR :: Matrix Double -> Matrix Double -> Matrix Double | ||
183 | luSolveR a b | ||
184 | | n1==n2 && n1==r = unsafePerformIO $ do | ||
185 | s <- createMatrix RowMajor r c | ||
186 | c_luSolveR // mat cdat a // mat cdat b // mat dat s // check "luSolveR" [cdat a, cdat b] | ||
187 | return s | ||
188 | | otherwise = error "luSolveR of nonsquare matrix" | ||
189 | where n1 = rows a | ||
190 | n2 = cols a | ||
191 | r = rows b | ||
192 | c = cols b | ||
193 | foreign import ccall "gsl-aux.h luSolveR" c_luSolveR :: TMMM | ||
194 | |||
195 | {- -| efficient multiplication by the inverse of a matrix (for complex matrices). | ||
196 | -} | ||
197 | luSolveC :: Matrix (Complex Double) -> Matrix (Complex Double) -> Matrix (Complex Double) | ||
198 | luSolveC a b | ||
199 | | n1==n2 && n1==r = unsafePerformIO $ do | ||
200 | s <- createMatrix RowMajor r c | ||
201 | c_luSolveC // mat cdat a // mat cdat b // mat dat s // check "luSolveC" [cdat a, cdat b] | ||
202 | return s | ||
203 | | otherwise = error "luSolveC of nonsquare matrix" | ||
204 | where n1 = rows a | ||
205 | n2 = cols a | ||
206 | r = rows b | ||
207 | c = cols b | ||
208 | foreign import ccall "gsl-aux.h luSolveC" c_luSolveC :: TCMCMCM | ||
209 | |||
210 | {- | lu decomposition of real matrix (packed as a vector including l, u, the permutation and sign) | ||
211 | -} | ||
212 | luRaux :: Matrix Double -> Vector Double | ||
213 | luRaux x = unsafePerformIO $ do | ||
214 | res <- createVector (r*r+r+1) | ||
215 | c_luRaux // mat cdat x // vec res // check "luRaux" [cdat x] | ||
216 | return res | ||
217 | where r = rows x | ||
218 | c = cols x | ||
219 | foreign import ccall "gsl-aux.h luRaux" c_luRaux :: TMV | ||
220 | |||
221 | {- | lu decomposition of complex matrix (packed as a vector including l, u, the permutation and sign) | ||
222 | -} | ||
223 | luCaux :: Matrix (Complex Double) -> Vector (Complex Double) | ||
224 | luCaux x = unsafePerformIO $ do | ||
225 | res <- createVector (r*r+r+1) | ||
226 | c_luCaux // mat cdat x // vec res // check "luCaux" [cdat x] | ||
227 | return res | ||
228 | where r = rows x | ||
229 | c = cols x | ||
230 | foreign import ccall "gsl-aux.h luCaux" c_luCaux :: TCMCV | ||
231 | |||
232 | {- | 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/Numeric.GSL/manual/Numeric.GSL-ref_13.html#SEC223>. | ||
233 | |||
234 | @\> let m = 'fromLists' [[1,2,-3],[2+3*i,-7,0],[1,-i,2*i]] | ||
235 | \> let (l,u,p,s) = luR m@ | ||
236 | |||
237 | L is the lower triangular: | ||
238 | |||
239 | @\> l | ||
240 | 1. 0. 0. | ||
241 | 0.154-0.231i 1. 0. | ||
242 | 0.154-0.231i 0.624-0.522i 1.@ | ||
243 | |||
244 | U is the upper triangular: | ||
245 | |||
246 | @\> u | ||
247 | 2.+3.i -7. 0. | ||
248 | 0. 3.077-1.615i -3. | ||
249 | 0. 0. 1.873+0.433i@ | ||
250 | |||
251 | p is a permutation: | ||
252 | |||
253 | @\> p | ||
254 | [1,0,2]@ | ||
255 | |||
256 | L \* U obtains a permuted version of the original matrix: | ||
257 | |||
258 | @\> extractRows p m | ||
259 | 2.+3.i -7. 0. | ||
260 | 1. 2. -3. | ||
261 | 1. -1.i 2.i | ||
262 | \ | ||
263 | \> l \<\> u | ||
264 | 2.+3.i -7. 0. | ||
265 | 1. 2. -3. | ||
266 | 1. -1.i 2.i@ | ||
267 | |||
268 | s is the sign of the permutation, required to obtain sign of the determinant: | ||
269 | |||
270 | @\> s * product ('toList' $ 'takeDiag' u) | ||
271 | (-18.0) :+ (-16.000000000000004) | ||
272 | \> 'LinearAlgebra.Algorithms.det' m | ||
273 | (-18.0) :+ (-16.000000000000004)@ | ||
274 | |||
275 | -} | ||
276 | luR :: Matrix Double -> (Matrix Double, Matrix Double, [Int], Double) | ||
277 | luR m = (l,u,p, fromIntegral s') where | ||
278 | r = rows m | ||
279 | v = luRaux m | ||
280 | lu = reshape r $ subVector 0 (r*r) v | ||
281 | s':p = map round . toList . subVector (r*r) (r+1) $ v | ||
282 | u = triang r r 0 1`mul` lu | ||
283 | l = (triang r r 0 0 `mul` lu) `add` ident r | ||
284 | add = liftMatrix2 $ vectorZipR Add | ||
285 | mul = liftMatrix2 $ vectorZipR Mul | ||
286 | |||
287 | -- | Complex version of 'luR'. | ||
288 | luC :: Matrix (Complex Double) -> (Matrix (Complex Double), Matrix (Complex Double), [Int], Complex Double) | ||
289 | luC m = (l,u,p, fromIntegral s') where | ||
290 | r = rows m | ||
291 | v = luCaux m | ||
292 | lu = reshape r $ subVector 0 (r*r) v | ||
293 | s':p = map (round.realPart) . toList . subVector (r*r) (r+1) $ v | ||
294 | u = triang r r 0 1 `mul` lu | ||
295 | l = (triang r r 0 0 `mul` lu) `add` liftMatrix comp (ident r) | ||
296 | add = liftMatrix2 $ vectorZipC Add | ||
297 | mul = liftMatrix2 $ vectorZipC Mul | ||
298 | |||
299 | {- auxiliary function to get triangular matrices | ||
300 | -} | ||
301 | triang r c h v = reshape c $ fromList [el i j | i<-[0..r-1], j<-[0..c-1]] | ||
302 | where el i j = if j-i>=h then v else 1 - v | ||
diff --git a/lib/Numeric/GSL/Minimization.hs b/lib/Numeric/GSL/Minimization.hs new file mode 100644 index 0000000..23ca51b --- /dev/null +++ b/lib/Numeric/GSL/Minimization.hs | |||
@@ -0,0 +1,213 @@ | |||
1 | {-# OPTIONS_GHC -fglasgow-exts #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | {- | | ||
4 | Module : Numeric.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 Numeric.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/Numeric/GSL/Polynomials.hs b/lib/Numeric/GSL/Polynomials.hs new file mode 100644 index 0000000..42694f0 --- /dev/null +++ b/lib/Numeric/GSL/Polynomials.hs | |||
@@ -0,0 +1,54 @@ | |||
1 | {-# OPTIONS_GHC -fglasgow-exts #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | {- | | ||
4 | Module : Numeric.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 Numeric.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/Numeric/GSL/Special.hs b/lib/Numeric/GSL/Special.hs new file mode 100644 index 0000000..b6cea2b --- /dev/null +++ b/lib/Numeric/GSL/Special.hs | |||
@@ -0,0 +1,74 @@ | |||
1 | ----------------------------------------------------------------------------- | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.GSL.Special ( | ||
18 | module Numeric.GSL.Special.Airy | ||
19 | , module Numeric.GSL.Special.Bessel | ||
20 | , module Numeric.GSL.Special.Clausen | ||
21 | , module Numeric.GSL.Special.Coulomb | ||
22 | , module Numeric.GSL.Special.Coupling | ||
23 | , module Numeric.GSL.Special.Dawson | ||
24 | , module Numeric.GSL.Special.Debye | ||
25 | , module Numeric.GSL.Special.Dilog | ||
26 | , module Numeric.GSL.Special.Elementary | ||
27 | , module Numeric.GSL.Special.Ellint | ||
28 | , module Numeric.GSL.Special.Erf | ||
29 | , module Numeric.GSL.Special.Exp | ||
30 | , module Numeric.GSL.Special.Expint | ||
31 | , module Numeric.GSL.Special.Fermi_dirac | ||
32 | , module Numeric.GSL.Special.Gamma | ||
33 | , module Numeric.GSL.Special.Gegenbauer | ||
34 | , module Numeric.GSL.Special.Hyperg | ||
35 | , module Numeric.GSL.Special.Laguerre | ||
36 | , module Numeric.GSL.Special.Lambert | ||
37 | , module Numeric.GSL.Special.Legendre | ||
38 | , module Numeric.GSL.Special.Log | ||
39 | , module Numeric.GSL.Special.Pow_int | ||
40 | , module Numeric.GSL.Special.Psi | ||
41 | , module Numeric.GSL.Special.Synchrotron | ||
42 | , module Numeric.GSL.Special.Trig | ||
43 | , module Numeric.GSL.Special.Zeta | ||
44 | ) | ||
45 | where | ||
46 | |||
47 | import Foreign | ||
48 | import Numeric.GSL.Special.Internal | ||
49 | import Numeric.GSL.Special.Airy | ||
50 | import Numeric.GSL.Special.Bessel | ||
51 | import Numeric.GSL.Special.Clausen | ||
52 | import Numeric.GSL.Special.Coulomb | ||
53 | import Numeric.GSL.Special.Coupling | ||
54 | import Numeric.GSL.Special.Dawson | ||
55 | import Numeric.GSL.Special.Debye | ||
56 | import Numeric.GSL.Special.Dilog | ||
57 | import Numeric.GSL.Special.Elementary | ||
58 | import Numeric.GSL.Special.Ellint | ||
59 | import Numeric.GSL.Special.Erf | ||
60 | import Numeric.GSL.Special.Exp | ||
61 | import Numeric.GSL.Special.Expint | ||
62 | import Numeric.GSL.Special.Fermi_dirac | ||
63 | import Numeric.GSL.Special.Gamma | ||
64 | import Numeric.GSL.Special.Gegenbauer | ||
65 | import Numeric.GSL.Special.Hyperg | ||
66 | import Numeric.GSL.Special.Laguerre | ||
67 | import Numeric.GSL.Special.Lambert | ||
68 | import Numeric.GSL.Special.Legendre | ||
69 | import Numeric.GSL.Special.Log | ||
70 | import Numeric.GSL.Special.Pow_int | ||
71 | import Numeric.GSL.Special.Psi | ||
72 | import Numeric.GSL.Special.Synchrotron | ||
73 | import Numeric.GSL.Special.Trig | ||
74 | import Numeric.GSL.Special.Zeta | ||
diff --git a/lib/Numeric/GSL/Special/Airy.hs b/lib/Numeric/GSL/Special/Airy.hs new file mode 100644 index 0000000..d987e1f --- /dev/null +++ b/lib/Numeric/GSL/Special/Airy.hs | |||
@@ -0,0 +1,166 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.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 Numeric.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/Numeric/GSL/Special/Bessel.hs b/lib/Numeric/GSL/Special/Bessel.hs new file mode 100644 index 0000000..e059666 --- /dev/null +++ b/lib/Numeric/GSL/Special/Bessel.hs | |||
@@ -0,0 +1,809 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.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 Numeric.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/Numeric/GSL/Special/Clausen.hs b/lib/Numeric/GSL/Special/Clausen.hs new file mode 100644 index 0000000..3052187 --- /dev/null +++ b/lib/Numeric/GSL/Special/Clausen.hs | |||
@@ -0,0 +1,37 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.GSL.Special.Clausen( | ||
18 | clausen_e | ||
19 | , clausen | ||
20 | ) where | ||
21 | |||
22 | import Foreign(Ptr) | ||
23 | import Numeric.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/Numeric/GSL/Special/Coulomb.hs b/lib/Numeric/GSL/Special/Coulomb.hs new file mode 100644 index 0000000..06848cb --- /dev/null +++ b/lib/Numeric/GSL/Special/Coulomb.hs | |||
@@ -0,0 +1,103 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.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 Numeric.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/Numeric/GSL/Special/Coupling.hs b/lib/Numeric/GSL/Special/Coupling.hs new file mode 100644 index 0000000..9578b1b --- /dev/null +++ b/lib/Numeric/GSL/Special/Coupling.hs | |||
@@ -0,0 +1,81 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.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 Numeric.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/Numeric/GSL/Special/Dawson.hs b/lib/Numeric/GSL/Special/Dawson.hs new file mode 100644 index 0000000..1d77a2b --- /dev/null +++ b/lib/Numeric/GSL/Special/Dawson.hs | |||
@@ -0,0 +1,37 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.GSL.Special.Dawson( | ||
18 | dawson_e | ||
19 | , dawson | ||
20 | ) where | ||
21 | |||
22 | import Foreign(Ptr) | ||
23 | import Numeric.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/Numeric/GSL/Special/Debye.hs b/lib/Numeric/GSL/Special/Debye.hs new file mode 100644 index 0000000..b8e9aca --- /dev/null +++ b/lib/Numeric/GSL/Special/Debye.hs | |||
@@ -0,0 +1,85 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.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 Numeric.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/Numeric/GSL/Special/Dilog.hs b/lib/Numeric/GSL/Special/Dilog.hs new file mode 100644 index 0000000..e7693da --- /dev/null +++ b/lib/Numeric/GSL/Special/Dilog.hs | |||
@@ -0,0 +1,58 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.GSL.Special.Dilog( | ||
18 | dilog_e | ||
19 | , dilog | ||
20 | ) where | ||
21 | |||
22 | import Foreign(Ptr) | ||
23 | import Numeric.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/Numeric/GSL/Special/Elementary.hs b/lib/Numeric/GSL/Special/Elementary.hs new file mode 100644 index 0000000..0312ada --- /dev/null +++ b/lib/Numeric/GSL/Special/Elementary.hs | |||
@@ -0,0 +1,45 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.GSL.Special.Elementary( | ||
18 | multiply_e | ||
19 | , multiply | ||
20 | , multiply_err_e | ||
21 | ) where | ||
22 | |||
23 | import Foreign(Ptr) | ||
24 | import Numeric.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/Numeric/GSL/Special/Ellint.hs b/lib/Numeric/GSL/Special/Ellint.hs new file mode 100644 index 0000000..798531a --- /dev/null +++ b/lib/Numeric/GSL/Special/Ellint.hs | |||
@@ -0,0 +1,181 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.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 Numeric.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/Numeric/GSL/Special/Erf.hs b/lib/Numeric/GSL/Special/Erf.hs new file mode 100644 index 0000000..ec73980 --- /dev/null +++ b/lib/Numeric/GSL/Special/Erf.hs | |||
@@ -0,0 +1,117 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.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 Numeric.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/Numeric/GSL/Special/Exp.hs b/lib/Numeric/GSL/Special/Exp.hs new file mode 100644 index 0000000..2787df4 --- /dev/null +++ b/lib/Numeric/GSL/Special/Exp.hs | |||
@@ -0,0 +1,129 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.GSL.Special.Exp( | ||
18 | exp_e | ||
19 | , Numeric.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 Numeric.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/Numeric/GSL/Special/Expint.hs b/lib/Numeric/GSL/Special/Expint.hs new file mode 100644 index 0000000..9882d09 --- /dev/null +++ b/lib/Numeric/GSL/Special/Expint.hs | |||
@@ -0,0 +1,213 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.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 Numeric.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/Numeric/GSL/Special/Fermi_dirac.hs b/lib/Numeric/GSL/Special/Fermi_dirac.hs new file mode 100644 index 0000000..a189dd4 --- /dev/null +++ b/lib/Numeric/GSL/Special/Fermi_dirac.hs | |||
@@ -0,0 +1,165 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.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 Numeric.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/Numeric/GSL/Special/Gamma.hs b/lib/Numeric/GSL/Special/Gamma.hs new file mode 100644 index 0000000..aa03892 --- /dev/null +++ b/lib/Numeric/GSL/Special/Gamma.hs | |||
@@ -0,0 +1,362 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.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 Numeric.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/Numeric/GSL/Special/Gegenbauer.hs b/lib/Numeric/GSL/Special/Gegenbauer.hs new file mode 100644 index 0000000..40cc1e9 --- /dev/null +++ b/lib/Numeric/GSL/Special/Gegenbauer.hs | |||
@@ -0,0 +1,92 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.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 Numeric.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/Numeric/GSL/Special/Hyperg.hs b/lib/Numeric/GSL/Special/Hyperg.hs new file mode 100644 index 0000000..28bf984 --- /dev/null +++ b/lib/Numeric/GSL/Special/Hyperg.hs | |||
@@ -0,0 +1,197 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.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 Numeric.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/Numeric/GSL/Special/Internal.hs b/lib/Numeric/GSL/Special/Internal.hs new file mode 100644 index 0000000..a08809b --- /dev/null +++ b/lib/Numeric/GSL/Special/Internal.hs | |||
@@ -0,0 +1,68 @@ | |||
1 | {-# OPTIONS #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | {- | | ||
4 | Module : Numeric.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 Numeric.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/Numeric/GSL/Special/Laguerre.hs b/lib/Numeric/GSL/Special/Laguerre.hs new file mode 100644 index 0000000..320e451 --- /dev/null +++ b/lib/Numeric/GSL/Special/Laguerre.hs | |||
@@ -0,0 +1,85 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.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 Numeric.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/Numeric/GSL/Special/Lambert.hs b/lib/Numeric/GSL/Special/Lambert.hs new file mode 100644 index 0000000..ad5579f --- /dev/null +++ b/lib/Numeric/GSL/Special/Lambert.hs | |||
@@ -0,0 +1,53 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.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 Numeric.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/Numeric/GSL/Special/Legendre.hs b/lib/Numeric/GSL/Special/Legendre.hs new file mode 100644 index 0000000..0ea7557 --- /dev/null +++ b/lib/Numeric/GSL/Special/Legendre.hs | |||
@@ -0,0 +1,278 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.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 Numeric.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/Numeric/GSL/Special/Log.hs b/lib/Numeric/GSL/Special/Log.hs new file mode 100644 index 0000000..e9c345b --- /dev/null +++ b/lib/Numeric/GSL/Special/Log.hs | |||
@@ -0,0 +1,74 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.GSL.Special.Log( | ||
18 | log_e | ||
19 | , Numeric.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 Numeric.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/Numeric/GSL/Special/Pow_int.hs b/lib/Numeric/GSL/Special/Pow_int.hs new file mode 100644 index 0000000..384dfc4 --- /dev/null +++ b/lib/Numeric/GSL/Special/Pow_int.hs | |||
@@ -0,0 +1,37 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.GSL.Special.Pow_int( | ||
18 | pow_int_e | ||
19 | , pow_int | ||
20 | ) where | ||
21 | |||
22 | import Foreign(Ptr) | ||
23 | import Numeric.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/Numeric/GSL/Special/Psi.hs b/lib/Numeric/GSL/Special/Psi.hs new file mode 100644 index 0000000..c0021e4 --- /dev/null +++ b/lib/Numeric/GSL/Special/Psi.hs | |||
@@ -0,0 +1,117 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.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 Numeric.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/Numeric/GSL/Special/Synchrotron.hs b/lib/Numeric/GSL/Special/Synchrotron.hs new file mode 100644 index 0000000..14881fe --- /dev/null +++ b/lib/Numeric/GSL/Special/Synchrotron.hs | |||
@@ -0,0 +1,53 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.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 Numeric.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/Numeric/GSL/Special/Trig.hs b/lib/Numeric/GSL/Special/Trig.hs new file mode 100644 index 0000000..b846c1d --- /dev/null +++ b/lib/Numeric/GSL/Special/Trig.hs | |||
@@ -0,0 +1,164 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.GSL.Special.Trig( | ||
18 | sin_e | ||
19 | , Numeric.GSL.Special.Trig.sin | ||
20 | , cos_e | ||
21 | , Numeric.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 Numeric.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/Numeric/GSL/Special/Zeta.hs b/lib/Numeric/GSL/Special/Zeta.hs new file mode 100644 index 0000000..48c8ff1 --- /dev/null +++ b/lib/Numeric/GSL/Special/Zeta.hs | |||
@@ -0,0 +1,133 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : Numeric.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 Numeric.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 Numeric.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/Numeric/GSL/Special/airy.h b/lib/Numeric/GSL/Special/airy.h new file mode 100644 index 0000000..e34e012 --- /dev/null +++ b/lib/Numeric/GSL/Special/airy.h | |||
@@ -0,0 +1,24 @@ | |||
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/Numeric/GSL/Special/auto.hs b/lib/Numeric/GSL/Special/auto.hs new file mode 100644 index 0000000..d2baff6 --- /dev/null +++ b/lib/Numeric/GSL/Special/auto.hs | |||
@@ -0,0 +1,233 @@ | |||
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 Numeric.GSL.Special.Internal\n" | ||
64 | let mod = modhead name ++ "module Numeric.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 : Numeric.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/Numeric/GSL/Special/autoall.sh b/lib/Numeric/GSL/Special/autoall.sh new file mode 100644 index 0000000..cb45957 --- /dev/null +++ b/lib/Numeric/GSL/Special/autoall.sh | |||
@@ -0,0 +1,41 @@ | |||
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/Numeric/GSL/Special/bessel.h b/lib/Numeric/GSL/Special/bessel.h new file mode 100644 index 0000000..5a2445d --- /dev/null +++ b/lib/Numeric/GSL/Special/bessel.h | |||
@@ -0,0 +1,100 @@ | |||
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/Numeric/GSL/Special/clausen.h b/lib/Numeric/GSL/Special/clausen.h new file mode 100644 index 0000000..9f0225b --- /dev/null +++ b/lib/Numeric/GSL/Special/clausen.h | |||
@@ -0,0 +1,2 @@ | |||
1 | int gsl_sf_clausen_e(double x,double* result); | ||
2 | double gsl_sf_clausen(double x); | ||
diff --git a/lib/Numeric/GSL/Special/coulomb.h b/lib/Numeric/GSL/Special/coulomb.h new file mode 100644 index 0000000..2551081 --- /dev/null +++ b/lib/Numeric/GSL/Special/coulomb.h | |||
@@ -0,0 +1,11 @@ | |||
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/Numeric/GSL/Special/coupling.h b/lib/Numeric/GSL/Special/coupling.h new file mode 100644 index 0000000..17de964 --- /dev/null +++ b/lib/Numeric/GSL/Special/coupling.h | |||
@@ -0,0 +1,10 @@ | |||
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/Numeric/GSL/Special/dawson.h b/lib/Numeric/GSL/Special/dawson.h new file mode 100644 index 0000000..5f878b5 --- /dev/null +++ b/lib/Numeric/GSL/Special/dawson.h | |||
@@ -0,0 +1,2 @@ | |||
1 | int gsl_sf_dawson_e(double x,double* result); | ||
2 | double gsl_sf_dawson(double x); | ||
diff --git a/lib/Numeric/GSL/Special/debye.h b/lib/Numeric/GSL/Special/debye.h new file mode 100644 index 0000000..2424b63 --- /dev/null +++ b/lib/Numeric/GSL/Special/debye.h | |||
@@ -0,0 +1,8 @@ | |||
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/Numeric/GSL/Special/dilog.h b/lib/Numeric/GSL/Special/dilog.h new file mode 100644 index 0000000..ce1599e --- /dev/null +++ b/lib/Numeric/GSL/Special/dilog.h | |||
@@ -0,0 +1,5 @@ | |||
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/Numeric/GSL/Special/elementary.h b/lib/Numeric/GSL/Special/elementary.h new file mode 100644 index 0000000..bf5adf8 --- /dev/null +++ b/lib/Numeric/GSL/Special/elementary.h | |||
@@ -0,0 +1,3 @@ | |||
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/Numeric/GSL/Special/ellint.h b/lib/Numeric/GSL/Special/ellint.h new file mode 100644 index 0000000..5329c6c --- /dev/null +++ b/lib/Numeric/GSL/Special/ellint.h | |||
@@ -0,0 +1,20 @@ | |||
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/Numeric/GSL/Special/erf.h b/lib/Numeric/GSL/Special/erf.h new file mode 100644 index 0000000..17369cf --- /dev/null +++ b/lib/Numeric/GSL/Special/erf.h | |||
@@ -0,0 +1,12 @@ | |||
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/Numeric/GSL/Special/exp.h b/lib/Numeric/GSL/Special/exp.h new file mode 100644 index 0000000..20062f0 --- /dev/null +++ b/lib/Numeric/GSL/Special/exp.h | |||
@@ -0,0 +1,18 @@ | |||
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/Numeric/GSL/Special/expint.h b/lib/Numeric/GSL/Special/expint.h new file mode 100644 index 0000000..1dd469f --- /dev/null +++ b/lib/Numeric/GSL/Special/expint.h | |||
@@ -0,0 +1,24 @@ | |||
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/Numeric/GSL/Special/fermi_dirac.h b/lib/Numeric/GSL/Special/fermi_dirac.h new file mode 100644 index 0000000..7a4c757 --- /dev/null +++ b/lib/Numeric/GSL/Special/fermi_dirac.h | |||
@@ -0,0 +1,18 @@ | |||
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/Numeric/GSL/Special/gamma.h b/lib/Numeric/GSL/Special/gamma.h new file mode 100644 index 0000000..c5cc417 --- /dev/null +++ b/lib/Numeric/GSL/Special/gamma.h | |||
@@ -0,0 +1,43 @@ | |||
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/Numeric/GSL/Special/gegenbauer.h b/lib/Numeric/GSL/Special/gegenbauer.h new file mode 100644 index 0000000..228cbd3 --- /dev/null +++ b/lib/Numeric/GSL/Special/gegenbauer.h | |||
@@ -0,0 +1,9 @@ | |||
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/Numeric/GSL/Special/gsl_sf_exp.h b/lib/Numeric/GSL/Special/gsl_sf_exp.h new file mode 100644 index 0000000..b1f0d89 --- /dev/null +++ b/lib/Numeric/GSL/Special/gsl_sf_exp.h | |||
@@ -0,0 +1,146 @@ | |||
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/Numeric/GSL/Special/gsl_sf_log.h b/lib/Numeric/GSL/Special/gsl_sf_log.h new file mode 100644 index 0000000..5225d05 --- /dev/null +++ b/lib/Numeric/GSL/Special/gsl_sf_log.h | |||
@@ -0,0 +1,90 @@ | |||
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/Numeric/GSL/Special/hyperg.h b/lib/Numeric/GSL/Special/hyperg.h new file mode 100644 index 0000000..aa59106 --- /dev/null +++ b/lib/Numeric/GSL/Special/hyperg.h | |||
@@ -0,0 +1,22 @@ | |||
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/Numeric/GSL/Special/laguerre.h b/lib/Numeric/GSL/Special/laguerre.h new file mode 100644 index 0000000..6275a05 --- /dev/null +++ b/lib/Numeric/GSL/Special/laguerre.h | |||
@@ -0,0 +1,8 @@ | |||
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/Numeric/GSL/Special/lambert.h b/lib/Numeric/GSL/Special/lambert.h new file mode 100644 index 0000000..df90d11 --- /dev/null +++ b/lib/Numeric/GSL/Special/lambert.h | |||
@@ -0,0 +1,4 @@ | |||
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/Numeric/GSL/Special/legendre.h b/lib/Numeric/GSL/Special/legendre.h new file mode 100644 index 0000000..aebe84f --- /dev/null +++ b/lib/Numeric/GSL/Special/legendre.h | |||
@@ -0,0 +1,44 @@ | |||
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/Numeric/GSL/Special/log.h b/lib/Numeric/GSL/Special/log.h new file mode 100644 index 0000000..5713845 --- /dev/null +++ b/lib/Numeric/GSL/Special/log.h | |||
@@ -0,0 +1,9 @@ | |||
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/Numeric/GSL/Special/pow_int.h b/lib/Numeric/GSL/Special/pow_int.h new file mode 100644 index 0000000..aba8bc9 --- /dev/null +++ b/lib/Numeric/GSL/Special/pow_int.h | |||
@@ -0,0 +1,2 @@ | |||
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/Numeric/GSL/Special/psi.h b/lib/Numeric/GSL/Special/psi.h new file mode 100644 index 0000000..589eb34 --- /dev/null +++ b/lib/Numeric/GSL/Special/psi.h | |||
@@ -0,0 +1,12 @@ | |||
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/Numeric/GSL/Special/synchrotron.h b/lib/Numeric/GSL/Special/synchrotron.h new file mode 100644 index 0000000..786401c --- /dev/null +++ b/lib/Numeric/GSL/Special/synchrotron.h | |||
@@ -0,0 +1,4 @@ | |||
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/Numeric/GSL/Special/trig.h b/lib/Numeric/GSL/Special/trig.h new file mode 100644 index 0000000..50677f2 --- /dev/null +++ b/lib/Numeric/GSL/Special/trig.h | |||
@@ -0,0 +1,25 @@ | |||
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/Numeric/GSL/Special/zeta.h b/lib/Numeric/GSL/Special/zeta.h new file mode 100644 index 0000000..b961ece --- /dev/null +++ b/lib/Numeric/GSL/Special/zeta.h | |||
@@ -0,0 +1,14 @@ | |||
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/Numeric/GSL/Vector.hs b/lib/Numeric/GSL/Vector.hs new file mode 100644 index 0000000..ef3d5e8 --- /dev/null +++ b/lib/Numeric/GSL/Vector.hs | |||
@@ -0,0 +1,145 @@ | |||
1 | {-# OPTIONS_GHC -fglasgow-exts #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | -- | | ||
4 | -- Module : Numeric.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 | -- #hide | ||
16 | |||
17 | module Numeric.GSL.Vector ( | ||
18 | FunCodeS(..), toScalarR, | ||
19 | FunCodeV(..), vectorMapR, vectorMapC, | ||
20 | FunCodeSV(..), vectorMapValR, vectorMapValC, | ||
21 | FunCodeVV(..), vectorZipR, vectorZipC | ||
22 | ) where | ||
23 | |||
24 | import Data.Packed.Internal.Common | ||
25 | import Data.Packed.Internal.Vector | ||
26 | |||
27 | import Complex | ||
28 | import Foreign | ||
29 | |||
30 | data FunCodeV = Sin | ||
31 | | Cos | ||
32 | | Tan | ||
33 | | Abs | ||
34 | | ASin | ||
35 | | ACos | ||
36 | | ATan | ||
37 | | Sinh | ||
38 | | Cosh | ||
39 | | Tanh | ||
40 | | ASinh | ||
41 | | ACosh | ||
42 | | ATanh | ||
43 | | Exp | ||
44 | | Log | ||
45 | | Sign | ||
46 | | Sqrt | ||
47 | deriving Enum | ||
48 | |||
49 | data FunCodeSV = Scale | ||
50 | | Recip | ||
51 | | AddConstant | ||
52 | | Negate | ||
53 | | PowSV | ||
54 | | PowVS | ||
55 | deriving Enum | ||
56 | |||
57 | data FunCodeVV = Add | ||
58 | | Sub | ||
59 | | Mul | ||
60 | | Div | ||
61 | | Pow | ||
62 | | ATan2 | ||
63 | deriving Enum | ||
64 | |||
65 | data FunCodeS = Norm2 | ||
66 | | AbsSum | ||
67 | | MaxIdx | ||
68 | | Max | ||
69 | | MinIdx | ||
70 | | Min | ||
71 | deriving Enum | ||
72 | |||
73 | ------------------------------------------------------------------ | ||
74 | |||
75 | toScalarAux fun code v = unsafePerformIO $ do | ||
76 | r <- createVector 1 | ||
77 | fun (fromEnum code) // vec v // vec r // check "toScalarAux" [v] | ||
78 | return (r `at` 0) | ||
79 | |||
80 | vectorMapAux fun code v = unsafePerformIO $ do | ||
81 | r <- createVector (dim v) | ||
82 | fun (fromEnum code) // vec v // vec r // check "vectorMapAux" [v] | ||
83 | return r | ||
84 | |||
85 | vectorMapValAux fun code val v = unsafePerformIO $ do | ||
86 | r <- createVector (dim v) | ||
87 | pval <- newArray [val] | ||
88 | fun (fromEnum code) pval // vec v // vec r // check "vectorMapValAux" [v] | ||
89 | free pval | ||
90 | return r | ||
91 | |||
92 | vectorZipAux fun code u v = unsafePerformIO $ do | ||
93 | r <- createVector (dim u) | ||
94 | fun (fromEnum code) // vec u // vec v // vec r // check "vectorZipAux" [u,v] | ||
95 | return r | ||
96 | |||
97 | --------------------------------------------------------------------- | ||
98 | |||
99 | -- | obtains different functions of a vector: norm1, norm2, max, min, posmax, posmin, etc. | ||
100 | toScalarR :: FunCodeS -> Vector Double -> Double | ||
101 | toScalarR oper = toScalarAux c_toScalarR (fromEnum oper) | ||
102 | |||
103 | foreign import ccall safe "gsl-aux.h toScalarR" c_toScalarR :: Int -> TVV | ||
104 | |||
105 | ------------------------------------------------------------------ | ||
106 | |||
107 | -- | map of real vectors with given function | ||
108 | vectorMapR :: FunCodeV -> Vector Double -> Vector Double | ||
109 | vectorMapR = vectorMapAux c_vectorMapR | ||
110 | |||
111 | foreign import ccall safe "gsl-aux.h mapR" c_vectorMapR :: Int -> TVV | ||
112 | |||
113 | -- | map of complex vectors with given function | ||
114 | vectorMapC :: FunCodeV -> Vector (Complex Double) -> Vector (Complex Double) | ||
115 | vectorMapC oper = vectorMapAux c_vectorMapC (fromEnum oper) | ||
116 | |||
117 | foreign import ccall safe "gsl-aux.h mapC" c_vectorMapC :: Int -> TCVCV | ||
118 | |||
119 | ------------------------------------------------------------------- | ||
120 | |||
121 | -- | map of real vectors with given function | ||
122 | vectorMapValR :: FunCodeSV -> Double -> Vector Double -> Vector Double | ||
123 | vectorMapValR oper = vectorMapValAux c_vectorMapValR (fromEnum oper) | ||
124 | |||
125 | foreign import ccall safe "gsl-aux.h mapValR" c_vectorMapValR :: Int -> Ptr Double -> TVV | ||
126 | |||
127 | -- | map of complex vectors with given function | ||
128 | vectorMapValC :: FunCodeSV -> Complex Double -> Vector (Complex Double) -> Vector (Complex Double) | ||
129 | vectorMapValC = vectorMapValAux c_vectorMapValC | ||
130 | |||
131 | foreign import ccall safe "gsl-aux.h mapValC" c_vectorMapValC :: Int -> Ptr (Complex Double) -> TCVCV | ||
132 | |||
133 | ------------------------------------------------------------------- | ||
134 | |||
135 | -- | elementwise operation on real vectors | ||
136 | vectorZipR :: FunCodeVV -> Vector Double -> Vector Double -> Vector Double | ||
137 | vectorZipR = vectorZipAux c_vectorZipR | ||
138 | |||
139 | foreign import ccall safe "gsl-aux.h zipR" c_vectorZipR :: Int -> TVVV | ||
140 | |||
141 | -- | elementwise operation on complex vectors | ||
142 | vectorZipC :: FunCodeVV -> Vector (Complex Double) -> Vector (Complex Double) -> Vector (Complex Double) | ||
143 | vectorZipC = vectorZipAux c_vectorZipC | ||
144 | |||
145 | foreign import ccall safe "gsl-aux.h zipC" c_vectorZipC :: Int -> TCVCVCV | ||
diff --git a/lib/Numeric/GSL/gsl-aux.c b/lib/Numeric/GSL/gsl-aux.c new file mode 100644 index 0000000..c602d5e --- /dev/null +++ b/lib/Numeric/GSL/gsl-aux.c | |||
@@ -0,0 +1,743 @@ | |||
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/Numeric/GSL/gsl-aux.h b/lib/Numeric/GSL/gsl-aux.h new file mode 100644 index 0000000..3ccac25 --- /dev/null +++ b/lib/Numeric/GSL/gsl-aux.h | |||
@@ -0,0 +1,62 @@ | |||
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); | ||
diff --git a/lib/Numeric/LinearAlgebra.hs b/lib/Numeric/LinearAlgebra.hs new file mode 100644 index 0000000..f3190a2 --- /dev/null +++ b/lib/Numeric/LinearAlgebra.hs | |||
@@ -0,0 +1,27 @@ | |||
1 | ----------------------------------------------------------------------------- | ||
2 | {- | | ||
3 | Module : Numeric.LinearAlgebra | ||
4 | Copyright : (c) Alberto Ruiz 2006-7 | ||
5 | License : GPL-style | ||
6 | |||
7 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
8 | Stability : provisional | ||
9 | Portability : uses ffi | ||
10 | |||
11 | Basic matrix computations implemented by BLAS, LAPACK and GSL. | ||
12 | |||
13 | -} | ||
14 | ----------------------------------------------------------------------------- | ||
15 | module Numeric.LinearAlgebra ( | ||
16 | module Data.Packed, | ||
17 | module Numeric.LinearAlgebra.Linear, | ||
18 | module Numeric.LinearAlgebra.Algorithms, | ||
19 | module Numeric.LinearAlgebra.Instances, | ||
20 | module Numeric.LinearAlgebra.Interface | ||
21 | ) where | ||
22 | |||
23 | import Data.Packed | ||
24 | import Numeric.LinearAlgebra.Linear | ||
25 | import Numeric.LinearAlgebra.Algorithms | ||
26 | import Numeric.LinearAlgebra.Instances | ||
27 | import Numeric.LinearAlgebra.Interface | ||
diff --git a/lib/Numeric/LinearAlgebra/Algorithms.hs b/lib/Numeric/LinearAlgebra/Algorithms.hs new file mode 100644 index 0000000..3513b18 --- /dev/null +++ b/lib/Numeric/LinearAlgebra/Algorithms.hs | |||
@@ -0,0 +1,259 @@ | |||
1 | {-# OPTIONS_GHC -fglasgow-exts #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | {- | | ||
4 | Module : Numeric.LinearAlgebra.Algorithms | ||
5 | Copyright : (c) Alberto Ruiz 2006-7 | ||
6 | License : GPL-style | ||
7 | |||
8 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
9 | Stability : provisional | ||
10 | Portability : uses ffi | ||
11 | |||
12 | A generic interface for a number of essential functions. Using it some higher level algorithms | ||
13 | and testing properties can be written for both real and complex matrices. | ||
14 | |||
15 | In any case, the specific functions for particular base types can also be explicitly | ||
16 | imported from the LAPACK and GSL.Matrix modules. | ||
17 | |||
18 | -} | ||
19 | ----------------------------------------------------------------------------- | ||
20 | |||
21 | module Numeric.LinearAlgebra.Algorithms ( | ||
22 | -- * Linear Systems | ||
23 | linearSolve, | ||
24 | inv, pinv, | ||
25 | pinvTol, det, | ||
26 | -- * Matrix factorizations | ||
27 | -- ** Singular value decomposition | ||
28 | svd, | ||
29 | full, economy, | ||
30 | -- ** Eigensystems | ||
31 | eig, eigSH, | ||
32 | -- ** Other | ||
33 | Numeric.LinearAlgebra.Algorithms.qr, chol, | ||
34 | -- * Nullspace | ||
35 | nullspacePrec, | ||
36 | nullVector, | ||
37 | -- * Misc | ||
38 | eps, i, | ||
39 | ctrans, | ||
40 | Normed(..), NormType(..), | ||
41 | GenMat(linearSolveSVD,lu,eigSH') | ||
42 | ) where | ||
43 | |||
44 | |||
45 | import Data.Packed.Internal hiding (fromComplex, toComplex, comp, conj) | ||
46 | import Data.Packed | ||
47 | import Numeric.GSL.Matrix(luR,luC,qr) | ||
48 | import Numeric.GSL.Vector | ||
49 | import Numeric.LinearAlgebra.LAPACK as LAPACK | ||
50 | import Complex | ||
51 | import Numeric.LinearAlgebra.Linear | ||
52 | |||
53 | -- | Auxiliary typeclass used to define generic computations for both real and complex matrices. | ||
54 | class (Linear Matrix t) => GenMat t where | ||
55 | svd :: Matrix t -> (Matrix t, Vector Double, Matrix t) | ||
56 | lu :: Matrix t -> (Matrix t, Matrix t, [Int], t) | ||
57 | linearSolve :: Matrix t -> Matrix t -> Matrix t | ||
58 | linearSolveSVD :: Matrix t -> Matrix t -> Matrix t | ||
59 | eig :: Matrix t -> (Vector (Complex Double), Matrix (Complex Double)) | ||
60 | eigSH' :: Matrix t -> (Vector Double, Matrix t) | ||
61 | cholSH :: Matrix t -> Matrix t | ||
62 | -- | conjugate transpose | ||
63 | ctrans :: Matrix t -> Matrix t | ||
64 | |||
65 | instance GenMat Double where | ||
66 | svd = svdR | ||
67 | lu = luR | ||
68 | linearSolve = linearSolveR | ||
69 | linearSolveSVD = linearSolveSVDR Nothing | ||
70 | ctrans = trans | ||
71 | eig = eigR | ||
72 | eigSH' = eigS | ||
73 | cholSH = cholS | ||
74 | |||
75 | instance GenMat (Complex Double) where | ||
76 | svd = svdC | ||
77 | lu = luC | ||
78 | linearSolve = linearSolveC | ||
79 | linearSolveSVD = linearSolveSVDC Nothing | ||
80 | ctrans = conjTrans | ||
81 | eig = eigC | ||
82 | eigSH' = eigH | ||
83 | cholSH = cholH | ||
84 | |||
85 | -- | eigensystem of complex hermitian or real symmetric matrix | ||
86 | eigSH :: GenMat t => Matrix t -> (Vector Double, Matrix t) | ||
87 | eigSH m | m `equal` ctrans m = eigSH' m | ||
88 | | otherwise = error "eigSH requires complex hermitian or real symmetric matrix" | ||
89 | |||
90 | -- | Cholesky factorization of a positive definite hermitian or symmetric matrix | ||
91 | chol :: GenMat t => Matrix t -> Matrix t | ||
92 | chol m | m `equal` ctrans m = cholSH m | ||
93 | | otherwise = error "chol requires positive definite complex hermitian or real symmetric matrix" | ||
94 | |||
95 | qr :: Matrix Double -> (Matrix Double, Matrix Double) | ||
96 | qr = Numeric.GSL.Matrix.qr | ||
97 | |||
98 | square m = rows m == cols m | ||
99 | |||
100 | det :: GenMat t => Matrix t -> t | ||
101 | det m | square m = s * (product $ toList $ takeDiag $ u) | ||
102 | | otherwise = error "det of nonsquare matrix" | ||
103 | where (_,u,_,s) = lu m | ||
104 | |||
105 | inv :: GenMat t => Matrix t -> Matrix t | ||
106 | inv m | square m = m `linearSolve` ident (rows m) | ||
107 | | otherwise = error "inv of nonsquare matrix" | ||
108 | |||
109 | pinv :: GenMat t => Matrix t -> Matrix t | ||
110 | pinv m = linearSolveSVD m (ident (rows m)) | ||
111 | |||
112 | full :: Field t | ||
113 | => (Matrix t -> (Matrix t, Vector Double, Matrix t)) -> Matrix t -> (Matrix t, Matrix Double, Matrix t) | ||
114 | full svd m = (u, d ,v) where | ||
115 | (u,s,v) = svd m | ||
116 | d = diagRect s r c | ||
117 | r = rows m | ||
118 | c = cols m | ||
119 | |||
120 | economy :: Field t | ||
121 | => (Matrix t -> (Matrix t, Vector Double, Matrix t)) -> Matrix t -> (Matrix t, Vector Double, Matrix t) | ||
122 | economy svd m = (u', subVector 0 d s, v') where | ||
123 | (u,s,v) = svd m | ||
124 | sl@(g:_) = toList (complex s) | ||
125 | s' = fromList . filter rec $ sl | ||
126 | rec x = magnitude x > magnitude g*tol | ||
127 | t = 1 | ||
128 | tol = (fromIntegral (max (rows m) (cols m)) * magnitude g * t * eps) | ||
129 | r = rows m | ||
130 | c = cols m | ||
131 | d = dim s' | ||
132 | u' = takeColumns d u | ||
133 | v' = takeColumns d v | ||
134 | |||
135 | |||
136 | -- | The machine precision of a Double: @eps == 2.22044604925031e-16@ (the value used by GNU-Octave). | ||
137 | eps :: Double | ||
138 | eps = 2.22044604925031e-16 | ||
139 | |||
140 | -- | The imaginary unit: @i == 0.0 :+ 1.0@ | ||
141 | i :: Complex Double | ||
142 | i = 0:+1 | ||
143 | |||
144 | |||
145 | -- | matrix product | ||
146 | mXm :: (Num t, GenMat t) => Matrix t -> Matrix t -> Matrix t | ||
147 | mXm = multiply | ||
148 | |||
149 | -- | matrix - vector product | ||
150 | mXv :: (Num t, GenMat t) => Matrix t -> Vector t -> Vector t | ||
151 | mXv m v = flatten $ m `mXm` (asColumn v) | ||
152 | |||
153 | -- | vector - matrix product | ||
154 | vXm :: (Num t, GenMat t) => Vector t -> Matrix t -> Vector t | ||
155 | vXm v m = flatten $ (asRow v) `mXm` m | ||
156 | |||
157 | |||
158 | --------------------------------------------------------------------------- | ||
159 | |||
160 | norm2 :: Vector Double -> Double | ||
161 | norm2 = toScalarR Norm2 | ||
162 | |||
163 | norm1 :: Vector Double -> Double | ||
164 | norm1 = toScalarR AbsSum | ||
165 | |||
166 | data NormType = Infinity | PNorm1 | PNorm2 -- PNorm Int | ||
167 | |||
168 | pnormRV PNorm2 = norm2 | ||
169 | pnormRV PNorm1 = norm1 | ||
170 | pnormRV Infinity = vectorMax . vectorMapR Abs | ||
171 | --pnormRV _ = error "pnormRV not yet defined" | ||
172 | |||
173 | pnormCV PNorm2 = norm2 . asReal | ||
174 | pnormCV PNorm1 = norm1 . liftVector magnitude | ||
175 | pnormCV Infinity = vectorMax . liftVector magnitude | ||
176 | --pnormCV _ = error "pnormCV not yet defined" | ||
177 | |||
178 | pnormRM PNorm2 m = head (toList s) where (_,s,_) = svdR m | ||
179 | pnormRM PNorm1 m = vectorMax $ constant 1 (rows m) `vXm` liftMatrix (vectorMapR Abs) m | ||
180 | pnormRM Infinity m = vectorMax $ liftMatrix (vectorMapR Abs) m `mXv` constant 1 (cols m) | ||
181 | --pnormRM _ _ = error "p norm not yet defined" | ||
182 | |||
183 | pnormCM PNorm2 m = head (toList s) where (_,s,_) = svdC m | ||
184 | pnormCM PNorm1 m = vectorMax $ constant 1 (rows m) `vXm` liftMatrix (liftVector magnitude) m | ||
185 | pnormCM Infinity m = vectorMax $ liftMatrix (liftVector magnitude) m `mXv` constant 1 (cols m) | ||
186 | --pnormCM _ _ = error "p norm not yet defined" | ||
187 | |||
188 | -- -- | computes the p-norm of a matrix or vector (with the same definitions as GNU-octave). pnorm 0 denotes \\inf-norm. See also 'norm'. | ||
189 | --pnorm :: (Container t, GenMat a) => Int -> t a -> Double | ||
190 | --pnorm = pnormG | ||
191 | |||
192 | class Normed t where | ||
193 | pnorm :: NormType -> t -> Double | ||
194 | norm :: t -> Double | ||
195 | norm = pnorm PNorm2 | ||
196 | |||
197 | instance Normed (Vector Double) where | ||
198 | pnorm = pnormRV | ||
199 | |||
200 | instance Normed (Vector (Complex Double)) where | ||
201 | pnorm = pnormCV | ||
202 | |||
203 | instance Normed (Matrix Double) where | ||
204 | pnorm = pnormRM | ||
205 | |||
206 | instance Normed (Matrix (Complex Double)) where | ||
207 | pnorm = pnormCM | ||
208 | |||
209 | ----------------------------------------------------------------------- | ||
210 | |||
211 | -- | The nullspace of a matrix from its SVD decomposition. | ||
212 | nullspacePrec :: GenMat t | ||
213 | => Double -- ^ relative tolerance in 'eps' units | ||
214 | -> Matrix t -- ^ input matrix | ||
215 | -> [Vector t] -- ^ list of unitary vectors spanning the nullspace | ||
216 | nullspacePrec t m = ns where | ||
217 | (_,s,v) = svd m | ||
218 | sl@(g:_) = toList s | ||
219 | tol = (fromIntegral (max (rows m) (cols m)) * g * t * eps) | ||
220 | rank = length (filter (> g*tol) sl) | ||
221 | -- ns = drop rank (toColumns v) | ||
222 | ns = drop rank $ toRows $ ctrans v | ||
223 | |||
224 | -- | The nullspace of a matrix, assumed to be one-dimensional, with default tolerance (shortcut for @last . nullspacePrec 1@). | ||
225 | nullVector :: GenMat t => Matrix t -> Vector t | ||
226 | nullVector = last . nullspacePrec 1 | ||
227 | |||
228 | ------------------------------------------------------------------------ | ||
229 | |||
230 | {- Pseudoinverse of a real matrix with the desired tolerance, expressed as a | ||
231 | multiplicative factor of the default tolerance used by GNU-Octave (see 'pinv'). | ||
232 | |||
233 | @\> let m = 'fromLists' [[1,0, 0] | ||
234 | ,[0,1, 0] | ||
235 | ,[0,0,1e-10]] | ||
236 | \ | ||
237 | \> 'pinv' m | ||
238 | 1. 0. 0. | ||
239 | 0. 1. 0. | ||
240 | 0. 0. 10000000000. | ||
241 | \ | ||
242 | \> pinvTol 1E8 m | ||
243 | 1. 0. 0. | ||
244 | 0. 1. 0. | ||
245 | 0. 0. 1.@ | ||
246 | |||
247 | -} | ||
248 | --pinvTol :: Double -> Matrix Double -> Matrix Double | ||
249 | pinvTol t m = v' `mXm` diag s' `mXm` trans u' where | ||
250 | (u,s,v) = svdR m | ||
251 | sl@(g:_) = toList s | ||
252 | s' = fromList . map rec $ sl | ||
253 | rec x = if x < g*tol then 1 else 1/x | ||
254 | tol = (fromIntegral (max (rows m) (cols m)) * g * t * eps) | ||
255 | r = rows m | ||
256 | c = cols m | ||
257 | d = dim s | ||
258 | u' = takeColumns d u | ||
259 | v' = takeColumns d v | ||
diff --git a/lib/Numeric/LinearAlgebra/Instances.hs b/lib/Numeric/LinearAlgebra/Instances.hs new file mode 100644 index 0000000..388f3da --- /dev/null +++ b/lib/Numeric/LinearAlgebra/Instances.hs | |||
@@ -0,0 +1,140 @@ | |||
1 | {-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | {- | | ||
4 | Module : Numeric.LinearAlgebra.Instances | ||
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 : portable | ||
11 | |||
12 | Numeric instances for Vector and Matrix. | ||
13 | |||
14 | In the context of the standard numeric operators, one-component vectors and matrices automatically expand to match the dimensions of the other operand. | ||
15 | |||
16 | -} | ||
17 | ----------------------------------------------------------------------------- | ||
18 | |||
19 | module Numeric.LinearAlgebra.Instances( | ||
20 | ) where | ||
21 | |||
22 | import Numeric.LinearAlgebra.Linear | ||
23 | import Numeric.GSL.Vector | ||
24 | import Data.Packed.Matrix | ||
25 | import Data.Packed.Vector | ||
26 | import Complex | ||
27 | |||
28 | adaptScalar f1 f2 f3 x y | ||
29 | | dim x == 1 = f1 (x@>0) y | ||
30 | | dim y == 1 = f3 x (y@>0) | ||
31 | | otherwise = f2 x y | ||
32 | |||
33 | liftMatrix2' :: (Field t, Field a, Field b) => (Vector a -> Vector b -> Vector t) -> Matrix a -> Matrix b -> Matrix t | ||
34 | liftMatrix2' f m1 m2 | compat' m1 m2 = reshape (max (cols m1) (cols m2)) (f (flatten m1) (flatten m2)) | ||
35 | | otherwise = error "nonconformant matrices in liftMatrix2'" | ||
36 | |||
37 | compat' :: Matrix a -> Matrix b -> Bool | ||
38 | compat' m1 m2 = rows m1 == 1 && cols m1 == 1 | ||
39 | || rows m2 == 1 && cols m2 == 1 | ||
40 | || rows m1 == rows m2 && cols m1 == cols m2 | ||
41 | |||
42 | instance (Eq a, Field a) => Eq (Vector a) where | ||
43 | a == b = dim a == dim b && toList a == toList b | ||
44 | |||
45 | instance (Linear Vector a) => Num (Vector a) where | ||
46 | (+) = adaptScalar addConstant add (flip addConstant) | ||
47 | negate = scale (-1) | ||
48 | (*) = adaptScalar scale mul (flip scale) | ||
49 | signum = liftVector signum | ||
50 | abs = liftVector abs | ||
51 | fromInteger = fromList . return . fromInteger | ||
52 | |||
53 | instance (Eq a, Field a) => Eq (Matrix a) where | ||
54 | a == b = cols a == cols b && flatten a == flatten b | ||
55 | |||
56 | instance (Linear Vector a) => Num (Matrix a) where | ||
57 | (+) = liftMatrix2' (+) | ||
58 | (-) = liftMatrix2' (-) | ||
59 | negate = liftMatrix negate | ||
60 | (*) = liftMatrix2' (*) | ||
61 | signum = liftMatrix signum | ||
62 | abs = liftMatrix abs | ||
63 | fromInteger = (1><1) . return . fromInteger | ||
64 | |||
65 | --------------------------------------------------- | ||
66 | |||
67 | instance (Linear Vector a) => Fractional (Vector a) where | ||
68 | fromRational n = fromList [fromRational n] | ||
69 | (/) = adaptScalar f divide g where | ||
70 | r `f` v = scaleRecip r v | ||
71 | v `g` r = scale (recip r) v | ||
72 | |||
73 | ------------------------------------------------------- | ||
74 | |||
75 | instance (Linear Vector a, Fractional (Vector a)) => Fractional (Matrix a) where | ||
76 | fromRational n = (1><1) [fromRational n] | ||
77 | (/) = liftMatrix2' (/) | ||
78 | |||
79 | --------------------------------------------------------- | ||
80 | |||
81 | instance Floating (Vector Double) where | ||
82 | sin = vectorMapR Sin | ||
83 | cos = vectorMapR Cos | ||
84 | tan = vectorMapR Tan | ||
85 | asin = vectorMapR ASin | ||
86 | acos = vectorMapR ACos | ||
87 | atan = vectorMapR ATan | ||
88 | sinh = vectorMapR Sinh | ||
89 | cosh = vectorMapR Cosh | ||
90 | tanh = vectorMapR Tanh | ||
91 | asinh = vectorMapR ASinh | ||
92 | acosh = vectorMapR ACosh | ||
93 | atanh = vectorMapR ATanh | ||
94 | exp = vectorMapR Exp | ||
95 | log = vectorMapR Log | ||
96 | sqrt = vectorMapR Sqrt | ||
97 | (**) = adaptScalar (vectorMapValR PowSV) (vectorZipR Pow) (flip (vectorMapValR PowVS)) | ||
98 | pi = fromList [pi] | ||
99 | |||
100 | ------------------------------------------------------------- | ||
101 | |||
102 | instance Floating (Vector (Complex Double)) where | ||
103 | sin = vectorMapC Sin | ||
104 | cos = vectorMapC Cos | ||
105 | tan = vectorMapC Tan | ||
106 | asin = vectorMapC ASin | ||
107 | acos = vectorMapC ACos | ||
108 | atan = vectorMapC ATan | ||
109 | sinh = vectorMapC Sinh | ||
110 | cosh = vectorMapC Cosh | ||
111 | tanh = vectorMapC Tanh | ||
112 | asinh = vectorMapC ASinh | ||
113 | acosh = vectorMapC ACosh | ||
114 | atanh = vectorMapC ATanh | ||
115 | exp = vectorMapC Exp | ||
116 | log = vectorMapC Log | ||
117 | sqrt = vectorMapC Sqrt | ||
118 | (**) = adaptScalar (vectorMapValC PowSV) (vectorZipC Pow) (flip (vectorMapValC PowVS)) | ||
119 | pi = fromList [pi] | ||
120 | |||
121 | ----------------------------------------------------------- | ||
122 | |||
123 | instance (Linear Vector a, Floating (Vector a)) => Floating (Matrix a) where | ||
124 | sin = liftMatrix sin | ||
125 | cos = liftMatrix cos | ||
126 | tan = liftMatrix tan | ||
127 | asin = liftMatrix asin | ||
128 | acos = liftMatrix acos | ||
129 | atan = liftMatrix atan | ||
130 | sinh = liftMatrix sinh | ||
131 | cosh = liftMatrix cosh | ||
132 | tanh = liftMatrix tanh | ||
133 | asinh = liftMatrix asinh | ||
134 | acosh = liftMatrix acosh | ||
135 | atanh = liftMatrix atanh | ||
136 | exp = liftMatrix exp | ||
137 | log = liftMatrix log | ||
138 | (**) = liftMatrix2' (**) | ||
139 | sqrt = liftMatrix sqrt | ||
140 | pi = (1><1) [pi] | ||
diff --git a/lib/Numeric/LinearAlgebra/Interface.hs b/lib/Numeric/LinearAlgebra/Interface.hs new file mode 100644 index 0000000..5bd207a --- /dev/null +++ b/lib/Numeric/LinearAlgebra/Interface.hs | |||
@@ -0,0 +1,106 @@ | |||
1 | {-# OPTIONS_GHC -fglasgow-exts #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | {- | | ||
4 | Module : Numeric.LinearAlgebra.Interface | ||
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 : portable | ||
11 | |||
12 | Operators for frequent operations. | ||
13 | |||
14 | -} | ||
15 | ----------------------------------------------------------------------------- | ||
16 | |||
17 | module Numeric.LinearAlgebra.Interface( | ||
18 | (<>),(<.>), | ||
19 | (<\>), | ||
20 | (.*),(*/), | ||
21 | (<|>),(<->), | ||
22 | ) where | ||
23 | |||
24 | import Numeric.LinearAlgebra.Linear | ||
25 | import Data.Packed.Vector | ||
26 | import Data.Packed.Matrix | ||
27 | import Numeric.LinearAlgebra.Algorithms | ||
28 | |||
29 | class Mul a b c | a b -> c where | ||
30 | infixl 7 <> | ||
31 | -- | matrix product | ||
32 | (<>) :: Field t => a t -> b t -> c t | ||
33 | |||
34 | instance Mul Matrix Matrix Matrix where | ||
35 | (<>) = multiply | ||
36 | |||
37 | instance Mul Matrix Vector Vector where | ||
38 | (<>) m v = flatten $ m <> (asColumn v) | ||
39 | |||
40 | instance Mul Vector Matrix Vector where | ||
41 | (<>) v m = flatten $ (asRow v) <> m | ||
42 | |||
43 | --------------------------------------------------- | ||
44 | |||
45 | -- | @u \<.\> v = dot u v@ | ||
46 | (<.>) :: (Field t) => Vector t -> Vector t -> t | ||
47 | infixl 7 <.> | ||
48 | (<.>) = dot | ||
49 | |||
50 | ---------------------------------------------------- | ||
51 | |||
52 | -- | @x .* a = scale x a@ | ||
53 | (.*) :: (Linear c a) => a -> c a -> c a | ||
54 | infixl 7 .* | ||
55 | a .* x = scale a x | ||
56 | |||
57 | ---------------------------------------------------- | ||
58 | |||
59 | -- | @a *\/ x = scale (recip x) a@ | ||
60 | (*/) :: (Linear c a) => c a -> a -> c a | ||
61 | infixl 7 */ | ||
62 | v */ x = scale (recip x) v | ||
63 | |||
64 | -- | least squares solution of a linear system, similar to the \\ operator of Matlab\/Octave (based on linearSolveSVD). | ||
65 | (<\>) :: (GenMat a) => Matrix a -> Vector a -> Vector a | ||
66 | infixl 7 <\> | ||
67 | m <\> v = flatten (linearSolveSVD m (reshape 1 v)) | ||
68 | |||
69 | ------------------------------------------------ | ||
70 | |||
71 | class Joinable a b where | ||
72 | joinH :: Field t => a t -> b t -> Matrix t | ||
73 | joinV :: Field t => a t -> b t -> Matrix t | ||
74 | |||
75 | instance Joinable Matrix Matrix where | ||
76 | joinH m1 m2 = fromBlocks [[m1,m2]] | ||
77 | joinV m1 m2 = fromBlocks [[m1],[m2]] | ||
78 | |||
79 | instance Joinable Matrix Vector where | ||
80 | joinH m v = joinH m (asColumn v) | ||
81 | joinV m v = joinV m (asRow v) | ||
82 | |||
83 | instance Joinable Vector Matrix where | ||
84 | joinH v m = joinH (asColumn v) m | ||
85 | joinV v m = joinV (asRow v) m | ||
86 | |||
87 | infixl 4 <|> | ||
88 | infixl 3 <-> | ||
89 | |||
90 | {- | Horizontal concatenation of matrices and vectors: | ||
91 | |||
92 | @> (ident 3 \<-\> 3 * ident 3) \<|\> fromList [1..6.0] | ||
93 | (6><4) | ||
94 | [ 1.0, 0.0, 0.0, 1.0 | ||
95 | , 0.0, 1.0, 0.0, 2.0 | ||
96 | , 0.0, 0.0, 1.0, 3.0 | ||
97 | , 3.0, 0.0, 0.0, 4.0 | ||
98 | , 0.0, 3.0, 0.0, 5.0 | ||
99 | , 0.0, 0.0, 3.0, 6.0 ]@ | ||
100 | -} | ||
101 | (<|>) :: (Field t, Joinable a b) => a t -> b t -> Matrix t | ||
102 | a <|> b = joinH a b | ||
103 | |||
104 | -- | Vertical concatenation of matrices and vectors. | ||
105 | (<->) :: (Field t, Joinable a b) => a t -> b t -> Matrix t | ||
106 | a <-> b = joinV a b | ||
diff --git a/lib/Numeric/LinearAlgebra/LAPACK.hs b/lib/Numeric/LinearAlgebra/LAPACK.hs new file mode 100644 index 0000000..648e59f --- /dev/null +++ b/lib/Numeric/LinearAlgebra/LAPACK.hs | |||
@@ -0,0 +1,335 @@ | |||
1 | {-# OPTIONS_GHC -fglasgow-exts #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | -- | | ||
4 | -- Module : Numeric.LinearAlgebra.LAPACK | ||
5 | -- Copyright : (c) Alberto Ruiz 2006-7 | ||
6 | -- License : GPL-style | ||
7 | -- | ||
8 | -- Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
9 | -- Stability : provisional | ||
10 | -- Portability : portable (uses FFI) | ||
11 | -- | ||
12 | -- Wrappers for a few LAPACK functions (<http://www.netlib.org/lapack>). | ||
13 | -- | ||
14 | ----------------------------------------------------------------------------- | ||
15 | |||
16 | module Numeric.LinearAlgebra.LAPACK ( | ||
17 | svdR, svdRdd, svdC, | ||
18 | eigC, eigR, eigS, eigH, eigS', eigH', | ||
19 | linearSolveR, linearSolveC, | ||
20 | linearSolveLSR, linearSolveLSC, | ||
21 | linearSolveSVDR, linearSolveSVDC, | ||
22 | cholS, cholH, | ||
23 | qrR, qrC | ||
24 | ) where | ||
25 | |||
26 | import Data.Packed.Internal | ||
27 | import Data.Packed.Internal.Vector | ||
28 | import Data.Packed.Internal.Matrix | ||
29 | import Data.Packed.Vector | ||
30 | import Data.Packed.Matrix | ||
31 | import Numeric.GSL.Vector(vectorMapValR, FunCodeSV(Scale)) | ||
32 | import Complex | ||
33 | import Foreign | ||
34 | |||
35 | ----------------------------------------------------------------------------- | ||
36 | foreign import ccall "LAPACK/lapack-aux.h svd_l_R" dgesvd :: TMMVM | ||
37 | |||
38 | -- | Wrapper for LAPACK's /dgesvd/, which computes the full svd decomposition of a real matrix. | ||
39 | -- | ||
40 | -- @(u,s,v)=full svdR m@ so that @m=u \<\> s \<\> 'trans' v@. | ||
41 | svdR :: Matrix Double -> (Matrix Double, Vector Double, Matrix Double) | ||
42 | svdR x = unsafePerformIO $ do | ||
43 | u <- createMatrix ColumnMajor r r | ||
44 | s <- createVector (min r c) | ||
45 | v <- createMatrix ColumnMajor c c | ||
46 | dgesvd // mat fdat x // mat dat u // vec s // mat dat v // check "svdR" [fdat x] | ||
47 | return (u,s,trans v) | ||
48 | where r = rows x | ||
49 | c = cols x | ||
50 | ----------------------------------------------------------------------------- | ||
51 | foreign import ccall "LAPACK/lapack-aux.h svd_l_Rdd" dgesdd :: TMMVM | ||
52 | |||
53 | -- | Wrapper for LAPACK's /dgesvd/, which computes the full svd decomposition of a real matrix. | ||
54 | -- | ||
55 | -- @(u,s,v)=full svdRdd m@ so that @m=u \<\> s \<\> 'trans' v@. | ||
56 | svdRdd :: Matrix Double -> (Matrix Double, Vector Double, Matrix Double) | ||
57 | svdRdd x = unsafePerformIO $ do | ||
58 | u <- createMatrix ColumnMajor r r | ||
59 | s <- createVector (min r c) | ||
60 | v <- createMatrix ColumnMajor c c | ||
61 | dgesdd // mat fdat x // mat dat u // vec s // mat dat v // check "svdRdd" [fdat x] | ||
62 | return (u,s,trans v) | ||
63 | where r = rows x | ||
64 | c = cols x | ||
65 | |||
66 | ----------------------------------------------------------------------------- | ||
67 | foreign import ccall "LAPACK/lapack-aux.h svd_l_C" zgesvd :: TCMCMVCM | ||
68 | |||
69 | -- | Wrapper for LAPACK's /zgesvd/, which computes the full svd decomposition of a complex matrix. | ||
70 | -- | ||
71 | -- @(u,s,v)=full svdC m@ so that @m=u \<\> comp s \<\> 'trans' v@. | ||
72 | svdC :: Matrix (Complex Double) -> (Matrix (Complex Double), Vector Double, Matrix (Complex Double)) | ||
73 | svdC x = unsafePerformIO $ do | ||
74 | u <- createMatrix ColumnMajor r r | ||
75 | s <- createVector (min r c) | ||
76 | v <- createMatrix ColumnMajor c c | ||
77 | zgesvd // mat fdat x // mat dat u // vec s // mat dat v // check "svdC" [fdat x] | ||
78 | return (u,s,trans v) | ||
79 | where r = rows x | ||
80 | c = cols x | ||
81 | |||
82 | |||
83 | ----------------------------------------------------------------------------- | ||
84 | foreign import ccall "LAPACK/lapack-aux.h eig_l_C" zgeev :: TCMCMCVCM | ||
85 | |||
86 | -- | Wrapper for LAPACK's /zgeev/, which computes the eigenvalues and right eigenvectors of a general complex matrix: | ||
87 | -- | ||
88 | -- if @(l,v)=eigC m@ then @m \<\> v = v \<\> diag l@. | ||
89 | -- | ||
90 | -- The eigenvectors are the columns of v. | ||
91 | -- The eigenvalues are not sorted. | ||
92 | eigC :: Matrix (Complex Double) -> (Vector (Complex Double), Matrix (Complex Double)) | ||
93 | eigC m | ||
94 | | r == 1 = (fromList [cdat m `at` 0], singleton 1) | ||
95 | | otherwise = unsafePerformIO $ do | ||
96 | l <- createVector r | ||
97 | v <- createMatrix ColumnMajor r r | ||
98 | dummy <- createMatrix ColumnMajor 1 1 | ||
99 | zgeev // mat fdat m // mat dat dummy // vec l // mat dat v // check "eigC" [fdat m] | ||
100 | return (l,v) | ||
101 | where r = rows m | ||
102 | |||
103 | ----------------------------------------------------------------------------- | ||
104 | foreign import ccall "LAPACK/lapack-aux.h eig_l_R" dgeev :: TMMCVM | ||
105 | |||
106 | -- | Wrapper for LAPACK's /dgeev/, which computes the eigenvalues and right eigenvectors of a general real matrix: | ||
107 | -- | ||
108 | -- if @(l,v)=eigR m@ then @m \<\> v = v \<\> diag l@. | ||
109 | -- | ||
110 | -- The eigenvectors are the columns of v. | ||
111 | -- The eigenvalues are not sorted. | ||
112 | eigR :: Matrix Double -> (Vector (Complex Double), Matrix (Complex Double)) | ||
113 | eigR m = (s', v'') | ||
114 | where (s,v) = eigRaux m | ||
115 | s' = toComplex (subVector 0 r (asReal s), subVector r r (asReal s)) | ||
116 | v' = toRows $ trans v | ||
117 | v'' = fromColumns $ fixeig (toList s') v' | ||
118 | r = rows m | ||
119 | |||
120 | eigRaux :: Matrix Double -> (Vector (Complex Double), Matrix Double) | ||
121 | eigRaux m | ||
122 | | r == 1 = (fromList [(cdat m `at` 0):+0], singleton 1) | ||
123 | | otherwise = unsafePerformIO $ do | ||
124 | l <- createVector r | ||
125 | v <- createMatrix ColumnMajor r r | ||
126 | dummy <- createMatrix ColumnMajor 1 1 | ||
127 | dgeev // mat fdat m // mat dat dummy // vec l // mat dat v // check "eigR" [fdat m] | ||
128 | return (l,v) | ||
129 | where r = rows m | ||
130 | |||
131 | fixeig [] _ = [] | ||
132 | fixeig [r] [v] = [comp v] | ||
133 | fixeig ((r1:+i1):(r2:+i2):r) (v1:v2:vs) | ||
134 | | r1 == r2 && i1 == (-i2) = toComplex (v1,v2) : toComplex (v1,scale (-1) v2) : fixeig r vs | ||
135 | | otherwise = comp v1 : fixeig ((r2:+i2):r) (v2:vs) | ||
136 | where scale = vectorMapValR Scale | ||
137 | |||
138 | ----------------------------------------------------------------------------- | ||
139 | foreign import ccall "LAPACK/lapack-aux.h eig_l_S" dsyev :: TMVM | ||
140 | |||
141 | -- | Wrapper for LAPACK's /dsyev/, which computes the eigenvalues and right eigenvectors of a symmetric real matrix: | ||
142 | -- | ||
143 | -- if @(l,v)=eigSl m@ then @m \<\> v = v \<\> diag l@. | ||
144 | -- | ||
145 | -- The eigenvectors are the columns of v. | ||
146 | -- The eigenvalues are sorted in descending order (use eigS' for ascending order). | ||
147 | eigS :: Matrix Double -> (Vector Double, Matrix Double) | ||
148 | eigS m = (s', fliprl v) | ||
149 | where (s,v) = eigS' m | ||
150 | s' = fromList . reverse . toList $ s | ||
151 | |||
152 | eigS' m | ||
153 | | r == 1 = (fromList [cdat m `at` 0], singleton 1) | ||
154 | | otherwise = unsafePerformIO $ do | ||
155 | l <- createVector r | ||
156 | v <- createMatrix ColumnMajor r r | ||
157 | dsyev // mat fdat m // vec l // mat dat v // check "eigS" [fdat m] | ||
158 | return (l,v) | ||
159 | where r = rows m | ||
160 | |||
161 | ----------------------------------------------------------------------------- | ||
162 | foreign import ccall "LAPACK/lapack-aux.h eig_l_H" zheev :: TCMVCM | ||
163 | |||
164 | -- | Wrapper for LAPACK's /zheev/, which computes the eigenvalues and right eigenvectors of a hermitian complex matrix: | ||
165 | -- | ||
166 | -- if @(l,v)=eigH m@ then @m \<\> s v = v \<\> diag l@. | ||
167 | -- | ||
168 | -- The eigenvectors are the columns of v. | ||
169 | -- The eigenvalues are sorted in descending order (use eigH' for ascending order). | ||
170 | eigH :: Matrix (Complex Double) -> (Vector Double, Matrix (Complex Double)) | ||
171 | eigH m = (s', fliprl v) | ||
172 | where (s,v) = eigH' m | ||
173 | s' = fromList . reverse . toList $ s | ||
174 | |||
175 | eigH' m | ||
176 | | r == 1 = (fromList [realPart (cdat m `at` 0)], singleton 1) | ||
177 | | otherwise = unsafePerformIO $ do | ||
178 | l <- createVector r | ||
179 | v <- createMatrix ColumnMajor r r | ||
180 | zheev // mat fdat m // vec l // mat dat v // check "eigH" [fdat m] | ||
181 | return (l,v) | ||
182 | where r = rows m | ||
183 | |||
184 | ----------------------------------------------------------------------------- | ||
185 | foreign import ccall "LAPACK/lapack-aux.h linearSolveR_l" dgesv :: TMMM | ||
186 | |||
187 | -- | Wrapper for LAPACK's /dgesv/, which solves a general real linear system (for several right-hand sides) internally using the lu decomposition. | ||
188 | linearSolveR :: Matrix Double -> Matrix Double -> Matrix Double | ||
189 | linearSolveR a b | ||
190 | | n1==n2 && n1==r = unsafePerformIO $ do | ||
191 | s <- createMatrix ColumnMajor r c | ||
192 | dgesv // mat fdat a // mat fdat b // mat dat s // check "linearSolveR" [fdat a, fdat b] | ||
193 | return s | ||
194 | | otherwise = error "linearSolveR of nonsquare matrix" | ||
195 | where n1 = rows a | ||
196 | n2 = cols a | ||
197 | r = rows b | ||
198 | c = cols b | ||
199 | |||
200 | ----------------------------------------------------------------------------- | ||
201 | foreign import ccall "LAPACK/lapack-aux.h linearSolveC_l" zgesv :: TCMCMCM | ||
202 | |||
203 | -- | Wrapper for LAPACK's /zgesv/, which solves a general complex linear system (for several right-hand sides) internally using the lu decomposition. | ||
204 | linearSolveC :: Matrix (Complex Double) -> Matrix (Complex Double) -> Matrix (Complex Double) | ||
205 | linearSolveC a b | ||
206 | | n1==n2 && n1==r = unsafePerformIO $ do | ||
207 | s <- createMatrix ColumnMajor r c | ||
208 | zgesv // mat fdat a // mat fdat b // mat dat s // check "linearSolveC" [fdat a, fdat b] | ||
209 | return s | ||
210 | | otherwise = error "linearSolveC of nonsquare matrix" | ||
211 | where n1 = rows a | ||
212 | n2 = cols a | ||
213 | r = rows b | ||
214 | c = cols b | ||
215 | |||
216 | ----------------------------------------------------------------------------------- | ||
217 | foreign import ccall "LAPACK/lapack-aux.h linearSolveLSR_l" dgels :: TMMM | ||
218 | |||
219 | -- | Wrapper for LAPACK's /dgels/, which obtains the least squared error solution of an overconstrained real linear system or the minimum norm solution of an underdetermined system, for several right-hand sides. For rank deficient systems use 'linearSolveSVDR'. | ||
220 | linearSolveLSR :: Matrix Double -> Matrix Double -> Matrix Double | ||
221 | linearSolveLSR a b = subMatrix (0,0) (cols a, cols b) $ linearSolveLSR_l a b | ||
222 | |||
223 | linearSolveLSR_l a b = unsafePerformIO $ do | ||
224 | r <- createMatrix ColumnMajor (max m n) nrhs | ||
225 | dgels // mat fdat a // mat fdat b // mat dat r // check "linearSolveLSR" [fdat a, fdat b] | ||
226 | return r | ||
227 | where m = rows a | ||
228 | n = cols a | ||
229 | nrhs = cols b | ||
230 | |||
231 | ----------------------------------------------------------------------------------- | ||
232 | foreign import ccall "LAPACK/lapack-aux.h linearSolveLSC_l" zgels :: TCMCMCM | ||
233 | |||
234 | -- | Wrapper for LAPACK's /zgels/, which obtains the least squared error solution of an overconstrained complex linear system or the minimum norm solution of an underdetermined system, for several right-hand sides. For rank deficient systems use 'linearSolveSVDC'. | ||
235 | linearSolveLSC :: Matrix (Complex Double) -> Matrix (Complex Double) -> Matrix (Complex Double) | ||
236 | linearSolveLSC a b = subMatrix (0,0) (cols a, cols b) $ linearSolveLSC_l a b | ||
237 | |||
238 | linearSolveLSC_l a b = unsafePerformIO $ do | ||
239 | r <- createMatrix ColumnMajor (max m n) nrhs | ||
240 | zgels // mat fdat a // mat fdat b // mat dat r // check "linearSolveLSC" [fdat a, fdat b] | ||
241 | return r | ||
242 | where m = rows a | ||
243 | n = cols a | ||
244 | nrhs = cols b | ||
245 | |||
246 | ----------------------------------------------------------------------------------- | ||
247 | foreign import ccall "LAPACK/lapack-aux.h linearSolveSVDR_l" dgelss :: Double -> TMMM | ||
248 | |||
249 | -- | Wrapper for LAPACK's /dgelss/, which obtains the minimum norm solution to a real linear least squares problem Ax=B using the svd, for several right-hand sides. Admits rank deficient systems but it is slower than 'linearSolveLSR'. The effective rank of A is determined by treating as zero those singular valures which are less than rcond times the largest singular value. If rcond == Nothing machine precision is used. | ||
250 | linearSolveSVDR :: Maybe Double -- ^ rcond | ||
251 | -> Matrix Double -- ^ coefficient matrix | ||
252 | -> Matrix Double -- ^ right hand sides (as columns) | ||
253 | -> Matrix Double -- ^ solution vectors (as columns) | ||
254 | linearSolveSVDR (Just rcond) a b = subMatrix (0,0) (cols a, cols b) $ linearSolveSVDR_l rcond a b | ||
255 | linearSolveSVDR Nothing a b = linearSolveSVDR (Just (-1)) a b | ||
256 | |||
257 | linearSolveSVDR_l rcond a b = unsafePerformIO $ do | ||
258 | r <- createMatrix ColumnMajor (max m n) nrhs | ||
259 | dgelss rcond // mat fdat a // mat fdat b // mat dat r // check "linearSolveSVDR" [fdat a, fdat b] | ||
260 | return r | ||
261 | where m = rows a | ||
262 | n = cols a | ||
263 | nrhs = cols b | ||
264 | |||
265 | ----------------------------------------------------------------------------------- | ||
266 | foreign import ccall "LAPACK/lapack-aux.h linearSolveSVDC_l" zgelss :: Double -> TCMCMCM | ||
267 | |||
268 | -- | Wrapper for LAPACK's /zgelss/, which obtains the minimum norm solution to a complex linear least squares problem Ax=B using the svd, for several right-hand sides. Admits rank deficient systems but it is slower than 'linearSolveLSC'. The effective rank of A is determined by treating as zero those singular valures which are less than rcond times the largest singular value. If rcond == Nothing machine precision is used. | ||
269 | linearSolveSVDC :: Maybe Double -- ^ rcond | ||
270 | -> Matrix (Complex Double) -- ^ coefficient matrix | ||
271 | -> Matrix (Complex Double) -- ^ right hand sides (as columns) | ||
272 | -> Matrix (Complex Double) -- ^ solution vectors (as columns) | ||
273 | linearSolveSVDC (Just rcond) a b = subMatrix (0,0) (cols a, cols b) $ linearSolveSVDC_l rcond a b | ||
274 | linearSolveSVDC Nothing a b = linearSolveSVDC (Just (-1)) a b | ||
275 | |||
276 | linearSolveSVDC_l rcond a b = unsafePerformIO $ do | ||
277 | r <- createMatrix ColumnMajor (max m n) nrhs | ||
278 | zgelss rcond // mat fdat a // mat fdat b // mat dat r // check "linearSolveSVDC" [fdat a, fdat b] | ||
279 | return r | ||
280 | where m = rows a | ||
281 | n = cols a | ||
282 | nrhs = cols b | ||
283 | |||
284 | ----------------------------------------------------------------------------------- | ||
285 | foreign import ccall "LAPACK/lapack-aux.h chol_l_H" zpotrf :: TCMCM | ||
286 | |||
287 | -- | Wrapper for LAPACK's /zpotrf/,which computes the Cholesky factorization of a | ||
288 | -- complex Hermitian positive definite matrix. | ||
289 | cholH :: Matrix (Complex Double) -> Matrix (Complex Double) | ||
290 | cholH a = unsafePerformIO $ do | ||
291 | r <- createMatrix ColumnMajor n n | ||
292 | zpotrf // mat fdat a // mat dat r // check "cholH" [fdat a] | ||
293 | return r | ||
294 | where n = rows a | ||
295 | |||
296 | ----------------------------------------------------------------------------------- | ||
297 | foreign import ccall "LAPACK/lapack-aux.h chol_l_S" dpotrf :: TMM | ||
298 | |||
299 | -- | Wrapper for LAPACK's /dpotrf/,which computes the Cholesky factorization of a | ||
300 | -- real symmetric positive definite matrix. | ||
301 | cholS :: Matrix Double -> Matrix Double | ||
302 | cholS a = unsafePerformIO $ do | ||
303 | r <- createMatrix ColumnMajor n n | ||
304 | dpotrf // mat fdat a // mat dat r // check "cholS" [fdat a] | ||
305 | return r | ||
306 | where n = rows a | ||
307 | |||
308 | ----------------------------------------------------------------------------------- | ||
309 | foreign import ccall "LAPACK/lapack-aux.h qr_l_R" dgeqr2 :: TMVM | ||
310 | |||
311 | -- | Wrapper for LAPACK's /dgeqr2/,which computes a QR factorization of a real matrix. | ||
312 | qrR :: Matrix Double -> (Matrix Double, Vector Double) | ||
313 | qrR a = unsafePerformIO $ do | ||
314 | r <- createMatrix ColumnMajor m n | ||
315 | tau <- createVector mn | ||
316 | dgeqr2 // mat fdat a // vec tau // mat dat r // check "qrR" [fdat a] | ||
317 | return (r,tau) | ||
318 | where m = rows a | ||
319 | n = cols a | ||
320 | mn = min m n | ||
321 | |||
322 | ----------------------------------------------------------------------------------- | ||
323 | foreign import ccall "LAPACK/lapack-aux.h qr_l_C" zgeqr2 :: TCMCVCM | ||
324 | |||
325 | -- | Wrapper for LAPACK's /zgeqr2/,which computes a QR factorization of a complex matrix. | ||
326 | qrC :: Matrix (Complex Double) -> (Matrix (Complex Double), Vector (Complex Double)) | ||
327 | qrC a = unsafePerformIO $ do | ||
328 | r <- createMatrix ColumnMajor m n | ||
329 | tau <- createVector mn | ||
330 | zgeqr2 // mat fdat a // vec tau // mat dat r // check "qrC" [fdat a] | ||
331 | return (r,tau) | ||
332 | where m = rows a | ||
333 | n = cols a | ||
334 | mn = min m n | ||
335 | |||
diff --git a/lib/Numeric/LinearAlgebra/LAPACK/clapack.h b/lib/Numeric/LinearAlgebra/LAPACK/clapack.h new file mode 100644 index 0000000..cad9a4c --- /dev/null +++ b/lib/Numeric/LinearAlgebra/LAPACK/clapack.h | |||
@@ -0,0 +1,5079 @@ | |||
1 | #ifndef __CLAPACK_H | ||
2 | #define __CLAPACK_H | ||
3 | |||
4 | /* Subroutine */ int cbdsqr_(char *uplo, integer *n, integer *ncvt, integer * | ||
5 | nru, integer *ncc, real *d__, real *e, complex *vt, integer *ldvt, | ||
6 | complex *u, integer *ldu, complex *c__, integer *ldc, real *rwork, | ||
7 | integer *info); | ||
8 | |||
9 | /* Subroutine */ int cgbbrd_(char *vect, integer *m, integer *n, integer *ncc, | ||
10 | integer *kl, integer *ku, complex *ab, integer *ldab, real *d__, | ||
11 | real *e, complex *q, integer *ldq, complex *pt, integer *ldpt, | ||
12 | complex *c__, integer *ldc, complex *work, real *rwork, integer *info); | ||
13 | |||
14 | /* Subroutine */ int cgbcon_(char *norm, integer *n, integer *kl, integer *ku, | ||
15 | complex *ab, integer *ldab, integer *ipiv, real *anorm, real *rcond, | ||
16 | complex *work, real *rwork, integer *info); | ||
17 | |||
18 | /* Subroutine */ int cgbequ_(integer *m, integer *n, integer *kl, integer *ku, | ||
19 | complex *ab, integer *ldab, real *r__, real *c__, real *rowcnd, real | ||
20 | *colcnd, real *amax, integer *info); | ||
21 | |||
22 | /* Subroutine */ int cgbrfs_(char *trans, integer *n, integer *kl, integer * | ||
23 | ku, integer *nrhs, complex *ab, integer *ldab, complex *afb, integer * | ||
24 | ldafb, integer *ipiv, complex *b, integer *ldb, complex *x, integer * | ||
25 | ldx, real *ferr, real *berr, complex *work, real *rwork, integer * | ||
26 | info); | ||
27 | |||
28 | /* Subroutine */ int cgbsv_(integer *n, integer *kl, integer *ku, integer * | ||
29 | nrhs, complex *ab, integer *ldab, integer *ipiv, complex *b, integer * | ||
30 | ldb, integer *info); | ||
31 | |||
32 | /* Subroutine */ int cgbsvx_(char *fact, char *trans, integer *n, integer *kl, | ||
33 | integer *ku, integer *nrhs, complex *ab, integer *ldab, complex *afb, | ||
34 | integer *ldafb, integer *ipiv, char *equed, real *r__, real *c__, | ||
35 | complex *b, integer *ldb, complex *x, integer *ldx, real *rcond, real | ||
36 | *ferr, real *berr, complex *work, real *rwork, integer *info); | ||
37 | |||
38 | /* Subroutine */ int cgbtf2_(integer *m, integer *n, integer *kl, integer *ku, | ||
39 | complex *ab, integer *ldab, integer *ipiv, integer *info); | ||
40 | |||
41 | /* Subroutine */ int cgbtrf_(integer *m, integer *n, integer *kl, integer *ku, | ||
42 | complex *ab, integer *ldab, integer *ipiv, integer *info); | ||
43 | |||
44 | /* Subroutine */ int cgbtrs_(char *trans, integer *n, integer *kl, integer * | ||
45 | ku, integer *nrhs, complex *ab, integer *ldab, integer *ipiv, complex | ||
46 | *b, integer *ldb, integer *info); | ||
47 | |||
48 | /* Subroutine */ int cgebak_(char *job, char *side, integer *n, integer *ilo, | ||
49 | integer *ihi, real *scale, integer *m, complex *v, integer *ldv, | ||
50 | integer *info); | ||
51 | |||
52 | /* Subroutine */ int cgebal_(char *job, integer *n, complex *a, integer *lda, | ||
53 | integer *ilo, integer *ihi, real *scale, integer *info); | ||
54 | |||
55 | /* Subroutine */ int cgebd2_(integer *m, integer *n, complex *a, integer *lda, | ||
56 | real *d__, real *e, complex *tauq, complex *taup, complex *work, | ||
57 | integer *info); | ||
58 | |||
59 | /* Subroutine */ int cgebrd_(integer *m, integer *n, complex *a, integer *lda, | ||
60 | real *d__, real *e, complex *tauq, complex *taup, complex *work, | ||
61 | integer *lwork, integer *info); | ||
62 | |||
63 | /* Subroutine */ int cgecon_(char *norm, integer *n, complex *a, integer *lda, | ||
64 | real *anorm, real *rcond, complex *work, real *rwork, integer *info); | ||
65 | |||
66 | /* Subroutine */ int cgeequ_(integer *m, integer *n, complex *a, integer *lda, | ||
67 | real *r__, real *c__, real *rowcnd, real *colcnd, real *amax, | ||
68 | integer *info); | ||
69 | |||
70 | /* Subroutine */ int cgees_(char *jobvs, char *sort, L_fp select, integer *n, | ||
71 | complex *a, integer *lda, integer *sdim, complex *w, complex *vs, | ||
72 | integer *ldvs, complex *work, integer *lwork, real *rwork, logical * | ||
73 | bwork, integer *info); | ||
74 | |||
75 | /* Subroutine */ int cgeesx_(char *jobvs, char *sort, L_fp select, char * | ||
76 | sense, integer *n, complex *a, integer *lda, integer *sdim, complex * | ||
77 | w, complex *vs, integer *ldvs, real *rconde, real *rcondv, complex * | ||
78 | work, integer *lwork, real *rwork, logical *bwork, integer *info); | ||
79 | |||
80 | /* Subroutine */ int cgeev_(char *jobvl, char *jobvr, integer *n, complex *a, | ||
81 | integer *lda, complex *w, complex *vl, integer *ldvl, complex *vr, | ||
82 | integer *ldvr, complex *work, integer *lwork, real *rwork, integer * | ||
83 | info); | ||
84 | |||
85 | /* Subroutine */ int cgeevx_(char *balanc, char *jobvl, char *jobvr, char * | ||
86 | sense, integer *n, complex *a, integer *lda, complex *w, complex *vl, | ||
87 | integer *ldvl, complex *vr, integer *ldvr, integer *ilo, integer *ihi, | ||
88 | real *scale, real *abnrm, real *rconde, real *rcondv, complex *work, | ||
89 | integer *lwork, real *rwork, integer *info); | ||
90 | |||
91 | /* Subroutine */ int cgegs_(char *jobvsl, char *jobvsr, integer *n, complex * | ||
92 | a, integer *lda, complex *b, integer *ldb, complex *alpha, complex * | ||
93 | beta, complex *vsl, integer *ldvsl, complex *vsr, integer *ldvsr, | ||
94 | complex *work, integer *lwork, real *rwork, integer *info); | ||
95 | |||
96 | /* Subroutine */ int cgegv_(char *jobvl, char *jobvr, integer *n, complex *a, | ||
97 | integer *lda, complex *b, integer *ldb, complex *alpha, complex *beta, | ||
98 | complex *vl, integer *ldvl, complex *vr, integer *ldvr, complex * | ||
99 | work, integer *lwork, real *rwork, integer *info); | ||
100 | |||
101 | /* Subroutine */ int cgehd2_(integer *n, integer *ilo, integer *ihi, complex * | ||
102 | a, integer *lda, complex *tau, complex *work, integer *info); | ||
103 | |||
104 | /* Subroutine */ int cgehrd_(integer *n, integer *ilo, integer *ihi, complex * | ||
105 | a, integer *lda, complex *tau, complex *work, integer *lwork, integer | ||
106 | *info); | ||
107 | |||
108 | /* Subroutine */ int cgelq2_(integer *m, integer *n, complex *a, integer *lda, | ||
109 | complex *tau, complex *work, integer *info); | ||
110 | |||
111 | /* Subroutine */ int cgelqf_(integer *m, integer *n, complex *a, integer *lda, | ||
112 | complex *tau, complex *work, integer *lwork, integer *info); | ||
113 | |||
114 | /* Subroutine */ int cgels_(char *trans, integer *m, integer *n, integer * | ||
115 | nrhs, complex *a, integer *lda, complex *b, integer *ldb, complex * | ||
116 | work, integer *lwork, integer *info); | ||
117 | |||
118 | /* Subroutine */ int cgelsx_(integer *m, integer *n, integer *nrhs, complex * | ||
119 | a, integer *lda, complex *b, integer *ldb, integer *jpvt, real *rcond, | ||
120 | integer *rank, complex *work, real *rwork, integer *info); | ||
121 | |||
122 | /* Subroutine */ int cgelsy_(integer *m, integer *n, integer *nrhs, complex * | ||
123 | a, integer *lda, complex *b, integer *ldb, integer *jpvt, real *rcond, | ||
124 | integer *rank, complex *work, integer *lwork, real *rwork, integer * | ||
125 | info); | ||
126 | |||
127 | /* Subroutine */ int cgeql2_(integer *m, integer *n, complex *a, integer *lda, | ||
128 | complex *tau, complex *work, integer *info); | ||
129 | |||
130 | /* Subroutine */ int cgeqlf_(integer *m, integer *n, complex *a, integer *lda, | ||
131 | complex *tau, complex *work, integer *lwork, integer *info); | ||
132 | |||
133 | /* Subroutine */ int cgeqp3_(integer *m, integer *n, complex *a, integer *lda, | ||
134 | integer *jpvt, complex *tau, complex *work, integer *lwork, real * | ||
135 | rwork, integer *info); | ||
136 | |||
137 | /* Subroutine */ int cgeqpf_(integer *m, integer *n, complex *a, integer *lda, | ||
138 | integer *jpvt, complex *tau, complex *work, real *rwork, integer * | ||
139 | info); | ||
140 | |||
141 | /* Subroutine */ int cgeqr2_(integer *m, integer *n, complex *a, integer *lda, | ||
142 | complex *tau, complex *work, integer *info); | ||
143 | |||
144 | /* Subroutine */ int cgeqrf_(integer *m, integer *n, complex *a, integer *lda, | ||
145 | complex *tau, complex *work, integer *lwork, integer *info); | ||
146 | |||
147 | /* Subroutine */ int cgerfs_(char *trans, integer *n, integer *nrhs, complex * | ||
148 | a, integer *lda, complex *af, integer *ldaf, integer *ipiv, complex * | ||
149 | b, integer *ldb, complex *x, integer *ldx, real *ferr, real *berr, | ||
150 | complex *work, real *rwork, integer *info); | ||
151 | |||
152 | /* Subroutine */ int cgerq2_(integer *m, integer *n, complex *a, integer *lda, | ||
153 | complex *tau, complex *work, integer *info); | ||
154 | |||
155 | /* Subroutine */ int cgerqf_(integer *m, integer *n, complex *a, integer *lda, | ||
156 | complex *tau, complex *work, integer *lwork, integer *info); | ||
157 | |||
158 | /* Subroutine */ int cgesc2_(integer *n, complex *a, integer *lda, complex * | ||
159 | rhs, integer *ipiv, integer *jpiv, real *scale); | ||
160 | |||
161 | /* Subroutine */ int cgesv_(integer *n, integer *nrhs, complex *a, integer * | ||
162 | lda, integer *ipiv, complex *b, integer *ldb, integer *info); | ||
163 | |||
164 | /* Subroutine */ int cgesvx_(char *fact, char *trans, integer *n, integer * | ||
165 | nrhs, complex *a, integer *lda, complex *af, integer *ldaf, integer * | ||
166 | ipiv, char *equed, real *r__, real *c__, complex *b, integer *ldb, | ||
167 | complex *x, integer *ldx, real *rcond, real *ferr, real *berr, | ||
168 | complex *work, real *rwork, integer *info); | ||
169 | |||
170 | /* Subroutine */ int cgetc2_(integer *n, complex *a, integer *lda, integer * | ||
171 | ipiv, integer *jpiv, integer *info); | ||
172 | |||
173 | /* Subroutine */ int cgetf2_(integer *m, integer *n, complex *a, integer *lda, | ||
174 | integer *ipiv, integer *info); | ||
175 | |||
176 | /* Subroutine */ int cgetrf_(integer *m, integer *n, complex *a, integer *lda, | ||
177 | integer *ipiv, integer *info); | ||
178 | |||
179 | /* Subroutine */ int cgetri_(integer *n, complex *a, integer *lda, integer * | ||
180 | ipiv, complex *work, integer *lwork, integer *info); | ||
181 | |||
182 | /* Subroutine */ int cgetrs_(char *trans, integer *n, integer *nrhs, complex * | ||
183 | a, integer *lda, integer *ipiv, complex *b, integer *ldb, integer * | ||
184 | info); | ||
185 | |||
186 | /* Subroutine */ int cggbak_(char *job, char *side, integer *n, integer *ilo, | ||
187 | integer *ihi, real *lscale, real *rscale, integer *m, complex *v, | ||
188 | integer *ldv, integer *info); | ||
189 | |||
190 | /* Subroutine */ int cggbal_(char *job, integer *n, complex *a, integer *lda, | ||
191 | complex *b, integer *ldb, integer *ilo, integer *ihi, real *lscale, | ||
192 | real *rscale, real *work, integer *info); | ||
193 | |||
194 | /* Subroutine */ int cgges_(char *jobvsl, char *jobvsr, char *sort, L_fp | ||
195 | selctg, integer *n, complex *a, integer *lda, complex *b, integer * | ||
196 | ldb, integer *sdim, complex *alpha, complex *beta, complex *vsl, | ||
197 | integer *ldvsl, complex *vsr, integer *ldvsr, complex *work, integer * | ||
198 | lwork, real *rwork, logical *bwork, integer *info); | ||
199 | |||
200 | /* Subroutine */ int cggesx_(char *jobvsl, char *jobvsr, char *sort, L_fp | ||
201 | selctg, char *sense, integer *n, complex *a, integer *lda, complex *b, | ||
202 | integer *ldb, integer *sdim, complex *alpha, complex *beta, complex * | ||
203 | vsl, integer *ldvsl, complex *vsr, integer *ldvsr, real *rconde, real | ||
204 | *rcondv, complex *work, integer *lwork, real *rwork, integer *iwork, | ||
205 | integer *liwork, logical *bwork, integer *info); | ||
206 | |||
207 | /* Subroutine */ int cggev_(char *jobvl, char *jobvr, integer *n, complex *a, | ||
208 | integer *lda, complex *b, integer *ldb, complex *alpha, complex *beta, | ||
209 | complex *vl, integer *ldvl, complex *vr, integer *ldvr, complex * | ||
210 | work, integer *lwork, real *rwork, integer *info); | ||
211 | |||
212 | /* Subroutine */ int cggevx_(char *balanc, char *jobvl, char *jobvr, char * | ||
213 | sense, integer *n, complex *a, integer *lda, complex *b, integer *ldb, | ||
214 | complex *alpha, complex *beta, complex *vl, integer *ldvl, complex * | ||
215 | vr, integer *ldvr, integer *ilo, integer *ihi, real *lscale, real * | ||
216 | rscale, real *abnrm, real *bbnrm, real *rconde, real *rcondv, complex | ||
217 | *work, integer *lwork, real *rwork, integer *iwork, logical *bwork, | ||
218 | integer *info); | ||
219 | |||
220 | /* Subroutine */ int cggglm_(integer *n, integer *m, integer *p, complex *a, | ||
221 | integer *lda, complex *b, integer *ldb, complex *d__, complex *x, | ||
222 | complex *y, complex *work, integer *lwork, integer *info); | ||
223 | |||
224 | /* Subroutine */ int cgghrd_(char *compq, char *compz, integer *n, integer * | ||
225 | ilo, integer *ihi, complex *a, integer *lda, complex *b, integer *ldb, | ||
226 | complex *q, integer *ldq, complex *z__, integer *ldz, integer *info); | ||
227 | |||
228 | /* Subroutine */ int cgglse_(integer *m, integer *n, integer *p, complex *a, | ||
229 | integer *lda, complex *b, integer *ldb, complex *c__, complex *d__, | ||
230 | complex *x, complex *work, integer *lwork, integer *info); | ||
231 | |||
232 | /* Subroutine */ int cggqrf_(integer *n, integer *m, integer *p, complex *a, | ||
233 | integer *lda, complex *taua, complex *b, integer *ldb, complex *taub, | ||
234 | complex *work, integer *lwork, integer *info); | ||
235 | |||
236 | /* Subroutine */ int cggrqf_(integer *m, integer *p, integer *n, complex *a, | ||
237 | integer *lda, complex *taua, complex *b, integer *ldb, complex *taub, | ||
238 | complex *work, integer *lwork, integer *info); | ||
239 | |||
240 | /* Subroutine */ int cggsvd_(char *jobu, char *jobv, char *jobq, integer *m, | ||
241 | integer *n, integer *p, integer *k, integer *l, complex *a, integer * | ||
242 | lda, complex *b, integer *ldb, real *alpha, real *beta, complex *u, | ||
243 | integer *ldu, complex *v, integer *ldv, complex *q, integer *ldq, | ||
244 | complex *work, real *rwork, integer *iwork, integer *info); | ||
245 | |||
246 | /* Subroutine */ int cggsvp_(char *jobu, char *jobv, char *jobq, integer *m, | ||
247 | integer *p, integer *n, complex *a, integer *lda, complex *b, integer | ||
248 | *ldb, real *tola, real *tolb, integer *k, integer *l, complex *u, | ||
249 | integer *ldu, complex *v, integer *ldv, complex *q, integer *ldq, | ||
250 | integer *iwork, real *rwork, complex *tau, complex *work, integer * | ||
251 | info); | ||
252 | |||
253 | /* Subroutine */ int cgtcon_(char *norm, integer *n, complex *dl, complex * | ||
254 | d__, complex *du, complex *du2, integer *ipiv, real *anorm, real * | ||
255 | rcond, complex *work, integer *info); | ||
256 | |||
257 | /* Subroutine */ int cgtrfs_(char *trans, integer *n, integer *nrhs, complex * | ||
258 | dl, complex *d__, complex *du, complex *dlf, complex *df, complex * | ||
259 | duf, complex *du2, integer *ipiv, complex *b, integer *ldb, complex * | ||
260 | x, integer *ldx, real *ferr, real *berr, complex *work, real *rwork, | ||
261 | integer *info); | ||
262 | |||
263 | /* Subroutine */ int cgtsv_(integer *n, integer *nrhs, complex *dl, complex * | ||
264 | d__, complex *du, complex *b, integer *ldb, integer *info); | ||
265 | |||
266 | /* Subroutine */ int cgtsvx_(char *fact, char *trans, integer *n, integer * | ||
267 | nrhs, complex *dl, complex *d__, complex *du, complex *dlf, complex * | ||
268 | df, complex *duf, complex *du2, integer *ipiv, complex *b, integer * | ||
269 | ldb, complex *x, integer *ldx, real *rcond, real *ferr, real *berr, | ||
270 | complex *work, real *rwork, integer *info); | ||
271 | |||
272 | /* Subroutine */ int cgttrf_(integer *n, complex *dl, complex *d__, complex * | ||
273 | du, complex *du2, integer *ipiv, integer *info); | ||
274 | |||
275 | /* Subroutine */ int cgttrs_(char *trans, integer *n, integer *nrhs, complex * | ||
276 | dl, complex *d__, complex *du, complex *du2, integer *ipiv, complex * | ||
277 | b, integer *ldb, integer *info); | ||
278 | |||
279 | /* Subroutine */ int cgtts2_(integer *itrans, integer *n, integer *nrhs, | ||
280 | complex *dl, complex *d__, complex *du, complex *du2, integer *ipiv, | ||
281 | complex *b, integer *ldb); | ||
282 | |||
283 | /* Subroutine */ int chbev_(char *jobz, char *uplo, integer *n, integer *kd, | ||
284 | complex *ab, integer *ldab, real *w, complex *z__, integer *ldz, | ||
285 | complex *work, real *rwork, integer *info); | ||
286 | |||
287 | /* Subroutine */ int chbevd_(char *jobz, char *uplo, integer *n, integer *kd, | ||
288 | complex *ab, integer *ldab, real *w, complex *z__, integer *ldz, | ||
289 | complex *work, integer *lwork, real *rwork, integer *lrwork, integer * | ||
290 | iwork, integer *liwork, integer *info); | ||
291 | |||
292 | /* Subroutine */ int chbevx_(char *jobz, char *range, char *uplo, integer *n, | ||
293 | integer *kd, complex *ab, integer *ldab, complex *q, integer *ldq, | ||
294 | real *vl, real *vu, integer *il, integer *iu, real *abstol, integer * | ||
295 | m, real *w, complex *z__, integer *ldz, complex *work, real *rwork, | ||
296 | integer *iwork, integer *ifail, integer *info); | ||
297 | |||
298 | /* Subroutine */ int chbgst_(char *vect, char *uplo, integer *n, integer *ka, | ||
299 | integer *kb, complex *ab, integer *ldab, complex *bb, integer *ldbb, | ||
300 | complex *x, integer *ldx, complex *work, real *rwork, integer *info); | ||
301 | |||
302 | /* Subroutine */ int chbgv_(char *jobz, char *uplo, integer *n, integer *ka, | ||
303 | integer *kb, complex *ab, integer *ldab, complex *bb, integer *ldbb, | ||
304 | real *w, complex *z__, integer *ldz, complex *work, real *rwork, | ||
305 | integer *info); | ||
306 | |||
307 | /* Subroutine */ int chbgvx_(char *jobz, char *range, char *uplo, integer *n, | ||
308 | integer *ka, integer *kb, complex *ab, integer *ldab, complex *bb, | ||
309 | integer *ldbb, complex *q, integer *ldq, real *vl, real *vu, integer * | ||
310 | il, integer *iu, real *abstol, integer *m, real *w, complex *z__, | ||
311 | integer *ldz, complex *work, real *rwork, integer *iwork, integer * | ||
312 | ifail, integer *info); | ||
313 | |||
314 | /* Subroutine */ int chbtrd_(char *vect, char *uplo, integer *n, integer *kd, | ||
315 | complex *ab, integer *ldab, real *d__, real *e, complex *q, integer * | ||
316 | ldq, complex *work, integer *info); | ||
317 | |||
318 | /* Subroutine */ int checon_(char *uplo, integer *n, complex *a, integer *lda, | ||
319 | integer *ipiv, real *anorm, real *rcond, complex *work, integer * | ||
320 | info); | ||
321 | |||
322 | /* Subroutine */ int cheev_(char *jobz, char *uplo, integer *n, complex *a, | ||
323 | integer *lda, real *w, complex *work, integer *lwork, real *rwork, | ||
324 | integer *info); | ||
325 | |||
326 | /* Subroutine */ int cheevd_(char *jobz, char *uplo, integer *n, complex *a, | ||
327 | integer *lda, real *w, complex *work, integer *lwork, real *rwork, | ||
328 | integer *lrwork, integer *iwork, integer *liwork, integer *info); | ||
329 | |||
330 | /* Subroutine */ int cheevr_(char *jobz, char *range, char *uplo, integer *n, | ||
331 | complex *a, integer *lda, real *vl, real *vu, integer *il, integer * | ||
332 | iu, real *abstol, integer *m, real *w, complex *z__, integer *ldz, | ||
333 | integer *isuppz, complex *work, integer *lwork, real *rwork, integer * | ||
334 | lrwork, integer *iwork, integer *liwork, integer *info); | ||
335 | |||
336 | /* Subroutine */ int cheevx_(char *jobz, char *range, char *uplo, integer *n, | ||
337 | complex *a, integer *lda, real *vl, real *vu, integer *il, integer * | ||
338 | iu, real *abstol, integer *m, real *w, complex *z__, integer *ldz, | ||
339 | complex *work, integer *lwork, real *rwork, integer *iwork, integer * | ||
340 | ifail, integer *info); | ||
341 | |||
342 | /* Subroutine */ int chegs2_(integer *itype, char *uplo, integer *n, complex * | ||
343 | a, integer *lda, complex *b, integer *ldb, integer *info); | ||
344 | |||
345 | /* Subroutine */ int chegst_(integer *itype, char *uplo, integer *n, complex * | ||
346 | a, integer *lda, complex *b, integer *ldb, integer *info); | ||
347 | |||
348 | /* Subroutine */ int chegv_(integer *itype, char *jobz, char *uplo, integer * | ||
349 | n, complex *a, integer *lda, complex *b, integer *ldb, real *w, | ||
350 | complex *work, integer *lwork, real *rwork, integer *info); | ||
351 | |||
352 | /* Subroutine */ int chegvd_(integer *itype, char *jobz, char *uplo, integer * | ||
353 | n, complex *a, integer *lda, complex *b, integer *ldb, real *w, | ||
354 | complex *work, integer *lwork, real *rwork, integer *lrwork, integer * | ||
355 | iwork, integer *liwork, integer *info); | ||
356 | |||
357 | /* Subroutine */ int chegvx_(integer *itype, char *jobz, char *range, char * | ||
358 | uplo, integer *n, complex *a, integer *lda, complex *b, integer *ldb, | ||
359 | real *vl, real *vu, integer *il, integer *iu, real *abstol, integer * | ||
360 | m, real *w, complex *z__, integer *ldz, complex *work, integer *lwork, | ||
361 | real *rwork, integer *iwork, integer *ifail, integer *info); | ||
362 | |||
363 | /* Subroutine */ int cherfs_(char *uplo, integer *n, integer *nrhs, complex * | ||
364 | a, integer *lda, complex *af, integer *ldaf, integer *ipiv, complex * | ||
365 | b, integer *ldb, complex *x, integer *ldx, real *ferr, real *berr, | ||
366 | complex *work, real *rwork, integer *info); | ||
367 | |||
368 | /* Subroutine */ int chesv_(char *uplo, integer *n, integer *nrhs, complex *a, | ||
369 | integer *lda, integer *ipiv, complex *b, integer *ldb, complex *work, | ||
370 | integer *lwork, integer *info); | ||
371 | |||
372 | /* Subroutine */ int chesvx_(char *fact, char *uplo, integer *n, integer * | ||
373 | nrhs, complex *a, integer *lda, complex *af, integer *ldaf, integer * | ||
374 | ipiv, complex *b, integer *ldb, complex *x, integer *ldx, real *rcond, | ||
375 | real *ferr, real *berr, complex *work, integer *lwork, real *rwork, | ||
376 | integer *info); | ||
377 | |||
378 | /* Subroutine */ int chetf2_(char *uplo, integer *n, complex *a, integer *lda, | ||
379 | integer *ipiv, integer *info); | ||
380 | |||
381 | /* Subroutine */ int chetrd_(char *uplo, integer *n, complex *a, integer *lda, | ||
382 | real *d__, real *e, complex *tau, complex *work, integer *lwork, | ||
383 | integer *info); | ||
384 | |||
385 | /* Subroutine */ int chetrf_(char *uplo, integer *n, complex *a, integer *lda, | ||
386 | integer *ipiv, complex *work, integer *lwork, integer *info); | ||
387 | |||
388 | /* Subroutine */ int chetri_(char *uplo, integer *n, complex *a, integer *lda, | ||
389 | integer *ipiv, complex *work, integer *info); | ||
390 | |||
391 | /* Subroutine */ int chetrs_(char *uplo, integer *n, integer *nrhs, complex * | ||
392 | a, integer *lda, integer *ipiv, complex *b, integer *ldb, integer * | ||
393 | info); | ||
394 | |||
395 | /* Subroutine */ int chgeqz_(char *job, char *compq, char *compz, integer *n, | ||
396 | integer *ilo, integer *ihi, complex *a, integer *lda, complex *b, | ||
397 | integer *ldb, complex *alpha, complex *beta, complex *q, integer *ldq, | ||
398 | complex *z__, integer *ldz, complex *work, integer *lwork, real * | ||
399 | rwork, integer *info); | ||
400 | |||
401 | /* Subroutine */ int chpcon_(char *uplo, integer *n, complex *ap, integer * | ||
402 | ipiv, real *anorm, real *rcond, complex *work, integer *info); | ||
403 | |||
404 | /* Subroutine */ int chpev_(char *jobz, char *uplo, integer *n, complex *ap, | ||
405 | real *w, complex *z__, integer *ldz, complex *work, real *rwork, | ||
406 | integer *info); | ||
407 | |||
408 | /* Subroutine */ int chpevd_(char *jobz, char *uplo, integer *n, complex *ap, | ||
409 | real *w, complex *z__, integer *ldz, complex *work, integer *lwork, | ||
410 | real *rwork, integer *lrwork, integer *iwork, integer *liwork, | ||
411 | integer *info); | ||
412 | |||
413 | /* Subroutine */ int chpevx_(char *jobz, char *range, char *uplo, integer *n, | ||
414 | complex *ap, real *vl, real *vu, integer *il, integer *iu, real * | ||
415 | abstol, integer *m, real *w, complex *z__, integer *ldz, complex * | ||
416 | work, real *rwork, integer *iwork, integer *ifail, integer *info); | ||
417 | |||
418 | /* Subroutine */ int chpgst_(integer *itype, char *uplo, integer *n, complex * | ||
419 | ap, complex *bp, integer *info); | ||
420 | |||
421 | /* Subroutine */ int chpgv_(integer *itype, char *jobz, char *uplo, integer * | ||
422 | n, complex *ap, complex *bp, real *w, complex *z__, integer *ldz, | ||
423 | complex *work, real *rwork, integer *info); | ||
424 | |||
425 | /* Subroutine */ int chpgvd_(integer *itype, char *jobz, char *uplo, integer * | ||
426 | n, complex *ap, complex *bp, real *w, complex *z__, integer *ldz, | ||
427 | complex *work, integer *lwork, real *rwork, integer *lrwork, integer * | ||
428 | iwork, integer *liwork, integer *info); | ||
429 | |||
430 | /* Subroutine */ int chpgvx_(integer *itype, char *jobz, char *range, char * | ||
431 | uplo, integer *n, complex *ap, complex *bp, real *vl, real *vu, | ||
432 | integer *il, integer *iu, real *abstol, integer *m, real *w, complex * | ||
433 | z__, integer *ldz, complex *work, real *rwork, integer *iwork, | ||
434 | integer *ifail, integer *info); | ||
435 | |||
436 | /* Subroutine */ int chprfs_(char *uplo, integer *n, integer *nrhs, complex * | ||
437 | ap, complex *afp, integer *ipiv, complex *b, integer *ldb, complex *x, | ||
438 | integer *ldx, real *ferr, real *berr, complex *work, real *rwork, | ||
439 | integer *info); | ||
440 | |||
441 | /* Subroutine */ int chpsv_(char *uplo, integer *n, integer *nrhs, complex * | ||
442 | ap, integer *ipiv, complex *b, integer *ldb, integer *info); | ||
443 | |||
444 | /* Subroutine */ int chpsvx_(char *fact, char *uplo, integer *n, integer * | ||
445 | nrhs, complex *ap, complex *afp, integer *ipiv, complex *b, integer * | ||
446 | ldb, complex *x, integer *ldx, real *rcond, real *ferr, real *berr, | ||
447 | complex *work, real *rwork, integer *info); | ||
448 | |||
449 | /* Subroutine */ int chptrd_(char *uplo, integer *n, complex *ap, real *d__, | ||
450 | real *e, complex *tau, integer *info); | ||
451 | |||
452 | /* Subroutine */ int chptrf_(char *uplo, integer *n, complex *ap, integer * | ||
453 | ipiv, integer *info); | ||
454 | |||
455 | /* Subroutine */ int chptri_(char *uplo, integer *n, complex *ap, integer * | ||
456 | ipiv, complex *work, integer *info); | ||
457 | |||
458 | /* Subroutine */ int chptrs_(char *uplo, integer *n, integer *nrhs, complex * | ||
459 | ap, integer *ipiv, complex *b, integer *ldb, integer *info); | ||
460 | |||
461 | /* Subroutine */ int chsein_(char *side, char *eigsrc, char *initv, logical * | ||
462 | select, integer *n, complex *h__, integer *ldh, complex *w, complex * | ||
463 | vl, integer *ldvl, complex *vr, integer *ldvr, integer *mm, integer * | ||
464 | m, complex *work, real *rwork, integer *ifaill, integer *ifailr, | ||
465 | integer *info); | ||
466 | |||
467 | /* Subroutine */ int chseqr_(char *job, char *compz, integer *n, integer *ilo, | ||
468 | integer *ihi, complex *h__, integer *ldh, complex *w, complex *z__, | ||
469 | integer *ldz, complex *work, integer *lwork, integer *info); | ||
470 | |||
471 | /* Subroutine */ int clabrd_(integer *m, integer *n, integer *nb, complex *a, | ||
472 | integer *lda, real *d__, real *e, complex *tauq, complex *taup, | ||
473 | complex *x, integer *ldx, complex *y, integer *ldy); | ||
474 | |||
475 | /* Subroutine */ int clacgv_(integer *n, complex *x, integer *incx); | ||
476 | |||
477 | /* Subroutine */ int clacon_(integer *n, complex *v, complex *x, real *est, | ||
478 | integer *kase); | ||
479 | |||
480 | /* Subroutine */ int clacp2_(char *uplo, integer *m, integer *n, real *a, | ||
481 | integer *lda, complex *b, integer *ldb); | ||
482 | |||
483 | /* Subroutine */ int clacpy_(char *uplo, integer *m, integer *n, complex *a, | ||
484 | integer *lda, complex *b, integer *ldb); | ||
485 | |||
486 | /* Subroutine */ int clacrm_(integer *m, integer *n, complex *a, integer *lda, | ||
487 | real *b, integer *ldb, complex *c__, integer *ldc, real *rwork); | ||
488 | |||
489 | /* Subroutine */ int clacrt_(integer *n, complex *cx, integer *incx, complex * | ||
490 | cy, integer *incy, complex *c__, complex *s); | ||
491 | |||
492 | /* Subroutine */ int claed0_(integer *qsiz, integer *n, real *d__, real *e, | ||
493 | complex *q, integer *ldq, complex *qstore, integer *ldqs, real *rwork, | ||
494 | integer *iwork, integer *info); | ||
495 | |||
496 | /* Subroutine */ int claed7_(integer *n, integer *cutpnt, integer *qsiz, | ||
497 | integer *tlvls, integer *curlvl, integer *curpbm, real *d__, complex * | ||
498 | q, integer *ldq, real *rho, integer *indxq, real *qstore, integer * | ||
499 | qptr, integer *prmptr, integer *perm, integer *givptr, integer * | ||
500 | givcol, real *givnum, complex *work, real *rwork, integer *iwork, | ||
501 | integer *info); | ||
502 | |||
503 | /* Subroutine */ int claed8_(integer *k, integer *n, integer *qsiz, complex * | ||
504 | q, integer *ldq, real *d__, real *rho, integer *cutpnt, real *z__, | ||
505 | real *dlamda, complex *q2, integer *ldq2, real *w, integer *indxp, | ||
506 | integer *indx, integer *indxq, integer *perm, integer *givptr, | ||
507 | integer *givcol, real *givnum, integer *info); | ||
508 | |||
509 | /* Subroutine */ int claein_(logical *rightv, logical *noinit, integer *n, | ||
510 | complex *h__, integer *ldh, complex *w, complex *v, complex *b, | ||
511 | integer *ldb, real *rwork, real *eps3, real *smlnum, integer *info); | ||
512 | |||
513 | /* Subroutine */ int claesy_(complex *a, complex *b, complex *c__, complex * | ||
514 | rt1, complex *rt2, complex *evscal, complex *cs1, complex *sn1); | ||
515 | |||
516 | /* Subroutine */ int claev2_(complex *a, complex *b, complex *c__, real *rt1, | ||
517 | real *rt2, real *cs1, complex *sn1); | ||
518 | |||
519 | /* Subroutine */ int clags2_(logical *upper, real *a1, complex *a2, real *a3, | ||
520 | real *b1, complex *b2, real *b3, real *csu, complex *snu, real *csv, | ||
521 | complex *snv, real *csq, complex *snq); | ||
522 | |||
523 | /* Subroutine */ int clagtm_(char *trans, integer *n, integer *nrhs, real * | ||
524 | alpha, complex *dl, complex *d__, complex *du, complex *x, integer * | ||
525 | ldx, real *beta, complex *b, integer *ldb); | ||
526 | |||
527 | /* Subroutine */ int clahef_(char *uplo, integer *n, integer *nb, integer *kb, | ||
528 | complex *a, integer *lda, integer *ipiv, complex *w, integer *ldw, | ||
529 | integer *info); | ||
530 | |||
531 | /* Subroutine */ int clahqr_(logical *wantt, logical *wantz, integer *n, | ||
532 | integer *ilo, integer *ihi, complex *h__, integer *ldh, complex *w, | ||
533 | integer *iloz, integer *ihiz, complex *z__, integer *ldz, integer * | ||
534 | info); | ||
535 | |||
536 | /* Subroutine */ int clahrd_(integer *n, integer *k, integer *nb, complex *a, | ||
537 | integer *lda, complex *tau, complex *t, integer *ldt, complex *y, | ||
538 | integer *ldy); | ||
539 | |||
540 | /* Subroutine */ int claic1_(integer *job, integer *j, complex *x, real *sest, | ||
541 | complex *w, complex *gamma, real *sestpr, complex *s, complex *c__); | ||
542 | |||
543 | /* Subroutine */ int clals0_(integer *icompq, integer *nl, integer *nr, | ||
544 | integer *sqre, integer *nrhs, complex *b, integer *ldb, complex *bx, | ||
545 | integer *ldbx, integer *perm, integer *givptr, integer *givcol, | ||
546 | integer *ldgcol, real *givnum, integer *ldgnum, real *poles, real * | ||
547 | difl, real *difr, real *z__, integer *k, real *c__, real *s, real * | ||
548 | rwork, integer *info); | ||
549 | |||
550 | /* Subroutine */ int clalsa_(integer *icompq, integer *smlsiz, integer *n, | ||
551 | integer *nrhs, complex *b, integer *ldb, complex *bx, integer *ldbx, | ||
552 | real *u, integer *ldu, real *vt, integer *k, real *difl, real *difr, | ||
553 | real *z__, real *poles, integer *givptr, integer *givcol, integer * | ||
554 | ldgcol, integer *perm, real *givnum, real *c__, real *s, real *rwork, | ||
555 | integer *iwork, integer *info); | ||
556 | |||
557 | /* Subroutine */ int clapll_(integer *n, complex *x, integer *incx, complex * | ||
558 | y, integer *incy, real *ssmin); | ||
559 | |||
560 | /* Subroutine */ int clapmt_(logical *forwrd, integer *m, integer *n, complex | ||
561 | *x, integer *ldx, integer *k); | ||
562 | |||
563 | /* Subroutine */ int claqgb_(integer *m, integer *n, integer *kl, integer *ku, | ||
564 | complex *ab, integer *ldab, real *r__, real *c__, real *rowcnd, real | ||
565 | *colcnd, real *amax, char *equed); | ||
566 | |||
567 | /* Subroutine */ int claqge_(integer *m, integer *n, complex *a, integer *lda, | ||
568 | real *r__, real *c__, real *rowcnd, real *colcnd, real *amax, char * | ||
569 | equed); | ||
570 | |||
571 | /* Subroutine */ int claqhb_(char *uplo, integer *n, integer *kd, complex *ab, | ||
572 | integer *ldab, real *s, real *scond, real *amax, char *equed); | ||
573 | |||
574 | /* Subroutine */ int claqhe_(char *uplo, integer *n, complex *a, integer *lda, | ||
575 | real *s, real *scond, real *amax, char *equed); | ||
576 | |||
577 | /* Subroutine */ int claqhp_(char *uplo, integer *n, complex *ap, real *s, | ||
578 | real *scond, real *amax, char *equed); | ||
579 | |||
580 | /* Subroutine */ int claqp2_(integer *m, integer *n, integer *offset, complex | ||
581 | *a, integer *lda, integer *jpvt, complex *tau, real *vn1, real *vn2, | ||
582 | complex *work); | ||
583 | |||
584 | /* Subroutine */ int claqps_(integer *m, integer *n, integer *offset, integer | ||
585 | *nb, integer *kb, complex *a, integer *lda, integer *jpvt, complex * | ||
586 | tau, real *vn1, real *vn2, complex *auxv, complex *f, integer *ldf); | ||
587 | |||
588 | /* Subroutine */ int claqsb_(char *uplo, integer *n, integer *kd, complex *ab, | ||
589 | integer *ldab, real *s, real *scond, real *amax, char *equed); | ||
590 | |||
591 | /* Subroutine */ int claqsp_(char *uplo, integer *n, complex *ap, real *s, | ||
592 | real *scond, real *amax, char *equed); | ||
593 | |||
594 | /* Subroutine */ int claqsy_(char *uplo, integer *n, complex *a, integer *lda, | ||
595 | real *s, real *scond, real *amax, char *equed); | ||
596 | |||
597 | /* Subroutine */ int clar1v_(integer *n, integer *b1, integer *bn, real * | ||
598 | sigma, real *d__, real *l, real *ld, real *lld, real *gersch, complex | ||
599 | *z__, real *ztz, real *mingma, integer *r__, integer *isuppz, real * | ||
600 | work); | ||
601 | |||
602 | /* Subroutine */ int clar2v_(integer *n, complex *x, complex *y, complex *z__, | ||
603 | integer *incx, real *c__, complex *s, integer *incc); | ||
604 | |||
605 | /* Subroutine */ int clarcm_(integer *m, integer *n, real *a, integer *lda, | ||
606 | complex *b, integer *ldb, complex *c__, integer *ldc, real *rwork); | ||
607 | |||
608 | /* Subroutine */ int clarf_(char *side, integer *m, integer *n, complex *v, | ||
609 | integer *incv, complex *tau, complex *c__, integer *ldc, complex * | ||
610 | work); | ||
611 | |||
612 | /* Subroutine */ int clarfb_(char *side, char *trans, char *direct, char * | ||
613 | storev, integer *m, integer *n, integer *k, complex *v, integer *ldv, | ||
614 | complex *t, integer *ldt, complex *c__, integer *ldc, complex *work, | ||
615 | integer *ldwork); | ||
616 | |||
617 | /* Subroutine */ int clarfg_(integer *n, complex *alpha, complex *x, integer * | ||
618 | incx, complex *tau); | ||
619 | |||
620 | /* Subroutine */ int clarft_(char *direct, char *storev, integer *n, integer * | ||
621 | k, complex *v, integer *ldv, complex *tau, complex *t, integer *ldt); | ||
622 | |||
623 | /* Subroutine */ int clarfx_(char *side, integer *m, integer *n, complex *v, | ||
624 | complex *tau, complex *c__, integer *ldc, complex *work); | ||
625 | |||
626 | /* Subroutine */ int clargv_(integer *n, complex *x, integer *incx, complex * | ||
627 | y, integer *incy, real *c__, integer *incc); | ||
628 | |||
629 | /* Subroutine */ int clarnv_(integer *idist, integer *iseed, integer *n, | ||
630 | complex *x); | ||
631 | |||
632 | /* Subroutine */ int clarrv_(integer *n, real *d__, real *l, integer *isplit, | ||
633 | integer *m, real *w, integer *iblock, real *gersch, real *tol, | ||
634 | complex *z__, integer *ldz, integer *isuppz, real *work, integer * | ||
635 | iwork, integer *info); | ||
636 | |||
637 | /* Subroutine */ int clartg_(complex *f, complex *g, real *cs, complex *sn, | ||
638 | complex *r__); | ||
639 | |||
640 | /* Subroutine */ int clartv_(integer *n, complex *x, integer *incx, complex * | ||
641 | y, integer *incy, real *c__, complex *s, integer *incc); | ||
642 | |||
643 | /* Subroutine */ int clarz_(char *side, integer *m, integer *n, integer *l, | ||
644 | complex *v, integer *incv, complex *tau, complex *c__, integer *ldc, | ||
645 | complex *work); | ||
646 | |||
647 | /* Subroutine */ int clarzb_(char *side, char *trans, char *direct, char * | ||
648 | storev, integer *m, integer *n, integer *k, integer *l, complex *v, | ||
649 | integer *ldv, complex *t, integer *ldt, complex *c__, integer *ldc, | ||
650 | complex *work, integer *ldwork); | ||
651 | |||
652 | /* Subroutine */ int clarzt_(char *direct, char *storev, integer *n, integer * | ||
653 | k, complex *v, integer *ldv, complex *tau, complex *t, integer *ldt); | ||
654 | |||
655 | /* Subroutine */ int clascl_(char *type__, integer *kl, integer *ku, real * | ||
656 | cfrom, real *cto, integer *m, integer *n, complex *a, integer *lda, | ||
657 | integer *info); | ||
658 | |||
659 | /* Subroutine */ int claset_(char *uplo, integer *m, integer *n, complex * | ||
660 | alpha, complex *beta, complex *a, integer *lda); | ||
661 | |||
662 | /* Subroutine */ int clasr_(char *side, char *pivot, char *direct, integer *m, | ||
663 | integer *n, real *c__, real *s, complex *a, integer *lda); | ||
664 | |||
665 | /* Subroutine */ int classq_(integer *n, complex *x, integer *incx, real * | ||
666 | scale, real *sumsq); | ||
667 | |||
668 | /* Subroutine */ int claswp_(integer *n, complex *a, integer *lda, integer * | ||
669 | k1, integer *k2, integer *ipiv, integer *incx); | ||
670 | |||
671 | /* Subroutine */ int clasyf_(char *uplo, integer *n, integer *nb, integer *kb, | ||
672 | complex *a, integer *lda, integer *ipiv, complex *w, integer *ldw, | ||
673 | integer *info); | ||
674 | |||
675 | /* Subroutine */ int clatbs_(char *uplo, char *trans, char *diag, char * | ||
676 | normin, integer *n, integer *kd, complex *ab, integer *ldab, complex * | ||
677 | x, real *scale, real *cnorm, integer *info); | ||
678 | |||
679 | /* Subroutine */ int clatdf_(integer *ijob, integer *n, complex *z__, integer | ||
680 | *ldz, complex *rhs, real *rdsum, real *rdscal, integer *ipiv, integer | ||
681 | *jpiv); | ||
682 | |||
683 | /* Subroutine */ int clatps_(char *uplo, char *trans, char *diag, char * | ||
684 | normin, integer *n, complex *ap, complex *x, real *scale, real *cnorm, | ||
685 | integer *info); | ||
686 | |||
687 | /* Subroutine */ int clatrd_(char *uplo, integer *n, integer *nb, complex *a, | ||
688 | integer *lda, real *e, complex *tau, complex *w, integer *ldw); | ||
689 | |||
690 | /* Subroutine */ int clatrs_(char *uplo, char *trans, char *diag, char * | ||
691 | normin, integer *n, complex *a, integer *lda, complex *x, real *scale, | ||
692 | real *cnorm, integer *info); | ||
693 | |||
694 | /* Subroutine */ int clatrz_(integer *m, integer *n, integer *l, complex *a, | ||
695 | integer *lda, complex *tau, complex *work); | ||
696 | |||
697 | /* Subroutine */ int clatzm_(char *side, integer *m, integer *n, complex *v, | ||
698 | integer *incv, complex *tau, complex *c1, complex *c2, integer *ldc, | ||
699 | complex *work); | ||
700 | |||
701 | /* Subroutine */ int clauu2_(char *uplo, integer *n, complex *a, integer *lda, | ||
702 | integer *info); | ||
703 | |||
704 | /* Subroutine */ int clauum_(char *uplo, integer *n, complex *a, integer *lda, | ||
705 | integer *info); | ||
706 | |||
707 | /* Subroutine */ int cpbcon_(char *uplo, integer *n, integer *kd, complex *ab, | ||
708 | integer *ldab, real *anorm, real *rcond, complex *work, real *rwork, | ||
709 | integer *info); | ||
710 | |||
711 | /* Subroutine */ int cpbequ_(char *uplo, integer *n, integer *kd, complex *ab, | ||
712 | integer *ldab, real *s, real *scond, real *amax, integer *info); | ||
713 | |||
714 | /* Subroutine */ int cpbrfs_(char *uplo, integer *n, integer *kd, integer * | ||
715 | nrhs, complex *ab, integer *ldab, complex *afb, integer *ldafb, | ||
716 | complex *b, integer *ldb, complex *x, integer *ldx, real *ferr, real * | ||
717 | berr, complex *work, real *rwork, integer *info); | ||
718 | |||
719 | /* Subroutine */ int cpbstf_(char *uplo, integer *n, integer *kd, complex *ab, | ||
720 | integer *ldab, integer *info); | ||
721 | |||
722 | /* Subroutine */ int cpbsv_(char *uplo, integer *n, integer *kd, integer * | ||
723 | nrhs, complex *ab, integer *ldab, complex *b, integer *ldb, integer * | ||
724 | info); | ||
725 | |||
726 | /* Subroutine */ int cpbsvx_(char *fact, char *uplo, integer *n, integer *kd, | ||
727 | integer *nrhs, complex *ab, integer *ldab, complex *afb, integer * | ||
728 | ldafb, char *equed, real *s, complex *b, integer *ldb, complex *x, | ||
729 | integer *ldx, real *rcond, real *ferr, real *berr, complex *work, | ||
730 | real *rwork, integer *info); | ||
731 | |||
732 | /* Subroutine */ int cpbtf2_(char *uplo, integer *n, integer *kd, complex *ab, | ||
733 | integer *ldab, integer *info); | ||
734 | |||
735 | /* Subroutine */ int cpbtrf_(char *uplo, integer *n, integer *kd, complex *ab, | ||
736 | integer *ldab, integer *info); | ||
737 | |||
738 | /* Subroutine */ int cpbtrs_(char *uplo, integer *n, integer *kd, integer * | ||
739 | nrhs, complex *ab, integer *ldab, complex *b, integer *ldb, integer * | ||
740 | info); | ||
741 | |||
742 | /* Subroutine */ int cpocon_(char *uplo, integer *n, complex *a, integer *lda, | ||
743 | real *anorm, real *rcond, complex *work, real *rwork, integer *info); | ||
744 | |||
745 | /* Subroutine */ int cpoequ_(integer *n, complex *a, integer *lda, real *s, | ||
746 | real *scond, real *amax, integer *info); | ||
747 | |||
748 | /* Subroutine */ int cporfs_(char *uplo, integer *n, integer *nrhs, complex * | ||
749 | a, integer *lda, complex *af, integer *ldaf, complex *b, integer *ldb, | ||
750 | complex *x, integer *ldx, real *ferr, real *berr, complex *work, | ||
751 | real *rwork, integer *info); | ||
752 | |||
753 | /* Subroutine */ int cposv_(char *uplo, integer *n, integer *nrhs, complex *a, | ||
754 | integer *lda, complex *b, integer *ldb, integer *info); | ||
755 | |||
756 | /* Subroutine */ int cposvx_(char *fact, char *uplo, integer *n, integer * | ||
757 | nrhs, complex *a, integer *lda, complex *af, integer *ldaf, char * | ||
758 | equed, real *s, complex *b, integer *ldb, complex *x, integer *ldx, | ||
759 | real *rcond, real *ferr, real *berr, complex *work, real *rwork, | ||
760 | integer *info); | ||
761 | |||
762 | /* Subroutine */ int cpotf2_(char *uplo, integer *n, complex *a, integer *lda, | ||
763 | integer *info); | ||
764 | |||
765 | /* Subroutine */ int cpotrf_(char *uplo, integer *n, complex *a, integer *lda, | ||
766 | integer *info); | ||
767 | |||
768 | /* Subroutine */ int cpotri_(char *uplo, integer *n, complex *a, integer *lda, | ||
769 | integer *info); | ||
770 | |||
771 | /* Subroutine */ int cpotrs_(char *uplo, integer *n, integer *nrhs, complex * | ||
772 | a, integer *lda, complex *b, integer *ldb, integer *info); | ||
773 | |||
774 | /* Subroutine */ int cppcon_(char *uplo, integer *n, complex *ap, real *anorm, | ||
775 | real *rcond, complex *work, real *rwork, integer *info); | ||
776 | |||
777 | /* Subroutine */ int cppequ_(char *uplo, integer *n, complex *ap, real *s, | ||
778 | real *scond, real *amax, integer *info); | ||
779 | |||
780 | /* Subroutine */ int cpprfs_(char *uplo, integer *n, integer *nrhs, complex * | ||
781 | ap, complex *afp, complex *b, integer *ldb, complex *x, integer *ldx, | ||
782 | real *ferr, real *berr, complex *work, real *rwork, integer *info); | ||
783 | |||
784 | /* Subroutine */ int cppsv_(char *uplo, integer *n, integer *nrhs, complex * | ||
785 | ap, complex *b, integer *ldb, integer *info); | ||
786 | |||
787 | /* Subroutine */ int cppsvx_(char *fact, char *uplo, integer *n, integer * | ||
788 | nrhs, complex *ap, complex *afp, char *equed, real *s, complex *b, | ||
789 | integer *ldb, complex *x, integer *ldx, real *rcond, real *ferr, real | ||
790 | *berr, complex *work, real *rwork, integer *info); | ||
791 | |||
792 | /* Subroutine */ int cpptrf_(char *uplo, integer *n, complex *ap, integer * | ||
793 | info); | ||
794 | |||
795 | /* Subroutine */ int cpptri_(char *uplo, integer *n, complex *ap, integer * | ||
796 | info); | ||
797 | |||
798 | /* Subroutine */ int cpptrs_(char *uplo, integer *n, integer *nrhs, complex * | ||
799 | ap, complex *b, integer *ldb, integer *info); | ||
800 | |||
801 | /* Subroutine */ int cptcon_(integer *n, real *d__, complex *e, real *anorm, | ||
802 | real *rcond, real *rwork, integer *info); | ||
803 | |||
804 | /* Subroutine */ int cptrfs_(char *uplo, integer *n, integer *nrhs, real *d__, | ||
805 | complex *e, real *df, complex *ef, complex *b, integer *ldb, complex | ||
806 | *x, integer *ldx, real *ferr, real *berr, complex *work, real *rwork, | ||
807 | integer *info); | ||
808 | |||
809 | /* Subroutine */ int cptsv_(integer *n, integer *nrhs, real *d__, complex *e, | ||
810 | complex *b, integer *ldb, integer *info); | ||
811 | |||
812 | /* Subroutine */ int cptsvx_(char *fact, integer *n, integer *nrhs, real *d__, | ||
813 | complex *e, real *df, complex *ef, complex *b, integer *ldb, complex | ||
814 | *x, integer *ldx, real *rcond, real *ferr, real *berr, complex *work, | ||
815 | real *rwork, integer *info); | ||
816 | |||
817 | /* Subroutine */ int cpttrf_(integer *n, real *d__, complex *e, integer *info); | ||
818 | |||
819 | /* Subroutine */ int cpttrs_(char *uplo, integer *n, integer *nrhs, real *d__, | ||
820 | complex *e, complex *b, integer *ldb, integer *info); | ||
821 | |||
822 | /* Subroutine */ int cptts2_(integer *iuplo, integer *n, integer *nrhs, real * | ||
823 | d__, complex *e, complex *b, integer *ldb); | ||
824 | |||
825 | /* Subroutine */ int crot_(integer *n, complex *cx, integer *incx, complex * | ||
826 | cy, integer *incy, real *c__, complex *s); | ||
827 | |||
828 | /* Subroutine */ int cspcon_(char *uplo, integer *n, complex *ap, integer * | ||
829 | ipiv, real *anorm, real *rcond, complex *work, integer *info); | ||
830 | |||
831 | /* Subroutine */ int cspmv_(char *uplo, integer *n, complex *alpha, complex * | ||
832 | ap, complex *x, integer *incx, complex *beta, complex *y, integer * | ||
833 | incy); | ||
834 | |||
835 | /* Subroutine */ int cspr_(char *uplo, integer *n, complex *alpha, complex *x, | ||
836 | integer *incx, complex *ap); | ||
837 | |||
838 | /* Subroutine */ int csprfs_(char *uplo, integer *n, integer *nrhs, complex * | ||
839 | ap, complex *afp, integer *ipiv, complex *b, integer *ldb, complex *x, | ||
840 | integer *ldx, real *ferr, real *berr, complex *work, real *rwork, | ||
841 | integer *info); | ||
842 | |||
843 | /* Subroutine */ int cspsv_(char *uplo, integer *n, integer *nrhs, complex * | ||
844 | ap, integer *ipiv, complex *b, integer *ldb, integer *info); | ||
845 | |||
846 | /* Subroutine */ int cspsvx_(char *fact, char *uplo, integer *n, integer * | ||
847 | nrhs, complex *ap, complex *afp, integer *ipiv, complex *b, integer * | ||
848 | ldb, complex *x, integer *ldx, real *rcond, real *ferr, real *berr, | ||
849 | complex *work, real *rwork, integer *info); | ||
850 | |||
851 | /* Subroutine */ int csptrf_(char *uplo, integer *n, complex *ap, integer * | ||
852 | ipiv, integer *info); | ||
853 | |||
854 | /* Subroutine */ int csptri_(char *uplo, integer *n, complex *ap, integer * | ||
855 | ipiv, complex *work, integer *info); | ||
856 | |||
857 | /* Subroutine */ int csptrs_(char *uplo, integer *n, integer *nrhs, complex * | ||
858 | ap, integer *ipiv, complex *b, integer *ldb, integer *info); | ||
859 | |||
860 | /* Subroutine */ int csrot_(integer *n, complex *cx, integer *incx, complex * | ||
861 | cy, integer *incy, real *c__, real *s); | ||
862 | |||
863 | /* Subroutine */ int csrscl_(integer *n, real *sa, complex *sx, integer *incx); | ||
864 | |||
865 | /* Subroutine */ int cstedc_(char *compz, integer *n, real *d__, real *e, | ||
866 | complex *z__, integer *ldz, complex *work, integer *lwork, real * | ||
867 | rwork, integer *lrwork, integer *iwork, integer *liwork, integer * | ||
868 | info); | ||
869 | |||
870 | /* Subroutine */ int cstein_(integer *n, real *d__, real *e, integer *m, real | ||
871 | *w, integer *iblock, integer *isplit, complex *z__, integer *ldz, | ||
872 | real *work, integer *iwork, integer *ifail, integer *info); | ||
873 | |||
874 | /* Subroutine */ int csteqr_(char *compz, integer *n, real *d__, real *e, | ||
875 | complex *z__, integer *ldz, real *work, integer *info); | ||
876 | |||
877 | /* Subroutine */ int csycon_(char *uplo, integer *n, complex *a, integer *lda, | ||
878 | integer *ipiv, real *anorm, real *rcond, complex *work, integer * | ||
879 | info); | ||
880 | |||
881 | /* Subroutine */ int csymv_(char *uplo, integer *n, complex *alpha, complex * | ||
882 | a, integer *lda, complex *x, integer *incx, complex *beta, complex *y, | ||
883 | integer *incy); | ||
884 | |||
885 | /* Subroutine */ int csyr_(char *uplo, integer *n, complex *alpha, complex *x, | ||
886 | integer *incx, complex *a, integer *lda); | ||
887 | |||
888 | /* Subroutine */ int csyrfs_(char *uplo, integer *n, integer *nrhs, complex * | ||
889 | a, integer *lda, complex *af, integer *ldaf, integer *ipiv, complex * | ||
890 | b, integer *ldb, complex *x, integer *ldx, real *ferr, real *berr, | ||
891 | complex *work, real *rwork, integer *info); | ||
892 | |||
893 | /* Subroutine */ int csysv_(char *uplo, integer *n, integer *nrhs, complex *a, | ||
894 | integer *lda, integer *ipiv, complex *b, integer *ldb, complex *work, | ||
895 | integer *lwork, integer *info); | ||
896 | |||
897 | /* Subroutine */ int csysvx_(char *fact, char *uplo, integer *n, integer * | ||
898 | nrhs, complex *a, integer *lda, complex *af, integer *ldaf, integer * | ||
899 | ipiv, complex *b, integer *ldb, complex *x, integer *ldx, real *rcond, | ||
900 | real *ferr, real *berr, complex *work, integer *lwork, real *rwork, | ||
901 | integer *info); | ||
902 | |||
903 | /* Subroutine */ int csytf2_(char *uplo, integer *n, complex *a, integer *lda, | ||
904 | integer *ipiv, integer *info); | ||
905 | |||
906 | /* Subroutine */ int csytrf_(char *uplo, integer *n, complex *a, integer *lda, | ||
907 | integer *ipiv, complex *work, integer *lwork, integer *info); | ||
908 | |||
909 | /* Subroutine */ int csytri_(char *uplo, integer *n, complex *a, integer *lda, | ||
910 | integer *ipiv, complex *work, integer *info); | ||
911 | |||
912 | /* Subroutine */ int csytrs_(char *uplo, integer *n, integer *nrhs, complex * | ||
913 | a, integer *lda, integer *ipiv, complex *b, integer *ldb, integer * | ||
914 | info); | ||
915 | |||
916 | /* Subroutine */ int ctbcon_(char *norm, char *uplo, char *diag, integer *n, | ||
917 | integer *kd, complex *ab, integer *ldab, real *rcond, complex *work, | ||
918 | real *rwork, integer *info); | ||
919 | |||
920 | /* Subroutine */ int ctbrfs_(char *uplo, char *trans, char *diag, integer *n, | ||
921 | integer *kd, integer *nrhs, complex *ab, integer *ldab, complex *b, | ||
922 | integer *ldb, complex *x, integer *ldx, real *ferr, real *berr, | ||
923 | complex *work, real *rwork, integer *info); | ||
924 | |||
925 | /* Subroutine */ int ctbtrs_(char *uplo, char *trans, char *diag, integer *n, | ||
926 | integer *kd, integer *nrhs, complex *ab, integer *ldab, complex *b, | ||
927 | integer *ldb, integer *info); | ||
928 | |||
929 | /* Subroutine */ int ctgevc_(char *side, char *howmny, logical *select, | ||
930 | integer *n, complex *a, integer *lda, complex *b, integer *ldb, | ||
931 | complex *vl, integer *ldvl, complex *vr, integer *ldvr, integer *mm, | ||
932 | integer *m, complex *work, real *rwork, integer *info); | ||
933 | |||
934 | /* Subroutine */ int ctgex2_(logical *wantq, logical *wantz, integer *n, | ||
935 | complex *a, integer *lda, complex *b, integer *ldb, complex *q, | ||
936 | integer *ldq, complex *z__, integer *ldz, integer *j1, integer *info); | ||
937 | |||
938 | /* Subroutine */ int ctgexc_(logical *wantq, logical *wantz, integer *n, | ||
939 | complex *a, integer *lda, complex *b, integer *ldb, complex *q, | ||
940 | integer *ldq, complex *z__, integer *ldz, integer *ifst, integer * | ||
941 | ilst, integer *info); | ||
942 | |||
943 | /* Subroutine */ int ctgsen_(integer *ijob, logical *wantq, logical *wantz, | ||
944 | logical *select, integer *n, complex *a, integer *lda, complex *b, | ||
945 | integer *ldb, complex *alpha, complex *beta, complex *q, integer *ldq, | ||
946 | complex *z__, integer *ldz, integer *m, real *pl, real *pr, real * | ||
947 | dif, complex *work, integer *lwork, integer *iwork, integer *liwork, | ||
948 | integer *info); | ||
949 | |||
950 | /* Subroutine */ int ctgsja_(char *jobu, char *jobv, char *jobq, integer *m, | ||
951 | integer *p, integer *n, integer *k, integer *l, complex *a, integer * | ||
952 | lda, complex *b, integer *ldb, real *tola, real *tolb, real *alpha, | ||
953 | real *beta, complex *u, integer *ldu, complex *v, integer *ldv, | ||
954 | complex *q, integer *ldq, complex *work, integer *ncycle, integer * | ||
955 | info); | ||
956 | |||
957 | /* Subroutine */ int ctgsna_(char *job, char *howmny, logical *select, | ||
958 | integer *n, complex *a, integer *lda, complex *b, integer *ldb, | ||
959 | complex *vl, integer *ldvl, complex *vr, integer *ldvr, real *s, real | ||
960 | *dif, integer *mm, integer *m, complex *work, integer *lwork, integer | ||
961 | *iwork, integer *info); | ||
962 | |||
963 | /* Subroutine */ int ctgsy2_(char *trans, integer *ijob, integer *m, integer * | ||
964 | n, complex *a, integer *lda, complex *b, integer *ldb, complex *c__, | ||
965 | integer *ldc, complex *d__, integer *ldd, complex *e, integer *lde, | ||
966 | complex *f, integer *ldf, real *scale, real *rdsum, real *rdscal, | ||
967 | integer *info); | ||
968 | |||
969 | /* Subroutine */ int ctgsyl_(char *trans, integer *ijob, integer *m, integer * | ||
970 | n, complex *a, integer *lda, complex *b, integer *ldb, complex *c__, | ||
971 | integer *ldc, complex *d__, integer *ldd, complex *e, integer *lde, | ||
972 | complex *f, integer *ldf, real *scale, real *dif, complex *work, | ||
973 | integer *lwork, integer *iwork, integer *info); | ||
974 | |||
975 | /* Subroutine */ int ctpcon_(char *norm, char *uplo, char *diag, integer *n, | ||
976 | complex *ap, real *rcond, complex *work, real *rwork, integer *info); | ||
977 | |||
978 | /* Subroutine */ int ctprfs_(char *uplo, char *trans, char *diag, integer *n, | ||
979 | integer *nrhs, complex *ap, complex *b, integer *ldb, complex *x, | ||
980 | integer *ldx, real *ferr, real *berr, complex *work, real *rwork, | ||
981 | integer *info); | ||
982 | |||
983 | /* Subroutine */ int ctptri_(char *uplo, char *diag, integer *n, complex *ap, | ||
984 | integer *info); | ||
985 | |||
986 | /* Subroutine */ int ctptrs_(char *uplo, char *trans, char *diag, integer *n, | ||
987 | integer *nrhs, complex *ap, complex *b, integer *ldb, integer *info); | ||
988 | |||
989 | /* Subroutine */ int ctrcon_(char *norm, char *uplo, char *diag, integer *n, | ||
990 | complex *a, integer *lda, real *rcond, complex *work, real *rwork, | ||
991 | integer *info); | ||
992 | |||
993 | /* Subroutine */ int ctrevc_(char *side, char *howmny, logical *select, | ||
994 | integer *n, complex *t, integer *ldt, complex *vl, integer *ldvl, | ||
995 | complex *vr, integer *ldvr, integer *mm, integer *m, complex *work, | ||
996 | real *rwork, integer *info); | ||
997 | |||
998 | /* Subroutine */ int ctrexc_(char *compq, integer *n, complex *t, integer * | ||
999 | ldt, complex *q, integer *ldq, integer *ifst, integer *ilst, integer * | ||
1000 | info); | ||
1001 | |||
1002 | /* Subroutine */ int ctrrfs_(char *uplo, char *trans, char *diag, integer *n, | ||
1003 | integer *nrhs, complex *a, integer *lda, complex *b, integer *ldb, | ||
1004 | complex *x, integer *ldx, real *ferr, real *berr, complex *work, real | ||
1005 | *rwork, integer *info); | ||
1006 | |||
1007 | /* Subroutine */ int ctrsen_(char *job, char *compq, logical *select, integer | ||
1008 | *n, complex *t, integer *ldt, complex *q, integer *ldq, complex *w, | ||
1009 | integer *m, real *s, real *sep, complex *work, integer *lwork, | ||
1010 | integer *info); | ||
1011 | |||
1012 | /* Subroutine */ int ctrsna_(char *job, char *howmny, logical *select, | ||
1013 | integer *n, complex *t, integer *ldt, complex *vl, integer *ldvl, | ||
1014 | complex *vr, integer *ldvr, real *s, real *sep, integer *mm, integer * | ||
1015 | m, complex *work, integer *ldwork, real *rwork, integer *info); | ||
1016 | |||
1017 | /* Subroutine */ int ctrsyl_(char *trana, char *tranb, integer *isgn, integer | ||
1018 | *m, integer *n, complex *a, integer *lda, complex *b, integer *ldb, | ||
1019 | complex *c__, integer *ldc, real *scale, integer *info); | ||
1020 | |||
1021 | /* Subroutine */ int ctrti2_(char *uplo, char *diag, integer *n, complex *a, | ||
1022 | integer *lda, integer *info); | ||
1023 | |||
1024 | /* Subroutine */ int ctrtri_(char *uplo, char *diag, integer *n, complex *a, | ||
1025 | integer *lda, integer *info); | ||
1026 | |||
1027 | /* Subroutine */ int ctrtrs_(char *uplo, char *trans, char *diag, integer *n, | ||
1028 | integer *nrhs, complex *a, integer *lda, complex *b, integer *ldb, | ||
1029 | integer *info); | ||
1030 | |||
1031 | /* Subroutine */ int ctzrqf_(integer *m, integer *n, complex *a, integer *lda, | ||
1032 | complex *tau, integer *info); | ||
1033 | |||
1034 | /* Subroutine */ int ctzrzf_(integer *m, integer *n, complex *a, integer *lda, | ||
1035 | complex *tau, complex *work, integer *lwork, integer *info); | ||
1036 | |||
1037 | /* Subroutine */ int cung2l_(integer *m, integer *n, integer *k, complex *a, | ||
1038 | integer *lda, complex *tau, complex *work, integer *info); | ||
1039 | |||
1040 | /* Subroutine */ int cung2r_(integer *m, integer *n, integer *k, complex *a, | ||
1041 | integer *lda, complex *tau, complex *work, integer *info); | ||
1042 | |||
1043 | /* Subroutine */ int cungbr_(char *vect, integer *m, integer *n, integer *k, | ||
1044 | complex *a, integer *lda, complex *tau, complex *work, integer *lwork, | ||
1045 | integer *info); | ||
1046 | |||
1047 | /* Subroutine */ int cunghr_(integer *n, integer *ilo, integer *ihi, complex * | ||
1048 | a, integer *lda, complex *tau, complex *work, integer *lwork, integer | ||
1049 | *info); | ||
1050 | |||
1051 | /* Subroutine */ int cungl2_(integer *m, integer *n, integer *k, complex *a, | ||
1052 | integer *lda, complex *tau, complex *work, integer *info); | ||
1053 | |||
1054 | /* Subroutine */ int cunglq_(integer *m, integer *n, integer *k, complex *a, | ||
1055 | integer *lda, complex *tau, complex *work, integer *lwork, integer * | ||
1056 | info); | ||
1057 | |||
1058 | /* Subroutine */ int cungql_(integer *m, integer *n, integer *k, complex *a, | ||
1059 | integer *lda, complex *tau, complex *work, integer *lwork, integer * | ||
1060 | info); | ||
1061 | |||
1062 | /* Subroutine */ int cungqr_(integer *m, integer *n, integer *k, complex *a, | ||
1063 | integer *lda, complex *tau, complex *work, integer *lwork, integer * | ||
1064 | info); | ||
1065 | |||
1066 | /* Subroutine */ int cungr2_(integer *m, integer *n, integer *k, complex *a, | ||
1067 | integer *lda, complex *tau, complex *work, integer *info); | ||
1068 | |||
1069 | /* Subroutine */ int cungrq_(integer *m, integer *n, integer *k, complex *a, | ||
1070 | integer *lda, complex *tau, complex *work, integer *lwork, integer * | ||
1071 | info); | ||
1072 | |||
1073 | /* Subroutine */ int cungtr_(char *uplo, integer *n, complex *a, integer *lda, | ||
1074 | complex *tau, complex *work, integer *lwork, integer *info); | ||
1075 | |||
1076 | /* Subroutine */ int cunm2l_(char *side, char *trans, integer *m, integer *n, | ||
1077 | integer *k, complex *a, integer *lda, complex *tau, complex *c__, | ||
1078 | integer *ldc, complex *work, integer *info); | ||
1079 | |||
1080 | /* Subroutine */ int cunm2r_(char *side, char *trans, integer *m, integer *n, | ||
1081 | integer *k, complex *a, integer *lda, complex *tau, complex *c__, | ||
1082 | integer *ldc, complex *work, integer *info); | ||
1083 | |||
1084 | /* Subroutine */ int cunmbr_(char *vect, char *side, char *trans, integer *m, | ||
1085 | integer *n, integer *k, complex *a, integer *lda, complex *tau, | ||
1086 | complex *c__, integer *ldc, complex *work, integer *lwork, integer * | ||
1087 | info); | ||
1088 | |||
1089 | /* Subroutine */ int cunmhr_(char *side, char *trans, integer *m, integer *n, | ||
1090 | integer *ilo, integer *ihi, complex *a, integer *lda, complex *tau, | ||
1091 | complex *c__, integer *ldc, complex *work, integer *lwork, integer * | ||
1092 | info); | ||
1093 | |||
1094 | /* Subroutine */ int cunml2_(char *side, char *trans, integer *m, integer *n, | ||
1095 | integer *k, complex *a, integer *lda, complex *tau, complex *c__, | ||
1096 | integer *ldc, complex *work, integer *info); | ||
1097 | |||
1098 | /* Subroutine */ int cunmlq_(char *side, char *trans, integer *m, integer *n, | ||
1099 | integer *k, complex *a, integer *lda, complex *tau, complex *c__, | ||
1100 | integer *ldc, complex *work, integer *lwork, integer *info); | ||
1101 | |||
1102 | /* Subroutine */ int cunmql_(char *side, char *trans, integer *m, integer *n, | ||
1103 | integer *k, complex *a, integer *lda, complex *tau, complex *c__, | ||
1104 | integer *ldc, complex *work, integer *lwork, integer *info); | ||
1105 | |||
1106 | /* Subroutine */ int cunmqr_(char *side, char *trans, integer *m, integer *n, | ||
1107 | integer *k, complex *a, integer *lda, complex *tau, complex *c__, | ||
1108 | integer *ldc, complex *work, integer *lwork, integer *info); | ||
1109 | |||
1110 | /* Subroutine */ int cunmr2_(char *side, char *trans, integer *m, integer *n, | ||
1111 | integer *k, complex *a, integer *lda, complex *tau, complex *c__, | ||
1112 | integer *ldc, complex *work, integer *info); | ||
1113 | |||
1114 | /* Subroutine */ int cunmr3_(char *side, char *trans, integer *m, integer *n, | ||
1115 | integer *k, integer *l, complex *a, integer *lda, complex *tau, | ||
1116 | complex *c__, integer *ldc, complex *work, integer *info); | ||
1117 | |||
1118 | /* Subroutine */ int cunmrq_(char *side, char *trans, integer *m, integer *n, | ||
1119 | integer *k, complex *a, integer *lda, complex *tau, complex *c__, | ||
1120 | integer *ldc, complex *work, integer *lwork, integer *info); | ||
1121 | |||
1122 | /* Subroutine */ int cunmrz_(char *side, char *trans, integer *m, integer *n, | ||
1123 | integer *k, integer *l, complex *a, integer *lda, complex *tau, | ||
1124 | complex *c__, integer *ldc, complex *work, integer *lwork, integer * | ||
1125 | info); | ||
1126 | |||
1127 | /* Subroutine */ int cunmtr_(char *side, char *uplo, char *trans, integer *m, | ||
1128 | integer *n, complex *a, integer *lda, complex *tau, complex *c__, | ||
1129 | integer *ldc, complex *work, integer *lwork, integer *info); | ||
1130 | |||
1131 | /* Subroutine */ int cupgtr_(char *uplo, integer *n, complex *ap, complex * | ||
1132 | tau, complex *q, integer *ldq, complex *work, integer *info); | ||
1133 | |||
1134 | /* Subroutine */ int cupmtr_(char *side, char *uplo, char *trans, integer *m, | ||
1135 | integer *n, complex *ap, complex *tau, complex *c__, integer *ldc, | ||
1136 | complex *work, integer *info); | ||
1137 | |||
1138 | /* Subroutine */ int dbdsdc_(char *uplo, char *compq, integer *n, doublereal * | ||
1139 | d__, doublereal *e, doublereal *u, integer *ldu, doublereal *vt, | ||
1140 | integer *ldvt, doublereal *q, integer *iq, doublereal *work, integer * | ||
1141 | iwork, integer *info); | ||
1142 | |||
1143 | /* Subroutine */ int dbdsqr_(char *uplo, integer *n, integer *ncvt, integer * | ||
1144 | nru, integer *ncc, doublereal *d__, doublereal *e, doublereal *vt, | ||
1145 | integer *ldvt, doublereal *u, integer *ldu, doublereal *c__, integer * | ||
1146 | ldc, doublereal *work, integer *info); | ||
1147 | |||
1148 | /* Subroutine */ int ddisna_(char *job, integer *m, integer *n, doublereal * | ||
1149 | d__, doublereal *sep, integer *info); | ||
1150 | |||
1151 | /* Subroutine */ int dgbbrd_(char *vect, integer *m, integer *n, integer *ncc, | ||
1152 | integer *kl, integer *ku, doublereal *ab, integer *ldab, doublereal * | ||
1153 | d__, doublereal *e, doublereal *q, integer *ldq, doublereal *pt, | ||
1154 | integer *ldpt, doublereal *c__, integer *ldc, doublereal *work, | ||
1155 | integer *info); | ||
1156 | |||
1157 | /* Subroutine */ int dgbcon_(char *norm, integer *n, integer *kl, integer *ku, | ||
1158 | doublereal *ab, integer *ldab, integer *ipiv, doublereal *anorm, | ||
1159 | doublereal *rcond, doublereal *work, integer *iwork, integer *info); | ||
1160 | |||
1161 | /* Subroutine */ int dgbequ_(integer *m, integer *n, integer *kl, integer *ku, | ||
1162 | doublereal *ab, integer *ldab, doublereal *r__, doublereal *c__, | ||
1163 | doublereal *rowcnd, doublereal *colcnd, doublereal *amax, integer * | ||
1164 | info); | ||
1165 | |||
1166 | /* Subroutine */ int dgbrfs_(char *trans, integer *n, integer *kl, integer * | ||
1167 | ku, integer *nrhs, doublereal *ab, integer *ldab, doublereal *afb, | ||
1168 | integer *ldafb, integer *ipiv, doublereal *b, integer *ldb, | ||
1169 | doublereal *x, integer *ldx, doublereal *ferr, doublereal *berr, | ||
1170 | doublereal *work, integer *iwork, integer *info); | ||
1171 | |||
1172 | /* Subroutine */ int dgbsv_(integer *n, integer *kl, integer *ku, integer * | ||
1173 | nrhs, doublereal *ab, integer *ldab, integer *ipiv, doublereal *b, | ||
1174 | integer *ldb, integer *info); | ||
1175 | |||
1176 | /* Subroutine */ int dgbsvx_(char *fact, char *trans, integer *n, integer *kl, | ||
1177 | integer *ku, integer *nrhs, doublereal *ab, integer *ldab, | ||
1178 | doublereal *afb, integer *ldafb, integer *ipiv, char *equed, | ||
1179 | doublereal *r__, doublereal *c__, doublereal *b, integer *ldb, | ||
1180 | doublereal *x, integer *ldx, doublereal *rcond, doublereal *ferr, | ||
1181 | doublereal *berr, doublereal *work, integer *iwork, integer *info); | ||
1182 | |||
1183 | /* Subroutine */ int dgbtf2_(integer *m, integer *n, integer *kl, integer *ku, | ||
1184 | doublereal *ab, integer *ldab, integer *ipiv, integer *info); | ||
1185 | |||
1186 | /* Subroutine */ int dgbtrf_(integer *m, integer *n, integer *kl, integer *ku, | ||
1187 | doublereal *ab, integer *ldab, integer *ipiv, integer *info); | ||
1188 | |||
1189 | /* Subroutine */ int dgbtrs_(char *trans, integer *n, integer *kl, integer * | ||
1190 | ku, integer *nrhs, doublereal *ab, integer *ldab, integer *ipiv, | ||
1191 | doublereal *b, integer *ldb, integer *info); | ||
1192 | |||
1193 | /* Subroutine */ int dgebak_(char *job, char *side, integer *n, integer *ilo, | ||
1194 | integer *ihi, doublereal *scale, integer *m, doublereal *v, integer * | ||
1195 | ldv, integer *info); | ||
1196 | |||
1197 | /* Subroutine */ int dgebal_(char *job, integer *n, doublereal *a, integer * | ||
1198 | lda, integer *ilo, integer *ihi, doublereal *scale, integer *info); | ||
1199 | |||
1200 | /* Subroutine */ int dgebd2_(integer *m, integer *n, doublereal *a, integer * | ||
1201 | lda, doublereal *d__, doublereal *e, doublereal *tauq, doublereal * | ||
1202 | taup, doublereal *work, integer *info); | ||
1203 | |||
1204 | /* Subroutine */ int dgebrd_(integer *m, integer *n, doublereal *a, integer * | ||
1205 | lda, doublereal *d__, doublereal *e, doublereal *tauq, doublereal * | ||
1206 | taup, doublereal *work, integer *lwork, integer *info); | ||
1207 | |||
1208 | /* Subroutine */ int dgecon_(char *norm, integer *n, doublereal *a, integer * | ||
1209 | lda, doublereal *anorm, doublereal *rcond, doublereal *work, integer * | ||
1210 | iwork, integer *info); | ||
1211 | |||
1212 | /* Subroutine */ int dgeequ_(integer *m, integer *n, doublereal *a, integer * | ||
1213 | lda, doublereal *r__, doublereal *c__, doublereal *rowcnd, doublereal | ||
1214 | *colcnd, doublereal *amax, integer *info); | ||
1215 | |||
1216 | /* Subroutine */ int dgees_(char *jobvs, char *sort, L_fp select, integer *n, | ||
1217 | doublereal *a, integer *lda, integer *sdim, doublereal *wr, | ||
1218 | doublereal *wi, doublereal *vs, integer *ldvs, doublereal *work, | ||
1219 | integer *lwork, logical *bwork, integer *info); | ||
1220 | |||
1221 | /* Subroutine */ int dgeesx_(char *jobvs, char *sort, L_fp select, char * | ||
1222 | sense, integer *n, doublereal *a, integer *lda, integer *sdim, | ||
1223 | doublereal *wr, doublereal *wi, doublereal *vs, integer *ldvs, | ||
1224 | doublereal *rconde, doublereal *rcondv, doublereal *work, integer * | ||
1225 | lwork, integer *iwork, integer *liwork, logical *bwork, integer *info); | ||
1226 | |||
1227 | /* Subroutine */ int dgeev_(char *jobvl, char *jobvr, integer *n, doublereal * | ||
1228 | a, integer *lda, doublereal *wr, doublereal *wi, doublereal *vl, | ||
1229 | integer *ldvl, doublereal *vr, integer *ldvr, doublereal *work, | ||
1230 | integer *lwork, integer *info); | ||
1231 | |||
1232 | /* Subroutine */ int dgeevx_(char *balanc, char *jobvl, char *jobvr, char * | ||
1233 | sense, integer *n, doublereal *a, integer *lda, doublereal *wr, | ||
1234 | doublereal *wi, doublereal *vl, integer *ldvl, doublereal *vr, | ||
1235 | integer *ldvr, integer *ilo, integer *ihi, doublereal *scale, | ||
1236 | doublereal *abnrm, doublereal *rconde, doublereal *rcondv, doublereal | ||
1237 | *work, integer *lwork, integer *iwork, integer *info); | ||
1238 | |||
1239 | /* Subroutine */ int dgegs_(char *jobvsl, char *jobvsr, integer *n, | ||
1240 | doublereal *a, integer *lda, doublereal *b, integer *ldb, doublereal * | ||
1241 | alphar, doublereal *alphai, doublereal *beta, doublereal *vsl, | ||
1242 | integer *ldvsl, doublereal *vsr, integer *ldvsr, doublereal *work, | ||
1243 | integer *lwork, integer *info); | ||
1244 | |||
1245 | /* Subroutine */ int dgegv_(char *jobvl, char *jobvr, integer *n, doublereal * | ||
1246 | a, integer *lda, doublereal *b, integer *ldb, doublereal *alphar, | ||
1247 | doublereal *alphai, doublereal *beta, doublereal *vl, integer *ldvl, | ||
1248 | doublereal *vr, integer *ldvr, doublereal *work, integer *lwork, | ||
1249 | integer *info); | ||
1250 | |||
1251 | /* Subroutine */ int dgehd2_(integer *n, integer *ilo, integer *ihi, | ||
1252 | doublereal *a, integer *lda, doublereal *tau, doublereal *work, | ||
1253 | integer *info); | ||
1254 | |||
1255 | /* Subroutine */ int dgehrd_(integer *n, integer *ilo, integer *ihi, | ||
1256 | doublereal *a, integer *lda, doublereal *tau, doublereal *work, | ||
1257 | integer *lwork, integer *info); | ||
1258 | |||
1259 | /* Subroutine */ int dgelq2_(integer *m, integer *n, doublereal *a, integer * | ||
1260 | lda, doublereal *tau, doublereal *work, integer *info); | ||
1261 | |||
1262 | /* Subroutine */ int dgelqf_(integer *m, integer *n, doublereal *a, integer * | ||
1263 | lda, doublereal *tau, doublereal *work, integer *lwork, integer *info); | ||
1264 | |||
1265 | /* Subroutine */ int dgels_(char *trans, integer *m, integer *n, integer * | ||
1266 | nrhs, doublereal *a, integer *lda, doublereal *b, integer *ldb, | ||
1267 | doublereal *work, integer *lwork, integer *info); | ||
1268 | |||
1269 | /* Subroutine */ int dgelsd_(integer *m, integer *n, integer *nrhs, | ||
1270 | doublereal *a, integer *lda, doublereal *b, integer *ldb, doublereal * | ||
1271 | s, doublereal *rcond, integer *rank, doublereal *work, integer *lwork, | ||
1272 | integer *iwork, integer *info); | ||
1273 | |||
1274 | /* Subroutine */ int dgelss_(integer *m, integer *n, integer *nrhs, | ||
1275 | doublereal *a, integer *lda, doublereal *b, integer *ldb, doublereal * | ||
1276 | s, doublereal *rcond, integer *rank, doublereal *work, integer *lwork, | ||
1277 | integer *info); | ||
1278 | |||
1279 | /* Subroutine */ int dgelsx_(integer *m, integer *n, integer *nrhs, | ||
1280 | doublereal *a, integer *lda, doublereal *b, integer *ldb, integer * | ||
1281 | jpvt, doublereal *rcond, integer *rank, doublereal *work, integer * | ||
1282 | info); | ||
1283 | |||
1284 | /* Subroutine */ int dgelsy_(integer *m, integer *n, integer *nrhs, | ||
1285 | doublereal *a, integer *lda, doublereal *b, integer *ldb, integer * | ||
1286 | jpvt, doublereal *rcond, integer *rank, doublereal *work, integer * | ||
1287 | lwork, integer *info); | ||
1288 | |||
1289 | /* Subroutine */ int dgeql2_(integer *m, integer *n, doublereal *a, integer * | ||
1290 | lda, doublereal *tau, doublereal *work, integer *info); | ||
1291 | |||
1292 | /* Subroutine */ int dgeqlf_(integer *m, integer *n, doublereal *a, integer * | ||
1293 | lda, doublereal *tau, doublereal *work, integer *lwork, integer *info); | ||
1294 | |||
1295 | /* Subroutine */ int dgeqp3_(integer *m, integer *n, doublereal *a, integer * | ||
1296 | lda, integer *jpvt, doublereal *tau, doublereal *work, integer *lwork, | ||
1297 | integer *info); | ||
1298 | |||
1299 | /* Subroutine */ int dgeqpf_(integer *m, integer *n, doublereal *a, integer * | ||
1300 | lda, integer *jpvt, doublereal *tau, doublereal *work, integer *info); | ||
1301 | |||
1302 | /* Subroutine */ int dgeqr2_(integer *m, integer *n, doublereal *a, integer * | ||
1303 | lda, doublereal *tau, doublereal *work, integer *info); | ||
1304 | |||
1305 | /* Subroutine */ int dgeqrf_(integer *m, integer *n, doublereal *a, integer * | ||
1306 | lda, doublereal *tau, doublereal *work, integer *lwork, integer *info); | ||
1307 | |||
1308 | /* Subroutine */ int dgerfs_(char *trans, integer *n, integer *nrhs, | ||
1309 | doublereal *a, integer *lda, doublereal *af, integer *ldaf, integer * | ||
1310 | ipiv, doublereal *b, integer *ldb, doublereal *x, integer *ldx, | ||
1311 | doublereal *ferr, doublereal *berr, doublereal *work, integer *iwork, | ||
1312 | integer *info); | ||
1313 | |||
1314 | /* Subroutine */ int dgerq2_(integer *m, integer *n, doublereal *a, integer * | ||
1315 | lda, doublereal *tau, doublereal *work, integer *info); | ||
1316 | |||
1317 | /* Subroutine */ int dgerqf_(integer *m, integer *n, doublereal *a, integer * | ||
1318 | lda, doublereal *tau, doublereal *work, integer *lwork, integer *info); | ||
1319 | |||
1320 | /* Subroutine */ int dgesc2_(integer *n, doublereal *a, integer *lda, | ||
1321 | doublereal *rhs, integer *ipiv, integer *jpiv, doublereal *scale); | ||
1322 | |||
1323 | /* Subroutine */ int dgesdd_(char *jobz, integer *m, integer *n, doublereal * | ||
1324 | a, integer *lda, doublereal *s, doublereal *u, integer *ldu, | ||
1325 | doublereal *vt, integer *ldvt, doublereal *work, integer *lwork, | ||
1326 | integer *iwork, integer *info); | ||
1327 | |||
1328 | /* Subroutine */ int dgesv_(integer *n, integer *nrhs, doublereal *a, integer | ||
1329 | *lda, integer *ipiv, doublereal *b, integer *ldb, integer *info); | ||
1330 | |||
1331 | /* Subroutine */ int dgesvd_(char *jobu, char *jobvt, integer *m, integer *n, | ||
1332 | doublereal *a, integer *lda, doublereal *s, doublereal *u, integer * | ||
1333 | ldu, doublereal *vt, integer *ldvt, doublereal *work, integer *lwork, | ||
1334 | integer *info); | ||
1335 | |||
1336 | /* Subroutine */ int dgesvx_(char *fact, char *trans, integer *n, integer * | ||
1337 | nrhs, doublereal *a, integer *lda, doublereal *af, integer *ldaf, | ||
1338 | integer *ipiv, char *equed, doublereal *r__, doublereal *c__, | ||
1339 | doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * | ||
1340 | rcond, doublereal *ferr, doublereal *berr, doublereal *work, integer * | ||
1341 | iwork, integer *info); | ||
1342 | |||
1343 | /* Subroutine */ int dgetc2_(integer *n, doublereal *a, integer *lda, integer | ||
1344 | *ipiv, integer *jpiv, integer *info); | ||
1345 | |||
1346 | /* Subroutine */ int dgetf2_(integer *m, integer *n, doublereal *a, integer * | ||
1347 | lda, integer *ipiv, integer *info); | ||
1348 | |||
1349 | /* Subroutine */ int dgetrf_(integer *m, integer *n, doublereal *a, integer * | ||
1350 | lda, integer *ipiv, integer *info); | ||
1351 | |||
1352 | /* Subroutine */ int dgetri_(integer *n, doublereal *a, integer *lda, integer | ||
1353 | *ipiv, doublereal *work, integer *lwork, integer *info); | ||
1354 | |||
1355 | /* Subroutine */ int dgetrs_(char *trans, integer *n, integer *nrhs, | ||
1356 | doublereal *a, integer *lda, integer *ipiv, doublereal *b, integer * | ||
1357 | ldb, integer *info); | ||
1358 | |||
1359 | /* Subroutine */ int dggbak_(char *job, char *side, integer *n, integer *ilo, | ||
1360 | integer *ihi, doublereal *lscale, doublereal *rscale, integer *m, | ||
1361 | doublereal *v, integer *ldv, integer *info); | ||
1362 | |||
1363 | /* Subroutine */ int dggbal_(char *job, integer *n, doublereal *a, integer * | ||
1364 | lda, doublereal *b, integer *ldb, integer *ilo, integer *ihi, | ||
1365 | doublereal *lscale, doublereal *rscale, doublereal *work, integer * | ||
1366 | info); | ||
1367 | |||
1368 | /* Subroutine */ int dgges_(char *jobvsl, char *jobvsr, char *sort, L_fp | ||
1369 | delctg, integer *n, doublereal *a, integer *lda, doublereal *b, | ||
1370 | integer *ldb, integer *sdim, doublereal *alphar, doublereal *alphai, | ||
1371 | doublereal *beta, doublereal *vsl, integer *ldvsl, doublereal *vsr, | ||
1372 | integer *ldvsr, doublereal *work, integer *lwork, logical *bwork, | ||
1373 | integer *info); | ||
1374 | |||
1375 | /* Subroutine */ int dggesx_(char *jobvsl, char *jobvsr, char *sort, L_fp | ||
1376 | delctg, char *sense, integer *n, doublereal *a, integer *lda, | ||
1377 | doublereal *b, integer *ldb, integer *sdim, doublereal *alphar, | ||
1378 | doublereal *alphai, doublereal *beta, doublereal *vsl, integer *ldvsl, | ||
1379 | doublereal *vsr, integer *ldvsr, doublereal *rconde, doublereal * | ||
1380 | rcondv, doublereal *work, integer *lwork, integer *iwork, integer * | ||
1381 | liwork, logical *bwork, integer *info); | ||
1382 | |||
1383 | /* Subroutine */ int dggev_(char *jobvl, char *jobvr, integer *n, doublereal * | ||
1384 | a, integer *lda, doublereal *b, integer *ldb, doublereal *alphar, | ||
1385 | doublereal *alphai, doublereal *beta, doublereal *vl, integer *ldvl, | ||
1386 | doublereal *vr, integer *ldvr, doublereal *work, integer *lwork, | ||
1387 | integer *info); | ||
1388 | |||
1389 | /* Subroutine */ int dggevx_(char *balanc, char *jobvl, char *jobvr, char * | ||
1390 | sense, integer *n, doublereal *a, integer *lda, doublereal *b, | ||
1391 | integer *ldb, doublereal *alphar, doublereal *alphai, doublereal * | ||
1392 | beta, doublereal *vl, integer *ldvl, doublereal *vr, integer *ldvr, | ||
1393 | integer *ilo, integer *ihi, doublereal *lscale, doublereal *rscale, | ||
1394 | doublereal *abnrm, doublereal *bbnrm, doublereal *rconde, doublereal * | ||
1395 | rcondv, doublereal *work, integer *lwork, integer *iwork, logical * | ||
1396 | bwork, integer *info); | ||
1397 | |||
1398 | /* Subroutine */ int dggglm_(integer *n, integer *m, integer *p, doublereal * | ||
1399 | a, integer *lda, doublereal *b, integer *ldb, doublereal *d__, | ||
1400 | doublereal *x, doublereal *y, doublereal *work, integer *lwork, | ||
1401 | integer *info); | ||
1402 | |||
1403 | /* Subroutine */ int dgghrd_(char *compq, char *compz, integer *n, integer * | ||
1404 | ilo, integer *ihi, doublereal *a, integer *lda, doublereal *b, | ||
1405 | integer *ldb, doublereal *q, integer *ldq, doublereal *z__, integer * | ||
1406 | ldz, integer *info); | ||
1407 | |||
1408 | /* Subroutine */ int dgglse_(integer *m, integer *n, integer *p, doublereal * | ||
1409 | a, integer *lda, doublereal *b, integer *ldb, doublereal *c__, | ||
1410 | doublereal *d__, doublereal *x, doublereal *work, integer *lwork, | ||
1411 | integer *info); | ||
1412 | |||
1413 | /* Subroutine */ int dggqrf_(integer *n, integer *m, integer *p, doublereal * | ||
1414 | a, integer *lda, doublereal *taua, doublereal *b, integer *ldb, | ||
1415 | doublereal *taub, doublereal *work, integer *lwork, integer *info); | ||
1416 | |||
1417 | /* Subroutine */ int dggrqf_(integer *m, integer *p, integer *n, doublereal * | ||
1418 | a, integer *lda, doublereal *taua, doublereal *b, integer *ldb, | ||
1419 | doublereal *taub, doublereal *work, integer *lwork, integer *info); | ||
1420 | |||
1421 | /* Subroutine */ int dggsvd_(char *jobu, char *jobv, char *jobq, integer *m, | ||
1422 | integer *n, integer *p, integer *k, integer *l, doublereal *a, | ||
1423 | integer *lda, doublereal *b, integer *ldb, doublereal *alpha, | ||
1424 | doublereal *beta, doublereal *u, integer *ldu, doublereal *v, integer | ||
1425 | *ldv, doublereal *q, integer *ldq, doublereal *work, integer *iwork, | ||
1426 | integer *info); | ||
1427 | |||
1428 | /* Subroutine */ int dggsvp_(char *jobu, char *jobv, char *jobq, integer *m, | ||
1429 | integer *p, integer *n, doublereal *a, integer *lda, doublereal *b, | ||
1430 | integer *ldb, doublereal *tola, doublereal *tolb, integer *k, integer | ||
1431 | *l, doublereal *u, integer *ldu, doublereal *v, integer *ldv, | ||
1432 | doublereal *q, integer *ldq, integer *iwork, doublereal *tau, | ||
1433 | doublereal *work, integer *info); | ||
1434 | |||
1435 | /* Subroutine */ int dgtcon_(char *norm, integer *n, doublereal *dl, | ||
1436 | doublereal *d__, doublereal *du, doublereal *du2, integer *ipiv, | ||
1437 | doublereal *anorm, doublereal *rcond, doublereal *work, integer * | ||
1438 | iwork, integer *info); | ||
1439 | |||
1440 | /* Subroutine */ int dgtrfs_(char *trans, integer *n, integer *nrhs, | ||
1441 | doublereal *dl, doublereal *d__, doublereal *du, doublereal *dlf, | ||
1442 | doublereal *df, doublereal *duf, doublereal *du2, integer *ipiv, | ||
1443 | doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * | ||
1444 | ferr, doublereal *berr, doublereal *work, integer *iwork, integer * | ||
1445 | info); | ||
1446 | |||
1447 | /* Subroutine */ int dgtsv_(integer *n, integer *nrhs, doublereal *dl, | ||
1448 | doublereal *d__, doublereal *du, doublereal *b, integer *ldb, integer | ||
1449 | *info); | ||
1450 | |||
1451 | /* Subroutine */ int dgtsvx_(char *fact, char *trans, integer *n, integer * | ||
1452 | nrhs, doublereal *dl, doublereal *d__, doublereal *du, doublereal * | ||
1453 | dlf, doublereal *df, doublereal *duf, doublereal *du2, integer *ipiv, | ||
1454 | doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * | ||
1455 | rcond, doublereal *ferr, doublereal *berr, doublereal *work, integer * | ||
1456 | iwork, integer *info); | ||
1457 | |||
1458 | /* Subroutine */ int dgttrf_(integer *n, doublereal *dl, doublereal *d__, | ||
1459 | doublereal *du, doublereal *du2, integer *ipiv, integer *info); | ||
1460 | |||
1461 | /* Subroutine */ int dgttrs_(char *trans, integer *n, integer *nrhs, | ||
1462 | doublereal *dl, doublereal *d__, doublereal *du, doublereal *du2, | ||
1463 | integer *ipiv, doublereal *b, integer *ldb, integer *info); | ||
1464 | |||
1465 | /* Subroutine */ int dgtts2_(integer *itrans, integer *n, integer *nrhs, | ||
1466 | doublereal *dl, doublereal *d__, doublereal *du, doublereal *du2, | ||
1467 | integer *ipiv, doublereal *b, integer *ldb); | ||
1468 | |||
1469 | /* Subroutine */ int dhgeqz_(char *job, char *compq, char *compz, integer *n, | ||
1470 | integer *ilo, integer *ihi, doublereal *a, integer *lda, doublereal * | ||
1471 | b, integer *ldb, doublereal *alphar, doublereal *alphai, doublereal * | ||
1472 | beta, doublereal *q, integer *ldq, doublereal *z__, integer *ldz, | ||
1473 | doublereal *work, integer *lwork, integer *info); | ||
1474 | |||
1475 | /* Subroutine */ int dhsein_(char *side, char *eigsrc, char *initv, logical * | ||
1476 | select, integer *n, doublereal *h__, integer *ldh, doublereal *wr, | ||
1477 | doublereal *wi, doublereal *vl, integer *ldvl, doublereal *vr, | ||
1478 | integer *ldvr, integer *mm, integer *m, doublereal *work, integer * | ||
1479 | ifaill, integer *ifailr, integer *info); | ||
1480 | |||
1481 | /* Subroutine */ int dhseqr_(char *job, char *compz, integer *n, integer *ilo, | ||
1482 | integer *ihi, doublereal *h__, integer *ldh, doublereal *wr, | ||
1483 | doublereal *wi, doublereal *z__, integer *ldz, doublereal *work, | ||
1484 | integer *lwork, integer *info); | ||
1485 | |||
1486 | /* Subroutine */ int dlabad_(doublereal *small, doublereal *large); | ||
1487 | |||
1488 | /* Subroutine */ int dlabrd_(integer *m, integer *n, integer *nb, doublereal * | ||
1489 | a, integer *lda, doublereal *d__, doublereal *e, doublereal *tauq, | ||
1490 | doublereal *taup, doublereal *x, integer *ldx, doublereal *y, integer | ||
1491 | *ldy); | ||
1492 | |||
1493 | /* Subroutine */ int dlacon_(integer *n, doublereal *v, doublereal *x, | ||
1494 | integer *isgn, doublereal *est, integer *kase); | ||
1495 | |||
1496 | /* Subroutine */ int dlacpy_(char *uplo, integer *m, integer *n, doublereal * | ||
1497 | a, integer *lda, doublereal *b, integer *ldb); | ||
1498 | |||
1499 | /* Subroutine */ int dladiv_(doublereal *a, doublereal *b, doublereal *c__, | ||
1500 | doublereal *d__, doublereal *p, doublereal *q); | ||
1501 | |||
1502 | /* Subroutine */ int dlae2_(doublereal *a, doublereal *b, doublereal *c__, | ||
1503 | doublereal *rt1, doublereal *rt2); | ||
1504 | |||
1505 | /* Subroutine */ int dlaebz_(integer *ijob, integer *nitmax, integer *n, | ||
1506 | integer *mmax, integer *minp, integer *nbmin, doublereal *abstol, | ||
1507 | doublereal *reltol, doublereal *pivmin, doublereal *d__, doublereal * | ||
1508 | e, doublereal *e2, integer *nval, doublereal *ab, doublereal *c__, | ||
1509 | integer *mout, integer *nab, doublereal *work, integer *iwork, | ||
1510 | integer *info); | ||
1511 | |||
1512 | /* Subroutine */ int dlaed0_(integer *icompq, integer *qsiz, integer *n, | ||
1513 | doublereal *d__, doublereal *e, doublereal *q, integer *ldq, | ||
1514 | doublereal *qstore, integer *ldqs, doublereal *work, integer *iwork, | ||
1515 | integer *info); | ||
1516 | |||
1517 | /* Subroutine */ int dlaed1_(integer *n, doublereal *d__, doublereal *q, | ||
1518 | integer *ldq, integer *indxq, doublereal *rho, integer *cutpnt, | ||
1519 | doublereal *work, integer *iwork, integer *info); | ||
1520 | |||
1521 | /* Subroutine */ int dlaed2_(integer *k, integer *n, integer *n1, doublereal * | ||
1522 | d__, doublereal *q, integer *ldq, integer *indxq, doublereal *rho, | ||
1523 | doublereal *z__, doublereal *dlamda, doublereal *w, doublereal *q2, | ||
1524 | integer *indx, integer *indxc, integer *indxp, integer *coltyp, | ||
1525 | integer *info); | ||
1526 | |||
1527 | /* Subroutine */ int dlaed3_(integer *k, integer *n, integer *n1, doublereal * | ||
1528 | d__, doublereal *q, integer *ldq, doublereal *rho, doublereal *dlamda, | ||
1529 | doublereal *q2, integer *indx, integer *ctot, doublereal *w, | ||
1530 | doublereal *s, integer *info); | ||
1531 | |||
1532 | /* Subroutine */ int dlaed4_(integer *n, integer *i__, doublereal *d__, | ||
1533 | doublereal *z__, doublereal *delta, doublereal *rho, doublereal *dlam, | ||
1534 | integer *info); | ||
1535 | |||
1536 | /* Subroutine */ int dlaed5_(integer *i__, doublereal *d__, doublereal *z__, | ||
1537 | doublereal *delta, doublereal *rho, doublereal *dlam); | ||
1538 | |||
1539 | /* Subroutine */ int dlaed6_(integer *kniter, logical *orgati, doublereal * | ||
1540 | rho, doublereal *d__, doublereal *z__, doublereal *finit, doublereal * | ||
1541 | tau, integer *info); | ||
1542 | |||
1543 | /* Subroutine */ int dlaed7_(integer *icompq, integer *n, integer *qsiz, | ||
1544 | integer *tlvls, integer *curlvl, integer *curpbm, doublereal *d__, | ||
1545 | doublereal *q, integer *ldq, integer *indxq, doublereal *rho, integer | ||
1546 | *cutpnt, doublereal *qstore, integer *qptr, integer *prmptr, integer * | ||
1547 | perm, integer *givptr, integer *givcol, doublereal *givnum, | ||
1548 | doublereal *work, integer *iwork, integer *info); | ||
1549 | |||
1550 | /* Subroutine */ int dlaed8_(integer *icompq, integer *k, integer *n, integer | ||
1551 | *qsiz, doublereal *d__, doublereal *q, integer *ldq, integer *indxq, | ||
1552 | doublereal *rho, integer *cutpnt, doublereal *z__, doublereal *dlamda, | ||
1553 | doublereal *q2, integer *ldq2, doublereal *w, integer *perm, integer | ||
1554 | *givptr, integer *givcol, doublereal *givnum, integer *indxp, integer | ||
1555 | *indx, integer *info); | ||
1556 | |||
1557 | /* Subroutine */ int dlaed9_(integer *k, integer *kstart, integer *kstop, | ||
1558 | integer *n, doublereal *d__, doublereal *q, integer *ldq, doublereal * | ||
1559 | rho, doublereal *dlamda, doublereal *w, doublereal *s, integer *lds, | ||
1560 | integer *info); | ||
1561 | |||
1562 | /* Subroutine */ int dlaeda_(integer *n, integer *tlvls, integer *curlvl, | ||
1563 | integer *curpbm, integer *prmptr, integer *perm, integer *givptr, | ||
1564 | integer *givcol, doublereal *givnum, doublereal *q, integer *qptr, | ||
1565 | doublereal *z__, doublereal *ztemp, integer *info); | ||
1566 | |||
1567 | /* Subroutine */ int dlaein_(logical *rightv, logical *noinit, integer *n, | ||
1568 | doublereal *h__, integer *ldh, doublereal *wr, doublereal *wi, | ||
1569 | doublereal *vr, doublereal *vi, doublereal *b, integer *ldb, | ||
1570 | doublereal *work, doublereal *eps3, doublereal *smlnum, doublereal * | ||
1571 | bignum, integer *info); | ||
1572 | |||
1573 | /* Subroutine */ int dlaev2_(doublereal *a, doublereal *b, doublereal *c__, | ||
1574 | doublereal *rt1, doublereal *rt2, doublereal *cs1, doublereal *sn1); | ||
1575 | |||
1576 | /* Subroutine */ int dlaexc_(logical *wantq, integer *n, doublereal *t, | ||
1577 | integer *ldt, doublereal *q, integer *ldq, integer *j1, integer *n1, | ||
1578 | integer *n2, doublereal *work, integer *info); | ||
1579 | |||
1580 | /* Subroutine */ int dlag2_(doublereal *a, integer *lda, doublereal *b, | ||
1581 | integer *ldb, doublereal *safmin, doublereal *scale1, doublereal * | ||
1582 | scale2, doublereal *wr1, doublereal *wr2, doublereal *wi); | ||
1583 | |||
1584 | /* Subroutine */ int dlags2_(logical *upper, doublereal *a1, doublereal *a2, | ||
1585 | doublereal *a3, doublereal *b1, doublereal *b2, doublereal *b3, | ||
1586 | doublereal *csu, doublereal *snu, doublereal *csv, doublereal *snv, | ||
1587 | doublereal *csq, doublereal *snq); | ||
1588 | |||
1589 | /* Subroutine */ int dlagtf_(integer *n, doublereal *a, doublereal *lambda, | ||
1590 | doublereal *b, doublereal *c__, doublereal *tol, doublereal *d__, | ||
1591 | integer *in, integer *info); | ||
1592 | |||
1593 | /* Subroutine */ int dlagtm_(char *trans, integer *n, integer *nrhs, | ||
1594 | doublereal *alpha, doublereal *dl, doublereal *d__, doublereal *du, | ||
1595 | doublereal *x, integer *ldx, doublereal *beta, doublereal *b, integer | ||
1596 | *ldb); | ||
1597 | |||
1598 | /* Subroutine */ int dlagts_(integer *job, integer *n, doublereal *a, | ||
1599 | doublereal *b, doublereal *c__, doublereal *d__, integer *in, | ||
1600 | doublereal *y, doublereal *tol, integer *info); | ||
1601 | |||
1602 | /* Subroutine */ int dlagv2_(doublereal *a, integer *lda, doublereal *b, | ||
1603 | integer *ldb, doublereal *alphar, doublereal *alphai, doublereal * | ||
1604 | beta, doublereal *csl, doublereal *snl, doublereal *csr, doublereal * | ||
1605 | snr); | ||
1606 | |||
1607 | /* Subroutine */ int dlahqr_(logical *wantt, logical *wantz, integer *n, | ||
1608 | integer *ilo, integer *ihi, doublereal *h__, integer *ldh, doublereal | ||
1609 | *wr, doublereal *wi, integer *iloz, integer *ihiz, doublereal *z__, | ||
1610 | integer *ldz, integer *info); | ||
1611 | |||
1612 | /* Subroutine */ int dlahrd_(integer *n, integer *k, integer *nb, doublereal * | ||
1613 | a, integer *lda, doublereal *tau, doublereal *t, integer *ldt, | ||
1614 | doublereal *y, integer *ldy); | ||
1615 | |||
1616 | /* Subroutine */ int dlaic1_(integer *job, integer *j, doublereal *x, | ||
1617 | doublereal *sest, doublereal *w, doublereal *gamma, doublereal * | ||
1618 | sestpr, doublereal *s, doublereal *c__); | ||
1619 | |||
1620 | /* Subroutine */ int dlaln2_(logical *ltrans, integer *na, integer *nw, | ||
1621 | doublereal *smin, doublereal *ca, doublereal *a, integer *lda, | ||
1622 | doublereal *d1, doublereal *d2, doublereal *b, integer *ldb, | ||
1623 | doublereal *wr, doublereal *wi, doublereal *x, integer *ldx, | ||
1624 | doublereal *scale, doublereal *xnorm, integer *info); | ||
1625 | |||
1626 | /* Subroutine */ int dlals0_(integer *icompq, integer *nl, integer *nr, | ||
1627 | integer *sqre, integer *nrhs, doublereal *b, integer *ldb, doublereal | ||
1628 | *bx, integer *ldbx, integer *perm, integer *givptr, integer *givcol, | ||
1629 | integer *ldgcol, doublereal *givnum, integer *ldgnum, doublereal * | ||
1630 | poles, doublereal *difl, doublereal *difr, doublereal *z__, integer * | ||
1631 | k, doublereal *c__, doublereal *s, doublereal *work, integer *info); | ||
1632 | |||
1633 | /* Subroutine */ int dlalsa_(integer *icompq, integer *smlsiz, integer *n, | ||
1634 | integer *nrhs, doublereal *b, integer *ldb, doublereal *bx, integer * | ||
1635 | ldbx, doublereal *u, integer *ldu, doublereal *vt, integer *k, | ||
1636 | doublereal *difl, doublereal *difr, doublereal *z__, doublereal * | ||
1637 | poles, integer *givptr, integer *givcol, integer *ldgcol, integer * | ||
1638 | perm, doublereal *givnum, doublereal *c__, doublereal *s, doublereal * | ||
1639 | work, integer *iwork, integer *info); | ||
1640 | |||
1641 | /* Subroutine */ int dlalsd_(char *uplo, integer *smlsiz, integer *n, integer | ||
1642 | *nrhs, doublereal *d__, doublereal *e, doublereal *b, integer *ldb, | ||
1643 | doublereal *rcond, integer *rank, doublereal *work, integer *iwork, | ||
1644 | integer *info); | ||
1645 | |||
1646 | /* Subroutine */ int dlamc1_(integer *beta, integer *t, logical *rnd, logical | ||
1647 | *ieee1); | ||
1648 | |||
1649 | /* Subroutine */ int dlamc2_(integer *beta, integer *t, logical *rnd, | ||
1650 | doublereal *eps, integer *emin, doublereal *rmin, integer *emax, | ||
1651 | doublereal *rmax); | ||
1652 | |||
1653 | /* Subroutine */ int dlamc4_(integer *emin, doublereal *start, integer *base); | ||
1654 | |||
1655 | /* Subroutine */ int dlamc5_(integer *beta, integer *p, integer *emin, | ||
1656 | logical *ieee, integer *emax, doublereal *rmax); | ||
1657 | |||
1658 | /* Subroutine */ int dlamrg_(integer *n1, integer *n2, doublereal *a, integer | ||
1659 | *dtrd1, integer *dtrd2, integer *index); | ||
1660 | |||
1661 | /* Subroutine */ int dlanv2_(doublereal *a, doublereal *b, doublereal *c__, | ||
1662 | doublereal *d__, doublereal *rt1r, doublereal *rt1i, doublereal *rt2r, | ||
1663 | doublereal *rt2i, doublereal *cs, doublereal *sn); | ||
1664 | |||
1665 | /* Subroutine */ int dlapll_(integer *n, doublereal *x, integer *incx, | ||
1666 | doublereal *y, integer *incy, doublereal *ssmin); | ||
1667 | |||
1668 | /* Subroutine */ int dlapmt_(logical *forwrd, integer *m, integer *n, | ||
1669 | doublereal *x, integer *ldx, integer *k); | ||
1670 | |||
1671 | /* Subroutine */ int dlaqgb_(integer *m, integer *n, integer *kl, integer *ku, | ||
1672 | doublereal *ab, integer *ldab, doublereal *r__, doublereal *c__, | ||
1673 | doublereal *rowcnd, doublereal *colcnd, doublereal *amax, char *equed); | ||
1674 | |||
1675 | /* Subroutine */ int dlaqge_(integer *m, integer *n, doublereal *a, integer * | ||
1676 | lda, doublereal *r__, doublereal *c__, doublereal *rowcnd, doublereal | ||
1677 | *colcnd, doublereal *amax, char *equed); | ||
1678 | |||
1679 | /* Subroutine */ int dlaqp2_(integer *m, integer *n, integer *offset, | ||
1680 | doublereal *a, integer *lda, integer *jpvt, doublereal *tau, | ||
1681 | doublereal *vn1, doublereal *vn2, doublereal *work); | ||
1682 | |||
1683 | /* Subroutine */ int dlaqps_(integer *m, integer *n, integer *offset, integer | ||
1684 | *nb, integer *kb, doublereal *a, integer *lda, integer *jpvt, | ||
1685 | doublereal *tau, doublereal *vn1, doublereal *vn2, doublereal *auxv, | ||
1686 | doublereal *f, integer *ldf); | ||
1687 | |||
1688 | /* Subroutine */ int dlaqsb_(char *uplo, integer *n, integer *kd, doublereal * | ||
1689 | ab, integer *ldab, doublereal *s, doublereal *scond, doublereal *amax, | ||
1690 | char *equed); | ||
1691 | |||
1692 | /* Subroutine */ int dlaqsp_(char *uplo, integer *n, doublereal *ap, | ||
1693 | doublereal *s, doublereal *scond, doublereal *amax, char *equed); | ||
1694 | |||
1695 | /* Subroutine */ int dlaqsy_(char *uplo, integer *n, doublereal *a, integer * | ||
1696 | lda, doublereal *s, doublereal *scond, doublereal *amax, char *equed); | ||
1697 | |||
1698 | /* Subroutine */ int dlaqtr_(logical *ltran, logical *lreal, integer *n, | ||
1699 | doublereal *t, integer *ldt, doublereal *b, doublereal *w, doublereal | ||
1700 | *scale, doublereal *x, doublereal *work, integer *info); | ||
1701 | |||
1702 | /* Subroutine */ int dlar1v_(integer *n, integer *b1, integer *bn, doublereal | ||
1703 | *sigma, doublereal *d__, doublereal *l, doublereal *ld, doublereal * | ||
1704 | lld, doublereal *gersch, doublereal *z__, doublereal *ztz, doublereal | ||
1705 | *mingma, integer *r__, integer *isuppz, doublereal *work); | ||
1706 | |||
1707 | /* Subroutine */ int dlar2v_(integer *n, doublereal *x, doublereal *y, | ||
1708 | doublereal *z__, integer *incx, doublereal *c__, doublereal *s, | ||
1709 | integer *incc); | ||
1710 | |||
1711 | /* Subroutine */ int dlarf_(char *side, integer *m, integer *n, doublereal *v, | ||
1712 | integer *incv, doublereal *tau, doublereal *c__, integer *ldc, | ||
1713 | doublereal *work); | ||
1714 | |||
1715 | /* Subroutine */ int dlarfb_(char *side, char *trans, char *direct, char * | ||
1716 | storev, integer *m, integer *n, integer *k, doublereal *v, integer * | ||
1717 | ldv, doublereal *t, integer *ldt, doublereal *c__, integer *ldc, | ||
1718 | doublereal *work, integer *ldwork); | ||
1719 | |||
1720 | /* Subroutine */ int dlarfg_(integer *n, doublereal *alpha, doublereal *x, | ||
1721 | integer *incx, doublereal *tau); | ||
1722 | |||
1723 | /* Subroutine */ int dlarft_(char *direct, char *storev, integer *n, integer * | ||
1724 | k, doublereal *v, integer *ldv, doublereal *tau, doublereal *t, | ||
1725 | integer *ldt); | ||
1726 | |||
1727 | /* Subroutine */ int dlarfx_(char *side, integer *m, integer *n, doublereal * | ||
1728 | v, doublereal *tau, doublereal *c__, integer *ldc, doublereal *work); | ||
1729 | |||
1730 | /* Subroutine */ int dlargv_(integer *n, doublereal *x, integer *incx, | ||
1731 | doublereal *y, integer *incy, doublereal *c__, integer *incc); | ||
1732 | |||
1733 | /* Subroutine */ int dlarnv_(integer *idist, integer *iseed, integer *n, | ||
1734 | doublereal *x); | ||
1735 | |||
1736 | /* Subroutine */ int dlarrb_(integer *n, doublereal *d__, doublereal *l, | ||
1737 | doublereal *ld, doublereal *lld, integer *ifirst, integer *ilast, | ||
1738 | doublereal *sigma, doublereal *reltol, doublereal *w, doublereal * | ||
1739 | wgap, doublereal *werr, doublereal *work, integer *iwork, integer * | ||
1740 | info); | ||
1741 | |||
1742 | /* Subroutine */ int dlarre_(integer *n, doublereal *d__, doublereal *e, | ||
1743 | doublereal *tol, integer *nsplit, integer *isplit, integer *m, | ||
1744 | doublereal *w, doublereal *woff, doublereal *gersch, doublereal *work, | ||
1745 | integer *info); | ||
1746 | |||
1747 | /* Subroutine */ int dlarrf_(integer *n, doublereal *d__, doublereal *l, | ||
1748 | doublereal *ld, doublereal *lld, integer *ifirst, integer *ilast, | ||
1749 | doublereal *w, doublereal *dplus, doublereal *lplus, doublereal *work, | ||
1750 | integer *iwork, integer *info); | ||
1751 | |||
1752 | /* Subroutine */ int dlarrv_(integer *n, doublereal *d__, doublereal *l, | ||
1753 | integer *isplit, integer *m, doublereal *w, integer *iblock, | ||
1754 | doublereal *gersch, doublereal *tol, doublereal *z__, integer *ldz, | ||
1755 | integer *isuppz, doublereal *work, integer *iwork, integer *info); | ||
1756 | |||
1757 | /* Subroutine */ int dlartg_(doublereal *f, doublereal *g, doublereal *cs, | ||
1758 | doublereal *sn, doublereal *r__); | ||
1759 | |||
1760 | /* Subroutine */ int dlartv_(integer *n, doublereal *x, integer *incx, | ||
1761 | doublereal *y, integer *incy, doublereal *c__, doublereal *s, integer | ||
1762 | *incc); | ||
1763 | |||
1764 | /* Subroutine */ int dlaruv_(integer *iseed, integer *n, doublereal *x); | ||
1765 | |||
1766 | /* Subroutine */ int dlarz_(char *side, integer *m, integer *n, integer *l, | ||
1767 | doublereal *v, integer *incv, doublereal *tau, doublereal *c__, | ||
1768 | integer *ldc, doublereal *work); | ||
1769 | |||
1770 | /* Subroutine */ int dlarzb_(char *side, char *trans, char *direct, char * | ||
1771 | storev, integer *m, integer *n, integer *k, integer *l, doublereal *v, | ||
1772 | integer *ldv, doublereal *t, integer *ldt, doublereal *c__, integer * | ||
1773 | ldc, doublereal *work, integer *ldwork); | ||
1774 | |||
1775 | /* Subroutine */ int dlarzt_(char *direct, char *storev, integer *n, integer * | ||
1776 | k, doublereal *v, integer *ldv, doublereal *tau, doublereal *t, | ||
1777 | integer *ldt); | ||
1778 | |||
1779 | /* Subroutine */ int dlas2_(doublereal *f, doublereal *g, doublereal *h__, | ||
1780 | doublereal *ssmin, doublereal *ssmax); | ||
1781 | |||
1782 | /* Subroutine */ int dlascl_(char *type__, integer *kl, integer *ku, | ||
1783 | doublereal *cfrom, doublereal *cto, integer *m, integer *n, | ||
1784 | doublereal *a, integer *lda, integer *info); | ||
1785 | |||
1786 | /* Subroutine */ int dlasd0_(integer *n, integer *sqre, doublereal *d__, | ||
1787 | doublereal *e, doublereal *u, integer *ldu, doublereal *vt, integer * | ||
1788 | ldvt, integer *smlsiz, integer *iwork, doublereal *work, integer * | ||
1789 | info); | ||
1790 | |||
1791 | /* Subroutine */ int dlasd1_(integer *nl, integer *nr, integer *sqre, | ||
1792 | doublereal *d__, doublereal *alpha, doublereal *beta, doublereal *u, | ||
1793 | integer *ldu, doublereal *vt, integer *ldvt, integer *idxq, integer * | ||
1794 | iwork, doublereal *work, integer *info); | ||
1795 | |||
1796 | /* Subroutine */ int dlasd2_(integer *nl, integer *nr, integer *sqre, integer | ||
1797 | *k, doublereal *d__, doublereal *z__, doublereal *alpha, doublereal * | ||
1798 | beta, doublereal *u, integer *ldu, doublereal *vt, integer *ldvt, | ||
1799 | doublereal *dsigma, doublereal *u2, integer *ldu2, doublereal *vt2, | ||
1800 | integer *ldvt2, integer *idxp, integer *idx, integer *idxc, integer * | ||
1801 | idxq, integer *coltyp, integer *info); | ||
1802 | |||
1803 | /* Subroutine */ int dlasd3_(integer *nl, integer *nr, integer *sqre, integer | ||
1804 | *k, doublereal *d__, doublereal *q, integer *ldq, doublereal *dsigma, | ||
1805 | doublereal *u, integer *ldu, doublereal *u2, integer *ldu2, | ||
1806 | doublereal *vt, integer *ldvt, doublereal *vt2, integer *ldvt2, | ||
1807 | integer *idxc, integer *ctot, doublereal *z__, integer *info); | ||
1808 | |||
1809 | /* Subroutine */ int dlasd4_(integer *n, integer *i__, doublereal *d__, | ||
1810 | doublereal *z__, doublereal *delta, doublereal *rho, doublereal * | ||
1811 | sigma, doublereal *work, integer *info); | ||
1812 | |||
1813 | /* Subroutine */ int dlasd5_(integer *i__, doublereal *d__, doublereal *z__, | ||
1814 | doublereal *delta, doublereal *rho, doublereal *dsigma, doublereal * | ||
1815 | work); | ||
1816 | |||
1817 | /* Subroutine */ int dlasd6_(integer *icompq, integer *nl, integer *nr, | ||
1818 | integer *sqre, doublereal *d__, doublereal *vf, doublereal *vl, | ||
1819 | doublereal *alpha, doublereal *beta, integer *idxq, integer *perm, | ||
1820 | integer *givptr, integer *givcol, integer *ldgcol, doublereal *givnum, | ||
1821 | integer *ldgnum, doublereal *poles, doublereal *difl, doublereal * | ||
1822 | difr, doublereal *z__, integer *k, doublereal *c__, doublereal *s, | ||
1823 | doublereal *work, integer *iwork, integer *info); | ||
1824 | |||
1825 | /* Subroutine */ int dlasd7_(integer *icompq, integer *nl, integer *nr, | ||
1826 | integer *sqre, integer *k, doublereal *d__, doublereal *z__, | ||
1827 | doublereal *zw, doublereal *vf, doublereal *vfw, doublereal *vl, | ||
1828 | doublereal *vlw, doublereal *alpha, doublereal *beta, doublereal * | ||
1829 | dsigma, integer *idx, integer *idxp, integer *idxq, integer *perm, | ||
1830 | integer *givptr, integer *givcol, integer *ldgcol, doublereal *givnum, | ||
1831 | integer *ldgnum, doublereal *c__, doublereal *s, integer *info); | ||
1832 | |||
1833 | /* Subroutine */ int dlasd8_(integer *icompq, integer *k, doublereal *d__, | ||
1834 | doublereal *z__, doublereal *vf, doublereal *vl, doublereal *difl, | ||
1835 | doublereal *difr, integer *lddifr, doublereal *dsigma, doublereal * | ||
1836 | work, integer *info); | ||
1837 | |||
1838 | /* Subroutine */ int dlasd9_(integer *icompq, integer *ldu, integer *k, | ||
1839 | doublereal *d__, doublereal *z__, doublereal *vf, doublereal *vl, | ||
1840 | doublereal *difl, doublereal *difr, doublereal *dsigma, doublereal * | ||
1841 | work, integer *info); | ||
1842 | |||
1843 | /* Subroutine */ int dlasda_(integer *icompq, integer *smlsiz, integer *n, | ||
1844 | integer *sqre, doublereal *d__, doublereal *e, doublereal *u, integer | ||
1845 | *ldu, doublereal *vt, integer *k, doublereal *difl, doublereal *difr, | ||
1846 | doublereal *z__, doublereal *poles, integer *givptr, integer *givcol, | ||
1847 | integer *ldgcol, integer *perm, doublereal *givnum, doublereal *c__, | ||
1848 | doublereal *s, doublereal *work, integer *iwork, integer *info); | ||
1849 | |||
1850 | /* Subroutine */ int dlasdq_(char *uplo, integer *sqre, integer *n, integer * | ||
1851 | ncvt, integer *nru, integer *ncc, doublereal *d__, doublereal *e, | ||
1852 | doublereal *vt, integer *ldvt, doublereal *u, integer *ldu, | ||
1853 | doublereal *c__, integer *ldc, doublereal *work, integer *info); | ||
1854 | |||
1855 | /* Subroutine */ int dlasdt_(integer *n, integer *lvl, integer *nd, integer * | ||
1856 | inode, integer *ndiml, integer *ndimr, integer *msub); | ||
1857 | |||
1858 | /* Subroutine */ int dlaset_(char *uplo, integer *m, integer *n, doublereal * | ||
1859 | alpha, doublereal *beta, doublereal *a, integer *lda); | ||
1860 | |||
1861 | /* Subroutine */ int dlasq1_(integer *n, doublereal *d__, doublereal *e, | ||
1862 | doublereal *work, integer *info); | ||
1863 | |||
1864 | /* Subroutine */ int dlasq2_(integer *n, doublereal *z__, integer *info); | ||
1865 | |||
1866 | /* Subroutine */ int dlasq3_(integer *i0, integer *n0, doublereal *z__, | ||
1867 | integer *pp, doublereal *dmin__, doublereal *sigma, doublereal *desig, | ||
1868 | doublereal *qmax, integer *nfail, integer *iter, integer *ndiv, | ||
1869 | logical *ieee); | ||
1870 | |||
1871 | /* Subroutine */ int dlasq4_(integer *i0, integer *n0, doublereal *z__, | ||
1872 | integer *pp, integer *n0in, doublereal *dmin__, doublereal *dmin1, | ||
1873 | doublereal *dmin2, doublereal *dn, doublereal *dn1, doublereal *dn2, | ||
1874 | doublereal *tau, integer *ttype); | ||
1875 | |||
1876 | /* Subroutine */ int dlasq5_(integer *i0, integer *n0, doublereal *z__, | ||
1877 | integer *pp, doublereal *tau, doublereal *dmin__, doublereal *dmin1, | ||
1878 | doublereal *dmin2, doublereal *dn, doublereal *dnm1, doublereal *dnm2, | ||
1879 | logical *ieee); | ||
1880 | |||
1881 | /* Subroutine */ int dlasq6_(integer *i0, integer *n0, doublereal *z__, | ||
1882 | integer *pp, doublereal *dmin__, doublereal *dmin1, doublereal *dmin2, | ||
1883 | doublereal *dn, doublereal *dnm1, doublereal *dnm2); | ||
1884 | |||
1885 | /* Subroutine */ int dlasr_(char *side, char *pivot, char *direct, integer *m, | ||
1886 | integer *n, doublereal *c__, doublereal *s, doublereal *a, integer * | ||
1887 | lda); | ||
1888 | |||
1889 | /* Subroutine */ int dlasrt_(char *id, integer *n, doublereal *d__, integer * | ||
1890 | info); | ||
1891 | |||
1892 | /* Subroutine */ int dlassq_(integer *n, doublereal *x, integer *incx, | ||
1893 | doublereal *scale, doublereal *sumsq); | ||
1894 | |||
1895 | /* Subroutine */ int dlasv2_(doublereal *f, doublereal *g, doublereal *h__, | ||
1896 | doublereal *ssmin, doublereal *ssmax, doublereal *snr, doublereal * | ||
1897 | csr, doublereal *snl, doublereal *csl); | ||
1898 | |||
1899 | /* Subroutine */ int dlaswp_(integer *n, doublereal *a, integer *lda, integer | ||
1900 | *k1, integer *k2, integer *ipiv, integer *incx); | ||
1901 | |||
1902 | /* Subroutine */ int dlasy2_(logical *ltranl, logical *ltranr, integer *isgn, | ||
1903 | integer *n1, integer *n2, doublereal *tl, integer *ldtl, doublereal * | ||
1904 | tr, integer *ldtr, doublereal *b, integer *ldb, doublereal *scale, | ||
1905 | doublereal *x, integer *ldx, doublereal *xnorm, integer *info); | ||
1906 | |||
1907 | /* Subroutine */ int dlasyf_(char *uplo, integer *n, integer *nb, integer *kb, | ||
1908 | doublereal *a, integer *lda, integer *ipiv, doublereal *w, integer * | ||
1909 | ldw, integer *info); | ||
1910 | |||
1911 | /* Subroutine */ int dlatbs_(char *uplo, char *trans, char *diag, char * | ||
1912 | normin, integer *n, integer *kd, doublereal *ab, integer *ldab, | ||
1913 | doublereal *x, doublereal *scale, doublereal *cnorm, integer *info); | ||
1914 | |||
1915 | /* Subroutine */ int dlatdf_(integer *ijob, integer *n, doublereal *z__, | ||
1916 | integer *ldz, doublereal *rhs, doublereal *rdsum, doublereal *rdscal, | ||
1917 | integer *ipiv, integer *jpiv); | ||
1918 | |||
1919 | /* Subroutine */ int dlatps_(char *uplo, char *trans, char *diag, char * | ||
1920 | normin, integer *n, doublereal *ap, doublereal *x, doublereal *scale, | ||
1921 | doublereal *cnorm, integer *info); | ||
1922 | |||
1923 | /* Subroutine */ int dlatrd_(char *uplo, integer *n, integer *nb, doublereal * | ||
1924 | a, integer *lda, doublereal *e, doublereal *tau, doublereal *w, | ||
1925 | integer *ldw); | ||
1926 | |||
1927 | /* Subroutine */ int dlatrs_(char *uplo, char *trans, char *diag, char * | ||
1928 | normin, integer *n, doublereal *a, integer *lda, doublereal *x, | ||
1929 | doublereal *scale, doublereal *cnorm, integer *info); | ||
1930 | |||
1931 | /* Subroutine */ int dlatrz_(integer *m, integer *n, integer *l, doublereal * | ||
1932 | a, integer *lda, doublereal *tau, doublereal *work); | ||
1933 | |||
1934 | /* Subroutine */ int dlatzm_(char *side, integer *m, integer *n, doublereal * | ||
1935 | v, integer *incv, doublereal *tau, doublereal *c1, doublereal *c2, | ||
1936 | integer *ldc, doublereal *work); | ||
1937 | |||
1938 | /* Subroutine */ int dlauu2_(char *uplo, integer *n, doublereal *a, integer * | ||
1939 | lda, integer *info); | ||
1940 | |||
1941 | /* Subroutine */ int dlauum_(char *uplo, integer *n, doublereal *a, integer * | ||
1942 | lda, integer *info); | ||
1943 | |||
1944 | /* Subroutine */ int dopgtr_(char *uplo, integer *n, doublereal *ap, | ||
1945 | doublereal *tau, doublereal *q, integer *ldq, doublereal *work, | ||
1946 | integer *info); | ||
1947 | |||
1948 | /* Subroutine */ int dopmtr_(char *side, char *uplo, char *trans, integer *m, | ||
1949 | integer *n, doublereal *ap, doublereal *tau, doublereal *c__, integer | ||
1950 | *ldc, doublereal *work, integer *info); | ||
1951 | |||
1952 | /* Subroutine */ int dorg2l_(integer *m, integer *n, integer *k, doublereal * | ||
1953 | a, integer *lda, doublereal *tau, doublereal *work, integer *info); | ||
1954 | |||
1955 | /* Subroutine */ int dorg2r_(integer *m, integer *n, integer *k, doublereal * | ||
1956 | a, integer *lda, doublereal *tau, doublereal *work, integer *info); | ||
1957 | |||
1958 | /* Subroutine */ int dorgbr_(char *vect, integer *m, integer *n, integer *k, | ||
1959 | doublereal *a, integer *lda, doublereal *tau, doublereal *work, | ||
1960 | integer *lwork, integer *info); | ||
1961 | |||
1962 | /* Subroutine */ int dorghr_(integer *n, integer *ilo, integer *ihi, | ||
1963 | doublereal *a, integer *lda, doublereal *tau, doublereal *work, | ||
1964 | integer *lwork, integer *info); | ||
1965 | |||
1966 | /* Subroutine */ int dorgl2_(integer *m, integer *n, integer *k, doublereal * | ||
1967 | a, integer *lda, doublereal *tau, doublereal *work, integer *info); | ||
1968 | |||
1969 | /* Subroutine */ int dorglq_(integer *m, integer *n, integer *k, doublereal * | ||
1970 | a, integer *lda, doublereal *tau, doublereal *work, integer *lwork, | ||
1971 | integer *info); | ||
1972 | |||
1973 | /* Subroutine */ int dorgql_(integer *m, integer *n, integer *k, doublereal * | ||
1974 | a, integer *lda, doublereal *tau, doublereal *work, integer *lwork, | ||
1975 | integer *info); | ||
1976 | |||
1977 | /* Subroutine */ int dorgqr_(integer *m, integer *n, integer *k, doublereal * | ||
1978 | a, integer *lda, doublereal *tau, doublereal *work, integer *lwork, | ||
1979 | integer *info); | ||
1980 | |||
1981 | /* Subroutine */ int dorgr2_(integer *m, integer *n, integer *k, doublereal * | ||
1982 | a, integer *lda, doublereal *tau, doublereal *work, integer *info); | ||
1983 | |||
1984 | /* Subroutine */ int dorgrq_(integer *m, integer *n, integer *k, doublereal * | ||
1985 | a, integer *lda, doublereal *tau, doublereal *work, integer *lwork, | ||
1986 | integer *info); | ||
1987 | |||
1988 | /* Subroutine */ int dorgtr_(char *uplo, integer *n, doublereal *a, integer * | ||
1989 | lda, doublereal *tau, doublereal *work, integer *lwork, integer *info); | ||
1990 | |||
1991 | /* Subroutine */ int dorm2l_(char *side, char *trans, integer *m, integer *n, | ||
1992 | integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * | ||
1993 | c__, integer *ldc, doublereal *work, integer *info); | ||
1994 | |||
1995 | /* Subroutine */ int dorm2r_(char *side, char *trans, integer *m, integer *n, | ||
1996 | integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * | ||
1997 | c__, integer *ldc, doublereal *work, integer *info); | ||
1998 | |||
1999 | /* Subroutine */ int dormbr_(char *vect, char *side, char *trans, integer *m, | ||
2000 | integer *n, integer *k, doublereal *a, integer *lda, doublereal *tau, | ||
2001 | doublereal *c__, integer *ldc, doublereal *work, integer *lwork, | ||
2002 | integer *info); | ||
2003 | |||
2004 | /* Subroutine */ int dormhr_(char *side, char *trans, integer *m, integer *n, | ||
2005 | integer *ilo, integer *ihi, doublereal *a, integer *lda, doublereal * | ||
2006 | tau, doublereal *c__, integer *ldc, doublereal *work, integer *lwork, | ||
2007 | integer *info); | ||
2008 | |||
2009 | /* Subroutine */ int dorml2_(char *side, char *trans, integer *m, integer *n, | ||
2010 | integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * | ||
2011 | c__, integer *ldc, doublereal *work, integer *info); | ||
2012 | |||
2013 | /* Subroutine */ int dormlq_(char *side, char *trans, integer *m, integer *n, | ||
2014 | integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * | ||
2015 | c__, integer *ldc, doublereal *work, integer *lwork, integer *info); | ||
2016 | |||
2017 | /* Subroutine */ int dormql_(char *side, char *trans, integer *m, integer *n, | ||
2018 | integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * | ||
2019 | c__, integer *ldc, doublereal *work, integer *lwork, integer *info); | ||
2020 | |||
2021 | /* Subroutine */ int dormqr_(char *side, char *trans, integer *m, integer *n, | ||
2022 | integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * | ||
2023 | c__, integer *ldc, doublereal *work, integer *lwork, integer *info); | ||
2024 | |||
2025 | /* Subroutine */ int dormr2_(char *side, char *trans, integer *m, integer *n, | ||
2026 | integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * | ||
2027 | c__, integer *ldc, doublereal *work, integer *info); | ||
2028 | |||
2029 | /* Subroutine */ int dormr3_(char *side, char *trans, integer *m, integer *n, | ||
2030 | integer *k, integer *l, doublereal *a, integer *lda, doublereal *tau, | ||
2031 | doublereal *c__, integer *ldc, doublereal *work, integer *info); | ||
2032 | |||
2033 | /* Subroutine */ int dormrq_(char *side, char *trans, integer *m, integer *n, | ||
2034 | integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * | ||
2035 | c__, integer *ldc, doublereal *work, integer *lwork, integer *info); | ||
2036 | |||
2037 | /* Subroutine */ int dormrz_(char *side, char *trans, integer *m, integer *n, | ||
2038 | integer *k, integer *l, doublereal *a, integer *lda, doublereal *tau, | ||
2039 | doublereal *c__, integer *ldc, doublereal *work, integer *lwork, | ||
2040 | integer *info); | ||
2041 | |||
2042 | /* Subroutine */ int dormtr_(char *side, char *uplo, char *trans, integer *m, | ||
2043 | integer *n, doublereal *a, integer *lda, doublereal *tau, doublereal * | ||
2044 | c__, integer *ldc, doublereal *work, integer *lwork, integer *info); | ||
2045 | |||
2046 | /* Subroutine */ int dpbcon_(char *uplo, integer *n, integer *kd, doublereal * | ||
2047 | ab, integer *ldab, doublereal *anorm, doublereal *rcond, doublereal * | ||
2048 | work, integer *iwork, integer *info); | ||
2049 | |||
2050 | /* Subroutine */ int dpbequ_(char *uplo, integer *n, integer *kd, doublereal * | ||
2051 | ab, integer *ldab, doublereal *s, doublereal *scond, doublereal *amax, | ||
2052 | integer *info); | ||
2053 | |||
2054 | /* Subroutine */ int dpbrfs_(char *uplo, integer *n, integer *kd, integer * | ||
2055 | nrhs, doublereal *ab, integer *ldab, doublereal *afb, integer *ldafb, | ||
2056 | doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * | ||
2057 | ferr, doublereal *berr, doublereal *work, integer *iwork, integer * | ||
2058 | info); | ||
2059 | |||
2060 | /* Subroutine */ int dpbstf_(char *uplo, integer *n, integer *kd, doublereal * | ||
2061 | ab, integer *ldab, integer *info); | ||
2062 | |||
2063 | /* Subroutine */ int dpbsv_(char *uplo, integer *n, integer *kd, integer * | ||
2064 | nrhs, doublereal *ab, integer *ldab, doublereal *b, integer *ldb, | ||
2065 | integer *info); | ||
2066 | |||
2067 | /* Subroutine */ int dpbsvx_(char *fact, char *uplo, integer *n, integer *kd, | ||
2068 | integer *nrhs, doublereal *ab, integer *ldab, doublereal *afb, | ||
2069 | integer *ldafb, char *equed, doublereal *s, doublereal *b, integer * | ||
2070 | ldb, doublereal *x, integer *ldx, doublereal *rcond, doublereal *ferr, | ||
2071 | doublereal *berr, doublereal *work, integer *iwork, integer *info); | ||
2072 | |||
2073 | /* Subroutine */ int dpbtf2_(char *uplo, integer *n, integer *kd, doublereal * | ||
2074 | ab, integer *ldab, integer *info); | ||
2075 | |||
2076 | /* Subroutine */ int dpbtrf_(char *uplo, integer *n, integer *kd, doublereal * | ||
2077 | ab, integer *ldab, integer *info); | ||
2078 | |||
2079 | /* Subroutine */ int dpbtrs_(char *uplo, integer *n, integer *kd, integer * | ||
2080 | nrhs, doublereal *ab, integer *ldab, doublereal *b, integer *ldb, | ||
2081 | integer *info); | ||
2082 | |||
2083 | /* Subroutine */ int dpocon_(char *uplo, integer *n, doublereal *a, integer * | ||
2084 | lda, doublereal *anorm, doublereal *rcond, doublereal *work, integer * | ||
2085 | iwork, integer *info); | ||
2086 | |||
2087 | /* Subroutine */ int dpoequ_(integer *n, doublereal *a, integer *lda, | ||
2088 | doublereal *s, doublereal *scond, doublereal *amax, integer *info); | ||
2089 | |||
2090 | /* Subroutine */ int dporfs_(char *uplo, integer *n, integer *nrhs, | ||
2091 | doublereal *a, integer *lda, doublereal *af, integer *ldaf, | ||
2092 | doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * | ||
2093 | ferr, doublereal *berr, doublereal *work, integer *iwork, integer * | ||
2094 | info); | ||
2095 | |||
2096 | /* Subroutine */ int dposv_(char *uplo, integer *n, integer *nrhs, doublereal | ||
2097 | *a, integer *lda, doublereal *b, integer *ldb, integer *info); | ||
2098 | |||
2099 | /* Subroutine */ int dposvx_(char *fact, char *uplo, integer *n, integer * | ||
2100 | nrhs, doublereal *a, integer *lda, doublereal *af, integer *ldaf, | ||
2101 | char *equed, doublereal *s, doublereal *b, integer *ldb, doublereal * | ||
2102 | x, integer *ldx, doublereal *rcond, doublereal *ferr, doublereal * | ||
2103 | berr, doublereal *work, integer *iwork, integer *info); | ||
2104 | |||
2105 | /* Subroutine */ int dpotf2_(char *uplo, integer *n, doublereal *a, integer * | ||
2106 | lda, integer *info); | ||
2107 | |||
2108 | /* Subroutine */ int dpotrf_(char *uplo, integer *n, doublereal *a, integer * | ||
2109 | lda, integer *info); | ||
2110 | |||
2111 | /* Subroutine */ int dpotri_(char *uplo, integer *n, doublereal *a, integer * | ||
2112 | lda, integer *info); | ||
2113 | |||
2114 | /* Subroutine */ int dpotrs_(char *uplo, integer *n, integer *nrhs, | ||
2115 | doublereal *a, integer *lda, doublereal *b, integer *ldb, integer * | ||
2116 | info); | ||
2117 | |||
2118 | /* Subroutine */ int dppcon_(char *uplo, integer *n, doublereal *ap, | ||
2119 | doublereal *anorm, doublereal *rcond, doublereal *work, integer * | ||
2120 | iwork, integer *info); | ||
2121 | |||
2122 | /* Subroutine */ int dppequ_(char *uplo, integer *n, doublereal *ap, | ||
2123 | doublereal *s, doublereal *scond, doublereal *amax, integer *info); | ||
2124 | |||
2125 | /* Subroutine */ int dpprfs_(char *uplo, integer *n, integer *nrhs, | ||
2126 | doublereal *ap, doublereal *afp, doublereal *b, integer *ldb, | ||
2127 | doublereal *x, integer *ldx, doublereal *ferr, doublereal *berr, | ||
2128 | doublereal *work, integer *iwork, integer *info); | ||
2129 | |||
2130 | /* Subroutine */ int dppsv_(char *uplo, integer *n, integer *nrhs, doublereal | ||
2131 | *ap, doublereal *b, integer *ldb, integer *info); | ||
2132 | |||
2133 | /* Subroutine */ int dppsvx_(char *fact, char *uplo, integer *n, integer * | ||
2134 | nrhs, doublereal *ap, doublereal *afp, char *equed, doublereal *s, | ||
2135 | doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * | ||
2136 | rcond, doublereal *ferr, doublereal *berr, doublereal *work, integer * | ||
2137 | iwork, integer *info); | ||
2138 | |||
2139 | /* Subroutine */ int dpptrf_(char *uplo, integer *n, doublereal *ap, integer * | ||
2140 | info); | ||
2141 | |||
2142 | /* Subroutine */ int dpptri_(char *uplo, integer *n, doublereal *ap, integer * | ||
2143 | info); | ||
2144 | |||
2145 | /* Subroutine */ int dpptrs_(char *uplo, integer *n, integer *nrhs, | ||
2146 | doublereal *ap, doublereal *b, integer *ldb, integer *info); | ||
2147 | |||
2148 | /* Subroutine */ int dptcon_(integer *n, doublereal *d__, doublereal *e, | ||
2149 | doublereal *anorm, doublereal *rcond, doublereal *work, integer *info); | ||
2150 | |||
2151 | /* Subroutine */ int dpteqr_(char *compz, integer *n, doublereal *d__, | ||
2152 | doublereal *e, doublereal *z__, integer *ldz, doublereal *work, | ||
2153 | integer *info); | ||
2154 | |||
2155 | /* Subroutine */ int dptrfs_(integer *n, integer *nrhs, doublereal *d__, | ||
2156 | doublereal *e, doublereal *df, doublereal *ef, doublereal *b, integer | ||
2157 | *ldb, doublereal *x, integer *ldx, doublereal *ferr, doublereal *berr, | ||
2158 | doublereal *work, integer *info); | ||
2159 | |||
2160 | /* Subroutine */ int dptsv_(integer *n, integer *nrhs, doublereal *d__, | ||
2161 | doublereal *e, doublereal *b, integer *ldb, integer *info); | ||
2162 | |||
2163 | /* Subroutine */ int dptsvx_(char *fact, integer *n, integer *nrhs, | ||
2164 | doublereal *d__, doublereal *e, doublereal *df, doublereal *ef, | ||
2165 | doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * | ||
2166 | rcond, doublereal *ferr, doublereal *berr, doublereal *work, integer * | ||
2167 | info); | ||
2168 | |||
2169 | /* Subroutine */ int dpttrf_(integer *n, doublereal *d__, doublereal *e, | ||
2170 | integer *info); | ||
2171 | |||
2172 | /* Subroutine */ int dpttrs_(integer *n, integer *nrhs, doublereal *d__, | ||
2173 | doublereal *e, doublereal *b, integer *ldb, integer *info); | ||
2174 | |||
2175 | /* Subroutine */ int dptts2_(integer *n, integer *nrhs, doublereal *d__, | ||
2176 | doublereal *e, doublereal *b, integer *ldb); | ||
2177 | |||
2178 | /* Subroutine */ int drscl_(integer *n, doublereal *sa, doublereal *sx, | ||
2179 | integer *incx); | ||
2180 | |||
2181 | /* Subroutine */ int dsbev_(char *jobz, char *uplo, integer *n, integer *kd, | ||
2182 | doublereal *ab, integer *ldab, doublereal *w, doublereal *z__, | ||
2183 | integer *ldz, doublereal *work, integer *info); | ||
2184 | |||
2185 | /* Subroutine */ int dsbevd_(char *jobz, char *uplo, integer *n, integer *kd, | ||
2186 | doublereal *ab, integer *ldab, doublereal *w, doublereal *z__, | ||
2187 | integer *ldz, doublereal *work, integer *lwork, integer *iwork, | ||
2188 | integer *liwork, integer *info); | ||
2189 | |||
2190 | /* Subroutine */ int dsbevx_(char *jobz, char *range, char *uplo, integer *n, | ||
2191 | integer *kd, doublereal *ab, integer *ldab, doublereal *q, integer * | ||
2192 | ldq, doublereal *vl, doublereal *vu, integer *il, integer *iu, | ||
2193 | doublereal *abstol, integer *m, doublereal *w, doublereal *z__, | ||
2194 | integer *ldz, doublereal *work, integer *iwork, integer *ifail, | ||
2195 | integer *info); | ||
2196 | |||
2197 | /* Subroutine */ int dsbgst_(char *vect, char *uplo, integer *n, integer *ka, | ||
2198 | integer *kb, doublereal *ab, integer *ldab, doublereal *bb, integer * | ||
2199 | ldbb, doublereal *x, integer *ldx, doublereal *work, integer *info); | ||
2200 | |||
2201 | /* Subroutine */ int dsbgv_(char *jobz, char *uplo, integer *n, integer *ka, | ||
2202 | integer *kb, doublereal *ab, integer *ldab, doublereal *bb, integer * | ||
2203 | ldbb, doublereal *w, doublereal *z__, integer *ldz, doublereal *work, | ||
2204 | integer *info); | ||
2205 | |||
2206 | /* Subroutine */ int dsbgvd_(char *jobz, char *uplo, integer *n, integer *ka, | ||
2207 | integer *kb, doublereal *ab, integer *ldab, doublereal *bb, integer * | ||
2208 | ldbb, doublereal *w, doublereal *z__, integer *ldz, doublereal *work, | ||
2209 | integer *lwork, integer *iwork, integer *liwork, integer *info); | ||
2210 | |||
2211 | /* Subroutine */ int dsbgvx_(char *jobz, char *range, char *uplo, integer *n, | ||
2212 | integer *ka, integer *kb, doublereal *ab, integer *ldab, doublereal * | ||
2213 | bb, integer *ldbb, doublereal *q, integer *ldq, doublereal *vl, | ||
2214 | doublereal *vu, integer *il, integer *iu, doublereal *abstol, integer | ||
2215 | *m, doublereal *w, doublereal *z__, integer *ldz, doublereal *work, | ||
2216 | integer *iwork, integer *ifail, integer *info); | ||
2217 | |||
2218 | /* Subroutine */ int dsbtrd_(char *vect, char *uplo, integer *n, integer *kd, | ||
2219 | doublereal *ab, integer *ldab, doublereal *d__, doublereal *e, | ||
2220 | doublereal *q, integer *ldq, doublereal *work, integer *info); | ||
2221 | |||
2222 | /* Subroutine */ int dspcon_(char *uplo, integer *n, doublereal *ap, integer * | ||
2223 | ipiv, doublereal *anorm, doublereal *rcond, doublereal *work, integer | ||
2224 | *iwork, integer *info); | ||
2225 | |||
2226 | /* Subroutine */ int dspev_(char *jobz, char *uplo, integer *n, doublereal * | ||
2227 | ap, doublereal *w, doublereal *z__, integer *ldz, doublereal *work, | ||
2228 | integer *info); | ||
2229 | |||
2230 | /* Subroutine */ int dspevd_(char *jobz, char *uplo, integer *n, doublereal * | ||
2231 | ap, doublereal *w, doublereal *z__, integer *ldz, doublereal *work, | ||
2232 | integer *lwork, integer *iwork, integer *liwork, integer *info); | ||
2233 | |||
2234 | /* Subroutine */ int dspevx_(char *jobz, char *range, char *uplo, integer *n, | ||
2235 | doublereal *ap, doublereal *vl, doublereal *vu, integer *il, integer * | ||
2236 | iu, doublereal *abstol, integer *m, doublereal *w, doublereal *z__, | ||
2237 | integer *ldz, doublereal *work, integer *iwork, integer *ifail, | ||
2238 | integer *info); | ||
2239 | |||
2240 | /* Subroutine */ int dspgst_(integer *itype, char *uplo, integer *n, | ||
2241 | doublereal *ap, doublereal *bp, integer *info); | ||
2242 | |||
2243 | /* Subroutine */ int dspgv_(integer *itype, char *jobz, char *uplo, integer * | ||
2244 | n, doublereal *ap, doublereal *bp, doublereal *w, doublereal *z__, | ||
2245 | integer *ldz, doublereal *work, integer *info); | ||
2246 | |||
2247 | /* Subroutine */ int dspgvd_(integer *itype, char *jobz, char *uplo, integer * | ||
2248 | n, doublereal *ap, doublereal *bp, doublereal *w, doublereal *z__, | ||
2249 | integer *ldz, doublereal *work, integer *lwork, integer *iwork, | ||
2250 | integer *liwork, integer *info); | ||
2251 | |||
2252 | /* Subroutine */ int dspgvx_(integer *itype, char *jobz, char *range, char * | ||
2253 | uplo, integer *n, doublereal *ap, doublereal *bp, doublereal *vl, | ||
2254 | doublereal *vu, integer *il, integer *iu, doublereal *abstol, integer | ||
2255 | *m, doublereal *w, doublereal *z__, integer *ldz, doublereal *work, | ||
2256 | integer *iwork, integer *ifail, integer *info); | ||
2257 | |||
2258 | /* Subroutine */ int dsprfs_(char *uplo, integer *n, integer *nrhs, | ||
2259 | doublereal *ap, doublereal *afp, integer *ipiv, doublereal *b, | ||
2260 | integer *ldb, doublereal *x, integer *ldx, doublereal *ferr, | ||
2261 | doublereal *berr, doublereal *work, integer *iwork, integer *info); | ||
2262 | |||
2263 | /* Subroutine */ int dspsv_(char *uplo, integer *n, integer *nrhs, doublereal | ||
2264 | *ap, integer *ipiv, doublereal *b, integer *ldb, integer *info); | ||
2265 | |||
2266 | /* Subroutine */ int dspsvx_(char *fact, char *uplo, integer *n, integer * | ||
2267 | nrhs, doublereal *ap, doublereal *afp, integer *ipiv, doublereal *b, | ||
2268 | integer *ldb, doublereal *x, integer *ldx, doublereal *rcond, | ||
2269 | doublereal *ferr, doublereal *berr, doublereal *work, integer *iwork, | ||
2270 | integer *info); | ||
2271 | |||
2272 | /* Subroutine */ int dsptrd_(char *uplo, integer *n, doublereal *ap, | ||
2273 | doublereal *d__, doublereal *e, doublereal *tau, integer *info); | ||
2274 | |||
2275 | /* Subroutine */ int dsptrf_(char *uplo, integer *n, doublereal *ap, integer * | ||
2276 | ipiv, integer *info); | ||
2277 | |||
2278 | /* Subroutine */ int dsptri_(char *uplo, integer *n, doublereal *ap, integer * | ||
2279 | ipiv, doublereal *work, integer *info); | ||
2280 | |||
2281 | /* Subroutine */ int dsptrs_(char *uplo, integer *n, integer *nrhs, | ||
2282 | doublereal *ap, integer *ipiv, doublereal *b, integer *ldb, integer * | ||
2283 | info); | ||
2284 | |||
2285 | /* Subroutine */ int dstebz_(char *range, char *order, integer *n, doublereal | ||
2286 | *vl, doublereal *vu, integer *il, integer *iu, doublereal *abstol, | ||
2287 | doublereal *d__, doublereal *e, integer *m, integer *nsplit, | ||
2288 | doublereal *w, integer *iblock, integer *isplit, doublereal *work, | ||
2289 | integer *iwork, integer *info); | ||
2290 | |||
2291 | /* Subroutine */ int dstedc_(char *compz, integer *n, doublereal *d__, | ||
2292 | doublereal *e, doublereal *z__, integer *ldz, doublereal *work, | ||
2293 | integer *lwork, integer *iwork, integer *liwork, integer *info); | ||
2294 | |||
2295 | /* Subroutine */ int dstegr_(char *jobz, char *range, integer *n, doublereal * | ||
2296 | d__, doublereal *e, doublereal *vl, doublereal *vu, integer *il, | ||
2297 | integer *iu, doublereal *abstol, integer *m, doublereal *w, | ||
2298 | doublereal *z__, integer *ldz, integer *isuppz, doublereal *work, | ||
2299 | integer *lwork, integer *iwork, integer *liwork, integer *info); | ||
2300 | |||
2301 | /* Subroutine */ int dstein_(integer *n, doublereal *d__, doublereal *e, | ||
2302 | integer *m, doublereal *w, integer *iblock, integer *isplit, | ||
2303 | doublereal *z__, integer *ldz, doublereal *work, integer *iwork, | ||
2304 | integer *ifail, integer *info); | ||
2305 | |||
2306 | /* Subroutine */ int dsteqr_(char *compz, integer *n, doublereal *d__, | ||
2307 | doublereal *e, doublereal *z__, integer *ldz, doublereal *work, | ||
2308 | integer *info); | ||
2309 | |||
2310 | /* Subroutine */ int dsterf_(integer *n, doublereal *d__, doublereal *e, | ||
2311 | integer *info); | ||
2312 | |||
2313 | /* Subroutine */ int dstev_(char *jobz, integer *n, doublereal *d__, | ||
2314 | doublereal *e, doublereal *z__, integer *ldz, doublereal *work, | ||
2315 | integer *info); | ||
2316 | |||
2317 | /* Subroutine */ int dstevd_(char *jobz, integer *n, doublereal *d__, | ||
2318 | doublereal *e, doublereal *z__, integer *ldz, doublereal *work, | ||
2319 | integer *lwork, integer *iwork, integer *liwork, integer *info); | ||
2320 | |||
2321 | /* Subroutine */ int dstevr_(char *jobz, char *range, integer *n, doublereal * | ||
2322 | d__, doublereal *e, doublereal *vl, doublereal *vu, integer *il, | ||
2323 | integer *iu, doublereal *abstol, integer *m, doublereal *w, | ||
2324 | doublereal *z__, integer *ldz, integer *isuppz, doublereal *work, | ||
2325 | integer *lwork, integer *iwork, integer *liwork, integer *info); | ||
2326 | |||
2327 | /* Subroutine */ int dstevx_(char *jobz, char *range, integer *n, doublereal * | ||
2328 | d__, doublereal *e, doublereal *vl, doublereal *vu, integer *il, | ||
2329 | integer *iu, doublereal *abstol, integer *m, doublereal *w, | ||
2330 | doublereal *z__, integer *ldz, doublereal *work, integer *iwork, | ||
2331 | integer *ifail, integer *info); | ||
2332 | |||
2333 | /* Subroutine */ int dsycon_(char *uplo, integer *n, doublereal *a, integer * | ||
2334 | lda, integer *ipiv, doublereal *anorm, doublereal *rcond, doublereal * | ||
2335 | work, integer *iwork, integer *info); | ||
2336 | |||
2337 | /* Subroutine */ int dsyev_(char *jobz, char *uplo, integer *n, doublereal *a, | ||
2338 | integer *lda, doublereal *w, doublereal *work, integer *lwork, | ||
2339 | integer *info); | ||
2340 | |||
2341 | /* Subroutine */ int dsyevd_(char *jobz, char *uplo, integer *n, doublereal * | ||
2342 | a, integer *lda, doublereal *w, doublereal *work, integer *lwork, | ||
2343 | integer *iwork, integer *liwork, integer *info); | ||
2344 | |||
2345 | /* Subroutine */ int dsyevr_(char *jobz, char *range, char *uplo, integer *n, | ||
2346 | doublereal *a, integer *lda, doublereal *vl, doublereal *vu, integer * | ||
2347 | il, integer *iu, doublereal *abstol, integer *m, doublereal *w, | ||
2348 | doublereal *z__, integer *ldz, integer *isuppz, doublereal *work, | ||
2349 | integer *lwork, integer *iwork, integer *liwork, integer *info); | ||
2350 | |||
2351 | /* Subroutine */ int dsyevx_(char *jobz, char *range, char *uplo, integer *n, | ||
2352 | doublereal *a, integer *lda, doublereal *vl, doublereal *vu, integer * | ||
2353 | il, integer *iu, doublereal *abstol, integer *m, doublereal *w, | ||
2354 | doublereal *z__, integer *ldz, doublereal *work, integer *lwork, | ||
2355 | integer *iwork, integer *ifail, integer *info); | ||
2356 | |||
2357 | /* Subroutine */ int dsygs2_(integer *itype, char *uplo, integer *n, | ||
2358 | doublereal *a, integer *lda, doublereal *b, integer *ldb, integer * | ||
2359 | info); | ||
2360 | |||
2361 | /* Subroutine */ int dsygst_(integer *itype, char *uplo, integer *n, | ||
2362 | doublereal *a, integer *lda, doublereal *b, integer *ldb, integer * | ||
2363 | info); | ||
2364 | |||
2365 | /* Subroutine */ int dsygv_(integer *itype, char *jobz, char *uplo, integer * | ||
2366 | n, doublereal *a, integer *lda, doublereal *b, integer *ldb, | ||
2367 | doublereal *w, doublereal *work, integer *lwork, integer *info); | ||
2368 | |||
2369 | /* Subroutine */ int dsygvd_(integer *itype, char *jobz, char *uplo, integer * | ||
2370 | n, doublereal *a, integer *lda, doublereal *b, integer *ldb, | ||
2371 | doublereal *w, doublereal *work, integer *lwork, integer *iwork, | ||
2372 | integer *liwork, integer *info); | ||
2373 | |||
2374 | /* Subroutine */ int dsygvx_(integer *itype, char *jobz, char *range, char * | ||
2375 | uplo, integer *n, doublereal *a, integer *lda, doublereal *b, integer | ||
2376 | *ldb, doublereal *vl, doublereal *vu, integer *il, integer *iu, | ||
2377 | doublereal *abstol, integer *m, doublereal *w, doublereal *z__, | ||
2378 | integer *ldz, doublereal *work, integer *lwork, integer *iwork, | ||
2379 | integer *ifail, integer *info); | ||
2380 | |||
2381 | /* Subroutine */ int dsyrfs_(char *uplo, integer *n, integer *nrhs, | ||
2382 | doublereal *a, integer *lda, doublereal *af, integer *ldaf, integer * | ||
2383 | ipiv, doublereal *b, integer *ldb, doublereal *x, integer *ldx, | ||
2384 | doublereal *ferr, doublereal *berr, doublereal *work, integer *iwork, | ||
2385 | integer *info); | ||
2386 | |||
2387 | /* Subroutine */ int dsysv_(char *uplo, integer *n, integer *nrhs, doublereal | ||
2388 | *a, integer *lda, integer *ipiv, doublereal *b, integer *ldb, | ||
2389 | doublereal *work, integer *lwork, integer *info); | ||
2390 | |||
2391 | /* Subroutine */ int dsysvx_(char *fact, char *uplo, integer *n, integer * | ||
2392 | nrhs, doublereal *a, integer *lda, doublereal *af, integer *ldaf, | ||
2393 | integer *ipiv, doublereal *b, integer *ldb, doublereal *x, integer * | ||
2394 | ldx, doublereal *rcond, doublereal *ferr, doublereal *berr, | ||
2395 | doublereal *work, integer *lwork, integer *iwork, integer *info); | ||
2396 | |||
2397 | /* Subroutine */ int dsytd2_(char *uplo, integer *n, doublereal *a, integer * | ||
2398 | lda, doublereal *d__, doublereal *e, doublereal *tau, integer *info); | ||
2399 | |||
2400 | /* Subroutine */ int dsytf2_(char *uplo, integer *n, doublereal *a, integer * | ||
2401 | lda, integer *ipiv, integer *info); | ||
2402 | |||
2403 | /* Subroutine */ int dsytrd_(char *uplo, integer *n, doublereal *a, integer * | ||
2404 | lda, doublereal *d__, doublereal *e, doublereal *tau, doublereal * | ||
2405 | work, integer *lwork, integer *info); | ||
2406 | |||
2407 | /* Subroutine */ int dsytrf_(char *uplo, integer *n, doublereal *a, integer * | ||
2408 | lda, integer *ipiv, doublereal *work, integer *lwork, integer *info); | ||
2409 | |||
2410 | /* Subroutine */ int dsytri_(char *uplo, integer *n, doublereal *a, integer * | ||
2411 | lda, integer *ipiv, doublereal *work, integer *info); | ||
2412 | |||
2413 | /* Subroutine */ int dsytrs_(char *uplo, integer *n, integer *nrhs, | ||
2414 | doublereal *a, integer *lda, integer *ipiv, doublereal *b, integer * | ||
2415 | ldb, integer *info); | ||
2416 | |||
2417 | /* Subroutine */ int dtbcon_(char *norm, char *uplo, char *diag, integer *n, | ||
2418 | integer *kd, doublereal *ab, integer *ldab, doublereal *rcond, | ||
2419 | doublereal *work, integer *iwork, integer *info); | ||
2420 | |||
2421 | /* Subroutine */ int dtbrfs_(char *uplo, char *trans, char *diag, integer *n, | ||
2422 | integer *kd, integer *nrhs, doublereal *ab, integer *ldab, doublereal | ||
2423 | *b, integer *ldb, doublereal *x, integer *ldx, doublereal *ferr, | ||
2424 | doublereal *berr, doublereal *work, integer *iwork, integer *info); | ||
2425 | |||
2426 | /* Subroutine */ int dtbtrs_(char *uplo, char *trans, char *diag, integer *n, | ||
2427 | integer *kd, integer *nrhs, doublereal *ab, integer *ldab, doublereal | ||
2428 | *b, integer *ldb, integer *info); | ||
2429 | |||
2430 | /* Subroutine */ int dtgevc_(char *side, char *howmny, logical *select, | ||
2431 | integer *n, doublereal *a, integer *lda, doublereal *b, integer *ldb, | ||
2432 | doublereal *vl, integer *ldvl, doublereal *vr, integer *ldvr, integer | ||
2433 | *mm, integer *m, doublereal *work, integer *info); | ||
2434 | |||
2435 | /* Subroutine */ int dtgex2_(logical *wantq, logical *wantz, integer *n, | ||
2436 | doublereal *a, integer *lda, doublereal *b, integer *ldb, doublereal * | ||
2437 | q, integer *ldq, doublereal *z__, integer *ldz, integer *j1, integer * | ||
2438 | n1, integer *n2, doublereal *work, integer *lwork, integer *info); | ||
2439 | |||
2440 | /* Subroutine */ int dtgexc_(logical *wantq, logical *wantz, integer *n, | ||
2441 | doublereal *a, integer *lda, doublereal *b, integer *ldb, doublereal * | ||
2442 | q, integer *ldq, doublereal *z__, integer *ldz, integer *ifst, | ||
2443 | integer *ilst, doublereal *work, integer *lwork, integer *info); | ||
2444 | |||
2445 | /* Subroutine */ int dtgsen_(integer *ijob, logical *wantq, logical *wantz, | ||
2446 | logical *select, integer *n, doublereal *a, integer *lda, doublereal * | ||
2447 | b, integer *ldb, doublereal *alphar, doublereal *alphai, doublereal * | ||
2448 | beta, doublereal *q, integer *ldq, doublereal *z__, integer *ldz, | ||
2449 | integer *m, doublereal *pl, doublereal *pr, doublereal *dif, | ||
2450 | doublereal *work, integer *lwork, integer *iwork, integer *liwork, | ||
2451 | integer *info); | ||
2452 | |||
2453 | /* Subroutine */ int dtgsja_(char *jobu, char *jobv, char *jobq, integer *m, | ||
2454 | integer *p, integer *n, integer *k, integer *l, doublereal *a, | ||
2455 | integer *lda, doublereal *b, integer *ldb, doublereal *tola, | ||
2456 | doublereal *tolb, doublereal *alpha, doublereal *beta, doublereal *u, | ||
2457 | integer *ldu, doublereal *v, integer *ldv, doublereal *q, integer * | ||
2458 | ldq, doublereal *work, integer *ncycle, integer *info); | ||
2459 | |||
2460 | /* Subroutine */ int dtgsna_(char *job, char *howmny, logical *select, | ||
2461 | integer *n, doublereal *a, integer *lda, doublereal *b, integer *ldb, | ||
2462 | doublereal *vl, integer *ldvl, doublereal *vr, integer *ldvr, | ||
2463 | doublereal *s, doublereal *dif, integer *mm, integer *m, doublereal * | ||
2464 | work, integer *lwork, integer *iwork, integer *info); | ||
2465 | |||
2466 | /* Subroutine */ int dtgsy2_(char *trans, integer *ijob, integer *m, integer * | ||
2467 | n, doublereal *a, integer *lda, doublereal *b, integer *ldb, | ||
2468 | doublereal *c__, integer *ldc, doublereal *d__, integer *ldd, | ||
2469 | doublereal *e, integer *lde, doublereal *f, integer *ldf, doublereal * | ||
2470 | scale, doublereal *rdsum, doublereal *rdscal, integer *iwork, integer | ||
2471 | *pq, integer *info); | ||
2472 | |||
2473 | /* Subroutine */ int dtgsyl_(char *trans, integer *ijob, integer *m, integer * | ||
2474 | n, doublereal *a, integer *lda, doublereal *b, integer *ldb, | ||
2475 | doublereal *c__, integer *ldc, doublereal *d__, integer *ldd, | ||
2476 | doublereal *e, integer *lde, doublereal *f, integer *ldf, doublereal * | ||
2477 | scale, doublereal *dif, doublereal *work, integer *lwork, integer * | ||
2478 | iwork, integer *info); | ||
2479 | |||
2480 | /* Subroutine */ int dtpcon_(char *norm, char *uplo, char *diag, integer *n, | ||
2481 | doublereal *ap, doublereal *rcond, doublereal *work, integer *iwork, | ||
2482 | integer *info); | ||
2483 | |||
2484 | /* Subroutine */ int dtprfs_(char *uplo, char *trans, char *diag, integer *n, | ||
2485 | integer *nrhs, doublereal *ap, doublereal *b, integer *ldb, | ||
2486 | doublereal *x, integer *ldx, doublereal *ferr, doublereal *berr, | ||
2487 | doublereal *work, integer *iwork, integer *info); | ||
2488 | |||
2489 | /* Subroutine */ int dtptri_(char *uplo, char *diag, integer *n, doublereal * | ||
2490 | ap, integer *info); | ||
2491 | |||
2492 | /* Subroutine */ int dtptrs_(char *uplo, char *trans, char *diag, integer *n, | ||
2493 | integer *nrhs, doublereal *ap, doublereal *b, integer *ldb, integer * | ||
2494 | info); | ||
2495 | |||
2496 | /* Subroutine */ int dtrcon_(char *norm, char *uplo, char *diag, integer *n, | ||
2497 | doublereal *a, integer *lda, doublereal *rcond, doublereal *work, | ||
2498 | integer *iwork, integer *info); | ||
2499 | |||
2500 | /* Subroutine */ int dtrevc_(char *side, char *howmny, logical *select, | ||
2501 | integer *n, doublereal *t, integer *ldt, doublereal *vl, integer * | ||
2502 | ldvl, doublereal *vr, integer *ldvr, integer *mm, integer *m, | ||
2503 | doublereal *work, integer *info); | ||
2504 | |||
2505 | /* Subroutine */ int dtrexc_(char *compq, integer *n, doublereal *t, integer * | ||
2506 | ldt, doublereal *q, integer *ldq, integer *ifst, integer *ilst, | ||
2507 | doublereal *work, integer *info); | ||
2508 | |||
2509 | /* Subroutine */ int dtrrfs_(char *uplo, char *trans, char *diag, integer *n, | ||
2510 | integer *nrhs, doublereal *a, integer *lda, doublereal *b, integer * | ||
2511 | ldb, doublereal *x, integer *ldx, doublereal *ferr, doublereal *berr, | ||
2512 | doublereal *work, integer *iwork, integer *info); | ||
2513 | |||
2514 | /* Subroutine */ int dtrsen_(char *job, char *compq, logical *select, integer | ||
2515 | *n, doublereal *t, integer *ldt, doublereal *q, integer *ldq, | ||
2516 | doublereal *wr, doublereal *wi, integer *m, doublereal *s, doublereal | ||
2517 | *sep, doublereal *work, integer *lwork, integer *iwork, integer * | ||
2518 | liwork, integer *info); | ||
2519 | |||
2520 | /* Subroutine */ int dtrsna_(char *job, char *howmny, logical *select, | ||
2521 | integer *n, doublereal *t, integer *ldt, doublereal *vl, integer * | ||
2522 | ldvl, doublereal *vr, integer *ldvr, doublereal *s, doublereal *sep, | ||
2523 | integer *mm, integer *m, doublereal *work, integer *ldwork, integer * | ||
2524 | iwork, integer *info); | ||
2525 | |||
2526 | /* Subroutine */ int dtrsyl_(char *trana, char *tranb, integer *isgn, integer | ||
2527 | *m, integer *n, doublereal *a, integer *lda, doublereal *b, integer * | ||
2528 | ldb, doublereal *c__, integer *ldc, doublereal *scale, integer *info); | ||
2529 | |||
2530 | /* Subroutine */ int dtrti2_(char *uplo, char *diag, integer *n, doublereal * | ||
2531 | a, integer *lda, integer *info); | ||
2532 | |||
2533 | /* Subroutine */ int dtrtri_(char *uplo, char *diag, integer *n, doublereal * | ||
2534 | a, integer *lda, integer *info); | ||
2535 | |||
2536 | /* Subroutine */ int dtrtrs_(char *uplo, char *trans, char *diag, integer *n, | ||
2537 | integer *nrhs, doublereal *a, integer *lda, doublereal *b, integer * | ||
2538 | ldb, integer *info); | ||
2539 | |||
2540 | /* Subroutine */ int dtzrqf_(integer *m, integer *n, doublereal *a, integer * | ||
2541 | lda, doublereal *tau, integer *info); | ||
2542 | |||
2543 | /* Subroutine */ int dtzrzf_(integer *m, integer *n, doublereal *a, integer * | ||
2544 | lda, doublereal *tau, doublereal *work, integer *lwork, integer *info); | ||
2545 | |||
2546 | integer icmax1_(integer *n, complex *cx, integer *incx); | ||
2547 | |||
2548 | integer ieeeck_(integer *ispec, real *zero, real *one); | ||
2549 | |||
2550 | integer ilaenv_(integer *ispec, char *name__, char *opts, integer *n1, | ||
2551 | integer *n2, integer *n3, integer *n4, ftnlen name_len, ftnlen | ||
2552 | opts_len); | ||
2553 | |||
2554 | integer izmax1_(integer *n, doublecomplex *cx, integer *incx); | ||
2555 | |||
2556 | /* Subroutine */ int sbdsdc_(char *uplo, char *compq, integer *n, real *d__, | ||
2557 | real *e, real *u, integer *ldu, real *vt, integer *ldvt, real *q, | ||
2558 | integer *iq, real *work, integer *iwork, integer *info); | ||
2559 | |||
2560 | /* Subroutine */ int sbdsqr_(char *uplo, integer *n, integer *ncvt, integer * | ||
2561 | nru, integer *ncc, real *d__, real *e, real *vt, integer *ldvt, real * | ||
2562 | u, integer *ldu, real *c__, integer *ldc, real *work, integer *info); | ||
2563 | |||
2564 | /* Subroutine */ int sdisna_(char *job, integer *m, integer *n, real *d__, | ||
2565 | real *sep, integer *info); | ||
2566 | |||
2567 | /* Subroutine */ int sgbbrd_(char *vect, integer *m, integer *n, integer *ncc, | ||
2568 | integer *kl, integer *ku, real *ab, integer *ldab, real *d__, real * | ||
2569 | e, real *q, integer *ldq, real *pt, integer *ldpt, real *c__, integer | ||
2570 | *ldc, real *work, integer *info); | ||
2571 | |||
2572 | /* Subroutine */ int sgbcon_(char *norm, integer *n, integer *kl, integer *ku, | ||
2573 | real *ab, integer *ldab, integer *ipiv, real *anorm, real *rcond, | ||
2574 | real *work, integer *iwork, integer *info); | ||
2575 | |||
2576 | /* Subroutine */ int sgbequ_(integer *m, integer *n, integer *kl, integer *ku, | ||
2577 | real *ab, integer *ldab, real *r__, real *c__, real *rowcnd, real * | ||
2578 | colcnd, real *amax, integer *info); | ||
2579 | |||
2580 | /* Subroutine */ int sgbrfs_(char *trans, integer *n, integer *kl, integer * | ||
2581 | ku, integer *nrhs, real *ab, integer *ldab, real *afb, integer *ldafb, | ||
2582 | integer *ipiv, real *b, integer *ldb, real *x, integer *ldx, real * | ||
2583 | ferr, real *berr, real *work, integer *iwork, integer *info); | ||
2584 | |||
2585 | /* Subroutine */ int sgbsv_(integer *n, integer *kl, integer *ku, integer * | ||
2586 | nrhs, real *ab, integer *ldab, integer *ipiv, real *b, integer *ldb, | ||
2587 | integer *info); | ||
2588 | |||
2589 | /* Subroutine */ int sgbsvx_(char *fact, char *trans, integer *n, integer *kl, | ||
2590 | integer *ku, integer *nrhs, real *ab, integer *ldab, real *afb, | ||
2591 | integer *ldafb, integer *ipiv, char *equed, real *r__, real *c__, | ||
2592 | real *b, integer *ldb, real *x, integer *ldx, real *rcond, real *ferr, | ||
2593 | real *berr, real *work, integer *iwork, integer *info); | ||
2594 | |||
2595 | /* Subroutine */ int sgbtf2_(integer *m, integer *n, integer *kl, integer *ku, | ||
2596 | real *ab, integer *ldab, integer *ipiv, integer *info); | ||
2597 | |||
2598 | /* Subroutine */ int sgbtrf_(integer *m, integer *n, integer *kl, integer *ku, | ||
2599 | real *ab, integer *ldab, integer *ipiv, integer *info); | ||
2600 | |||
2601 | /* Subroutine */ int sgbtrs_(char *trans, integer *n, integer *kl, integer * | ||
2602 | ku, integer *nrhs, real *ab, integer *ldab, integer *ipiv, real *b, | ||
2603 | integer *ldb, integer *info); | ||
2604 | |||
2605 | /* Subroutine */ int sgebak_(char *job, char *side, integer *n, integer *ilo, | ||
2606 | integer *ihi, real *scale, integer *m, real *v, integer *ldv, integer | ||
2607 | *info); | ||
2608 | |||
2609 | /* Subroutine */ int sgebal_(char *job, integer *n, real *a, integer *lda, | ||
2610 | integer *ilo, integer *ihi, real *scale, integer *info); | ||
2611 | |||
2612 | /* Subroutine */ int sgebd2_(integer *m, integer *n, real *a, integer *lda, | ||
2613 | real *d__, real *e, real *tauq, real *taup, real *work, integer *info); | ||
2614 | |||
2615 | /* Subroutine */ int sgebrd_(integer *m, integer *n, real *a, integer *lda, | ||
2616 | real *d__, real *e, real *tauq, real *taup, real *work, integer * | ||
2617 | lwork, integer *info); | ||
2618 | |||
2619 | /* Subroutine */ int sgecon_(char *norm, integer *n, real *a, integer *lda, | ||
2620 | real *anorm, real *rcond, real *work, integer *iwork, integer *info); | ||
2621 | |||
2622 | /* Subroutine */ int sgeequ_(integer *m, integer *n, real *a, integer *lda, | ||
2623 | real *r__, real *c__, real *rowcnd, real *colcnd, real *amax, integer | ||
2624 | *info); | ||
2625 | |||
2626 | /* Subroutine */ int sgees_(char *jobvs, char *sort, L_fp select, integer *n, | ||
2627 | real *a, integer *lda, integer *sdim, real *wr, real *wi, real *vs, | ||
2628 | integer *ldvs, real *work, integer *lwork, logical *bwork, integer * | ||
2629 | info); | ||
2630 | |||
2631 | /* Subroutine */ int sgeesx_(char *jobvs, char *sort, L_fp select, char * | ||
2632 | sense, integer *n, real *a, integer *lda, integer *sdim, real *wr, | ||
2633 | real *wi, real *vs, integer *ldvs, real *rconde, real *rcondv, real * | ||
2634 | work, integer *lwork, integer *iwork, integer *liwork, logical *bwork, | ||
2635 | integer *info); | ||
2636 | |||
2637 | /* Subroutine */ int sgeev_(char *jobvl, char *jobvr, integer *n, real *a, | ||
2638 | integer *lda, real *wr, real *wi, real *vl, integer *ldvl, real *vr, | ||
2639 | integer *ldvr, real *work, integer *lwork, integer *info); | ||
2640 | |||
2641 | /* Subroutine */ int sgeevx_(char *balanc, char *jobvl, char *jobvr, char * | ||
2642 | sense, integer *n, real *a, integer *lda, real *wr, real *wi, real * | ||
2643 | vl, integer *ldvl, real *vr, integer *ldvr, integer *ilo, integer * | ||
2644 | ihi, real *scale, real *abnrm, real *rconde, real *rcondv, real *work, | ||
2645 | integer *lwork, integer *iwork, integer *info); | ||
2646 | |||
2647 | /* Subroutine */ int sgegs_(char *jobvsl, char *jobvsr, integer *n, real *a, | ||
2648 | integer *lda, real *b, integer *ldb, real *alphar, real *alphai, real | ||
2649 | *beta, real *vsl, integer *ldvsl, real *vsr, integer *ldvsr, real * | ||
2650 | work, integer *lwork, integer *info); | ||
2651 | |||
2652 | /* Subroutine */ int sgegv_(char *jobvl, char *jobvr, integer *n, real *a, | ||
2653 | integer *lda, real *b, integer *ldb, real *alphar, real *alphai, real | ||
2654 | *beta, real *vl, integer *ldvl, real *vr, integer *ldvr, real *work, | ||
2655 | integer *lwork, integer *info); | ||
2656 | |||
2657 | /* Subroutine */ int sgehd2_(integer *n, integer *ilo, integer *ihi, real *a, | ||
2658 | integer *lda, real *tau, real *work, integer *info); | ||
2659 | |||
2660 | /* Subroutine */ int sgehrd_(integer *n, integer *ilo, integer *ihi, real *a, | ||
2661 | integer *lda, real *tau, real *work, integer *lwork, integer *info); | ||
2662 | |||
2663 | /* Subroutine */ int sgelq2_(integer *m, integer *n, real *a, integer *lda, | ||
2664 | real *tau, real *work, integer *info); | ||
2665 | |||
2666 | /* Subroutine */ int sgelqf_(integer *m, integer *n, real *a, integer *lda, | ||
2667 | real *tau, real *work, integer *lwork, integer *info); | ||
2668 | |||
2669 | /* Subroutine */ int sgels_(char *trans, integer *m, integer *n, integer * | ||
2670 | nrhs, real *a, integer *lda, real *b, integer *ldb, real *work, | ||
2671 | integer *lwork, integer *info); | ||
2672 | |||
2673 | /* Subroutine */ int sgelsd_(integer *m, integer *n, integer *nrhs, real *a, | ||
2674 | integer *lda, real *b, integer *ldb, real *s, real *rcond, integer * | ||
2675 | rank, real *work, integer *lwork, integer *iwork, integer *info); | ||
2676 | |||
2677 | /* Subroutine */ int sgelss_(integer *m, integer *n, integer *nrhs, real *a, | ||
2678 | integer *lda, real *b, integer *ldb, real *s, real *rcond, integer * | ||
2679 | rank, real *work, integer *lwork, integer *info); | ||
2680 | |||
2681 | /* Subroutine */ int sgelsx_(integer *m, integer *n, integer *nrhs, real *a, | ||
2682 | integer *lda, real *b, integer *ldb, integer *jpvt, real *rcond, | ||
2683 | integer *rank, real *work, integer *info); | ||
2684 | |||
2685 | /* Subroutine */ int sgelsy_(integer *m, integer *n, integer *nrhs, real *a, | ||
2686 | integer *lda, real *b, integer *ldb, integer *jpvt, real *rcond, | ||
2687 | integer *rank, real *work, integer *lwork, integer *info); | ||
2688 | |||
2689 | /* Subroutine */ int sgeql2_(integer *m, integer *n, real *a, integer *lda, | ||
2690 | real *tau, real *work, integer *info); | ||
2691 | |||
2692 | /* Subroutine */ int sgeqlf_(integer *m, integer *n, real *a, integer *lda, | ||
2693 | real *tau, real *work, integer *lwork, integer *info); | ||
2694 | |||
2695 | /* Subroutine */ int sgeqp3_(integer *m, integer *n, real *a, integer *lda, | ||
2696 | integer *jpvt, real *tau, real *work, integer *lwork, integer *info); | ||
2697 | |||
2698 | /* Subroutine */ int sgeqpf_(integer *m, integer *n, real *a, integer *lda, | ||
2699 | integer *jpvt, real *tau, real *work, integer *info); | ||
2700 | |||
2701 | /* Subroutine */ int sgeqr2_(integer *m, integer *n, real *a, integer *lda, | ||
2702 | real *tau, real *work, integer *info); | ||
2703 | |||
2704 | /* Subroutine */ int sgeqrf_(integer *m, integer *n, real *a, integer *lda, | ||
2705 | real *tau, real *work, integer *lwork, integer *info); | ||
2706 | |||
2707 | /* Subroutine */ int sgerfs_(char *trans, integer *n, integer *nrhs, real *a, | ||
2708 | integer *lda, real *af, integer *ldaf, integer *ipiv, real *b, | ||
2709 | integer *ldb, real *x, integer *ldx, real *ferr, real *berr, real * | ||
2710 | work, integer *iwork, integer *info); | ||
2711 | |||
2712 | /* Subroutine */ int sgerq2_(integer *m, integer *n, real *a, integer *lda, | ||
2713 | real *tau, real *work, integer *info); | ||
2714 | |||
2715 | /* Subroutine */ int sgerqf_(integer *m, integer *n, real *a, integer *lda, | ||
2716 | real *tau, real *work, integer *lwork, integer *info); | ||
2717 | |||
2718 | /* Subroutine */ int sgesc2_(integer *n, real *a, integer *lda, real *rhs, | ||
2719 | integer *ipiv, integer *jpiv, real *scale); | ||
2720 | |||
2721 | /* Subroutine */ int sgesdd_(char *jobz, integer *m, integer *n, real *a, | ||
2722 | integer *lda, real *s, real *u, integer *ldu, real *vt, integer *ldvt, | ||
2723 | real *work, integer *lwork, integer *iwork, integer *info); | ||
2724 | |||
2725 | /* Subroutine */ int sgesv_(integer *n, integer *nrhs, real *a, integer *lda, | ||
2726 | integer *ipiv, real *b, integer *ldb, integer *info); | ||
2727 | |||
2728 | /* Subroutine */ int sgesvd_(char *jobu, char *jobvt, integer *m, integer *n, | ||
2729 | real *a, integer *lda, real *s, real *u, integer *ldu, real *vt, | ||
2730 | integer *ldvt, real *work, integer *lwork, integer *info); | ||
2731 | |||
2732 | /* Subroutine */ int sgesvx_(char *fact, char *trans, integer *n, integer * | ||
2733 | nrhs, real *a, integer *lda, real *af, integer *ldaf, integer *ipiv, | ||
2734 | char *equed, real *r__, real *c__, real *b, integer *ldb, real *x, | ||
2735 | integer *ldx, real *rcond, real *ferr, real *berr, real *work, | ||
2736 | integer *iwork, integer *info); | ||
2737 | |||
2738 | /* Subroutine */ int sgetc2_(integer *n, real *a, integer *lda, integer *ipiv, | ||
2739 | integer *jpiv, integer *info); | ||
2740 | |||
2741 | /* Subroutine */ int sgetf2_(integer *m, integer *n, real *a, integer *lda, | ||
2742 | integer *ipiv, integer *info); | ||
2743 | |||
2744 | /* Subroutine */ int sgetrf_(integer *m, integer *n, real *a, integer *lda, | ||
2745 | integer *ipiv, integer *info); | ||
2746 | |||
2747 | /* Subroutine */ int sgetri_(integer *n, real *a, integer *lda, integer *ipiv, | ||
2748 | real *work, integer *lwork, integer *info); | ||
2749 | |||
2750 | /* Subroutine */ int sgetrs_(char *trans, integer *n, integer *nrhs, real *a, | ||
2751 | integer *lda, integer *ipiv, real *b, integer *ldb, integer *info); | ||
2752 | |||
2753 | /* Subroutine */ int sggbak_(char *job, char *side, integer *n, integer *ilo, | ||
2754 | integer *ihi, real *lscale, real *rscale, integer *m, real *v, | ||
2755 | integer *ldv, integer *info); | ||
2756 | |||
2757 | /* Subroutine */ int sggbal_(char *job, integer *n, real *a, integer *lda, | ||
2758 | real *b, integer *ldb, integer *ilo, integer *ihi, real *lscale, real | ||
2759 | *rscale, real *work, integer *info); | ||
2760 | |||
2761 | /* Subroutine */ int sgges_(char *jobvsl, char *jobvsr, char *sort, L_fp | ||
2762 | selctg, integer *n, real *a, integer *lda, real *b, integer *ldb, | ||
2763 | integer *sdim, real *alphar, real *alphai, real *beta, real *vsl, | ||
2764 | integer *ldvsl, real *vsr, integer *ldvsr, real *work, integer *lwork, | ||
2765 | logical *bwork, integer *info); | ||
2766 | |||
2767 | /* Subroutine */ int sggesx_(char *jobvsl, char *jobvsr, char *sort, L_fp | ||
2768 | selctg, char *sense, integer *n, real *a, integer *lda, real *b, | ||
2769 | integer *ldb, integer *sdim, real *alphar, real *alphai, real *beta, | ||
2770 | real *vsl, integer *ldvsl, real *vsr, integer *ldvsr, real *rconde, | ||
2771 | real *rcondv, real *work, integer *lwork, integer *iwork, integer * | ||
2772 | liwork, logical *bwork, integer *info); | ||
2773 | |||
2774 | /* Subroutine */ int sggev_(char *jobvl, char *jobvr, integer *n, real *a, | ||
2775 | integer *lda, real *b, integer *ldb, real *alphar, real *alphai, real | ||
2776 | *beta, real *vl, integer *ldvl, real *vr, integer *ldvr, real *work, | ||
2777 | integer *lwork, integer *info); | ||
2778 | |||
2779 | /* Subroutine */ int sggevx_(char *balanc, char *jobvl, char *jobvr, char * | ||
2780 | sense, integer *n, real *a, integer *lda, real *b, integer *ldb, real | ||
2781 | *alphar, real *alphai, real *beta, real *vl, integer *ldvl, real *vr, | ||
2782 | integer *ldvr, integer *ilo, integer *ihi, real *lscale, real *rscale, | ||
2783 | real *abnrm, real *bbnrm, real *rconde, real *rcondv, real *work, | ||
2784 | integer *lwork, integer *iwork, logical *bwork, integer *info); | ||
2785 | |||
2786 | /* Subroutine */ int sggglm_(integer *n, integer *m, integer *p, real *a, | ||
2787 | integer *lda, real *b, integer *ldb, real *d__, real *x, real *y, | ||
2788 | real *work, integer *lwork, integer *info); | ||
2789 | |||
2790 | /* Subroutine */ int sgghrd_(char *compq, char *compz, integer *n, integer * | ||
2791 | ilo, integer *ihi, real *a, integer *lda, real *b, integer *ldb, real | ||
2792 | *q, integer *ldq, real *z__, integer *ldz, integer *info); | ||
2793 | |||
2794 | /* Subroutine */ int sgglse_(integer *m, integer *n, integer *p, real *a, | ||
2795 | integer *lda, real *b, integer *ldb, real *c__, real *d__, real *x, | ||
2796 | real *work, integer *lwork, integer *info); | ||
2797 | |||
2798 | /* Subroutine */ int sggqrf_(integer *n, integer *m, integer *p, real *a, | ||
2799 | integer *lda, real *taua, real *b, integer *ldb, real *taub, real * | ||
2800 | work, integer *lwork, integer *info); | ||
2801 | |||
2802 | /* Subroutine */ int sggrqf_(integer *m, integer *p, integer *n, real *a, | ||
2803 | integer *lda, real *taua, real *b, integer *ldb, real *taub, real * | ||
2804 | work, integer *lwork, integer *info); | ||
2805 | |||
2806 | /* Subroutine */ int sggsvd_(char *jobu, char *jobv, char *jobq, integer *m, | ||
2807 | integer *n, integer *p, integer *k, integer *l, real *a, integer *lda, | ||
2808 | real *b, integer *ldb, real *alpha, real *beta, real *u, integer * | ||
2809 | ldu, real *v, integer *ldv, real *q, integer *ldq, real *work, | ||
2810 | integer *iwork, integer *info); | ||
2811 | |||
2812 | /* Subroutine */ int sggsvp_(char *jobu, char *jobv, char *jobq, integer *m, | ||
2813 | integer *p, integer *n, real *a, integer *lda, real *b, integer *ldb, | ||
2814 | real *tola, real *tolb, integer *k, integer *l, real *u, integer *ldu, | ||
2815 | real *v, integer *ldv, real *q, integer *ldq, integer *iwork, real * | ||
2816 | tau, real *work, integer *info); | ||
2817 | |||
2818 | /* Subroutine */ int sgtcon_(char *norm, integer *n, real *dl, real *d__, | ||
2819 | real *du, real *du2, integer *ipiv, real *anorm, real *rcond, real * | ||
2820 | work, integer *iwork, integer *info); | ||
2821 | |||
2822 | /* Subroutine */ int sgtrfs_(char *trans, integer *n, integer *nrhs, real *dl, | ||
2823 | real *d__, real *du, real *dlf, real *df, real *duf, real *du2, | ||
2824 | integer *ipiv, real *b, integer *ldb, real *x, integer *ldx, real * | ||
2825 | ferr, real *berr, real *work, integer *iwork, integer *info); | ||
2826 | |||
2827 | /* Subroutine */ int sgtsv_(integer *n, integer *nrhs, real *dl, real *d__, | ||
2828 | real *du, real *b, integer *ldb, integer *info); | ||
2829 | |||
2830 | /* Subroutine */ int sgtsvx_(char *fact, char *trans, integer *n, integer * | ||
2831 | nrhs, real *dl, real *d__, real *du, real *dlf, real *df, real *duf, | ||
2832 | real *du2, integer *ipiv, real *b, integer *ldb, real *x, integer * | ||
2833 | ldx, real *rcond, real *ferr, real *berr, real *work, integer *iwork, | ||
2834 | integer *info); | ||
2835 | |||
2836 | /* Subroutine */ int sgttrf_(integer *n, real *dl, real *d__, real *du, real * | ||
2837 | du2, integer *ipiv, integer *info); | ||
2838 | |||
2839 | /* Subroutine */ int sgttrs_(char *trans, integer *n, integer *nrhs, real *dl, | ||
2840 | real *d__, real *du, real *du2, integer *ipiv, real *b, integer *ldb, | ||
2841 | integer *info); | ||
2842 | |||
2843 | /* Subroutine */ int sgtts2_(integer *itrans, integer *n, integer *nrhs, real | ||
2844 | *dl, real *d__, real *du, real *du2, integer *ipiv, real *b, integer * | ||
2845 | ldb); | ||
2846 | |||
2847 | /* Subroutine */ int shgeqz_(char *job, char *compq, char *compz, integer *n, | ||
2848 | integer *ilo, integer *ihi, real *a, integer *lda, real *b, integer * | ||
2849 | ldb, real *alphar, real *alphai, real *beta, real *q, integer *ldq, | ||
2850 | real *z__, integer *ldz, real *work, integer *lwork, integer *info); | ||
2851 | |||
2852 | /* Subroutine */ int shsein_(char *side, char *eigsrc, char *initv, logical * | ||
2853 | select, integer *n, real *h__, integer *ldh, real *wr, real *wi, real | ||
2854 | *vl, integer *ldvl, real *vr, integer *ldvr, integer *mm, integer *m, | ||
2855 | real *work, integer *ifaill, integer *ifailr, integer *info); | ||
2856 | |||
2857 | /* Subroutine */ int shseqr_(char *job, char *compz, integer *n, integer *ilo, | ||
2858 | integer *ihi, real *h__, integer *ldh, real *wr, real *wi, real *z__, | ||
2859 | integer *ldz, real *work, integer *lwork, integer *info); | ||
2860 | |||
2861 | /* Subroutine */ int slabad_(real *small, real *large); | ||
2862 | |||
2863 | /* Subroutine */ int slabrd_(integer *m, integer *n, integer *nb, real *a, | ||
2864 | integer *lda, real *d__, real *e, real *tauq, real *taup, real *x, | ||
2865 | integer *ldx, real *y, integer *ldy); | ||
2866 | |||
2867 | /* Subroutine */ int slacon_(integer *n, real *v, real *x, integer *isgn, | ||
2868 | real *est, integer *kase); | ||
2869 | |||
2870 | /* Subroutine */ int slacpy_(char *uplo, integer *m, integer *n, real *a, | ||
2871 | integer *lda, real *b, integer *ldb); | ||
2872 | |||
2873 | /* Subroutine */ int sladiv_(real *a, real *b, real *c__, real *d__, real *p, | ||
2874 | real *q); | ||
2875 | |||
2876 | /* Subroutine */ int slae2_(real *a, real *b, real *c__, real *rt1, real *rt2); | ||
2877 | |||
2878 | /* Subroutine */ int slaebz_(integer *ijob, integer *nitmax, integer *n, | ||
2879 | integer *mmax, integer *minp, integer *nbmin, real *abstol, real * | ||
2880 | reltol, real *pivmin, real *d__, real *e, real *e2, integer *nval, | ||
2881 | real *ab, real *c__, integer *mout, integer *nab, real *work, integer | ||
2882 | *iwork, integer *info); | ||
2883 | |||
2884 | /* Subroutine */ int slaed0_(integer *icompq, integer *qsiz, integer *n, real | ||
2885 | *d__, real *e, real *q, integer *ldq, real *qstore, integer *ldqs, | ||
2886 | real *work, integer *iwork, integer *info); | ||
2887 | |||
2888 | /* Subroutine */ int slaed1_(integer *n, real *d__, real *q, integer *ldq, | ||
2889 | integer *indxq, real *rho, integer *cutpnt, real *work, integer * | ||
2890 | iwork, integer *info); | ||
2891 | |||
2892 | /* Subroutine */ int slaed2_(integer *k, integer *n, integer *n1, real *d__, | ||
2893 | real *q, integer *ldq, integer *indxq, real *rho, real *z__, real * | ||
2894 | dlamda, real *w, real *q2, integer *indx, integer *indxc, integer * | ||
2895 | indxp, integer *coltyp, integer *info); | ||
2896 | |||
2897 | /* Subroutine */ int slaed3_(integer *k, integer *n, integer *n1, real *d__, | ||
2898 | real *q, integer *ldq, real *rho, real *dlamda, real *q2, integer * | ||
2899 | indx, integer *ctot, real *w, real *s, integer *info); | ||
2900 | |||
2901 | /* Subroutine */ int slaed4_(integer *n, integer *i__, real *d__, real *z__, | ||
2902 | real *delta, real *rho, real *dlam, integer *info); | ||
2903 | |||
2904 | /* Subroutine */ int slaed5_(integer *i__, real *d__, real *z__, real *delta, | ||
2905 | real *rho, real *dlam); | ||
2906 | |||
2907 | /* Subroutine */ int slaed6_(integer *kniter, logical *orgati, real *rho, | ||
2908 | real *d__, real *z__, real *finit, real *tau, integer *info); | ||
2909 | |||
2910 | /* Subroutine */ int slaed7_(integer *icompq, integer *n, integer *qsiz, | ||
2911 | integer *tlvls, integer *curlvl, integer *curpbm, real *d__, real *q, | ||
2912 | integer *ldq, integer *indxq, real *rho, integer *cutpnt, real * | ||
2913 | qstore, integer *qptr, integer *prmptr, integer *perm, integer * | ||
2914 | givptr, integer *givcol, real *givnum, real *work, integer *iwork, | ||
2915 | integer *info); | ||
2916 | |||
2917 | /* Subroutine */ int slaed8_(integer *icompq, integer *k, integer *n, integer | ||
2918 | *qsiz, real *d__, real *q, integer *ldq, integer *indxq, real *rho, | ||
2919 | integer *cutpnt, real *z__, real *dlamda, real *q2, integer *ldq2, | ||
2920 | real *w, integer *perm, integer *givptr, integer *givcol, real * | ||
2921 | givnum, integer *indxp, integer *indx, integer *info); | ||
2922 | |||
2923 | /* Subroutine */ int slaed9_(integer *k, integer *kstart, integer *kstop, | ||
2924 | integer *n, real *d__, real *q, integer *ldq, real *rho, real *dlamda, | ||
2925 | real *w, real *s, integer *lds, integer *info); | ||
2926 | |||
2927 | /* Subroutine */ int slaeda_(integer *n, integer *tlvls, integer *curlvl, | ||
2928 | integer *curpbm, integer *prmptr, integer *perm, integer *givptr, | ||
2929 | integer *givcol, real *givnum, real *q, integer *qptr, real *z__, | ||
2930 | real *ztemp, integer *info); | ||
2931 | |||
2932 | /* Subroutine */ int slaein_(logical *rightv, logical *noinit, integer *n, | ||
2933 | real *h__, integer *ldh, real *wr, real *wi, real *vr, real *vi, real | ||
2934 | *b, integer *ldb, real *work, real *eps3, real *smlnum, real *bignum, | ||
2935 | integer *info); | ||
2936 | |||
2937 | /* Subroutine */ int slaev2_(real *a, real *b, real *c__, real *rt1, real * | ||
2938 | rt2, real *cs1, real *sn1); | ||
2939 | |||
2940 | /* Subroutine */ int slaexc_(logical *wantq, integer *n, real *t, integer * | ||
2941 | ldt, real *q, integer *ldq, integer *j1, integer *n1, integer *n2, | ||
2942 | real *work, integer *info); | ||
2943 | |||
2944 | /* Subroutine */ int slag2_(real *a, integer *lda, real *b, integer *ldb, | ||
2945 | real *safmin, real *scale1, real *scale2, real *wr1, real *wr2, real * | ||
2946 | wi); | ||
2947 | |||
2948 | /* Subroutine */ int slags2_(logical *upper, real *a1, real *a2, real *a3, | ||
2949 | real *b1, real *b2, real *b3, real *csu, real *snu, real *csv, real * | ||
2950 | snv, real *csq, real *snq); | ||
2951 | |||
2952 | /* Subroutine */ int slagtf_(integer *n, real *a, real *lambda, real *b, real | ||
2953 | *c__, real *tol, real *d__, integer *in, integer *info); | ||
2954 | |||
2955 | /* Subroutine */ int slagtm_(char *trans, integer *n, integer *nrhs, real * | ||
2956 | alpha, real *dl, real *d__, real *du, real *x, integer *ldx, real * | ||
2957 | beta, real *b, integer *ldb); | ||
2958 | |||
2959 | /* Subroutine */ int slagts_(integer *job, integer *n, real *a, real *b, real | ||
2960 | *c__, real *d__, integer *in, real *y, real *tol, integer *info); | ||
2961 | |||
2962 | /* Subroutine */ int slagv2_(real *a, integer *lda, real *b, integer *ldb, | ||
2963 | real *alphar, real *alphai, real *beta, real *csl, real *snl, real * | ||
2964 | csr, real *snr); | ||
2965 | |||
2966 | /* Subroutine */ int slahqr_(logical *wantt, logical *wantz, integer *n, | ||
2967 | integer *ilo, integer *ihi, real *h__, integer *ldh, real *wr, real * | ||
2968 | wi, integer *iloz, integer *ihiz, real *z__, integer *ldz, integer * | ||
2969 | info); | ||
2970 | |||
2971 | /* Subroutine */ int slahrd_(integer *n, integer *k, integer *nb, real *a, | ||
2972 | integer *lda, real *tau, real *t, integer *ldt, real *y, integer *ldy); | ||
2973 | |||
2974 | /* Subroutine */ int slaic1_(integer *job, integer *j, real *x, real *sest, | ||
2975 | real *w, real *gamma, real *sestpr, real *s, real *c__); | ||
2976 | |||
2977 | /* Subroutine */ int slaln2_(logical *ltrans, integer *na, integer *nw, real * | ||
2978 | smin, real *ca, real *a, integer *lda, real *d1, real *d2, real *b, | ||
2979 | integer *ldb, real *wr, real *wi, real *x, integer *ldx, real *scale, | ||
2980 | real *xnorm, integer *info); | ||
2981 | |||
2982 | /* Subroutine */ int slals0_(integer *icompq, integer *nl, integer *nr, | ||
2983 | integer *sqre, integer *nrhs, real *b, integer *ldb, real *bx, | ||
2984 | integer *ldbx, integer *perm, integer *givptr, integer *givcol, | ||
2985 | integer *ldgcol, real *givnum, integer *ldgnum, real *poles, real * | ||
2986 | difl, real *difr, real *z__, integer *k, real *c__, real *s, real * | ||
2987 | work, integer *info); | ||
2988 | |||
2989 | /* Subroutine */ int slalsa_(integer *icompq, integer *smlsiz, integer *n, | ||
2990 | integer *nrhs, real *b, integer *ldb, real *bx, integer *ldbx, real * | ||
2991 | u, integer *ldu, real *vt, integer *k, real *difl, real *difr, real * | ||
2992 | z__, real *poles, integer *givptr, integer *givcol, integer *ldgcol, | ||
2993 | integer *perm, real *givnum, real *c__, real *s, real *work, integer * | ||
2994 | iwork, integer *info); | ||
2995 | |||
2996 | /* Subroutine */ int slalsd_(char *uplo, integer *smlsiz, integer *n, integer | ||
2997 | *nrhs, real *d__, real *e, real *b, integer *ldb, real *rcond, | ||
2998 | integer *rank, real *work, integer *iwork, integer *info); | ||
2999 | |||
3000 | /* Subroutine */ int slamc1_(integer *beta, integer *t, logical *rnd, logical | ||
3001 | *ieee1); | ||
3002 | |||
3003 | /* Subroutine */ int slamc2_(integer *beta, integer *t, logical *rnd, real * | ||
3004 | eps, integer *emin, real *rmin, integer *emax, real *rmax); | ||
3005 | |||
3006 | /* Subroutine */ int slamc4_(integer *emin, real *start, integer *base); | ||
3007 | |||
3008 | /* Subroutine */ int slamc5_(integer *beta, integer *p, integer *emin, | ||
3009 | logical *ieee, integer *emax, real *rmax); | ||
3010 | |||
3011 | /* Subroutine */ int slamrg_(integer *n1, integer *n2, real *a, integer * | ||
3012 | strd1, integer *strd2, integer *index); | ||
3013 | |||
3014 | /* Subroutine */ int slanv2_(real *a, real *b, real *c__, real *d__, real * | ||
3015 | rt1r, real *rt1i, real *rt2r, real *rt2i, real *cs, real *sn); | ||
3016 | |||
3017 | /* Subroutine */ int slapll_(integer *n, real *x, integer *incx, real *y, | ||
3018 | integer *incy, real *ssmin); | ||
3019 | |||
3020 | /* Subroutine */ int slapmt_(logical *forwrd, integer *m, integer *n, real *x, | ||
3021 | integer *ldx, integer *k); | ||
3022 | |||
3023 | /* Subroutine */ int slaqgb_(integer *m, integer *n, integer *kl, integer *ku, | ||
3024 | real *ab, integer *ldab, real *r__, real *c__, real *rowcnd, real * | ||
3025 | colcnd, real *amax, char *equed); | ||
3026 | |||
3027 | /* Subroutine */ int slaqge_(integer *m, integer *n, real *a, integer *lda, | ||
3028 | real *r__, real *c__, real *rowcnd, real *colcnd, real *amax, char * | ||
3029 | equed); | ||
3030 | |||
3031 | /* Subroutine */ int slaqp2_(integer *m, integer *n, integer *offset, real *a, | ||
3032 | integer *lda, integer *jpvt, real *tau, real *vn1, real *vn2, real * | ||
3033 | work); | ||
3034 | |||
3035 | /* Subroutine */ int slaqps_(integer *m, integer *n, integer *offset, integer | ||
3036 | *nb, integer *kb, real *a, integer *lda, integer *jpvt, real *tau, | ||
3037 | real *vn1, real *vn2, real *auxv, real *f, integer *ldf); | ||
3038 | |||
3039 | /* Subroutine */ int slaqsb_(char *uplo, integer *n, integer *kd, real *ab, | ||
3040 | integer *ldab, real *s, real *scond, real *amax, char *equed); | ||
3041 | |||
3042 | /* Subroutine */ int slaqsp_(char *uplo, integer *n, real *ap, real *s, real * | ||
3043 | scond, real *amax, char *equed); | ||
3044 | |||
3045 | /* Subroutine */ int slaqsy_(char *uplo, integer *n, real *a, integer *lda, | ||
3046 | real *s, real *scond, real *amax, char *equed); | ||
3047 | |||
3048 | /* Subroutine */ int slaqtr_(logical *ltran, logical *lreal, integer *n, real | ||
3049 | *t, integer *ldt, real *b, real *w, real *scale, real *x, real *work, | ||
3050 | integer *info); | ||
3051 | |||
3052 | /* Subroutine */ int slar1v_(integer *n, integer *b1, integer *bn, real * | ||
3053 | sigma, real *d__, real *l, real *ld, real *lld, real *gersch, real * | ||
3054 | z__, real *ztz, real *mingma, integer *r__, integer *isuppz, real * | ||
3055 | work); | ||
3056 | |||
3057 | /* Subroutine */ int slar2v_(integer *n, real *x, real *y, real *z__, integer | ||
3058 | *incx, real *c__, real *s, integer *incc); | ||
3059 | |||
3060 | /* Subroutine */ int slarf_(char *side, integer *m, integer *n, real *v, | ||
3061 | integer *incv, real *tau, real *c__, integer *ldc, real *work); | ||
3062 | |||
3063 | /* Subroutine */ int slarfb_(char *side, char *trans, char *direct, char * | ||
3064 | storev, integer *m, integer *n, integer *k, real *v, integer *ldv, | ||
3065 | real *t, integer *ldt, real *c__, integer *ldc, real *work, integer * | ||
3066 | ldwork); | ||
3067 | |||
3068 | /* Subroutine */ int slarfg_(integer *n, real *alpha, real *x, integer *incx, | ||
3069 | real *tau); | ||
3070 | |||
3071 | /* Subroutine */ int slarft_(char *direct, char *storev, integer *n, integer * | ||
3072 | k, real *v, integer *ldv, real *tau, real *t, integer *ldt); | ||
3073 | |||
3074 | /* Subroutine */ int slarfx_(char *side, integer *m, integer *n, real *v, | ||
3075 | real *tau, real *c__, integer *ldc, real *work); | ||
3076 | |||
3077 | /* Subroutine */ int slargv_(integer *n, real *x, integer *incx, real *y, | ||
3078 | integer *incy, real *c__, integer *incc); | ||
3079 | |||
3080 | /* Subroutine */ int slarnv_(integer *idist, integer *iseed, integer *n, real | ||
3081 | *x); | ||
3082 | |||
3083 | /* Subroutine */ int slarrb_(integer *n, real *d__, real *l, real *ld, real * | ||
3084 | lld, integer *ifirst, integer *ilast, real *sigma, real *reltol, real | ||
3085 | *w, real *wgap, real *werr, real *work, integer *iwork, integer *info); | ||
3086 | |||
3087 | /* Subroutine */ int slarre_(integer *n, real *d__, real *e, real *tol, | ||
3088 | integer *nsplit, integer *isplit, integer *m, real *w, real *woff, | ||
3089 | real *gersch, real *work, integer *info); | ||
3090 | |||
3091 | /* Subroutine */ int slarrf_(integer *n, real *d__, real *l, real *ld, real * | ||
3092 | lld, integer *ifirst, integer *ilast, real *w, real *dplus, real * | ||
3093 | lplus, real *work, integer *iwork, integer *info); | ||
3094 | |||
3095 | /* Subroutine */ int slarrv_(integer *n, real *d__, real *l, integer *isplit, | ||
3096 | integer *m, real *w, integer *iblock, real *gersch, real *tol, real * | ||
3097 | z__, integer *ldz, integer *isuppz, real *work, integer *iwork, | ||
3098 | integer *info); | ||
3099 | |||
3100 | /* Subroutine */ int slartg_(real *f, real *g, real *cs, real *sn, real *r__); | ||
3101 | |||
3102 | /* Subroutine */ int slartv_(integer *n, real *x, integer *incx, real *y, | ||
3103 | integer *incy, real *c__, real *s, integer *incc); | ||
3104 | |||
3105 | /* Subroutine */ int slaruv_(integer *iseed, integer *n, real *x); | ||
3106 | |||
3107 | /* Subroutine */ int slarz_(char *side, integer *m, integer *n, integer *l, | ||
3108 | real *v, integer *incv, real *tau, real *c__, integer *ldc, real * | ||
3109 | work); | ||
3110 | |||
3111 | /* Subroutine */ int slarzb_(char *side, char *trans, char *direct, char * | ||
3112 | storev, integer *m, integer *n, integer *k, integer *l, real *v, | ||
3113 | integer *ldv, real *t, integer *ldt, real *c__, integer *ldc, real * | ||
3114 | work, integer *ldwork); | ||
3115 | |||
3116 | /* Subroutine */ int slarzt_(char *direct, char *storev, integer *n, integer * | ||
3117 | k, real *v, integer *ldv, real *tau, real *t, integer *ldt); | ||
3118 | |||
3119 | /* Subroutine */ int slas2_(real *f, real *g, real *h__, real *ssmin, real * | ||
3120 | ssmax); | ||
3121 | |||
3122 | /* Subroutine */ int slascl_(char *type__, integer *kl, integer *ku, real * | ||
3123 | cfrom, real *cto, integer *m, integer *n, real *a, integer *lda, | ||
3124 | integer *info); | ||
3125 | |||
3126 | /* Subroutine */ int slasd0_(integer *n, integer *sqre, real *d__, real *e, | ||
3127 | real *u, integer *ldu, real *vt, integer *ldvt, integer *smlsiz, | ||
3128 | integer *iwork, real *work, integer *info); | ||
3129 | |||
3130 | /* Subroutine */ int slasd1_(integer *nl, integer *nr, integer *sqre, real * | ||
3131 | d__, real *alpha, real *beta, real *u, integer *ldu, real *vt, | ||
3132 | integer *ldvt, integer *idxq, integer *iwork, real *work, integer * | ||
3133 | info); | ||
3134 | |||
3135 | /* Subroutine */ int slasd2_(integer *nl, integer *nr, integer *sqre, integer | ||
3136 | *k, real *d__, real *z__, real *alpha, real *beta, real *u, integer * | ||
3137 | ldu, real *vt, integer *ldvt, real *dsigma, real *u2, integer *ldu2, | ||
3138 | real *vt2, integer *ldvt2, integer *idxp, integer *idx, integer *idxc, | ||
3139 | integer *idxq, integer *coltyp, integer *info); | ||
3140 | |||
3141 | /* Subroutine */ int slasd3_(integer *nl, integer *nr, integer *sqre, integer | ||
3142 | *k, real *d__, real *q, integer *ldq, real *dsigma, real *u, integer * | ||
3143 | ldu, real *u2, integer *ldu2, real *vt, integer *ldvt, real *vt2, | ||
3144 | integer *ldvt2, integer *idxc, integer *ctot, real *z__, integer * | ||
3145 | info); | ||
3146 | |||
3147 | /* Subroutine */ int slasd4_(integer *n, integer *i__, real *d__, real *z__, | ||
3148 | real *delta, real *rho, real *sigma, real *work, integer *info); | ||
3149 | |||
3150 | /* Subroutine */ int slasd5_(integer *i__, real *d__, real *z__, real *delta, | ||
3151 | real *rho, real *dsigma, real *work); | ||
3152 | |||
3153 | /* Subroutine */ int slasd6_(integer *icompq, integer *nl, integer *nr, | ||
3154 | integer *sqre, real *d__, real *vf, real *vl, real *alpha, real *beta, | ||
3155 | integer *idxq, integer *perm, integer *givptr, integer *givcol, | ||
3156 | integer *ldgcol, real *givnum, integer *ldgnum, real *poles, real * | ||
3157 | difl, real *difr, real *z__, integer *k, real *c__, real *s, real * | ||
3158 | work, integer *iwork, integer *info); | ||
3159 | |||
3160 | /* Subroutine */ int slasd7_(integer *icompq, integer *nl, integer *nr, | ||
3161 | integer *sqre, integer *k, real *d__, real *z__, real *zw, real *vf, | ||
3162 | real *vfw, real *vl, real *vlw, real *alpha, real *beta, real *dsigma, | ||
3163 | integer *idx, integer *idxp, integer *idxq, integer *perm, integer * | ||
3164 | givptr, integer *givcol, integer *ldgcol, real *givnum, integer * | ||
3165 | ldgnum, real *c__, real *s, integer *info); | ||
3166 | |||
3167 | /* Subroutine */ int slasd8_(integer *icompq, integer *k, real *d__, real * | ||
3168 | z__, real *vf, real *vl, real *difl, real *difr, integer *lddifr, | ||
3169 | real *dsigma, real *work, integer *info); | ||
3170 | |||
3171 | /* Subroutine */ int slasd9_(integer *icompq, integer *ldu, integer *k, real * | ||
3172 | d__, real *z__, real *vf, real *vl, real *difl, real *difr, real * | ||
3173 | dsigma, real *work, integer *info); | ||
3174 | |||
3175 | /* Subroutine */ int slasda_(integer *icompq, integer *smlsiz, integer *n, | ||
3176 | integer *sqre, real *d__, real *e, real *u, integer *ldu, real *vt, | ||
3177 | integer *k, real *difl, real *difr, real *z__, real *poles, integer * | ||
3178 | givptr, integer *givcol, integer *ldgcol, integer *perm, real *givnum, | ||
3179 | real *c__, real *s, real *work, integer *iwork, integer *info); | ||
3180 | |||
3181 | /* Subroutine */ int slasdq_(char *uplo, integer *sqre, integer *n, integer * | ||
3182 | ncvt, integer *nru, integer *ncc, real *d__, real *e, real *vt, | ||
3183 | integer *ldvt, real *u, integer *ldu, real *c__, integer *ldc, real * | ||
3184 | work, integer *info); | ||
3185 | |||
3186 | /* Subroutine */ int slasdt_(integer *n, integer *lvl, integer *nd, integer * | ||
3187 | inode, integer *ndiml, integer *ndimr, integer *msub); | ||
3188 | |||
3189 | /* Subroutine */ int slaset_(char *uplo, integer *m, integer *n, real *alpha, | ||
3190 | real *beta, real *a, integer *lda); | ||
3191 | |||
3192 | /* Subroutine */ int slasq1_(integer *n, real *d__, real *e, real *work, | ||
3193 | integer *info); | ||
3194 | |||
3195 | /* Subroutine */ int slasq2_(integer *n, real *z__, integer *info); | ||
3196 | |||
3197 | /* Subroutine */ int slasq3_(integer *i0, integer *n0, real *z__, integer *pp, | ||
3198 | real *dmin__, real *sigma, real *desig, real *qmax, integer *nfail, | ||
3199 | integer *iter, integer *ndiv, logical *ieee); | ||
3200 | |||
3201 | /* Subroutine */ int slasq4_(integer *i0, integer *n0, real *z__, integer *pp, | ||
3202 | integer *n0in, real *dmin__, real *dmin1, real *dmin2, real *dn, | ||
3203 | real *dn1, real *dn2, real *tau, integer *ttype); | ||
3204 | |||
3205 | /* Subroutine */ int slasq5_(integer *i0, integer *n0, real *z__, integer *pp, | ||
3206 | real *tau, real *dmin__, real *dmin1, real *dmin2, real *dn, real * | ||
3207 | dnm1, real *dnm2, logical *ieee); | ||
3208 | |||
3209 | /* Subroutine */ int slasq6_(integer *i0, integer *n0, real *z__, integer *pp, | ||
3210 | real *dmin__, real *dmin1, real *dmin2, real *dn, real *dnm1, real * | ||
3211 | dnm2); | ||
3212 | |||
3213 | /* Subroutine */ int slasr_(char *side, char *pivot, char *direct, integer *m, | ||
3214 | integer *n, real *c__, real *s, real *a, integer *lda); | ||
3215 | |||
3216 | /* Subroutine */ int slasrt_(char *id, integer *n, real *d__, integer *info); | ||
3217 | |||
3218 | /* Subroutine */ int slassq_(integer *n, real *x, integer *incx, real *scale, | ||
3219 | real *sumsq); | ||
3220 | |||
3221 | /* Subroutine */ int slasv2_(real *f, real *g, real *h__, real *ssmin, real * | ||
3222 | ssmax, real *snr, real *csr, real *snl, real *csl); | ||
3223 | |||
3224 | /* Subroutine */ int slaswp_(integer *n, real *a, integer *lda, integer *k1, | ||
3225 | integer *k2, integer *ipiv, integer *incx); | ||
3226 | |||
3227 | /* Subroutine */ int slasy2_(logical *ltranl, logical *ltranr, integer *isgn, | ||
3228 | integer *n1, integer *n2, real *tl, integer *ldtl, real *tr, integer * | ||
3229 | ldtr, real *b, integer *ldb, real *scale, real *x, integer *ldx, real | ||
3230 | *xnorm, integer *info); | ||
3231 | |||
3232 | /* Subroutine */ int slasyf_(char *uplo, integer *n, integer *nb, integer *kb, | ||
3233 | real *a, integer *lda, integer *ipiv, real *w, integer *ldw, integer | ||
3234 | *info); | ||
3235 | |||
3236 | /* Subroutine */ int slatbs_(char *uplo, char *trans, char *diag, char * | ||
3237 | normin, integer *n, integer *kd, real *ab, integer *ldab, real *x, | ||
3238 | real *scale, real *cnorm, integer *info); | ||
3239 | |||
3240 | /* Subroutine */ int slatdf_(integer *ijob, integer *n, real *z__, integer * | ||
3241 | ldz, real *rhs, real *rdsum, real *rdscal, integer *ipiv, integer * | ||
3242 | jpiv); | ||
3243 | |||
3244 | /* Subroutine */ int slatps_(char *uplo, char *trans, char *diag, char * | ||
3245 | normin, integer *n, real *ap, real *x, real *scale, real *cnorm, | ||
3246 | integer *info); | ||
3247 | |||
3248 | /* Subroutine */ int slatrd_(char *uplo, integer *n, integer *nb, real *a, | ||
3249 | integer *lda, real *e, real *tau, real *w, integer *ldw); | ||
3250 | |||
3251 | /* Subroutine */ int slatrs_(char *uplo, char *trans, char *diag, char * | ||
3252 | normin, integer *n, real *a, integer *lda, real *x, real *scale, real | ||
3253 | *cnorm, integer *info); | ||
3254 | |||
3255 | /* Subroutine */ int slatrz_(integer *m, integer *n, integer *l, real *a, | ||
3256 | integer *lda, real *tau, real *work); | ||
3257 | |||
3258 | /* Subroutine */ int slatzm_(char *side, integer *m, integer *n, real *v, | ||
3259 | integer *incv, real *tau, real *c1, real *c2, integer *ldc, real * | ||
3260 | work); | ||
3261 | |||
3262 | /* Subroutine */ int slauu2_(char *uplo, integer *n, real *a, integer *lda, | ||
3263 | integer *info); | ||
3264 | |||
3265 | /* Subroutine */ int slauum_(char *uplo, integer *n, real *a, integer *lda, | ||
3266 | integer *info); | ||
3267 | |||
3268 | /* Subroutine */ int sopgtr_(char *uplo, integer *n, real *ap, real *tau, | ||
3269 | real *q, integer *ldq, real *work, integer *info); | ||
3270 | |||
3271 | /* Subroutine */ int sopmtr_(char *side, char *uplo, char *trans, integer *m, | ||
3272 | integer *n, real *ap, real *tau, real *c__, integer *ldc, real *work, | ||
3273 | integer *info); | ||
3274 | |||
3275 | /* Subroutine */ int sorg2l_(integer *m, integer *n, integer *k, real *a, | ||
3276 | integer *lda, real *tau, real *work, integer *info); | ||
3277 | |||
3278 | /* Subroutine */ int sorg2r_(integer *m, integer *n, integer *k, real *a, | ||
3279 | integer *lda, real *tau, real *work, integer *info); | ||
3280 | |||
3281 | /* Subroutine */ int sorgbr_(char *vect, integer *m, integer *n, integer *k, | ||
3282 | real *a, integer *lda, real *tau, real *work, integer *lwork, integer | ||
3283 | *info); | ||
3284 | |||
3285 | /* Subroutine */ int sorghr_(integer *n, integer *ilo, integer *ihi, real *a, | ||
3286 | integer *lda, real *tau, real *work, integer *lwork, integer *info); | ||
3287 | |||
3288 | /* Subroutine */ int sorgl2_(integer *m, integer *n, integer *k, real *a, | ||
3289 | integer *lda, real *tau, real *work, integer *info); | ||
3290 | |||
3291 | /* Subroutine */ int sorglq_(integer *m, integer *n, integer *k, real *a, | ||
3292 | integer *lda, real *tau, real *work, integer *lwork, integer *info); | ||
3293 | |||
3294 | /* Subroutine */ int sorgql_(integer *m, integer *n, integer *k, real *a, | ||
3295 | integer *lda, real *tau, real *work, integer *lwork, integer *info); | ||
3296 | |||
3297 | /* Subroutine */ int sorgqr_(integer *m, integer *n, integer *k, real *a, | ||
3298 | integer *lda, real *tau, real *work, integer *lwork, integer *info); | ||
3299 | |||
3300 | /* Subroutine */ int sorgr2_(integer *m, integer *n, integer *k, real *a, | ||
3301 | integer *lda, real *tau, real *work, integer *info); | ||
3302 | |||
3303 | /* Subroutine */ int sorgrq_(integer *m, integer *n, integer *k, real *a, | ||
3304 | integer *lda, real *tau, real *work, integer *lwork, integer *info); | ||
3305 | |||
3306 | /* Subroutine */ int sorgtr_(char *uplo, integer *n, real *a, integer *lda, | ||
3307 | real *tau, real *work, integer *lwork, integer *info); | ||
3308 | |||
3309 | /* Subroutine */ int sorm2l_(char *side, char *trans, integer *m, integer *n, | ||
3310 | integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, | ||
3311 | real *work, integer *info); | ||
3312 | |||
3313 | /* Subroutine */ int sorm2r_(char *side, char *trans, integer *m, integer *n, | ||
3314 | integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, | ||
3315 | real *work, integer *info); | ||
3316 | |||
3317 | /* Subroutine */ int sormbr_(char *vect, char *side, char *trans, integer *m, | ||
3318 | integer *n, integer *k, real *a, integer *lda, real *tau, real *c__, | ||
3319 | integer *ldc, real *work, integer *lwork, integer *info); | ||
3320 | |||
3321 | /* Subroutine */ int sormhr_(char *side, char *trans, integer *m, integer *n, | ||
3322 | integer *ilo, integer *ihi, real *a, integer *lda, real *tau, real * | ||
3323 | c__, integer *ldc, real *work, integer *lwork, integer *info); | ||
3324 | |||
3325 | /* Subroutine */ int sorml2_(char *side, char *trans, integer *m, integer *n, | ||
3326 | integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, | ||
3327 | real *work, integer *info); | ||
3328 | |||
3329 | /* Subroutine */ int sormlq_(char *side, char *trans, integer *m, integer *n, | ||
3330 | integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, | ||
3331 | real *work, integer *lwork, integer *info); | ||
3332 | |||
3333 | /* Subroutine */ int sormql_(char *side, char *trans, integer *m, integer *n, | ||
3334 | integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, | ||
3335 | real *work, integer *lwork, integer *info); | ||
3336 | |||
3337 | /* Subroutine */ int sormqr_(char *side, char *trans, integer *m, integer *n, | ||
3338 | integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, | ||
3339 | real *work, integer *lwork, integer *info); | ||
3340 | |||
3341 | /* Subroutine */ int sormr2_(char *side, char *trans, integer *m, integer *n, | ||
3342 | integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, | ||
3343 | real *work, integer *info); | ||
3344 | |||
3345 | /* Subroutine */ int sormr3_(char *side, char *trans, integer *m, integer *n, | ||
3346 | integer *k, integer *l, real *a, integer *lda, real *tau, real *c__, | ||
3347 | integer *ldc, real *work, integer *info); | ||
3348 | |||
3349 | /* Subroutine */ int sormrq_(char *side, char *trans, integer *m, integer *n, | ||
3350 | integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, | ||
3351 | real *work, integer *lwork, integer *info); | ||
3352 | |||
3353 | /* Subroutine */ int sormrz_(char *side, char *trans, integer *m, integer *n, | ||
3354 | integer *k, integer *l, real *a, integer *lda, real *tau, real *c__, | ||
3355 | integer *ldc, real *work, integer *lwork, integer *info); | ||
3356 | |||
3357 | /* Subroutine */ int sormtr_(char *side, char *uplo, char *trans, integer *m, | ||
3358 | integer *n, real *a, integer *lda, real *tau, real *c__, integer *ldc, | ||
3359 | real *work, integer *lwork, integer *info); | ||
3360 | |||
3361 | /* Subroutine */ int spbcon_(char *uplo, integer *n, integer *kd, real *ab, | ||
3362 | integer *ldab, real *anorm, real *rcond, real *work, integer *iwork, | ||
3363 | integer *info); | ||
3364 | |||
3365 | /* Subroutine */ int spbequ_(char *uplo, integer *n, integer *kd, real *ab, | ||
3366 | integer *ldab, real *s, real *scond, real *amax, integer *info); | ||
3367 | |||
3368 | /* Subroutine */ int spbrfs_(char *uplo, integer *n, integer *kd, integer * | ||
3369 | nrhs, real *ab, integer *ldab, real *afb, integer *ldafb, real *b, | ||
3370 | integer *ldb, real *x, integer *ldx, real *ferr, real *berr, real * | ||
3371 | work, integer *iwork, integer *info); | ||
3372 | |||
3373 | /* Subroutine */ int spbstf_(char *uplo, integer *n, integer *kd, real *ab, | ||
3374 | integer *ldab, integer *info); | ||
3375 | |||
3376 | /* Subroutine */ int spbsv_(char *uplo, integer *n, integer *kd, integer * | ||
3377 | nrhs, real *ab, integer *ldab, real *b, integer *ldb, integer *info); | ||
3378 | |||
3379 | /* Subroutine */ int spbsvx_(char *fact, char *uplo, integer *n, integer *kd, | ||
3380 | integer *nrhs, real *ab, integer *ldab, real *afb, integer *ldafb, | ||
3381 | char *equed, real *s, real *b, integer *ldb, real *x, integer *ldx, | ||
3382 | real *rcond, real *ferr, real *berr, real *work, integer *iwork, | ||
3383 | integer *info); | ||
3384 | |||
3385 | /* Subroutine */ int spbtf2_(char *uplo, integer *n, integer *kd, real *ab, | ||
3386 | integer *ldab, integer *info); | ||
3387 | |||
3388 | /* Subroutine */ int spbtrf_(char *uplo, integer *n, integer *kd, real *ab, | ||
3389 | integer *ldab, integer *info); | ||
3390 | |||
3391 | /* Subroutine */ int spbtrs_(char *uplo, integer *n, integer *kd, integer * | ||
3392 | nrhs, real *ab, integer *ldab, real *b, integer *ldb, integer *info); | ||
3393 | |||
3394 | /* Subroutine */ int spocon_(char *uplo, integer *n, real *a, integer *lda, | ||
3395 | real *anorm, real *rcond, real *work, integer *iwork, integer *info); | ||
3396 | |||
3397 | /* Subroutine */ int spoequ_(integer *n, real *a, integer *lda, real *s, real | ||
3398 | *scond, real *amax, integer *info); | ||
3399 | |||
3400 | /* Subroutine */ int sporfs_(char *uplo, integer *n, integer *nrhs, real *a, | ||
3401 | integer *lda, real *af, integer *ldaf, real *b, integer *ldb, real *x, | ||
3402 | integer *ldx, real *ferr, real *berr, real *work, integer *iwork, | ||
3403 | integer *info); | ||
3404 | |||
3405 | /* Subroutine */ int sposv_(char *uplo, integer *n, integer *nrhs, real *a, | ||
3406 | integer *lda, real *b, integer *ldb, integer *info); | ||
3407 | |||
3408 | /* Subroutine */ int sposvx_(char *fact, char *uplo, integer *n, integer * | ||
3409 | nrhs, real *a, integer *lda, real *af, integer *ldaf, char *equed, | ||
3410 | real *s, real *b, integer *ldb, real *x, integer *ldx, real *rcond, | ||
3411 | real *ferr, real *berr, real *work, integer *iwork, integer *info); | ||
3412 | |||
3413 | /* Subroutine */ int spotf2_(char *uplo, integer *n, real *a, integer *lda, | ||
3414 | integer *info); | ||
3415 | |||
3416 | /* Subroutine */ int spotrf_(char *uplo, integer *n, real *a, integer *lda, | ||
3417 | integer *info); | ||
3418 | |||
3419 | /* Subroutine */ int spotri_(char *uplo, integer *n, real *a, integer *lda, | ||
3420 | integer *info); | ||
3421 | |||
3422 | /* Subroutine */ int spotrs_(char *uplo, integer *n, integer *nrhs, real *a, | ||
3423 | integer *lda, real *b, integer *ldb, integer *info); | ||
3424 | |||
3425 | /* Subroutine */ int sppcon_(char *uplo, integer *n, real *ap, real *anorm, | ||
3426 | real *rcond, real *work, integer *iwork, integer *info); | ||
3427 | |||
3428 | /* Subroutine */ int sppequ_(char *uplo, integer *n, real *ap, real *s, real * | ||
3429 | scond, real *amax, integer *info); | ||
3430 | |||
3431 | /* Subroutine */ int spprfs_(char *uplo, integer *n, integer *nrhs, real *ap, | ||
3432 | real *afp, real *b, integer *ldb, real *x, integer *ldx, real *ferr, | ||
3433 | real *berr, real *work, integer *iwork, integer *info); | ||
3434 | |||
3435 | /* Subroutine */ int sppsv_(char *uplo, integer *n, integer *nrhs, real *ap, | ||
3436 | real *b, integer *ldb, integer *info); | ||
3437 | |||
3438 | /* Subroutine */ int sppsvx_(char *fact, char *uplo, integer *n, integer * | ||
3439 | nrhs, real *ap, real *afp, char *equed, real *s, real *b, integer * | ||
3440 | ldb, real *x, integer *ldx, real *rcond, real *ferr, real *berr, real | ||
3441 | *work, integer *iwork, integer *info); | ||
3442 | |||
3443 | /* Subroutine */ int spptrf_(char *uplo, integer *n, real *ap, integer *info); | ||
3444 | |||
3445 | /* Subroutine */ int spptri_(char *uplo, integer *n, real *ap, integer *info); | ||
3446 | |||
3447 | /* Subroutine */ int spptrs_(char *uplo, integer *n, integer *nrhs, real *ap, | ||
3448 | real *b, integer *ldb, integer *info); | ||
3449 | |||
3450 | /* Subroutine */ int sptcon_(integer *n, real *d__, real *e, real *anorm, | ||
3451 | real *rcond, real *work, integer *info); | ||
3452 | |||
3453 | /* Subroutine */ int spteqr_(char *compz, integer *n, real *d__, real *e, | ||
3454 | real *z__, integer *ldz, real *work, integer *info); | ||
3455 | |||
3456 | /* Subroutine */ int sptrfs_(integer *n, integer *nrhs, real *d__, real *e, | ||
3457 | real *df, real *ef, real *b, integer *ldb, real *x, integer *ldx, | ||
3458 | real *ferr, real *berr, real *work, integer *info); | ||
3459 | |||
3460 | /* Subroutine */ int sptsv_(integer *n, integer *nrhs, real *d__, real *e, | ||
3461 | real *b, integer *ldb, integer *info); | ||
3462 | |||
3463 | /* Subroutine */ int sptsvx_(char *fact, integer *n, integer *nrhs, real *d__, | ||
3464 | real *e, real *df, real *ef, real *b, integer *ldb, real *x, integer | ||
3465 | *ldx, real *rcond, real *ferr, real *berr, real *work, integer *info); | ||
3466 | |||
3467 | /* Subroutine */ int spttrf_(integer *n, real *d__, real *e, integer *info); | ||
3468 | |||
3469 | /* Subroutine */ int spttrs_(integer *n, integer *nrhs, real *d__, real *e, | ||
3470 | real *b, integer *ldb, integer *info); | ||
3471 | |||
3472 | /* Subroutine */ int sptts2_(integer *n, integer *nrhs, real *d__, real *e, | ||
3473 | real *b, integer *ldb); | ||
3474 | |||
3475 | /* Subroutine */ int srscl_(integer *n, real *sa, real *sx, integer *incx); | ||
3476 | |||
3477 | /* Subroutine */ int ssbev_(char *jobz, char *uplo, integer *n, integer *kd, | ||
3478 | real *ab, integer *ldab, real *w, real *z__, integer *ldz, real *work, | ||
3479 | integer *info); | ||
3480 | |||
3481 | /* Subroutine */ int ssbevd_(char *jobz, char *uplo, integer *n, integer *kd, | ||
3482 | real *ab, integer *ldab, real *w, real *z__, integer *ldz, real *work, | ||
3483 | integer *lwork, integer *iwork, integer *liwork, integer *info); | ||
3484 | |||
3485 | /* Subroutine */ int ssbevx_(char *jobz, char *range, char *uplo, integer *n, | ||
3486 | integer *kd, real *ab, integer *ldab, real *q, integer *ldq, real *vl, | ||
3487 | real *vu, integer *il, integer *iu, real *abstol, integer *m, real * | ||
3488 | w, real *z__, integer *ldz, real *work, integer *iwork, integer * | ||
3489 | ifail, integer *info); | ||
3490 | |||
3491 | /* Subroutine */ int ssbgst_(char *vect, char *uplo, integer *n, integer *ka, | ||
3492 | integer *kb, real *ab, integer *ldab, real *bb, integer *ldbb, real * | ||
3493 | x, integer *ldx, real *work, integer *info); | ||
3494 | |||
3495 | /* Subroutine */ int ssbgv_(char *jobz, char *uplo, integer *n, integer *ka, | ||
3496 | integer *kb, real *ab, integer *ldab, real *bb, integer *ldbb, real * | ||
3497 | w, real *z__, integer *ldz, real *work, integer *info); | ||
3498 | |||
3499 | /* Subroutine */ int ssbgvd_(char *jobz, char *uplo, integer *n, integer *ka, | ||
3500 | integer *kb, real *ab, integer *ldab, real *bb, integer *ldbb, real * | ||
3501 | w, real *z__, integer *ldz, real *work, integer *lwork, integer * | ||
3502 | iwork, integer *liwork, integer *info); | ||
3503 | |||
3504 | /* Subroutine */ int ssbgvx_(char *jobz, char *range, char *uplo, integer *n, | ||
3505 | integer *ka, integer *kb, real *ab, integer *ldab, real *bb, integer * | ||
3506 | ldbb, real *q, integer *ldq, real *vl, real *vu, integer *il, integer | ||
3507 | *iu, real *abstol, integer *m, real *w, real *z__, integer *ldz, real | ||
3508 | *work, integer *iwork, integer *ifail, integer *info); | ||
3509 | |||
3510 | /* Subroutine */ int ssbtrd_(char *vect, char *uplo, integer *n, integer *kd, | ||
3511 | real *ab, integer *ldab, real *d__, real *e, real *q, integer *ldq, | ||
3512 | real *work, integer *info); | ||
3513 | |||
3514 | /* Subroutine */ int sspcon_(char *uplo, integer *n, real *ap, integer *ipiv, | ||
3515 | real *anorm, real *rcond, real *work, integer *iwork, integer *info); | ||
3516 | |||
3517 | /* Subroutine */ int sspev_(char *jobz, char *uplo, integer *n, real *ap, | ||
3518 | real *w, real *z__, integer *ldz, real *work, integer *info); | ||
3519 | |||
3520 | /* Subroutine */ int sspevd_(char *jobz, char *uplo, integer *n, real *ap, | ||
3521 | real *w, real *z__, integer *ldz, real *work, integer *lwork, integer | ||
3522 | *iwork, integer *liwork, integer *info); | ||
3523 | |||
3524 | /* Subroutine */ int sspevx_(char *jobz, char *range, char *uplo, integer *n, | ||
3525 | real *ap, real *vl, real *vu, integer *il, integer *iu, real *abstol, | ||
3526 | integer *m, real *w, real *z__, integer *ldz, real *work, integer * | ||
3527 | iwork, integer *ifail, integer *info); | ||
3528 | |||
3529 | /* Subroutine */ int sspgst_(integer *itype, char *uplo, integer *n, real *ap, | ||
3530 | real *bp, integer *info); | ||
3531 | |||
3532 | /* Subroutine */ int sspgv_(integer *itype, char *jobz, char *uplo, integer * | ||
3533 | n, real *ap, real *bp, real *w, real *z__, integer *ldz, real *work, | ||
3534 | integer *info); | ||
3535 | |||
3536 | /* Subroutine */ int sspgvd_(integer *itype, char *jobz, char *uplo, integer * | ||
3537 | n, real *ap, real *bp, real *w, real *z__, integer *ldz, real *work, | ||
3538 | integer *lwork, integer *iwork, integer *liwork, integer *info); | ||
3539 | |||
3540 | /* Subroutine */ int sspgvx_(integer *itype, char *jobz, char *range, char * | ||
3541 | uplo, integer *n, real *ap, real *bp, real *vl, real *vu, integer *il, | ||
3542 | integer *iu, real *abstol, integer *m, real *w, real *z__, integer * | ||
3543 | ldz, real *work, integer *iwork, integer *ifail, integer *info); | ||
3544 | |||
3545 | /* Subroutine */ int ssprfs_(char *uplo, integer *n, integer *nrhs, real *ap, | ||
3546 | real *afp, integer *ipiv, real *b, integer *ldb, real *x, integer * | ||
3547 | ldx, real *ferr, real *berr, real *work, integer *iwork, integer * | ||
3548 | info); | ||
3549 | |||
3550 | /* Subroutine */ int sspsv_(char *uplo, integer *n, integer *nrhs, real *ap, | ||
3551 | integer *ipiv, real *b, integer *ldb, integer *info); | ||
3552 | |||
3553 | /* Subroutine */ int sspsvx_(char *fact, char *uplo, integer *n, integer * | ||
3554 | nrhs, real *ap, real *afp, integer *ipiv, real *b, integer *ldb, real | ||
3555 | *x, integer *ldx, real *rcond, real *ferr, real *berr, real *work, | ||
3556 | integer *iwork, integer *info); | ||
3557 | |||
3558 | /* Subroutine */ int ssptrd_(char *uplo, integer *n, real *ap, real *d__, | ||
3559 | real *e, real *tau, integer *info); | ||
3560 | |||
3561 | /* Subroutine */ int ssptrf_(char *uplo, integer *n, real *ap, integer *ipiv, | ||
3562 | integer *info); | ||
3563 | |||
3564 | /* Subroutine */ int ssptri_(char *uplo, integer *n, real *ap, integer *ipiv, | ||
3565 | real *work, integer *info); | ||
3566 | |||
3567 | /* Subroutine */ int ssptrs_(char *uplo, integer *n, integer *nrhs, real *ap, | ||
3568 | integer *ipiv, real *b, integer *ldb, integer *info); | ||
3569 | |||
3570 | /* Subroutine */ int sstebz_(char *range, char *order, integer *n, real *vl, | ||
3571 | real *vu, integer *il, integer *iu, real *abstol, real *d__, real *e, | ||
3572 | integer *m, integer *nsplit, real *w, integer *iblock, integer * | ||
3573 | isplit, real *work, integer *iwork, integer *info); | ||
3574 | |||
3575 | /* Subroutine */ int sstedc_(char *compz, integer *n, real *d__, real *e, | ||
3576 | real *z__, integer *ldz, real *work, integer *lwork, integer *iwork, | ||
3577 | integer *liwork, integer *info); | ||
3578 | |||
3579 | /* Subroutine */ int sstegr_(char *jobz, char *range, integer *n, real *d__, | ||
3580 | real *e, real *vl, real *vu, integer *il, integer *iu, real *abstol, | ||
3581 | integer *m, real *w, real *z__, integer *ldz, integer *isuppz, real * | ||
3582 | work, integer *lwork, integer *iwork, integer *liwork, integer *info); | ||
3583 | |||
3584 | /* Subroutine */ int sstein_(integer *n, real *d__, real *e, integer *m, real | ||
3585 | *w, integer *iblock, integer *isplit, real *z__, integer *ldz, real * | ||
3586 | work, integer *iwork, integer *ifail, integer *info); | ||
3587 | |||
3588 | /* Subroutine */ int ssteqr_(char *compz, integer *n, real *d__, real *e, | ||
3589 | real *z__, integer *ldz, real *work, integer *info); | ||
3590 | |||
3591 | /* Subroutine */ int ssterf_(integer *n, real *d__, real *e, integer *info); | ||
3592 | |||
3593 | /* Subroutine */ int sstev_(char *jobz, integer *n, real *d__, real *e, real * | ||
3594 | z__, integer *ldz, real *work, integer *info); | ||
3595 | |||
3596 | /* Subroutine */ int sstevd_(char *jobz, integer *n, real *d__, real *e, real | ||
3597 | *z__, integer *ldz, real *work, integer *lwork, integer *iwork, | ||
3598 | integer *liwork, integer *info); | ||
3599 | |||
3600 | /* Subroutine */ int sstevr_(char *jobz, char *range, integer *n, real *d__, | ||
3601 | real *e, real *vl, real *vu, integer *il, integer *iu, real *abstol, | ||
3602 | integer *m, real *w, real *z__, integer *ldz, integer *isuppz, real * | ||
3603 | work, integer *lwork, integer *iwork, integer *liwork, integer *info); | ||
3604 | |||
3605 | /* Subroutine */ int sstevx_(char *jobz, char *range, integer *n, real *d__, | ||
3606 | real *e, real *vl, real *vu, integer *il, integer *iu, real *abstol, | ||
3607 | integer *m, real *w, real *z__, integer *ldz, real *work, integer * | ||
3608 | iwork, integer *ifail, integer *info); | ||
3609 | |||
3610 | /* Subroutine */ int ssycon_(char *uplo, integer *n, real *a, integer *lda, | ||
3611 | integer *ipiv, real *anorm, real *rcond, real *work, integer *iwork, | ||
3612 | integer *info); | ||
3613 | |||
3614 | /* Subroutine */ int ssyev_(char *jobz, char *uplo, integer *n, real *a, | ||
3615 | integer *lda, real *w, real *work, integer *lwork, integer *info); | ||
3616 | |||
3617 | /* Subroutine */ int ssyevd_(char *jobz, char *uplo, integer *n, real *a, | ||
3618 | integer *lda, real *w, real *work, integer *lwork, integer *iwork, | ||
3619 | integer *liwork, integer *info); | ||
3620 | |||
3621 | /* Subroutine */ int ssyevr_(char *jobz, char *range, char *uplo, integer *n, | ||
3622 | real *a, integer *lda, real *vl, real *vu, integer *il, integer *iu, | ||
3623 | real *abstol, integer *m, real *w, real *z__, integer *ldz, integer * | ||
3624 | isuppz, real *work, integer *lwork, integer *iwork, integer *liwork, | ||
3625 | integer *info); | ||
3626 | |||
3627 | /* Subroutine */ int ssyevx_(char *jobz, char *range, char *uplo, integer *n, | ||
3628 | real *a, integer *lda, real *vl, real *vu, integer *il, integer *iu, | ||
3629 | real *abstol, integer *m, real *w, real *z__, integer *ldz, real * | ||
3630 | work, integer *lwork, integer *iwork, integer *ifail, integer *info); | ||
3631 | |||
3632 | /* Subroutine */ int ssygs2_(integer *itype, char *uplo, integer *n, real *a, | ||
3633 | integer *lda, real *b, integer *ldb, integer *info); | ||
3634 | |||
3635 | /* Subroutine */ int ssygst_(integer *itype, char *uplo, integer *n, real *a, | ||
3636 | integer *lda, real *b, integer *ldb, integer *info); | ||
3637 | |||
3638 | /* Subroutine */ int ssygv_(integer *itype, char *jobz, char *uplo, integer * | ||
3639 | n, real *a, integer *lda, real *b, integer *ldb, real *w, real *work, | ||
3640 | integer *lwork, integer *info); | ||
3641 | |||
3642 | /* Subroutine */ int ssygvd_(integer *itype, char *jobz, char *uplo, integer * | ||
3643 | n, real *a, integer *lda, real *b, integer *ldb, real *w, real *work, | ||
3644 | integer *lwork, integer *iwork, integer *liwork, integer *info); | ||
3645 | |||
3646 | /* Subroutine */ int ssygvx_(integer *itype, char *jobz, char *range, char * | ||
3647 | uplo, integer *n, real *a, integer *lda, real *b, integer *ldb, real * | ||
3648 | vl, real *vu, integer *il, integer *iu, real *abstol, integer *m, | ||
3649 | real *w, real *z__, integer *ldz, real *work, integer *lwork, integer | ||
3650 | *iwork, integer *ifail, integer *info); | ||
3651 | |||
3652 | /* Subroutine */ int ssyrfs_(char *uplo, integer *n, integer *nrhs, real *a, | ||
3653 | integer *lda, real *af, integer *ldaf, integer *ipiv, real *b, | ||
3654 | integer *ldb, real *x, integer *ldx, real *ferr, real *berr, real * | ||
3655 | work, integer *iwork, integer *info); | ||
3656 | |||
3657 | /* Subroutine */ int ssysv_(char *uplo, integer *n, integer *nrhs, real *a, | ||
3658 | integer *lda, integer *ipiv, real *b, integer *ldb, real *work, | ||
3659 | integer *lwork, integer *info); | ||
3660 | |||
3661 | /* Subroutine */ int ssysvx_(char *fact, char *uplo, integer *n, integer * | ||
3662 | nrhs, real *a, integer *lda, real *af, integer *ldaf, integer *ipiv, | ||
3663 | real *b, integer *ldb, real *x, integer *ldx, real *rcond, real *ferr, | ||
3664 | real *berr, real *work, integer *lwork, integer *iwork, integer * | ||
3665 | info); | ||
3666 | |||
3667 | /* Subroutine */ int ssytd2_(char *uplo, integer *n, real *a, integer *lda, | ||
3668 | real *d__, real *e, real *tau, integer *info); | ||
3669 | |||
3670 | /* Subroutine */ int ssytf2_(char *uplo, integer *n, real *a, integer *lda, | ||
3671 | integer *ipiv, integer *info); | ||
3672 | |||
3673 | /* Subroutine */ int ssytrd_(char *uplo, integer *n, real *a, integer *lda, | ||
3674 | real *d__, real *e, real *tau, real *work, integer *lwork, integer * | ||
3675 | info); | ||
3676 | |||
3677 | /* Subroutine */ int ssytrf_(char *uplo, integer *n, real *a, integer *lda, | ||
3678 | integer *ipiv, real *work, integer *lwork, integer *info); | ||
3679 | |||
3680 | /* Subroutine */ int ssytri_(char *uplo, integer *n, real *a, integer *lda, | ||
3681 | integer *ipiv, real *work, integer *info); | ||
3682 | |||
3683 | /* Subroutine */ int ssytrs_(char *uplo, integer *n, integer *nrhs, real *a, | ||
3684 | integer *lda, integer *ipiv, real *b, integer *ldb, integer *info); | ||
3685 | |||
3686 | /* Subroutine */ int stbcon_(char *norm, char *uplo, char *diag, integer *n, | ||
3687 | integer *kd, real *ab, integer *ldab, real *rcond, real *work, | ||
3688 | integer *iwork, integer *info); | ||
3689 | |||
3690 | /* Subroutine */ int stbrfs_(char *uplo, char *trans, char *diag, integer *n, | ||
3691 | integer *kd, integer *nrhs, real *ab, integer *ldab, real *b, integer | ||
3692 | *ldb, real *x, integer *ldx, real *ferr, real *berr, real *work, | ||
3693 | integer *iwork, integer *info); | ||
3694 | |||
3695 | /* Subroutine */ int stbtrs_(char *uplo, char *trans, char *diag, integer *n, | ||
3696 | integer *kd, integer *nrhs, real *ab, integer *ldab, real *b, integer | ||
3697 | *ldb, integer *info); | ||
3698 | |||
3699 | /* Subroutine */ int stgevc_(char *side, char *howmny, logical *select, | ||
3700 | integer *n, real *a, integer *lda, real *b, integer *ldb, real *vl, | ||
3701 | integer *ldvl, real *vr, integer *ldvr, integer *mm, integer *m, real | ||
3702 | *work, integer *info); | ||
3703 | |||
3704 | /* Subroutine */ int stgex2_(logical *wantq, logical *wantz, integer *n, real | ||
3705 | *a, integer *lda, real *b, integer *ldb, real *q, integer *ldq, real * | ||
3706 | z__, integer *ldz, integer *j1, integer *n1, integer *n2, real *work, | ||
3707 | integer *lwork, integer *info); | ||
3708 | |||
3709 | /* Subroutine */ int stgexc_(logical *wantq, logical *wantz, integer *n, real | ||
3710 | *a, integer *lda, real *b, integer *ldb, real *q, integer *ldq, real * | ||
3711 | z__, integer *ldz, integer *ifst, integer *ilst, real *work, integer * | ||
3712 | lwork, integer *info); | ||
3713 | |||
3714 | /* Subroutine */ int stgsen_(integer *ijob, logical *wantq, logical *wantz, | ||
3715 | logical *select, integer *n, real *a, integer *lda, real *b, integer * | ||
3716 | ldb, real *alphar, real *alphai, real *beta, real *q, integer *ldq, | ||
3717 | real *z__, integer *ldz, integer *m, real *pl, real *pr, real *dif, | ||
3718 | real *work, integer *lwork, integer *iwork, integer *liwork, integer * | ||
3719 | info); | ||
3720 | |||
3721 | /* Subroutine */ int stgsja_(char *jobu, char *jobv, char *jobq, integer *m, | ||
3722 | integer *p, integer *n, integer *k, integer *l, real *a, integer *lda, | ||
3723 | real *b, integer *ldb, real *tola, real *tolb, real *alpha, real * | ||
3724 | beta, real *u, integer *ldu, real *v, integer *ldv, real *q, integer * | ||
3725 | ldq, real *work, integer *ncycle, integer *info); | ||
3726 | |||
3727 | /* Subroutine */ int stgsna_(char *job, char *howmny, logical *select, | ||
3728 | integer *n, real *a, integer *lda, real *b, integer *ldb, real *vl, | ||
3729 | integer *ldvl, real *vr, integer *ldvr, real *s, real *dif, integer * | ||
3730 | mm, integer *m, real *work, integer *lwork, integer *iwork, integer * | ||
3731 | info); | ||
3732 | |||
3733 | /* Subroutine */ int stgsy2_(char *trans, integer *ijob, integer *m, integer * | ||
3734 | n, real *a, integer *lda, real *b, integer *ldb, real *c__, integer * | ||
3735 | ldc, real *d__, integer *ldd, real *e, integer *lde, real *f, integer | ||
3736 | *ldf, real *scale, real *rdsum, real *rdscal, integer *iwork, integer | ||
3737 | *pq, integer *info); | ||
3738 | |||
3739 | /* Subroutine */ int stgsyl_(char *trans, integer *ijob, integer *m, integer * | ||
3740 | n, real *a, integer *lda, real *b, integer *ldb, real *c__, integer * | ||
3741 | ldc, real *d__, integer *ldd, real *e, integer *lde, real *f, integer | ||
3742 | *ldf, real *scale, real *dif, real *work, integer *lwork, integer * | ||
3743 | iwork, integer *info); | ||
3744 | |||
3745 | /* Subroutine */ int stpcon_(char *norm, char *uplo, char *diag, integer *n, | ||
3746 | real *ap, real *rcond, real *work, integer *iwork, integer *info); | ||
3747 | |||
3748 | /* Subroutine */ int stprfs_(char *uplo, char *trans, char *diag, integer *n, | ||
3749 | integer *nrhs, real *ap, real *b, integer *ldb, real *x, integer *ldx, | ||
3750 | real *ferr, real *berr, real *work, integer *iwork, integer *info); | ||
3751 | |||
3752 | /* Subroutine */ int stptri_(char *uplo, char *diag, integer *n, real *ap, | ||
3753 | integer *info); | ||
3754 | |||
3755 | /* Subroutine */ int stptrs_(char *uplo, char *trans, char *diag, integer *n, | ||
3756 | integer *nrhs, real *ap, real *b, integer *ldb, integer *info); | ||
3757 | |||
3758 | /* Subroutine */ int strcon_(char *norm, char *uplo, char *diag, integer *n, | ||
3759 | real *a, integer *lda, real *rcond, real *work, integer *iwork, | ||
3760 | integer *info); | ||
3761 | |||
3762 | /* Subroutine */ int strevc_(char *side, char *howmny, logical *select, | ||
3763 | integer *n, real *t, integer *ldt, real *vl, integer *ldvl, real *vr, | ||
3764 | integer *ldvr, integer *mm, integer *m, real *work, integer *info); | ||
3765 | |||
3766 | /* Subroutine */ int strexc_(char *compq, integer *n, real *t, integer *ldt, | ||
3767 | real *q, integer *ldq, integer *ifst, integer *ilst, real *work, | ||
3768 | integer *info); | ||
3769 | |||
3770 | /* Subroutine */ int strrfs_(char *uplo, char *trans, char *diag, integer *n, | ||
3771 | integer *nrhs, real *a, integer *lda, real *b, integer *ldb, real *x, | ||
3772 | integer *ldx, real *ferr, real *berr, real *work, integer *iwork, | ||
3773 | integer *info); | ||
3774 | |||
3775 | /* Subroutine */ int strsen_(char *job, char *compq, logical *select, integer | ||
3776 | *n, real *t, integer *ldt, real *q, integer *ldq, real *wr, real *wi, | ||
3777 | integer *m, real *s, real *sep, real *work, integer *lwork, integer * | ||
3778 | iwork, integer *liwork, integer *info); | ||
3779 | |||
3780 | /* Subroutine */ int strsna_(char *job, char *howmny, logical *select, | ||
3781 | integer *n, real *t, integer *ldt, real *vl, integer *ldvl, real *vr, | ||
3782 | integer *ldvr, real *s, real *sep, integer *mm, integer *m, real * | ||
3783 | work, integer *ldwork, integer *iwork, integer *info); | ||
3784 | |||
3785 | /* Subroutine */ int strsyl_(char *trana, char *tranb, integer *isgn, integer | ||
3786 | *m, integer *n, real *a, integer *lda, real *b, integer *ldb, real * | ||
3787 | c__, integer *ldc, real *scale, integer *info); | ||
3788 | |||
3789 | /* Subroutine */ int strti2_(char *uplo, char *diag, integer *n, real *a, | ||
3790 | integer *lda, integer *info); | ||
3791 | |||
3792 | /* Subroutine */ int strtri_(char *uplo, char *diag, integer *n, real *a, | ||
3793 | integer *lda, integer *info); | ||
3794 | |||
3795 | /* Subroutine */ int strtrs_(char *uplo, char *trans, char *diag, integer *n, | ||
3796 | integer *nrhs, real *a, integer *lda, real *b, integer *ldb, integer * | ||
3797 | info); | ||
3798 | |||
3799 | /* Subroutine */ int stzrqf_(integer *m, integer *n, real *a, integer *lda, | ||
3800 | real *tau, integer *info); | ||
3801 | |||
3802 | /* Subroutine */ int stzrzf_(integer *m, integer *n, real *a, integer *lda, | ||
3803 | real *tau, real *work, integer *lwork, integer *info); | ||
3804 | |||
3805 | /* Subroutine */ int xerbla_(char *srname, integer *info); | ||
3806 | |||
3807 | /* Subroutine */ int zbdsqr_(char *uplo, integer *n, integer *ncvt, integer * | ||
3808 | nru, integer *ncc, doublereal *d__, doublereal *e, doublecomplex *vt, | ||
3809 | integer *ldvt, doublecomplex *u, integer *ldu, doublecomplex *c__, | ||
3810 | integer *ldc, doublereal *rwork, integer *info); | ||
3811 | |||
3812 | /* Subroutine */ int zdrot_(integer *n, doublecomplex *cx, integer *incx, | ||
3813 | doublecomplex *cy, integer *incy, doublereal *c__, doublereal *s); | ||
3814 | |||
3815 | /* Subroutine */ int zdrscl_(integer *n, doublereal *sa, doublecomplex *sx, | ||
3816 | integer *incx); | ||
3817 | |||
3818 | /* Subroutine */ int zgbbrd_(char *vect, integer *m, integer *n, integer *ncc, | ||
3819 | integer *kl, integer *ku, doublecomplex *ab, integer *ldab, | ||
3820 | doublereal *d__, doublereal *e, doublecomplex *q, integer *ldq, | ||
3821 | doublecomplex *pt, integer *ldpt, doublecomplex *c__, integer *ldc, | ||
3822 | doublecomplex *work, doublereal *rwork, integer *info); | ||
3823 | |||
3824 | /* Subroutine */ int zgbcon_(char *norm, integer *n, integer *kl, integer *ku, | ||
3825 | doublecomplex *ab, integer *ldab, integer *ipiv, doublereal *anorm, | ||
3826 | doublereal *rcond, doublecomplex *work, doublereal *rwork, integer * | ||
3827 | info); | ||
3828 | |||
3829 | /* Subroutine */ int zgbequ_(integer *m, integer *n, integer *kl, integer *ku, | ||
3830 | doublecomplex *ab, integer *ldab, doublereal *r__, doublereal *c__, | ||
3831 | doublereal *rowcnd, doublereal *colcnd, doublereal *amax, integer * | ||
3832 | info); | ||
3833 | |||
3834 | /* Subroutine */ int zgbrfs_(char *trans, integer *n, integer *kl, integer * | ||
3835 | ku, integer *nrhs, doublecomplex *ab, integer *ldab, doublecomplex * | ||
3836 | afb, integer *ldafb, integer *ipiv, doublecomplex *b, integer *ldb, | ||
3837 | doublecomplex *x, integer *ldx, doublereal *ferr, doublereal *berr, | ||
3838 | doublecomplex *work, doublereal *rwork, integer *info); | ||
3839 | |||
3840 | /* Subroutine */ int zgbsv_(integer *n, integer *kl, integer *ku, integer * | ||
3841 | nrhs, doublecomplex *ab, integer *ldab, integer *ipiv, doublecomplex * | ||
3842 | b, integer *ldb, integer *info); | ||
3843 | |||
3844 | /* Subroutine */ int zgbsvx_(char *fact, char *trans, integer *n, integer *kl, | ||
3845 | integer *ku, integer *nrhs, doublecomplex *ab, integer *ldab, | ||
3846 | doublecomplex *afb, integer *ldafb, integer *ipiv, char *equed, | ||
3847 | doublereal *r__, doublereal *c__, doublecomplex *b, integer *ldb, | ||
3848 | doublecomplex *x, integer *ldx, doublereal *rcond, doublereal *ferr, | ||
3849 | doublereal *berr, doublecomplex *work, doublereal *rwork, integer * | ||
3850 | info); | ||
3851 | |||
3852 | /* Subroutine */ int zgbtf2_(integer *m, integer *n, integer *kl, integer *ku, | ||
3853 | doublecomplex *ab, integer *ldab, integer *ipiv, integer *info); | ||
3854 | |||
3855 | /* Subroutine */ int zgbtrf_(integer *m, integer *n, integer *kl, integer *ku, | ||
3856 | doublecomplex *ab, integer *ldab, integer *ipiv, integer *info); | ||
3857 | |||
3858 | /* Subroutine */ int zgbtrs_(char *trans, integer *n, integer *kl, integer * | ||
3859 | ku, integer *nrhs, doublecomplex *ab, integer *ldab, integer *ipiv, | ||
3860 | doublecomplex *b, integer *ldb, integer *info); | ||
3861 | |||
3862 | /* Subroutine */ int zgebak_(char *job, char *side, integer *n, integer *ilo, | ||
3863 | integer *ihi, doublereal *scale, integer *m, doublecomplex *v, | ||
3864 | integer *ldv, integer *info); | ||
3865 | |||
3866 | /* Subroutine */ int zgebal_(char *job, integer *n, doublecomplex *a, integer | ||
3867 | *lda, integer *ilo, integer *ihi, doublereal *scale, integer *info); | ||
3868 | |||
3869 | /* Subroutine */ int zgebd2_(integer *m, integer *n, doublecomplex *a, | ||
3870 | integer *lda, doublereal *d__, doublereal *e, doublecomplex *tauq, | ||
3871 | doublecomplex *taup, doublecomplex *work, integer *info); | ||
3872 | |||
3873 | /* Subroutine */ int zgebrd_(integer *m, integer *n, doublecomplex *a, | ||
3874 | integer *lda, doublereal *d__, doublereal *e, doublecomplex *tauq, | ||
3875 | doublecomplex *taup, doublecomplex *work, integer *lwork, integer * | ||
3876 | info); | ||
3877 | |||
3878 | /* Subroutine */ int zgecon_(char *norm, integer *n, doublecomplex *a, | ||
3879 | integer *lda, doublereal *anorm, doublereal *rcond, doublecomplex * | ||
3880 | work, doublereal *rwork, integer *info); | ||
3881 | |||
3882 | /* Subroutine */ int zgeequ_(integer *m, integer *n, doublecomplex *a, | ||
3883 | integer *lda, doublereal *r__, doublereal *c__, doublereal *rowcnd, | ||
3884 | doublereal *colcnd, doublereal *amax, integer *info); | ||
3885 | |||
3886 | /* Subroutine */ int zgees_(char *jobvs, char *sort, L_fp select, integer *n, | ||
3887 | doublecomplex *a, integer *lda, integer *sdim, doublecomplex *w, | ||
3888 | doublecomplex *vs, integer *ldvs, doublecomplex *work, integer *lwork, | ||
3889 | doublereal *rwork, logical *bwork, integer *info); | ||
3890 | |||
3891 | /* Subroutine */ int zgeesx_(char *jobvs, char *sort, L_fp select, char * | ||
3892 | sense, integer *n, doublecomplex *a, integer *lda, integer *sdim, | ||
3893 | doublecomplex *w, doublecomplex *vs, integer *ldvs, doublereal * | ||
3894 | rconde, doublereal *rcondv, doublecomplex *work, integer *lwork, | ||
3895 | doublereal *rwork, logical *bwork, integer *info); | ||
3896 | |||
3897 | /* Subroutine */ int zgeev_(char *jobvl, char *jobvr, integer *n, | ||
3898 | doublecomplex *a, integer *lda, doublecomplex *w, doublecomplex *vl, | ||
3899 | integer *ldvl, doublecomplex *vr, integer *ldvr, doublecomplex *work, | ||
3900 | integer *lwork, doublereal *rwork, integer *info); | ||
3901 | |||
3902 | /* Subroutine */ int zgeevx_(char *balanc, char *jobvl, char *jobvr, char * | ||
3903 | sense, integer *n, doublecomplex *a, integer *lda, doublecomplex *w, | ||
3904 | doublecomplex *vl, integer *ldvl, doublecomplex *vr, integer *ldvr, | ||
3905 | integer *ilo, integer *ihi, doublereal *scale, doublereal *abnrm, | ||
3906 | doublereal *rconde, doublereal *rcondv, doublecomplex *work, integer * | ||
3907 | lwork, doublereal *rwork, integer *info); | ||
3908 | |||
3909 | /* Subroutine */ int zgegs_(char *jobvsl, char *jobvsr, integer *n, | ||
3910 | doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, | ||
3911 | doublecomplex *alpha, doublecomplex *beta, doublecomplex *vsl, | ||
3912 | integer *ldvsl, doublecomplex *vsr, integer *ldvsr, doublecomplex * | ||
3913 | work, integer *lwork, doublereal *rwork, integer *info); | ||
3914 | |||
3915 | /* Subroutine */ int zgegv_(char *jobvl, char *jobvr, integer *n, | ||
3916 | doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, | ||
3917 | doublecomplex *alpha, doublecomplex *beta, doublecomplex *vl, integer | ||
3918 | *ldvl, doublecomplex *vr, integer *ldvr, doublecomplex *work, integer | ||
3919 | *lwork, doublereal *rwork, integer *info); | ||
3920 | |||
3921 | /* Subroutine */ int zgehd2_(integer *n, integer *ilo, integer *ihi, | ||
3922 | doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * | ||
3923 | work, integer *info); | ||
3924 | |||
3925 | /* Subroutine */ int zgehrd_(integer *n, integer *ilo, integer *ihi, | ||
3926 | doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * | ||
3927 | work, integer *lwork, integer *info); | ||
3928 | |||
3929 | /* Subroutine */ int zgelq2_(integer *m, integer *n, doublecomplex *a, | ||
3930 | integer *lda, doublecomplex *tau, doublecomplex *work, integer *info); | ||
3931 | |||
3932 | /* Subroutine */ int zgelqf_(integer *m, integer *n, doublecomplex *a, | ||
3933 | integer *lda, doublecomplex *tau, doublecomplex *work, integer *lwork, | ||
3934 | integer *info); | ||
3935 | |||
3936 | /* Subroutine */ int zgels_(char *trans, integer *m, integer *n, integer * | ||
3937 | nrhs, doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, | ||
3938 | doublecomplex *work, integer *lwork, integer *info); | ||
3939 | |||
3940 | /* Subroutine */ int zgelsx_(integer *m, integer *n, integer *nrhs, | ||
3941 | doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, | ||
3942 | integer *jpvt, doublereal *rcond, integer *rank, doublecomplex *work, | ||
3943 | doublereal *rwork, integer *info); | ||
3944 | |||
3945 | /* Subroutine */ int zgelsy_(integer *m, integer *n, integer *nrhs, | ||
3946 | doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, | ||
3947 | integer *jpvt, doublereal *rcond, integer *rank, doublecomplex *work, | ||
3948 | integer *lwork, doublereal *rwork, integer *info); | ||
3949 | |||
3950 | /* Subroutine */ int zgeql2_(integer *m, integer *n, doublecomplex *a, | ||
3951 | integer *lda, doublecomplex *tau, doublecomplex *work, integer *info); | ||
3952 | |||
3953 | /* Subroutine */ int zgeqlf_(integer *m, integer *n, doublecomplex *a, | ||
3954 | integer *lda, doublecomplex *tau, doublecomplex *work, integer *lwork, | ||
3955 | integer *info); | ||
3956 | |||
3957 | /* Subroutine */ int zgeqp3_(integer *m, integer *n, doublecomplex *a, | ||
3958 | integer *lda, integer *jpvt, doublecomplex *tau, doublecomplex *work, | ||
3959 | integer *lwork, doublereal *rwork, integer *info); | ||
3960 | |||
3961 | /* Subroutine */ int zgeqpf_(integer *m, integer *n, doublecomplex *a, | ||
3962 | integer *lda, integer *jpvt, doublecomplex *tau, doublecomplex *work, | ||
3963 | doublereal *rwork, integer *info); | ||
3964 | |||
3965 | /* Subroutine */ int zgeqr2_(integer *m, integer *n, doublecomplex *a, | ||
3966 | integer *lda, doublecomplex *tau, doublecomplex *work, integer *info); | ||
3967 | |||
3968 | /* Subroutine */ int zgeqrf_(integer *m, integer *n, doublecomplex *a, | ||
3969 | integer *lda, doublecomplex *tau, doublecomplex *work, integer *lwork, | ||
3970 | integer *info); | ||
3971 | |||
3972 | /* Subroutine */ int zgerfs_(char *trans, integer *n, integer *nrhs, | ||
3973 | doublecomplex *a, integer *lda, doublecomplex *af, integer *ldaf, | ||
3974 | integer *ipiv, doublecomplex *b, integer *ldb, doublecomplex *x, | ||
3975 | integer *ldx, doublereal *ferr, doublereal *berr, doublecomplex *work, | ||
3976 | doublereal *rwork, integer *info); | ||
3977 | |||
3978 | /* Subroutine */ int zgerq2_(integer *m, integer *n, doublecomplex *a, | ||
3979 | integer *lda, doublecomplex *tau, doublecomplex *work, integer *info); | ||
3980 | |||
3981 | /* Subroutine */ int zgerqf_(integer *m, integer *n, doublecomplex *a, | ||
3982 | integer *lda, doublecomplex *tau, doublecomplex *work, integer *lwork, | ||
3983 | integer *info); | ||
3984 | |||
3985 | /* Subroutine */ int zgesc2_(integer *n, doublecomplex *a, integer *lda, | ||
3986 | doublecomplex *rhs, integer *ipiv, integer *jpiv, doublereal *scale); | ||
3987 | |||
3988 | /* Subroutine */ int zgesv_(integer *n, integer *nrhs, doublecomplex *a, | ||
3989 | integer *lda, integer *ipiv, doublecomplex *b, integer *ldb, integer * | ||
3990 | info); | ||
3991 | |||
3992 | /* Subroutine */ int zgesvx_(char *fact, char *trans, integer *n, integer * | ||
3993 | nrhs, doublecomplex *a, integer *lda, doublecomplex *af, integer * | ||
3994 | ldaf, integer *ipiv, char *equed, doublereal *r__, doublereal *c__, | ||
3995 | doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, | ||
3996 | doublereal *rcond, doublereal *ferr, doublereal *berr, doublecomplex * | ||
3997 | work, doublereal *rwork, integer *info); | ||
3998 | |||
3999 | /* Subroutine */ int zgetc2_(integer *n, doublecomplex *a, integer *lda, | ||
4000 | integer *ipiv, integer *jpiv, integer *info); | ||
4001 | |||
4002 | /* Subroutine */ int zgetf2_(integer *m, integer *n, doublecomplex *a, | ||
4003 | integer *lda, integer *ipiv, integer *info); | ||
4004 | |||
4005 | /* Subroutine */ int zgetrf_(integer *m, integer *n, doublecomplex *a, | ||
4006 | integer *lda, integer *ipiv, integer *info); | ||
4007 | |||
4008 | /* Subroutine */ int zgetri_(integer *n, doublecomplex *a, integer *lda, | ||
4009 | integer *ipiv, doublecomplex *work, integer *lwork, integer *info); | ||
4010 | |||
4011 | /* Subroutine */ int zgetrs_(char *trans, integer *n, integer *nrhs, | ||
4012 | doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *b, | ||
4013 | integer *ldb, integer *info); | ||
4014 | |||
4015 | /* Subroutine */ int zggbak_(char *job, char *side, integer *n, integer *ilo, | ||
4016 | integer *ihi, doublereal *lscale, doublereal *rscale, integer *m, | ||
4017 | doublecomplex *v, integer *ldv, integer *info); | ||
4018 | |||
4019 | /* Subroutine */ int zggbal_(char *job, integer *n, doublecomplex *a, integer | ||
4020 | *lda, doublecomplex *b, integer *ldb, integer *ilo, integer *ihi, | ||
4021 | doublereal *lscale, doublereal *rscale, doublereal *work, integer * | ||
4022 | info); | ||
4023 | |||
4024 | /* Subroutine */ int zgges_(char *jobvsl, char *jobvsr, char *sort, L_fp | ||
4025 | delctg, integer *n, doublecomplex *a, integer *lda, doublecomplex *b, | ||
4026 | integer *ldb, integer *sdim, doublecomplex *alpha, doublecomplex * | ||
4027 | beta, doublecomplex *vsl, integer *ldvsl, doublecomplex *vsr, integer | ||
4028 | *ldvsr, doublecomplex *work, integer *lwork, doublereal *rwork, | ||
4029 | logical *bwork, integer *info); | ||
4030 | |||
4031 | /* Subroutine */ int zggesx_(char *jobvsl, char *jobvsr, char *sort, L_fp | ||
4032 | delctg, char *sense, integer *n, doublecomplex *a, integer *lda, | ||
4033 | doublecomplex *b, integer *ldb, integer *sdim, doublecomplex *alpha, | ||
4034 | doublecomplex *beta, doublecomplex *vsl, integer *ldvsl, | ||
4035 | doublecomplex *vsr, integer *ldvsr, doublereal *rconde, doublereal * | ||
4036 | rcondv, doublecomplex *work, integer *lwork, doublereal *rwork, | ||
4037 | integer *iwork, integer *liwork, logical *bwork, integer *info); | ||
4038 | |||
4039 | /* Subroutine */ int zggev_(char *jobvl, char *jobvr, integer *n, | ||
4040 | doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, | ||
4041 | doublecomplex *alpha, doublecomplex *beta, doublecomplex *vl, integer | ||
4042 | *ldvl, doublecomplex *vr, integer *ldvr, doublecomplex *work, integer | ||
4043 | *lwork, doublereal *rwork, integer *info); | ||
4044 | |||
4045 | /* Subroutine */ int zggevx_(char *balanc, char *jobvl, char *jobvr, char * | ||
4046 | sense, integer *n, doublecomplex *a, integer *lda, doublecomplex *b, | ||
4047 | integer *ldb, doublecomplex *alpha, doublecomplex *beta, | ||
4048 | doublecomplex *vl, integer *ldvl, doublecomplex *vr, integer *ldvr, | ||
4049 | integer *ilo, integer *ihi, doublereal *lscale, doublereal *rscale, | ||
4050 | doublereal *abnrm, doublereal *bbnrm, doublereal *rconde, doublereal * | ||
4051 | rcondv, doublecomplex *work, integer *lwork, doublereal *rwork, | ||
4052 | integer *iwork, logical *bwork, integer *info); | ||
4053 | |||
4054 | /* Subroutine */ int zggglm_(integer *n, integer *m, integer *p, | ||
4055 | doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, | ||
4056 | doublecomplex *d__, doublecomplex *x, doublecomplex *y, doublecomplex | ||
4057 | *work, integer *lwork, integer *info); | ||
4058 | |||
4059 | /* Subroutine */ int zgghrd_(char *compq, char *compz, integer *n, integer * | ||
4060 | ilo, integer *ihi, doublecomplex *a, integer *lda, doublecomplex *b, | ||
4061 | integer *ldb, doublecomplex *q, integer *ldq, doublecomplex *z__, | ||
4062 | integer *ldz, integer *info); | ||
4063 | |||
4064 | /* Subroutine */ int zgglse_(integer *m, integer *n, integer *p, | ||
4065 | doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, | ||
4066 | doublecomplex *c__, doublecomplex *d__, doublecomplex *x, | ||
4067 | doublecomplex *work, integer *lwork, integer *info); | ||
4068 | |||
4069 | /* Subroutine */ int zggqrf_(integer *n, integer *m, integer *p, | ||
4070 | doublecomplex *a, integer *lda, doublecomplex *taua, doublecomplex *b, | ||
4071 | integer *ldb, doublecomplex *taub, doublecomplex *work, integer * | ||
4072 | lwork, integer *info); | ||
4073 | |||
4074 | /* Subroutine */ int zggrqf_(integer *m, integer *p, integer *n, | ||
4075 | doublecomplex *a, integer *lda, doublecomplex *taua, doublecomplex *b, | ||
4076 | integer *ldb, doublecomplex *taub, doublecomplex *work, integer * | ||
4077 | lwork, integer *info); | ||
4078 | |||
4079 | /* Subroutine */ int zggsvd_(char *jobu, char *jobv, char *jobq, integer *m, | ||
4080 | integer *n, integer *p, integer *k, integer *l, doublecomplex *a, | ||
4081 | integer *lda, doublecomplex *b, integer *ldb, doublereal *alpha, | ||
4082 | doublereal *beta, doublecomplex *u, integer *ldu, doublecomplex *v, | ||
4083 | integer *ldv, doublecomplex *q, integer *ldq, doublecomplex *work, | ||
4084 | doublereal *rwork, integer *iwork, integer *info); | ||
4085 | |||
4086 | /* Subroutine */ int zggsvp_(char *jobu, char *jobv, char *jobq, integer *m, | ||
4087 | integer *p, integer *n, doublecomplex *a, integer *lda, doublecomplex | ||
4088 | *b, integer *ldb, doublereal *tola, doublereal *tolb, integer *k, | ||
4089 | integer *l, doublecomplex *u, integer *ldu, doublecomplex *v, integer | ||
4090 | *ldv, doublecomplex *q, integer *ldq, integer *iwork, doublereal * | ||
4091 | rwork, doublecomplex *tau, doublecomplex *work, integer *info); | ||
4092 | |||
4093 | /* Subroutine */ int zgtcon_(char *norm, integer *n, doublecomplex *dl, | ||
4094 | doublecomplex *d__, doublecomplex *du, doublecomplex *du2, integer * | ||
4095 | ipiv, doublereal *anorm, doublereal *rcond, doublecomplex *work, | ||
4096 | integer *info); | ||
4097 | |||
4098 | /* Subroutine */ int zgtrfs_(char *trans, integer *n, integer *nrhs, | ||
4099 | doublecomplex *dl, doublecomplex *d__, doublecomplex *du, | ||
4100 | doublecomplex *dlf, doublecomplex *df, doublecomplex *duf, | ||
4101 | doublecomplex *du2, integer *ipiv, doublecomplex *b, integer *ldb, | ||
4102 | doublecomplex *x, integer *ldx, doublereal *ferr, doublereal *berr, | ||
4103 | doublecomplex *work, doublereal *rwork, integer *info); | ||
4104 | |||
4105 | /* Subroutine */ int zgtsv_(integer *n, integer *nrhs, doublecomplex *dl, | ||
4106 | doublecomplex *d__, doublecomplex *du, doublecomplex *b, integer *ldb, | ||
4107 | integer *info); | ||
4108 | |||
4109 | /* Subroutine */ int zgtsvx_(char *fact, char *trans, integer *n, integer * | ||
4110 | nrhs, doublecomplex *dl, doublecomplex *d__, doublecomplex *du, | ||
4111 | doublecomplex *dlf, doublecomplex *df, doublecomplex *duf, | ||
4112 | doublecomplex *du2, integer *ipiv, doublecomplex *b, integer *ldb, | ||
4113 | doublecomplex *x, integer *ldx, doublereal *rcond, doublereal *ferr, | ||
4114 | doublereal *berr, doublecomplex *work, doublereal *rwork, integer * | ||
4115 | info); | ||
4116 | |||
4117 | /* Subroutine */ int zgttrf_(integer *n, doublecomplex *dl, doublecomplex * | ||
4118 | d__, doublecomplex *du, doublecomplex *du2, integer *ipiv, integer * | ||
4119 | info); | ||
4120 | |||
4121 | /* Subroutine */ int zgttrs_(char *trans, integer *n, integer *nrhs, | ||
4122 | doublecomplex *dl, doublecomplex *d__, doublecomplex *du, | ||
4123 | doublecomplex *du2, integer *ipiv, doublecomplex *b, integer *ldb, | ||
4124 | integer *info); | ||
4125 | |||
4126 | /* Subroutine */ int zgtts2_(integer *itrans, integer *n, integer *nrhs, | ||
4127 | doublecomplex *dl, doublecomplex *d__, doublecomplex *du, | ||
4128 | doublecomplex *du2, integer *ipiv, doublecomplex *b, integer *ldb); | ||
4129 | |||
4130 | /* Subroutine */ int zhbev_(char *jobz, char *uplo, integer *n, integer *kd, | ||
4131 | doublecomplex *ab, integer *ldab, doublereal *w, doublecomplex *z__, | ||
4132 | integer *ldz, doublecomplex *work, doublereal *rwork, integer *info); | ||
4133 | |||
4134 | /* Subroutine */ int zhbevd_(char *jobz, char *uplo, integer *n, integer *kd, | ||
4135 | doublecomplex *ab, integer *ldab, doublereal *w, doublecomplex *z__, | ||
4136 | integer *ldz, doublecomplex *work, integer *lwork, doublereal *rwork, | ||
4137 | integer *lrwork, integer *iwork, integer *liwork, integer *info); | ||
4138 | |||
4139 | /* Subroutine */ int zhbevx_(char *jobz, char *range, char *uplo, integer *n, | ||
4140 | integer *kd, doublecomplex *ab, integer *ldab, doublecomplex *q, | ||
4141 | integer *ldq, doublereal *vl, doublereal *vu, integer *il, integer * | ||
4142 | iu, doublereal *abstol, integer *m, doublereal *w, doublecomplex *z__, | ||
4143 | integer *ldz, doublecomplex *work, doublereal *rwork, integer *iwork, | ||
4144 | integer *ifail, integer *info); | ||
4145 | |||
4146 | /* Subroutine */ int zhbgst_(char *vect, char *uplo, integer *n, integer *ka, | ||
4147 | integer *kb, doublecomplex *ab, integer *ldab, doublecomplex *bb, | ||
4148 | integer *ldbb, doublecomplex *x, integer *ldx, doublecomplex *work, | ||
4149 | doublereal *rwork, integer *info); | ||
4150 | |||
4151 | /* Subroutine */ int zhbgv_(char *jobz, char *uplo, integer *n, integer *ka, | ||
4152 | integer *kb, doublecomplex *ab, integer *ldab, doublecomplex *bb, | ||
4153 | integer *ldbb, doublereal *w, doublecomplex *z__, integer *ldz, | ||
4154 | doublecomplex *work, doublereal *rwork, integer *info); | ||
4155 | |||
4156 | /* Subroutine */ int zhbgvx_(char *jobz, char *range, char *uplo, integer *n, | ||
4157 | integer *ka, integer *kb, doublecomplex *ab, integer *ldab, | ||
4158 | doublecomplex *bb, integer *ldbb, doublecomplex *q, integer *ldq, | ||
4159 | doublereal *vl, doublereal *vu, integer *il, integer *iu, doublereal * | ||
4160 | abstol, integer *m, doublereal *w, doublecomplex *z__, integer *ldz, | ||
4161 | doublecomplex *work, doublereal *rwork, integer *iwork, integer * | ||
4162 | ifail, integer *info); | ||
4163 | |||
4164 | /* Subroutine */ int zhbtrd_(char *vect, char *uplo, integer *n, integer *kd, | ||
4165 | doublecomplex *ab, integer *ldab, doublereal *d__, doublereal *e, | ||
4166 | doublecomplex *q, integer *ldq, doublecomplex *work, integer *info); | ||
4167 | |||
4168 | /* Subroutine */ int zhecon_(char *uplo, integer *n, doublecomplex *a, | ||
4169 | integer *lda, integer *ipiv, doublereal *anorm, doublereal *rcond, | ||
4170 | doublecomplex *work, integer *info); | ||
4171 | |||
4172 | /* Subroutine */ int zheev_(char *jobz, char *uplo, integer *n, doublecomplex | ||
4173 | *a, integer *lda, doublereal *w, doublecomplex *work, integer *lwork, | ||
4174 | doublereal *rwork, integer *info); | ||
4175 | |||
4176 | /* Subroutine */ int zheevd_(char *jobz, char *uplo, integer *n, | ||
4177 | doublecomplex *a, integer *lda, doublereal *w, doublecomplex *work, | ||
4178 | integer *lwork, doublereal *rwork, integer *lrwork, integer *iwork, | ||
4179 | integer *liwork, integer *info); | ||
4180 | |||
4181 | /* Subroutine */ int zheevr_(char *jobz, char *range, char *uplo, integer *n, | ||
4182 | doublecomplex *a, integer *lda, doublereal *vl, doublereal *vu, | ||
4183 | integer *il, integer *iu, doublereal *abstol, integer *m, doublereal * | ||
4184 | w, doublecomplex *z__, integer *ldz, integer *isuppz, doublecomplex * | ||
4185 | work, integer *lwork, doublereal *rwork, integer *lrwork, integer * | ||
4186 | iwork, integer *liwork, integer *info); | ||
4187 | |||
4188 | /* Subroutine */ int zheevx_(char *jobz, char *range, char *uplo, integer *n, | ||
4189 | doublecomplex *a, integer *lda, doublereal *vl, doublereal *vu, | ||
4190 | integer *il, integer *iu, doublereal *abstol, integer *m, doublereal * | ||
4191 | w, doublecomplex *z__, integer *ldz, doublecomplex *work, integer * | ||
4192 | lwork, doublereal *rwork, integer *iwork, integer *ifail, integer * | ||
4193 | info); | ||
4194 | |||
4195 | /* Subroutine */ int zhegs2_(integer *itype, char *uplo, integer *n, | ||
4196 | doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, | ||
4197 | integer *info); | ||
4198 | |||
4199 | /* Subroutine */ int zhegst_(integer *itype, char *uplo, integer *n, | ||
4200 | doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, | ||
4201 | integer *info); | ||
4202 | |||
4203 | /* Subroutine */ int zhegv_(integer *itype, char *jobz, char *uplo, integer * | ||
4204 | n, doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, | ||
4205 | doublereal *w, doublecomplex *work, integer *lwork, doublereal *rwork, | ||
4206 | integer *info); | ||
4207 | |||
4208 | /* Subroutine */ int zhegvd_(integer *itype, char *jobz, char *uplo, integer * | ||
4209 | n, doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, | ||
4210 | doublereal *w, doublecomplex *work, integer *lwork, doublereal *rwork, | ||
4211 | integer *lrwork, integer *iwork, integer *liwork, integer *info); | ||
4212 | |||
4213 | /* Subroutine */ int zhegvx_(integer *itype, char *jobz, char *range, char * | ||
4214 | uplo, integer *n, doublecomplex *a, integer *lda, doublecomplex *b, | ||
4215 | integer *ldb, doublereal *vl, doublereal *vu, integer *il, integer * | ||
4216 | iu, doublereal *abstol, integer *m, doublereal *w, doublecomplex *z__, | ||
4217 | integer *ldz, doublecomplex *work, integer *lwork, doublereal *rwork, | ||
4218 | integer *iwork, integer *ifail, integer *info); | ||
4219 | |||
4220 | /* Subroutine */ int zherfs_(char *uplo, integer *n, integer *nrhs, | ||
4221 | doublecomplex *a, integer *lda, doublecomplex *af, integer *ldaf, | ||
4222 | integer *ipiv, doublecomplex *b, integer *ldb, doublecomplex *x, | ||
4223 | integer *ldx, doublereal *ferr, doublereal *berr, doublecomplex *work, | ||
4224 | doublereal *rwork, integer *info); | ||
4225 | |||
4226 | /* Subroutine */ int zhesv_(char *uplo, integer *n, integer *nrhs, | ||
4227 | doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *b, | ||
4228 | integer *ldb, doublecomplex *work, integer *lwork, integer *info); | ||
4229 | |||
4230 | /* Subroutine */ int zhesvx_(char *fact, char *uplo, integer *n, integer * | ||
4231 | nrhs, doublecomplex *a, integer *lda, doublecomplex *af, integer * | ||
4232 | ldaf, integer *ipiv, doublecomplex *b, integer *ldb, doublecomplex *x, | ||
4233 | integer *ldx, doublereal *rcond, doublereal *ferr, doublereal *berr, | ||
4234 | doublecomplex *work, integer *lwork, doublereal *rwork, integer *info); | ||
4235 | |||
4236 | /* Subroutine */ int zhetf2_(char *uplo, integer *n, doublecomplex *a, | ||
4237 | integer *lda, integer *ipiv, integer *info); | ||
4238 | |||
4239 | /* Subroutine */ int zhetrd_(char *uplo, integer *n, doublecomplex *a, | ||
4240 | integer *lda, doublereal *d__, doublereal *e, doublecomplex *tau, | ||
4241 | doublecomplex *work, integer *lwork, integer *info); | ||
4242 | |||
4243 | /* Subroutine */ int zhetrf_(char *uplo, integer *n, doublecomplex *a, | ||
4244 | integer *lda, integer *ipiv, doublecomplex *work, integer *lwork, | ||
4245 | integer *info); | ||
4246 | |||
4247 | /* Subroutine */ int zhetri_(char *uplo, integer *n, doublecomplex *a, | ||
4248 | integer *lda, integer *ipiv, doublecomplex *work, integer *info); | ||
4249 | |||
4250 | /* Subroutine */ int zhetrs_(char *uplo, integer *n, integer *nrhs, | ||
4251 | doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *b, | ||
4252 | integer *ldb, integer *info); | ||
4253 | |||
4254 | /* Subroutine */ int zhgeqz_(char *job, char *compq, char *compz, integer *n, | ||
4255 | integer *ilo, integer *ihi, doublecomplex *a, integer *lda, | ||
4256 | doublecomplex *b, integer *ldb, doublecomplex *alpha, doublecomplex * | ||
4257 | beta, doublecomplex *q, integer *ldq, doublecomplex *z__, integer * | ||
4258 | ldz, doublecomplex *work, integer *lwork, doublereal *rwork, integer * | ||
4259 | info); | ||
4260 | |||
4261 | /* Subroutine */ int zhpcon_(char *uplo, integer *n, doublecomplex *ap, | ||
4262 | integer *ipiv, doublereal *anorm, doublereal *rcond, doublecomplex * | ||
4263 | work, integer *info); | ||
4264 | |||
4265 | /* Subroutine */ int zhpev_(char *jobz, char *uplo, integer *n, doublecomplex | ||
4266 | *ap, doublereal *w, doublecomplex *z__, integer *ldz, doublecomplex * | ||
4267 | work, doublereal *rwork, integer *info); | ||
4268 | |||
4269 | /* Subroutine */ int zhpevd_(char *jobz, char *uplo, integer *n, | ||
4270 | doublecomplex *ap, doublereal *w, doublecomplex *z__, integer *ldz, | ||
4271 | doublecomplex *work, integer *lwork, doublereal *rwork, integer * | ||
4272 | lrwork, integer *iwork, integer *liwork, integer *info); | ||
4273 | |||
4274 | /* Subroutine */ int zhpevx_(char *jobz, char *range, char *uplo, integer *n, | ||
4275 | doublecomplex *ap, doublereal *vl, doublereal *vu, integer *il, | ||
4276 | integer *iu, doublereal *abstol, integer *m, doublereal *w, | ||
4277 | doublecomplex *z__, integer *ldz, doublecomplex *work, doublereal * | ||
4278 | rwork, integer *iwork, integer *ifail, integer *info); | ||
4279 | |||
4280 | /* Subroutine */ int zhpgst_(integer *itype, char *uplo, integer *n, | ||
4281 | doublecomplex *ap, doublecomplex *bp, integer *info); | ||
4282 | |||
4283 | /* Subroutine */ int zhpgv_(integer *itype, char *jobz, char *uplo, integer * | ||
4284 | n, doublecomplex *ap, doublecomplex *bp, doublereal *w, doublecomplex | ||
4285 | *z__, integer *ldz, doublecomplex *work, doublereal *rwork, integer * | ||
4286 | info); | ||
4287 | |||
4288 | /* Subroutine */ int zhpgvd_(integer *itype, char *jobz, char *uplo, integer * | ||
4289 | n, doublecomplex *ap, doublecomplex *bp, doublereal *w, doublecomplex | ||
4290 | *z__, integer *ldz, doublecomplex *work, integer *lwork, doublereal * | ||
4291 | rwork, integer *lrwork, integer *iwork, integer *liwork, integer * | ||
4292 | info); | ||
4293 | |||
4294 | /* Subroutine */ int zhpgvx_(integer *itype, char *jobz, char *range, char * | ||
4295 | uplo, integer *n, doublecomplex *ap, doublecomplex *bp, doublereal * | ||
4296 | vl, doublereal *vu, integer *il, integer *iu, doublereal *abstol, | ||
4297 | integer *m, doublereal *w, doublecomplex *z__, integer *ldz, | ||
4298 | doublecomplex *work, doublereal *rwork, integer *iwork, integer * | ||
4299 | ifail, integer *info); | ||
4300 | |||
4301 | /* Subroutine */ int zhprfs_(char *uplo, integer *n, integer *nrhs, | ||
4302 | doublecomplex *ap, doublecomplex *afp, integer *ipiv, doublecomplex * | ||
4303 | b, integer *ldb, doublecomplex *x, integer *ldx, doublereal *ferr, | ||
4304 | doublereal *berr, doublecomplex *work, doublereal *rwork, integer * | ||
4305 | info); | ||
4306 | |||
4307 | /* Subroutine */ int zhpsv_(char *uplo, integer *n, integer *nrhs, | ||
4308 | doublecomplex *ap, integer *ipiv, doublecomplex *b, integer *ldb, | ||
4309 | integer *info); | ||
4310 | |||
4311 | /* Subroutine */ int zhpsvx_(char *fact, char *uplo, integer *n, integer * | ||
4312 | nrhs, doublecomplex *ap, doublecomplex *afp, integer *ipiv, | ||
4313 | doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, | ||
4314 | doublereal *rcond, doublereal *ferr, doublereal *berr, doublecomplex * | ||
4315 | work, doublereal *rwork, integer *info); | ||
4316 | |||
4317 | /* Subroutine */ int zhptrd_(char *uplo, integer *n, doublecomplex *ap, | ||
4318 | doublereal *d__, doublereal *e, doublecomplex *tau, integer *info); | ||
4319 | |||
4320 | /* Subroutine */ int zhptrf_(char *uplo, integer *n, doublecomplex *ap, | ||
4321 | integer *ipiv, integer *info); | ||
4322 | |||
4323 | /* Subroutine */ int zhptri_(char *uplo, integer *n, doublecomplex *ap, | ||
4324 | integer *ipiv, doublecomplex *work, integer *info); | ||
4325 | |||
4326 | /* Subroutine */ int zhptrs_(char *uplo, integer *n, integer *nrhs, | ||
4327 | doublecomplex *ap, integer *ipiv, doublecomplex *b, integer *ldb, | ||
4328 | integer *info); | ||
4329 | |||
4330 | /* Subroutine */ int zhsein_(char *side, char *eigsrc, char *initv, logical * | ||
4331 | select, integer *n, doublecomplex *h__, integer *ldh, doublecomplex * | ||
4332 | w, doublecomplex *vl, integer *ldvl, doublecomplex *vr, integer *ldvr, | ||
4333 | integer *mm, integer *m, doublecomplex *work, doublereal *rwork, | ||
4334 | integer *ifaill, integer *ifailr, integer *info); | ||
4335 | |||
4336 | /* Subroutine */ int zhseqr_(char *job, char *compz, integer *n, integer *ilo, | ||
4337 | integer *ihi, doublecomplex *h__, integer *ldh, doublecomplex *w, | ||
4338 | doublecomplex *z__, integer *ldz, doublecomplex *work, integer *lwork, | ||
4339 | integer *info); | ||
4340 | |||
4341 | /* Subroutine */ int zlabrd_(integer *m, integer *n, integer *nb, | ||
4342 | doublecomplex *a, integer *lda, doublereal *d__, doublereal *e, | ||
4343 | doublecomplex *tauq, doublecomplex *taup, doublecomplex *x, integer * | ||
4344 | ldx, doublecomplex *y, integer *ldy); | ||
4345 | |||
4346 | /* Subroutine */ int zlacgv_(integer *n, doublecomplex *x, integer *incx); | ||
4347 | |||
4348 | /* Subroutine */ int zlacon_(integer *n, doublecomplex *v, doublecomplex *x, | ||
4349 | doublereal *est, integer *kase); | ||
4350 | |||
4351 | /* Subroutine */ int zlacp2_(char *uplo, integer *m, integer *n, doublereal * | ||
4352 | a, integer *lda, doublecomplex *b, integer *ldb); | ||
4353 | |||
4354 | /* Subroutine */ int zlacpy_(char *uplo, integer *m, integer *n, | ||
4355 | doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb); | ||
4356 | |||
4357 | /* Subroutine */ int zlacrm_(integer *m, integer *n, doublecomplex *a, | ||
4358 | integer *lda, doublereal *b, integer *ldb, doublecomplex *c__, | ||
4359 | integer *ldc, doublereal *rwork); | ||
4360 | |||
4361 | /* Subroutine */ int zlacrt_(integer *n, doublecomplex *cx, integer *incx, | ||
4362 | doublecomplex *cy, integer *incy, doublecomplex *c__, doublecomplex * | ||
4363 | s); | ||
4364 | |||
4365 | /* Subroutine */ int zlaed0_(integer *qsiz, integer *n, doublereal *d__, | ||
4366 | doublereal *e, doublecomplex *q, integer *ldq, doublecomplex *qstore, | ||
4367 | integer *ldqs, doublereal *rwork, integer *iwork, integer *info); | ||
4368 | |||
4369 | /* Subroutine */ int zlaed7_(integer *n, integer *cutpnt, integer *qsiz, | ||
4370 | integer *tlvls, integer *curlvl, integer *curpbm, doublereal *d__, | ||
4371 | doublecomplex *q, integer *ldq, doublereal *rho, integer *indxq, | ||
4372 | doublereal *qstore, integer *qptr, integer *prmptr, integer *perm, | ||
4373 | integer *givptr, integer *givcol, doublereal *givnum, doublecomplex * | ||
4374 | work, doublereal *rwork, integer *iwork, integer *info); | ||
4375 | |||
4376 | /* Subroutine */ int zlaed8_(integer *k, integer *n, integer *qsiz, | ||
4377 | doublecomplex *q, integer *ldq, doublereal *d__, doublereal *rho, | ||
4378 | integer *cutpnt, doublereal *z__, doublereal *dlamda, doublecomplex * | ||
4379 | q2, integer *ldq2, doublereal *w, integer *indxp, integer *indx, | ||
4380 | integer *indxq, integer *perm, integer *givptr, integer *givcol, | ||
4381 | doublereal *givnum, integer *info); | ||
4382 | |||
4383 | /* Subroutine */ int zlaein_(logical *rightv, logical *noinit, integer *n, | ||
4384 | doublecomplex *h__, integer *ldh, doublecomplex *w, doublecomplex *v, | ||
4385 | doublecomplex *b, integer *ldb, doublereal *rwork, doublereal *eps3, | ||
4386 | doublereal *smlnum, integer *info); | ||
4387 | |||
4388 | /* Subroutine */ int zlaesy_(doublecomplex *a, doublecomplex *b, | ||
4389 | doublecomplex *c__, doublecomplex *rt1, doublecomplex *rt2, | ||
4390 | doublecomplex *evscal, doublecomplex *cs1, doublecomplex *sn1); | ||
4391 | |||
4392 | /* Subroutine */ int zlaev2_(doublecomplex *a, doublecomplex *b, | ||
4393 | doublecomplex *c__, doublereal *rt1, doublereal *rt2, doublereal *cs1, | ||
4394 | doublecomplex *sn1); | ||
4395 | |||
4396 | /* Subroutine */ int zlags2_(logical *upper, doublereal *a1, doublecomplex * | ||
4397 | a2, doublereal *a3, doublereal *b1, doublecomplex *b2, doublereal *b3, | ||
4398 | doublereal *csu, doublecomplex *snu, doublereal *csv, doublecomplex * | ||
4399 | snv, doublereal *csq, doublecomplex *snq); | ||
4400 | |||
4401 | /* Subroutine */ int zlagtm_(char *trans, integer *n, integer *nrhs, | ||
4402 | doublereal *alpha, doublecomplex *dl, doublecomplex *d__, | ||
4403 | doublecomplex *du, doublecomplex *x, integer *ldx, doublereal *beta, | ||
4404 | doublecomplex *b, integer *ldb); | ||
4405 | |||
4406 | /* Subroutine */ int zlahef_(char *uplo, integer *n, integer *nb, integer *kb, | ||
4407 | doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *w, | ||
4408 | integer *ldw, integer *info); | ||
4409 | |||
4410 | /* Subroutine */ int zlahqr_(logical *wantt, logical *wantz, integer *n, | ||
4411 | integer *ilo, integer *ihi, doublecomplex *h__, integer *ldh, | ||
4412 | doublecomplex *w, integer *iloz, integer *ihiz, doublecomplex *z__, | ||
4413 | integer *ldz, integer *info); | ||
4414 | |||
4415 | /* Subroutine */ int zlahrd_(integer *n, integer *k, integer *nb, | ||
4416 | doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex *t, | ||
4417 | integer *ldt, doublecomplex *y, integer *ldy); | ||
4418 | |||
4419 | /* Subroutine */ int zlaic1_(integer *job, integer *j, doublecomplex *x, | ||
4420 | doublereal *sest, doublecomplex *w, doublecomplex *gamma, doublereal * | ||
4421 | sestpr, doublecomplex *s, doublecomplex *c__); | ||
4422 | |||
4423 | /* Subroutine */ int zlals0_(integer *icompq, integer *nl, integer *nr, | ||
4424 | integer *sqre, integer *nrhs, doublecomplex *b, integer *ldb, | ||
4425 | doublecomplex *bx, integer *ldbx, integer *perm, integer *givptr, | ||
4426 | integer *givcol, integer *ldgcol, doublereal *givnum, integer *ldgnum, | ||
4427 | doublereal *poles, doublereal *difl, doublereal *difr, doublereal * | ||
4428 | z__, integer *k, doublereal *c__, doublereal *s, doublereal *rwork, | ||
4429 | integer *info); | ||
4430 | |||
4431 | /* Subroutine */ int zlalsa_(integer *icompq, integer *smlsiz, integer *n, | ||
4432 | integer *nrhs, doublecomplex *b, integer *ldb, doublecomplex *bx, | ||
4433 | integer *ldbx, doublereal *u, integer *ldu, doublereal *vt, integer * | ||
4434 | k, doublereal *difl, doublereal *difr, doublereal *z__, doublereal * | ||
4435 | poles, integer *givptr, integer *givcol, integer *ldgcol, integer * | ||
4436 | perm, doublereal *givnum, doublereal *c__, doublereal *s, doublereal * | ||
4437 | rwork, integer *iwork, integer *info); | ||
4438 | |||
4439 | /* Subroutine */ int zlapll_(integer *n, doublecomplex *x, integer *incx, | ||
4440 | doublecomplex *y, integer *incy, doublereal *ssmin); | ||
4441 | |||
4442 | /* Subroutine */ int zlapmt_(logical *forwrd, integer *m, integer *n, | ||
4443 | doublecomplex *x, integer *ldx, integer *k); | ||
4444 | |||
4445 | /* Subroutine */ int zlaqgb_(integer *m, integer *n, integer *kl, integer *ku, | ||
4446 | doublecomplex *ab, integer *ldab, doublereal *r__, doublereal *c__, | ||
4447 | doublereal *rowcnd, doublereal *colcnd, doublereal *amax, char *equed); | ||
4448 | |||
4449 | /* Subroutine */ int zlaqge_(integer *m, integer *n, doublecomplex *a, | ||
4450 | integer *lda, doublereal *r__, doublereal *c__, doublereal *rowcnd, | ||
4451 | doublereal *colcnd, doublereal *amax, char *equed); | ||
4452 | |||
4453 | /* Subroutine */ int zlaqhb_(char *uplo, integer *n, integer *kd, | ||
4454 | doublecomplex *ab, integer *ldab, doublereal *s, doublereal *scond, | ||
4455 | doublereal *amax, char *equed); | ||
4456 | |||
4457 | /* Subroutine */ int zlaqhe_(char *uplo, integer *n, doublecomplex *a, | ||
4458 | integer *lda, doublereal *s, doublereal *scond, doublereal *amax, | ||
4459 | char *equed); | ||
4460 | |||
4461 | /* Subroutine */ int zlaqhp_(char *uplo, integer *n, doublecomplex *ap, | ||
4462 | doublereal *s, doublereal *scond, doublereal *amax, char *equed); | ||
4463 | |||
4464 | /* Subroutine */ int zlaqp2_(integer *m, integer *n, integer *offset, | ||
4465 | doublecomplex *a, integer *lda, integer *jpvt, doublecomplex *tau, | ||
4466 | doublereal *vn1, doublereal *vn2, doublecomplex *work); | ||
4467 | |||
4468 | /* Subroutine */ int zlaqps_(integer *m, integer *n, integer *offset, integer | ||
4469 | *nb, integer *kb, doublecomplex *a, integer *lda, integer *jpvt, | ||
4470 | doublecomplex *tau, doublereal *vn1, doublereal *vn2, doublecomplex * | ||
4471 | auxv, doublecomplex *f, integer *ldf); | ||
4472 | |||
4473 | /* Subroutine */ int zlaqsb_(char *uplo, integer *n, integer *kd, | ||
4474 | doublecomplex *ab, integer *ldab, doublereal *s, doublereal *scond, | ||
4475 | doublereal *amax, char *equed); | ||
4476 | |||
4477 | /* Subroutine */ int zlaqsp_(char *uplo, integer *n, doublecomplex *ap, | ||
4478 | doublereal *s, doublereal *scond, doublereal *amax, char *equed); | ||
4479 | |||
4480 | /* Subroutine */ int zlaqsy_(char *uplo, integer *n, doublecomplex *a, | ||
4481 | integer *lda, doublereal *s, doublereal *scond, doublereal *amax, | ||
4482 | char *equed); | ||
4483 | |||
4484 | /* Subroutine */ int zlar1v_(integer *n, integer *b1, integer *bn, doublereal | ||
4485 | *sigma, doublereal *d__, doublereal *l, doublereal *ld, doublereal * | ||
4486 | lld, doublereal *gersch, doublecomplex *z__, doublereal *ztz, | ||
4487 | doublereal *mingma, integer *r__, integer *isuppz, doublereal *work); | ||
4488 | |||
4489 | /* Subroutine */ int zlar2v_(integer *n, doublecomplex *x, doublecomplex *y, | ||
4490 | doublecomplex *z__, integer *incx, doublereal *c__, doublecomplex *s, | ||
4491 | integer *incc); | ||
4492 | |||
4493 | /* Subroutine */ int zlarcm_(integer *m, integer *n, doublereal *a, integer * | ||
4494 | lda, doublecomplex *b, integer *ldb, doublecomplex *c__, integer *ldc, | ||
4495 | doublereal *rwork); | ||
4496 | |||
4497 | /* Subroutine */ int zlarf_(char *side, integer *m, integer *n, doublecomplex | ||
4498 | *v, integer *incv, doublecomplex *tau, doublecomplex *c__, integer * | ||
4499 | ldc, doublecomplex *work); | ||
4500 | |||
4501 | /* Subroutine */ int zlarfb_(char *side, char *trans, char *direct, char * | ||
4502 | storev, integer *m, integer *n, integer *k, doublecomplex *v, integer | ||
4503 | *ldv, doublecomplex *t, integer *ldt, doublecomplex *c__, integer * | ||
4504 | ldc, doublecomplex *work, integer *ldwork); | ||
4505 | |||
4506 | /* Subroutine */ int zlarfg_(integer *n, doublecomplex *alpha, doublecomplex * | ||
4507 | x, integer *incx, doublecomplex *tau); | ||
4508 | |||
4509 | /* Subroutine */ int zlarft_(char *direct, char *storev, integer *n, integer * | ||
4510 | k, doublecomplex *v, integer *ldv, doublecomplex *tau, doublecomplex * | ||
4511 | t, integer *ldt); | ||
4512 | |||
4513 | /* Subroutine */ int zlarfx_(char *side, integer *m, integer *n, | ||
4514 | doublecomplex *v, doublecomplex *tau, doublecomplex *c__, integer * | ||
4515 | ldc, doublecomplex *work); | ||
4516 | |||
4517 | /* Subroutine */ int zlargv_(integer *n, doublecomplex *x, integer *incx, | ||
4518 | doublecomplex *y, integer *incy, doublereal *c__, integer *incc); | ||
4519 | |||
4520 | /* Subroutine */ int zlarnv_(integer *idist, integer *iseed, integer *n, | ||
4521 | doublecomplex *x); | ||
4522 | |||
4523 | /* Subroutine */ int zlarrv_(integer *n, doublereal *d__, doublereal *l, | ||
4524 | integer *isplit, integer *m, doublereal *w, integer *iblock, | ||
4525 | doublereal *gersch, doublereal *tol, doublecomplex *z__, integer *ldz, | ||
4526 | integer *isuppz, doublereal *work, integer *iwork, integer *info); | ||
4527 | |||
4528 | /* Subroutine */ int zlartg_(doublecomplex *f, doublecomplex *g, doublereal * | ||
4529 | cs, doublecomplex *sn, doublecomplex *r__); | ||
4530 | |||
4531 | /* Subroutine */ int zlartv_(integer *n, doublecomplex *x, integer *incx, | ||
4532 | doublecomplex *y, integer *incy, doublereal *c__, doublecomplex *s, | ||
4533 | integer *incc); | ||
4534 | |||
4535 | /* Subroutine */ int zlarz_(char *side, integer *m, integer *n, integer *l, | ||
4536 | doublecomplex *v, integer *incv, doublecomplex *tau, doublecomplex * | ||
4537 | c__, integer *ldc, doublecomplex *work); | ||
4538 | |||
4539 | /* Subroutine */ int zlarzb_(char *side, char *trans, char *direct, char * | ||
4540 | storev, integer *m, integer *n, integer *k, integer *l, doublecomplex | ||
4541 | *v, integer *ldv, doublecomplex *t, integer *ldt, doublecomplex *c__, | ||
4542 | integer *ldc, doublecomplex *work, integer *ldwork); | ||
4543 | |||
4544 | /* Subroutine */ int zlarzt_(char *direct, char *storev, integer *n, integer * | ||
4545 | k, doublecomplex *v, integer *ldv, doublecomplex *tau, doublecomplex * | ||
4546 | t, integer *ldt); | ||
4547 | |||
4548 | /* Subroutine */ int zlascl_(char *type__, integer *kl, integer *ku, | ||
4549 | doublereal *cfrom, doublereal *cto, integer *m, integer *n, | ||
4550 | doublecomplex *a, integer *lda, integer *info); | ||
4551 | |||
4552 | /* Subroutine */ int zlaset_(char *uplo, integer *m, integer *n, | ||
4553 | doublecomplex *alpha, doublecomplex *beta, doublecomplex *a, integer * | ||
4554 | lda); | ||
4555 | |||
4556 | /* Subroutine */ int zlasr_(char *side, char *pivot, char *direct, integer *m, | ||
4557 | integer *n, doublereal *c__, doublereal *s, doublecomplex *a, | ||
4558 | integer *lda); | ||
4559 | |||
4560 | /* Subroutine */ int zlassq_(integer *n, doublecomplex *x, integer *incx, | ||
4561 | doublereal *scale, doublereal *sumsq); | ||
4562 | |||
4563 | /* Subroutine */ int zlaswp_(integer *n, doublecomplex *a, integer *lda, | ||
4564 | integer *k1, integer *k2, integer *ipiv, integer *incx); | ||
4565 | |||
4566 | /* Subroutine */ int zlasyf_(char *uplo, integer *n, integer *nb, integer *kb, | ||
4567 | doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *w, | ||
4568 | integer *ldw, integer *info); | ||
4569 | |||
4570 | /* Subroutine */ int zlatbs_(char *uplo, char *trans, char *diag, char * | ||
4571 | normin, integer *n, integer *kd, doublecomplex *ab, integer *ldab, | ||
4572 | doublecomplex *x, doublereal *scale, doublereal *cnorm, integer *info); | ||
4573 | |||
4574 | /* Subroutine */ int zlatdf_(integer *ijob, integer *n, doublecomplex *z__, | ||
4575 | integer *ldz, doublecomplex *rhs, doublereal *rdsum, doublereal * | ||
4576 | rdscal, integer *ipiv, integer *jpiv); | ||
4577 | |||
4578 | /* Subroutine */ int zlatps_(char *uplo, char *trans, char *diag, char * | ||
4579 | normin, integer *n, doublecomplex *ap, doublecomplex *x, doublereal * | ||
4580 | scale, doublereal *cnorm, integer *info); | ||
4581 | |||
4582 | /* Subroutine */ int zlatrd_(char *uplo, integer *n, integer *nb, | ||
4583 | doublecomplex *a, integer *lda, doublereal *e, doublecomplex *tau, | ||
4584 | doublecomplex *w, integer *ldw); | ||
4585 | |||
4586 | /* Subroutine */ int zlatrs_(char *uplo, char *trans, char *diag, char * | ||
4587 | normin, integer *n, doublecomplex *a, integer *lda, doublecomplex *x, | ||
4588 | doublereal *scale, doublereal *cnorm, integer *info); | ||
4589 | |||
4590 | /* Subroutine */ int zlatrz_(integer *m, integer *n, integer *l, | ||
4591 | doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * | ||
4592 | work); | ||
4593 | |||
4594 | /* Subroutine */ int zlatzm_(char *side, integer *m, integer *n, | ||
4595 | doublecomplex *v, integer *incv, doublecomplex *tau, doublecomplex * | ||
4596 | c1, doublecomplex *c2, integer *ldc, doublecomplex *work); | ||
4597 | |||
4598 | /* Subroutine */ int zlauu2_(char *uplo, integer *n, doublecomplex *a, | ||
4599 | integer *lda, integer *info); | ||
4600 | |||
4601 | /* Subroutine */ int zlauum_(char *uplo, integer *n, doublecomplex *a, | ||
4602 | integer *lda, integer *info); | ||
4603 | |||
4604 | /* Subroutine */ int zpbcon_(char *uplo, integer *n, integer *kd, | ||
4605 | doublecomplex *ab, integer *ldab, doublereal *anorm, doublereal * | ||
4606 | rcond, doublecomplex *work, doublereal *rwork, integer *info); | ||
4607 | |||
4608 | /* Subroutine */ int zpbequ_(char *uplo, integer *n, integer *kd, | ||
4609 | doublecomplex *ab, integer *ldab, doublereal *s, doublereal *scond, | ||
4610 | doublereal *amax, integer *info); | ||
4611 | |||
4612 | /* Subroutine */ int zpbrfs_(char *uplo, integer *n, integer *kd, integer * | ||
4613 | nrhs, doublecomplex *ab, integer *ldab, doublecomplex *afb, integer * | ||
4614 | ldafb, doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, | ||
4615 | doublereal *ferr, doublereal *berr, doublecomplex *work, doublereal * | ||
4616 | rwork, integer *info); | ||
4617 | |||
4618 | /* Subroutine */ int zpbstf_(char *uplo, integer *n, integer *kd, | ||
4619 | doublecomplex *ab, integer *ldab, integer *info); | ||
4620 | |||
4621 | /* Subroutine */ int zpbsv_(char *uplo, integer *n, integer *kd, integer * | ||
4622 | nrhs, doublecomplex *ab, integer *ldab, doublecomplex *b, integer * | ||
4623 | ldb, integer *info); | ||
4624 | |||
4625 | /* Subroutine */ int zpbsvx_(char *fact, char *uplo, integer *n, integer *kd, | ||
4626 | integer *nrhs, doublecomplex *ab, integer *ldab, doublecomplex *afb, | ||
4627 | integer *ldafb, char *equed, doublereal *s, doublecomplex *b, integer | ||
4628 | *ldb, doublecomplex *x, integer *ldx, doublereal *rcond, doublereal * | ||
4629 | ferr, doublereal *berr, doublecomplex *work, doublereal *rwork, | ||
4630 | integer *info); | ||
4631 | |||
4632 | /* Subroutine */ int zpbtf2_(char *uplo, integer *n, integer *kd, | ||
4633 | doublecomplex *ab, integer *ldab, integer *info); | ||
4634 | |||
4635 | /* Subroutine */ int zpbtrf_(char *uplo, integer *n, integer *kd, | ||
4636 | doublecomplex *ab, integer *ldab, integer *info); | ||
4637 | |||
4638 | /* Subroutine */ int zpbtrs_(char *uplo, integer *n, integer *kd, integer * | ||
4639 | nrhs, doublecomplex *ab, integer *ldab, doublecomplex *b, integer * | ||
4640 | ldb, integer *info); | ||
4641 | |||
4642 | /* Subroutine */ int zpocon_(char *uplo, integer *n, doublecomplex *a, | ||
4643 | integer *lda, doublereal *anorm, doublereal *rcond, doublecomplex * | ||
4644 | work, doublereal *rwork, integer *info); | ||
4645 | |||
4646 | /* Subroutine */ int zpoequ_(integer *n, doublecomplex *a, integer *lda, | ||
4647 | doublereal *s, doublereal *scond, doublereal *amax, integer *info); | ||
4648 | |||
4649 | /* Subroutine */ int zporfs_(char *uplo, integer *n, integer *nrhs, | ||
4650 | doublecomplex *a, integer *lda, doublecomplex *af, integer *ldaf, | ||
4651 | doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, | ||
4652 | doublereal *ferr, doublereal *berr, doublecomplex *work, doublereal * | ||
4653 | rwork, integer *info); | ||
4654 | |||
4655 | /* Subroutine */ int zposv_(char *uplo, integer *n, integer *nrhs, | ||
4656 | doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, | ||
4657 | integer *info); | ||
4658 | |||
4659 | /* Subroutine */ int zposvx_(char *fact, char *uplo, integer *n, integer * | ||
4660 | nrhs, doublecomplex *a, integer *lda, doublecomplex *af, integer * | ||
4661 | ldaf, char *equed, doublereal *s, doublecomplex *b, integer *ldb, | ||
4662 | doublecomplex *x, integer *ldx, doublereal *rcond, doublereal *ferr, | ||
4663 | doublereal *berr, doublecomplex *work, doublereal *rwork, integer * | ||
4664 | info); | ||
4665 | |||
4666 | /* Subroutine */ int zpotf2_(char *uplo, integer *n, doublecomplex *a, | ||
4667 | integer *lda, integer *info); | ||
4668 | |||
4669 | /* Subroutine */ int zpotrf_(char *uplo, integer *n, doublecomplex *a, | ||
4670 | integer *lda, integer *info); | ||
4671 | |||
4672 | /* Subroutine */ int zpotri_(char *uplo, integer *n, doublecomplex *a, | ||
4673 | integer *lda, integer *info); | ||
4674 | |||
4675 | /* Subroutine */ int zpotrs_(char *uplo, integer *n, integer *nrhs, | ||
4676 | doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, | ||
4677 | integer *info); | ||
4678 | |||
4679 | /* Subroutine */ int zppcon_(char *uplo, integer *n, doublecomplex *ap, | ||
4680 | doublereal *anorm, doublereal *rcond, doublecomplex *work, doublereal | ||
4681 | *rwork, integer *info); | ||
4682 | |||
4683 | /* Subroutine */ int zppequ_(char *uplo, integer *n, doublecomplex *ap, | ||
4684 | doublereal *s, doublereal *scond, doublereal *amax, integer *info); | ||
4685 | |||
4686 | /* Subroutine */ int zpprfs_(char *uplo, integer *n, integer *nrhs, | ||
4687 | doublecomplex *ap, doublecomplex *afp, doublecomplex *b, integer *ldb, | ||
4688 | doublecomplex *x, integer *ldx, doublereal *ferr, doublereal *berr, | ||
4689 | doublecomplex *work, doublereal *rwork, integer *info); | ||
4690 | |||
4691 | /* Subroutine */ int zppsv_(char *uplo, integer *n, integer *nrhs, | ||
4692 | doublecomplex *ap, doublecomplex *b, integer *ldb, integer *info); | ||
4693 | |||
4694 | /* Subroutine */ int zppsvx_(char *fact, char *uplo, integer *n, integer * | ||
4695 | nrhs, doublecomplex *ap, doublecomplex *afp, char *equed, doublereal * | ||
4696 | s, doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, | ||
4697 | doublereal *rcond, doublereal *ferr, doublereal *berr, doublecomplex * | ||
4698 | work, doublereal *rwork, integer *info); | ||
4699 | |||
4700 | /* Subroutine */ int zpptrf_(char *uplo, integer *n, doublecomplex *ap, | ||
4701 | integer *info); | ||
4702 | |||
4703 | /* Subroutine */ int zpptri_(char *uplo, integer *n, doublecomplex *ap, | ||
4704 | integer *info); | ||
4705 | |||
4706 | /* Subroutine */ int zpptrs_(char *uplo, integer *n, integer *nrhs, | ||
4707 | doublecomplex *ap, doublecomplex *b, integer *ldb, integer *info); | ||
4708 | |||
4709 | /* Subroutine */ int zptcon_(integer *n, doublereal *d__, doublecomplex *e, | ||
4710 | doublereal *anorm, doublereal *rcond, doublereal *rwork, integer * | ||
4711 | info); | ||
4712 | |||
4713 | /* Subroutine */ int zptrfs_(char *uplo, integer *n, integer *nrhs, | ||
4714 | doublereal *d__, doublecomplex *e, doublereal *df, doublecomplex *ef, | ||
4715 | doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, | ||
4716 | doublereal *ferr, doublereal *berr, doublecomplex *work, doublereal * | ||
4717 | rwork, integer *info); | ||
4718 | |||
4719 | /* Subroutine */ int zptsv_(integer *n, integer *nrhs, doublereal *d__, | ||
4720 | doublecomplex *e, doublecomplex *b, integer *ldb, integer *info); | ||
4721 | |||
4722 | /* Subroutine */ int zptsvx_(char *fact, integer *n, integer *nrhs, | ||
4723 | doublereal *d__, doublecomplex *e, doublereal *df, doublecomplex *ef, | ||
4724 | doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, | ||
4725 | doublereal *rcond, doublereal *ferr, doublereal *berr, doublecomplex * | ||
4726 | work, doublereal *rwork, integer *info); | ||
4727 | |||
4728 | /* Subroutine */ int zpttrf_(integer *n, doublereal *d__, doublecomplex *e, | ||
4729 | integer *info); | ||
4730 | |||
4731 | /* Subroutine */ int zpttrs_(char *uplo, integer *n, integer *nrhs, | ||
4732 | doublereal *d__, doublecomplex *e, doublecomplex *b, integer *ldb, | ||
4733 | integer *info); | ||
4734 | |||
4735 | /* Subroutine */ int zptts2_(integer *iuplo, integer *n, integer *nrhs, | ||
4736 | doublereal *d__, doublecomplex *e, doublecomplex *b, integer *ldb); | ||
4737 | |||
4738 | /* Subroutine */ int zrot_(integer *n, doublecomplex *cx, integer *incx, | ||
4739 | doublecomplex *cy, integer *incy, doublereal *c__, doublecomplex *s); | ||
4740 | |||
4741 | /* Subroutine */ int zspcon_(char *uplo, integer *n, doublecomplex *ap, | ||
4742 | integer *ipiv, doublereal *anorm, doublereal *rcond, doublecomplex * | ||
4743 | work, integer *info); | ||
4744 | |||
4745 | /* Subroutine */ int zspmv_(char *uplo, integer *n, doublecomplex *alpha, | ||
4746 | doublecomplex *ap, doublecomplex *x, integer *incx, doublecomplex * | ||
4747 | beta, doublecomplex *y, integer *incy); | ||
4748 | |||
4749 | /* Subroutine */ int zspr_(char *uplo, integer *n, doublecomplex *alpha, | ||
4750 | doublecomplex *x, integer *incx, doublecomplex *ap); | ||
4751 | |||
4752 | /* Subroutine */ int zsprfs_(char *uplo, integer *n, integer *nrhs, | ||
4753 | doublecomplex *ap, doublecomplex *afp, integer *ipiv, doublecomplex * | ||
4754 | b, integer *ldb, doublecomplex *x, integer *ldx, doublereal *ferr, | ||
4755 | doublereal *berr, doublecomplex *work, doublereal *rwork, integer * | ||
4756 | info); | ||
4757 | |||
4758 | /* Subroutine */ int zspsv_(char *uplo, integer *n, integer *nrhs, | ||
4759 | doublecomplex *ap, integer *ipiv, doublecomplex *b, integer *ldb, | ||
4760 | integer *info); | ||
4761 | |||
4762 | /* Subroutine */ int zspsvx_(char *fact, char *uplo, integer *n, integer * | ||
4763 | nrhs, doublecomplex *ap, doublecomplex *afp, integer *ipiv, | ||
4764 | doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, | ||
4765 | doublereal *rcond, doublereal *ferr, doublereal *berr, doublecomplex * | ||
4766 | work, doublereal *rwork, integer *info); | ||
4767 | |||
4768 | /* Subroutine */ int zsptrf_(char *uplo, integer *n, doublecomplex *ap, | ||
4769 | integer *ipiv, integer *info); | ||
4770 | |||
4771 | /* Subroutine */ int zsptri_(char *uplo, integer *n, doublecomplex *ap, | ||
4772 | integer *ipiv, doublecomplex *work, integer *info); | ||
4773 | |||
4774 | /* Subroutine */ int zsptrs_(char *uplo, integer *n, integer *nrhs, | ||
4775 | doublecomplex *ap, integer *ipiv, doublecomplex *b, integer *ldb, | ||
4776 | integer *info); | ||
4777 | |||
4778 | /* Subroutine */ int zstedc_(char *compz, integer *n, doublereal *d__, | ||
4779 | doublereal *e, doublecomplex *z__, integer *ldz, doublecomplex *work, | ||
4780 | integer *lwork, doublereal *rwork, integer *lrwork, integer *iwork, | ||
4781 | integer *liwork, integer *info); | ||
4782 | |||
4783 | /* Subroutine */ int zstein_(integer *n, doublereal *d__, doublereal *e, | ||
4784 | integer *m, doublereal *w, integer *iblock, integer *isplit, | ||
4785 | doublecomplex *z__, integer *ldz, doublereal *work, integer *iwork, | ||
4786 | integer *ifail, integer *info); | ||
4787 | |||
4788 | /* Subroutine */ int zsteqr_(char *compz, integer *n, doublereal *d__, | ||
4789 | doublereal *e, doublecomplex *z__, integer *ldz, doublereal *work, | ||
4790 | integer *info); | ||
4791 | |||
4792 | /* Subroutine */ int zsycon_(char *uplo, integer *n, doublecomplex *a, | ||
4793 | integer *lda, integer *ipiv, doublereal *anorm, doublereal *rcond, | ||
4794 | doublecomplex *work, integer *info); | ||
4795 | |||
4796 | /* Subroutine */ int zsymv_(char *uplo, integer *n, doublecomplex *alpha, | ||
4797 | doublecomplex *a, integer *lda, doublecomplex *x, integer *incx, | ||
4798 | doublecomplex *beta, doublecomplex *y, integer *incy); | ||
4799 | |||
4800 | /* Subroutine */ int zsyr_(char *uplo, integer *n, doublecomplex *alpha, | ||
4801 | doublecomplex *x, integer *incx, doublecomplex *a, integer *lda); | ||
4802 | |||
4803 | /* Subroutine */ int zsyrfs_(char *uplo, integer *n, integer *nrhs, | ||
4804 | doublecomplex *a, integer *lda, doublecomplex *af, integer *ldaf, | ||
4805 | integer *ipiv, doublecomplex *b, integer *ldb, doublecomplex *x, | ||
4806 | integer *ldx, doublereal *ferr, doublereal *berr, doublecomplex *work, | ||
4807 | doublereal *rwork, integer *info); | ||
4808 | |||
4809 | /* Subroutine */ int zsysv_(char *uplo, integer *n, integer *nrhs, | ||
4810 | doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *b, | ||
4811 | integer *ldb, doublecomplex *work, integer *lwork, integer *info); | ||
4812 | |||
4813 | /* Subroutine */ int zsysvx_(char *fact, char *uplo, integer *n, integer * | ||
4814 | nrhs, doublecomplex *a, integer *lda, doublecomplex *af, integer * | ||
4815 | ldaf, integer *ipiv, doublecomplex *b, integer *ldb, doublecomplex *x, | ||
4816 | integer *ldx, doublereal *rcond, doublereal *ferr, doublereal *berr, | ||
4817 | doublecomplex *work, integer *lwork, doublereal *rwork, integer *info); | ||
4818 | |||
4819 | /* Subroutine */ int zsytf2_(char *uplo, integer *n, doublecomplex *a, | ||
4820 | integer *lda, integer *ipiv, integer *info); | ||
4821 | |||
4822 | /* Subroutine */ int zsytrf_(char *uplo, integer *n, doublecomplex *a, | ||
4823 | integer *lda, integer *ipiv, doublecomplex *work, integer *lwork, | ||
4824 | integer *info); | ||
4825 | |||
4826 | /* Subroutine */ int zsytri_(char *uplo, integer *n, doublecomplex *a, | ||
4827 | integer *lda, integer *ipiv, doublecomplex *work, integer *info); | ||
4828 | |||
4829 | /* Subroutine */ int zsytrs_(char *uplo, integer *n, integer *nrhs, | ||
4830 | doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *b, | ||
4831 | integer *ldb, integer *info); | ||
4832 | |||
4833 | /* Subroutine */ int ztbcon_(char *norm, char *uplo, char *diag, integer *n, | ||
4834 | integer *kd, doublecomplex *ab, integer *ldab, doublereal *rcond, | ||
4835 | doublecomplex *work, doublereal *rwork, integer *info); | ||
4836 | |||
4837 | /* Subroutine */ int ztbrfs_(char *uplo, char *trans, char *diag, integer *n, | ||
4838 | integer *kd, integer *nrhs, doublecomplex *ab, integer *ldab, | ||
4839 | doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, | ||
4840 | doublereal *ferr, doublereal *berr, doublecomplex *work, doublereal * | ||
4841 | rwork, integer *info); | ||
4842 | |||
4843 | /* Subroutine */ int ztbtrs_(char *uplo, char *trans, char *diag, integer *n, | ||
4844 | integer *kd, integer *nrhs, doublecomplex *ab, integer *ldab, | ||
4845 | doublecomplex *b, integer *ldb, integer *info); | ||
4846 | |||
4847 | /* Subroutine */ int ztgevc_(char *side, char *howmny, logical *select, | ||
4848 | integer *n, doublecomplex *a, integer *lda, doublecomplex *b, integer | ||
4849 | *ldb, doublecomplex *vl, integer *ldvl, doublecomplex *vr, integer * | ||
4850 | ldvr, integer *mm, integer *m, doublecomplex *work, doublereal *rwork, | ||
4851 | integer *info); | ||
4852 | |||
4853 | /* Subroutine */ int ztgex2_(logical *wantq, logical *wantz, integer *n, | ||
4854 | doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, | ||
4855 | doublecomplex *q, integer *ldq, doublecomplex *z__, integer *ldz, | ||
4856 | integer *j1, integer *info); | ||
4857 | |||
4858 | /* Subroutine */ int ztgexc_(logical *wantq, logical *wantz, integer *n, | ||
4859 | doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, | ||
4860 | doublecomplex *q, integer *ldq, doublecomplex *z__, integer *ldz, | ||
4861 | integer *ifst, integer *ilst, integer *info); | ||
4862 | |||
4863 | /* Subroutine */ int ztgsen_(integer *ijob, logical *wantq, logical *wantz, | ||
4864 | logical *select, integer *n, doublecomplex *a, integer *lda, | ||
4865 | doublecomplex *b, integer *ldb, doublecomplex *alpha, doublecomplex * | ||
4866 | beta, doublecomplex *q, integer *ldq, doublecomplex *z__, integer * | ||
4867 | ldz, integer *m, doublereal *pl, doublereal *pr, doublereal *dif, | ||
4868 | doublecomplex *work, integer *lwork, integer *iwork, integer *liwork, | ||
4869 | integer *info); | ||
4870 | |||
4871 | /* Subroutine */ int ztgsja_(char *jobu, char *jobv, char *jobq, integer *m, | ||
4872 | integer *p, integer *n, integer *k, integer *l, doublecomplex *a, | ||
4873 | integer *lda, doublecomplex *b, integer *ldb, doublereal *tola, | ||
4874 | doublereal *tolb, doublereal *alpha, doublereal *beta, doublecomplex * | ||
4875 | u, integer *ldu, doublecomplex *v, integer *ldv, doublecomplex *q, | ||
4876 | integer *ldq, doublecomplex *work, integer *ncycle, integer *info); | ||
4877 | |||
4878 | /* Subroutine */ int ztgsna_(char *job, char *howmny, logical *select, | ||
4879 | integer *n, doublecomplex *a, integer *lda, doublecomplex *b, integer | ||
4880 | *ldb, doublecomplex *vl, integer *ldvl, doublecomplex *vr, integer * | ||
4881 | ldvr, doublereal *s, doublereal *dif, integer *mm, integer *m, | ||
4882 | doublecomplex *work, integer *lwork, integer *iwork, integer *info); | ||
4883 | |||
4884 | /* Subroutine */ int ztgsy2_(char *trans, integer *ijob, integer *m, integer * | ||
4885 | n, doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, | ||
4886 | doublecomplex *c__, integer *ldc, doublecomplex *d__, integer *ldd, | ||
4887 | doublecomplex *e, integer *lde, doublecomplex *f, integer *ldf, | ||
4888 | doublereal *scale, doublereal *rdsum, doublereal *rdscal, integer * | ||
4889 | info); | ||
4890 | |||
4891 | /* Subroutine */ int ztgsyl_(char *trans, integer *ijob, integer *m, integer * | ||
4892 | n, doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, | ||
4893 | doublecomplex *c__, integer *ldc, doublecomplex *d__, integer *ldd, | ||
4894 | doublecomplex *e, integer *lde, doublecomplex *f, integer *ldf, | ||
4895 | doublereal *scale, doublereal *dif, doublecomplex *work, integer * | ||
4896 | lwork, integer *iwork, integer *info); | ||
4897 | |||
4898 | /* Subroutine */ int ztpcon_(char *norm, char *uplo, char *diag, integer *n, | ||
4899 | doublecomplex *ap, doublereal *rcond, doublecomplex *work, doublereal | ||
4900 | *rwork, integer *info); | ||
4901 | |||
4902 | /* Subroutine */ int ztprfs_(char *uplo, char *trans, char *diag, integer *n, | ||
4903 | integer *nrhs, doublecomplex *ap, doublecomplex *b, integer *ldb, | ||
4904 | doublecomplex *x, integer *ldx, doublereal *ferr, doublereal *berr, | ||
4905 | doublecomplex *work, doublereal *rwork, integer *info); | ||
4906 | |||
4907 | /* Subroutine */ int ztptri_(char *uplo, char *diag, integer *n, | ||
4908 | doublecomplex *ap, integer *info); | ||
4909 | |||
4910 | /* Subroutine */ int ztptrs_(char *uplo, char *trans, char *diag, integer *n, | ||
4911 | integer *nrhs, doublecomplex *ap, doublecomplex *b, integer *ldb, | ||
4912 | integer *info); | ||
4913 | |||
4914 | /* Subroutine */ int ztrcon_(char *norm, char *uplo, char *diag, integer *n, | ||
4915 | doublecomplex *a, integer *lda, doublereal *rcond, doublecomplex * | ||
4916 | work, doublereal *rwork, integer *info); | ||
4917 | |||
4918 | /* Subroutine */ int ztrevc_(char *side, char *howmny, logical *select, | ||
4919 | integer *n, doublecomplex *t, integer *ldt, doublecomplex *vl, | ||
4920 | integer *ldvl, doublecomplex *vr, integer *ldvr, integer *mm, integer | ||
4921 | *m, doublecomplex *work, doublereal *rwork, integer *info); | ||
4922 | |||
4923 | /* Subroutine */ int ztrexc_(char *compq, integer *n, doublecomplex *t, | ||
4924 | integer *ldt, doublecomplex *q, integer *ldq, integer *ifst, integer * | ||
4925 | ilst, integer *info); | ||
4926 | |||
4927 | /* Subroutine */ int ztrrfs_(char *uplo, char *trans, char *diag, integer *n, | ||
4928 | integer *nrhs, doublecomplex *a, integer *lda, doublecomplex *b, | ||
4929 | integer *ldb, doublecomplex *x, integer *ldx, doublereal *ferr, | ||
4930 | doublereal *berr, doublecomplex *work, doublereal *rwork, integer * | ||
4931 | info); | ||
4932 | |||
4933 | /* Subroutine */ int ztrsen_(char *job, char *compq, logical *select, integer | ||
4934 | *n, doublecomplex *t, integer *ldt, doublecomplex *q, integer *ldq, | ||
4935 | doublecomplex *w, integer *m, doublereal *s, doublereal *sep, | ||
4936 | doublecomplex *work, integer *lwork, integer *info); | ||
4937 | |||
4938 | /* Subroutine */ int ztrsna_(char *job, char *howmny, logical *select, | ||
4939 | integer *n, doublecomplex *t, integer *ldt, doublecomplex *vl, | ||
4940 | integer *ldvl, doublecomplex *vr, integer *ldvr, doublereal *s, | ||
4941 | doublereal *sep, integer *mm, integer *m, doublecomplex *work, | ||
4942 | integer *ldwork, doublereal *rwork, integer *info); | ||
4943 | |||
4944 | /* Subroutine */ int ztrsyl_(char *trana, char *tranb, integer *isgn, integer | ||
4945 | *m, integer *n, doublecomplex *a, integer *lda, doublecomplex *b, | ||
4946 | integer *ldb, doublecomplex *c__, integer *ldc, doublereal *scale, | ||
4947 | integer *info); | ||
4948 | |||
4949 | /* Subroutine */ int ztrti2_(char *uplo, char *diag, integer *n, | ||
4950 | doublecomplex *a, integer *lda, integer *info); | ||
4951 | |||
4952 | /* Subroutine */ int ztrtri_(char *uplo, char *diag, integer *n, | ||
4953 | doublecomplex *a, integer *lda, integer *info); | ||
4954 | |||
4955 | /* Subroutine */ int ztrtrs_(char *uplo, char *trans, char *diag, integer *n, | ||
4956 | integer *nrhs, doublecomplex *a, integer *lda, doublecomplex *b, | ||
4957 | integer *ldb, integer *info); | ||
4958 | |||
4959 | /* Subroutine */ int ztzrqf_(integer *m, integer *n, doublecomplex *a, | ||
4960 | integer *lda, doublecomplex *tau, integer *info); | ||
4961 | |||
4962 | /* Subroutine */ int ztzrzf_(integer *m, integer *n, doublecomplex *a, | ||
4963 | integer *lda, doublecomplex *tau, doublecomplex *work, integer *lwork, | ||
4964 | integer *info); | ||
4965 | |||
4966 | /* Subroutine */ int zung2l_(integer *m, integer *n, integer *k, | ||
4967 | doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * | ||
4968 | work, integer *info); | ||
4969 | |||
4970 | /* Subroutine */ int zung2r_(integer *m, integer *n, integer *k, | ||
4971 | doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * | ||
4972 | work, integer *info); | ||
4973 | |||
4974 | /* Subroutine */ int zungbr_(char *vect, integer *m, integer *n, integer *k, | ||
4975 | doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * | ||
4976 | work, integer *lwork, integer *info); | ||
4977 | |||
4978 | /* Subroutine */ int zunghr_(integer *n, integer *ilo, integer *ihi, | ||
4979 | doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * | ||
4980 | work, integer *lwork, integer *info); | ||
4981 | |||
4982 | /* Subroutine */ int zungl2_(integer *m, integer *n, integer *k, | ||
4983 | doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * | ||
4984 | work, integer *info); | ||
4985 | |||
4986 | /* Subroutine */ int zunglq_(integer *m, integer *n, integer *k, | ||
4987 | doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * | ||
4988 | work, integer *lwork, integer *info); | ||
4989 | |||
4990 | /* Subroutine */ int zungql_(integer *m, integer *n, integer *k, | ||
4991 | doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * | ||
4992 | work, integer *lwork, integer *info); | ||
4993 | |||
4994 | /* Subroutine */ int zungqr_(integer *m, integer *n, integer *k, | ||
4995 | doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * | ||
4996 | work, integer *lwork, integer *info); | ||
4997 | |||
4998 | /* Subroutine */ int zungr2_(integer *m, integer *n, integer *k, | ||
4999 | doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * | ||
5000 | work, integer *info); | ||
5001 | |||
5002 | /* Subroutine */ int zungrq_(integer *m, integer *n, integer *k, | ||
5003 | doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * | ||
5004 | work, integer *lwork, integer *info); | ||
5005 | |||
5006 | /* Subroutine */ int zungtr_(char *uplo, integer *n, doublecomplex *a, | ||
5007 | integer *lda, doublecomplex *tau, doublecomplex *work, integer *lwork, | ||
5008 | integer *info); | ||
5009 | |||
5010 | /* Subroutine */ int zunm2l_(char *side, char *trans, integer *m, integer *n, | ||
5011 | integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, | ||
5012 | doublecomplex *c__, integer *ldc, doublecomplex *work, integer *info); | ||
5013 | |||
5014 | /* Subroutine */ int zunm2r_(char *side, char *trans, integer *m, integer *n, | ||
5015 | integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, | ||
5016 | doublecomplex *c__, integer *ldc, doublecomplex *work, integer *info); | ||
5017 | |||
5018 | /* Subroutine */ int zunmbr_(char *vect, char *side, char *trans, integer *m, | ||
5019 | integer *n, integer *k, doublecomplex *a, integer *lda, doublecomplex | ||
5020 | *tau, doublecomplex *c__, integer *ldc, doublecomplex *work, integer * | ||
5021 | lwork, integer *info); | ||
5022 | |||
5023 | /* Subroutine */ int zunmhr_(char *side, char *trans, integer *m, integer *n, | ||
5024 | integer *ilo, integer *ihi, doublecomplex *a, integer *lda, | ||
5025 | doublecomplex *tau, doublecomplex *c__, integer *ldc, doublecomplex * | ||
5026 | work, integer *lwork, integer *info); | ||
5027 | |||
5028 | /* Subroutine */ int zunml2_(char *side, char *trans, integer *m, integer *n, | ||
5029 | integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, | ||
5030 | doublecomplex *c__, integer *ldc, doublecomplex *work, integer *info); | ||
5031 | |||
5032 | /* Subroutine */ int zunmlq_(char *side, char *trans, integer *m, integer *n, | ||
5033 | integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, | ||
5034 | doublecomplex *c__, integer *ldc, doublecomplex *work, integer *lwork, | ||
5035 | integer *info); | ||
5036 | |||
5037 | /* Subroutine */ int zunmql_(char *side, char *trans, integer *m, integer *n, | ||
5038 | integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, | ||
5039 | doublecomplex *c__, integer *ldc, doublecomplex *work, integer *lwork, | ||
5040 | integer *info); | ||
5041 | |||
5042 | /* Subroutine */ int zunmqr_(char *side, char *trans, integer *m, integer *n, | ||
5043 | integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, | ||
5044 | doublecomplex *c__, integer *ldc, doublecomplex *work, integer *lwork, | ||
5045 | integer *info); | ||
5046 | |||
5047 | /* Subroutine */ int zunmr2_(char *side, char *trans, integer *m, integer *n, | ||
5048 | integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, | ||
5049 | doublecomplex *c__, integer *ldc, doublecomplex *work, integer *info); | ||
5050 | |||
5051 | /* Subroutine */ int zunmr3_(char *side, char *trans, integer *m, integer *n, | ||
5052 | integer *k, integer *l, doublecomplex *a, integer *lda, doublecomplex | ||
5053 | *tau, doublecomplex *c__, integer *ldc, doublecomplex *work, integer * | ||
5054 | info); | ||
5055 | |||
5056 | /* Subroutine */ int zunmrq_(char *side, char *trans, integer *m, integer *n, | ||
5057 | integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, | ||
5058 | doublecomplex *c__, integer *ldc, doublecomplex *work, integer *lwork, | ||
5059 | integer *info); | ||
5060 | |||
5061 | /* Subroutine */ int zunmrz_(char *side, char *trans, integer *m, integer *n, | ||
5062 | integer *k, integer *l, doublecomplex *a, integer *lda, doublecomplex | ||
5063 | *tau, doublecomplex *c__, integer *ldc, doublecomplex *work, integer * | ||
5064 | lwork, integer *info); | ||
5065 | |||
5066 | /* Subroutine */ int zunmtr_(char *side, char *uplo, char *trans, integer *m, | ||
5067 | integer *n, doublecomplex *a, integer *lda, doublecomplex *tau, | ||
5068 | doublecomplex *c__, integer *ldc, doublecomplex *work, integer *lwork, | ||
5069 | integer *info); | ||
5070 | |||
5071 | /* Subroutine */ int zupgtr_(char *uplo, integer *n, doublecomplex *ap, | ||
5072 | doublecomplex *tau, doublecomplex *q, integer *ldq, doublecomplex * | ||
5073 | work, integer *info); | ||
5074 | |||
5075 | /* Subroutine */ int zupmtr_(char *side, char *uplo, char *trans, integer *m, | ||
5076 | integer *n, doublecomplex *ap, doublecomplex *tau, doublecomplex *c__, | ||
5077 | integer *ldc, doublecomplex *work, integer *info); | ||
5078 | |||
5079 | #endif /* __CLAPACK_H */ | ||
diff --git a/lib/Numeric/LinearAlgebra/LAPACK/f2c.h b/lib/Numeric/LinearAlgebra/LAPACK/f2c.h new file mode 100644 index 0000000..b94ee7c --- /dev/null +++ b/lib/Numeric/LinearAlgebra/LAPACK/f2c.h | |||
@@ -0,0 +1,223 @@ | |||
1 | /* f2c.h -- Standard Fortran to C header file */ | ||
2 | |||
3 | /** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed." | ||
4 | |||
5 | - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */ | ||
6 | |||
7 | #ifndef F2C_INCLUDE | ||
8 | #define F2C_INCLUDE | ||
9 | |||
10 | typedef long int integer; | ||
11 | typedef unsigned long int uinteger; | ||
12 | typedef char *address; | ||
13 | typedef short int shortint; | ||
14 | typedef float real; | ||
15 | typedef double doublereal; | ||
16 | typedef struct { real r, i; } complex; | ||
17 | typedef struct { doublereal r, i; } doublecomplex; | ||
18 | typedef long int logical; | ||
19 | typedef short int shortlogical; | ||
20 | typedef char logical1; | ||
21 | typedef char integer1; | ||
22 | #ifdef INTEGER_STAR_8 /* Adjust for integer*8. */ | ||
23 | typedef long long longint; /* system-dependent */ | ||
24 | typedef unsigned long long ulongint; /* system-dependent */ | ||
25 | #define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b))) | ||
26 | #define qbit_set(a,b) ((a) | ((ulongint)1 << (b))) | ||
27 | #endif | ||
28 | |||
29 | #define TRUE_ (1) | ||
30 | #define FALSE_ (0) | ||
31 | |||
32 | /* Extern is for use with -E */ | ||
33 | #ifndef Extern | ||
34 | #define Extern extern | ||
35 | #endif | ||
36 | |||
37 | /* I/O stuff */ | ||
38 | |||
39 | #ifdef f2c_i2 | ||
40 | /* for -i2 */ | ||
41 | typedef short flag; | ||
42 | typedef short ftnlen; | ||
43 | typedef short ftnint; | ||
44 | #else | ||
45 | typedef long int flag; | ||
46 | typedef long int ftnlen; | ||
47 | typedef long int ftnint; | ||
48 | #endif | ||
49 | |||
50 | /*external read, write*/ | ||
51 | typedef struct | ||
52 | { flag cierr; | ||
53 | ftnint ciunit; | ||
54 | flag ciend; | ||
55 | char *cifmt; | ||
56 | ftnint cirec; | ||
57 | } cilist; | ||
58 | |||
59 | /*internal read, write*/ | ||
60 | typedef struct | ||
61 | { flag icierr; | ||
62 | char *iciunit; | ||
63 | flag iciend; | ||
64 | char *icifmt; | ||
65 | ftnint icirlen; | ||
66 | ftnint icirnum; | ||
67 | } icilist; | ||
68 | |||
69 | /*open*/ | ||
70 | typedef struct | ||
71 | { flag oerr; | ||
72 | ftnint ounit; | ||
73 | char *ofnm; | ||
74 | ftnlen ofnmlen; | ||
75 | char *osta; | ||
76 | char *oacc; | ||
77 | char *ofm; | ||
78 | ftnint orl; | ||
79 | char *oblnk; | ||
80 | } olist; | ||
81 | |||
82 | /*close*/ | ||
83 | typedef struct | ||
84 | { flag cerr; | ||
85 | ftnint cunit; | ||
86 | char *csta; | ||
87 | } cllist; | ||
88 | |||
89 | /*rewind, backspace, endfile*/ | ||
90 | typedef struct | ||
91 | { flag aerr; | ||
92 | ftnint aunit; | ||
93 | } alist; | ||
94 | |||
95 | /* inquire */ | ||
96 | typedef struct | ||
97 | { flag inerr; | ||
98 | ftnint inunit; | ||
99 | char *infile; | ||
100 | ftnlen infilen; | ||
101 | ftnint *inex; /*parameters in standard's order*/ | ||
102 | ftnint *inopen; | ||
103 | ftnint *innum; | ||
104 | ftnint *innamed; | ||
105 | char *inname; | ||
106 | ftnlen innamlen; | ||
107 | char *inacc; | ||
108 | ftnlen inacclen; | ||
109 | char *inseq; | ||
110 | ftnlen inseqlen; | ||
111 | char *indir; | ||
112 | ftnlen indirlen; | ||
113 | char *infmt; | ||
114 | ftnlen infmtlen; | ||
115 | char *inform; | ||
116 | ftnint informlen; | ||
117 | char *inunf; | ||
118 | ftnlen inunflen; | ||
119 | ftnint *inrecl; | ||
120 | ftnint *innrec; | ||
121 | char *inblank; | ||
122 | ftnlen inblanklen; | ||
123 | } inlist; | ||
124 | |||
125 | #define VOID void | ||
126 | |||
127 | union Multitype { /* for multiple entry points */ | ||
128 | integer1 g; | ||
129 | shortint h; | ||
130 | integer i; | ||
131 | /* longint j; */ | ||
132 | real r; | ||
133 | doublereal d; | ||
134 | complex c; | ||
135 | doublecomplex z; | ||
136 | }; | ||
137 | |||
138 | typedef union Multitype Multitype; | ||
139 | |||
140 | /*typedef long int Long;*/ /* No longer used; formerly in Namelist */ | ||
141 | |||
142 | struct Vardesc { /* for Namelist */ | ||
143 | char *name; | ||
144 | char *addr; | ||
145 | ftnlen *dims; | ||
146 | int type; | ||
147 | }; | ||
148 | typedef struct Vardesc Vardesc; | ||
149 | |||
150 | struct Namelist { | ||
151 | char *name; | ||
152 | Vardesc **vars; | ||
153 | int nvars; | ||
154 | }; | ||
155 | typedef struct Namelist Namelist; | ||
156 | |||
157 | #define abs(x) ((x) >= 0 ? (x) : -(x)) | ||
158 | #define dabs(x) (doublereal)abs(x) | ||
159 | #define min(a,b) ((a) <= (b) ? (a) : (b)) | ||
160 | #define max(a,b) ((a) >= (b) ? (a) : (b)) | ||
161 | #define dmin(a,b) (doublereal)min(a,b) | ||
162 | #define dmax(a,b) (doublereal)max(a,b) | ||
163 | #define bit_test(a,b) ((a) >> (b) & 1) | ||
164 | #define bit_clear(a,b) ((a) & ~((uinteger)1 << (b))) | ||
165 | #define bit_set(a,b) ((a) | ((uinteger)1 << (b))) | ||
166 | |||
167 | /* procedure parameter types for -A and -C++ */ | ||
168 | |||
169 | #define F2C_proc_par_types 1 | ||
170 | #ifdef __cplusplus | ||
171 | typedef int /* Unknown procedure type */ (*U_fp)(...); | ||
172 | typedef shortint (*J_fp)(...); | ||
173 | typedef integer (*I_fp)(...); | ||
174 | typedef real (*R_fp)(...); | ||
175 | typedef doublereal (*D_fp)(...), (*E_fp)(...); | ||
176 | typedef /* Complex */ VOID (*C_fp)(...); | ||
177 | typedef /* Double Complex */ VOID (*Z_fp)(...); | ||
178 | typedef logical (*L_fp)(...); | ||
179 | typedef shortlogical (*K_fp)(...); | ||
180 | typedef /* Character */ VOID (*H_fp)(...); | ||
181 | typedef /* Subroutine */ int (*S_fp)(...); | ||
182 | #else | ||
183 | typedef int /* Unknown procedure type */ (*U_fp)(); | ||
184 | typedef shortint (*J_fp)(); | ||
185 | typedef integer (*I_fp)(); | ||
186 | typedef real (*R_fp)(); | ||
187 | typedef doublereal (*D_fp)(), (*E_fp)(); | ||
188 | typedef /* Complex */ VOID (*C_fp)(); | ||
189 | typedef /* Double Complex */ VOID (*Z_fp)(); | ||
190 | typedef logical (*L_fp)(); | ||
191 | typedef shortlogical (*K_fp)(); | ||
192 | typedef /* Character */ VOID (*H_fp)(); | ||
193 | typedef /* Subroutine */ int (*S_fp)(); | ||
194 | #endif | ||
195 | /* E_fp is for real functions when -R is not specified */ | ||
196 | typedef VOID C_f; /* complex function */ | ||
197 | typedef VOID H_f; /* character function */ | ||
198 | typedef VOID Z_f; /* double complex function */ | ||
199 | typedef doublereal E_f; /* real function with -R not specified */ | ||
200 | |||
201 | /* undef any lower-case symbols that your C compiler predefines, e.g.: */ | ||
202 | |||
203 | #ifndef Skip_f2c_Undefs | ||
204 | #undef cray | ||
205 | #undef gcos | ||
206 | #undef mc68010 | ||
207 | #undef mc68020 | ||
208 | #undef mips | ||
209 | #undef pdp11 | ||
210 | #undef sgi | ||
211 | #undef sparc | ||
212 | #undef sun | ||
213 | #undef sun2 | ||
214 | #undef sun3 | ||
215 | #undef sun4 | ||
216 | #undef u370 | ||
217 | #undef u3b | ||
218 | #undef u3b2 | ||
219 | #undef u3b5 | ||
220 | #undef unix | ||
221 | #undef vax | ||
222 | #endif | ||
223 | #endif | ||
diff --git a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c new file mode 100644 index 0000000..4ef9a6e --- /dev/null +++ b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c | |||
@@ -0,0 +1,656 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <stdlib.h> | ||
3 | #include <string.h> | ||
4 | #include <math.h> | ||
5 | #include <time.h> | ||
6 | #include "lapack-aux.h" | ||
7 | |||
8 | #define MACRO(B) do {B} while (0) | ||
9 | #define ERROR(CODE) MACRO(return CODE;) | ||
10 | #define REQUIRES(COND, CODE) MACRO(if(!(COND)) {ERROR(CODE);}) | ||
11 | |||
12 | #define MIN(A,B) ((A)<(B)?(A):(B)) | ||
13 | #define MAX(A,B) ((A)>(B)?(A):(B)) | ||
14 | |||
15 | #ifdef DBGL | ||
16 | #define DEBUGMSG(M) printf("LAPACK Wrapper "M"\n: "); size_t t0 = time(NULL); | ||
17 | #define OK MACRO(printf("%ld s\n",time(0)-t0); return 0;); | ||
18 | #else | ||
19 | #define DEBUGMSG(M) | ||
20 | #define OK return 0; | ||
21 | #endif | ||
22 | |||
23 | #define CHECK(RES,CODE) MACRO(if(RES) return CODE;) | ||
24 | |||
25 | #define BAD_SIZE 2000 | ||
26 | #define BAD_CODE 2001 | ||
27 | #define MEM 2002 | ||
28 | #define BAD_FILE 2003 | ||
29 | #define SINGULAR 2004 | ||
30 | #define NOCONVER 2005 | ||
31 | #define NODEFPOS 2006 | ||
32 | |||
33 | //////////////////// real svd //////////////////////////////////// | ||
34 | |||
35 | int svd_l_R(KDMAT(a),DMAT(u), DVEC(s),DMAT(v)) { | ||
36 | integer m = ar; | ||
37 | integer n = ac; | ||
38 | integer q = MIN(m,n); | ||
39 | REQUIRES(ur==m && uc==m && sn==q && vr==n && vc==n,BAD_SIZE); | ||
40 | DEBUGMSG("svd_l_R"); | ||
41 | double *B = (double*)malloc(m*n*sizeof(double)); | ||
42 | CHECK(!B,MEM); | ||
43 | memcpy(B,ap,m*n*sizeof(double)); | ||
44 | integer lwork = -1; | ||
45 | integer res; | ||
46 | // ask for optimal lwork | ||
47 | double ans; | ||
48 | //printf("ask zgesvd\n"); | ||
49 | char* job = "A"; | ||
50 | dgesvd_ (job,job, | ||
51 | &m,&n,B,&m, | ||
52 | sp, | ||
53 | up,&m, | ||
54 | vp,&n, | ||
55 | &ans, &lwork, | ||
56 | &res); | ||
57 | lwork = ceil(ans); | ||
58 | //printf("ans = %d\n",lwork); | ||
59 | double * work = (double*)malloc(lwork*sizeof(double)); | ||
60 | CHECK(!work,MEM); | ||
61 | //printf("dgesdd\n"); | ||
62 | dgesvd_ (job,job, | ||
63 | &m,&n,B,&m, | ||
64 | sp, | ||
65 | up,&m, | ||
66 | vp,&n, | ||
67 | work, &lwork, | ||
68 | &res); | ||
69 | CHECK(res,res); | ||
70 | free(work); | ||
71 | free(B); | ||
72 | OK | ||
73 | } | ||
74 | |||
75 | // (alternative version) | ||
76 | |||
77 | int svd_l_Rdd(KDMAT(a),DMAT(u), DVEC(s),DMAT(v)) { | ||
78 | integer m = ar; | ||
79 | integer n = ac; | ||
80 | integer q = MIN(m,n); | ||
81 | REQUIRES(ur==m && uc==m && sn==q && vr==n && vc==n,BAD_SIZE); | ||
82 | DEBUGMSG("svd_l_Rdd"); | ||
83 | double *B = (double*)malloc(m*n*sizeof(double)); | ||
84 | CHECK(!B,MEM); | ||
85 | memcpy(B,ap,m*n*sizeof(double)); | ||
86 | integer* iwk = (integer*) malloc(8*q*sizeof(int)); | ||
87 | CHECK(!iwk,MEM); | ||
88 | integer lwk = -1; | ||
89 | integer res; | ||
90 | // ask for optimal lwk | ||
91 | double ans; | ||
92 | //printf("ask dgesdd\n"); | ||
93 | dgesdd_ ("A",&m,&n,B,&m,sp,up,&m,vp,&n,&ans,&lwk,iwk,&res); | ||
94 | lwk = 2*ceil(ans); // ????? otherwise 50x100 rejects lwk | ||
95 | //printf("lwk = %d\n",lwk); | ||
96 | double * workv = (double*)malloc(lwk*sizeof(double)); | ||
97 | CHECK(!workv,MEM); | ||
98 | //printf("dgesdd\n"); | ||
99 | dgesdd_ ("A",&m,&n,B,&m,sp,up,&m,vp,&n,workv,&lwk,iwk,&res); | ||
100 | CHECK(res,res); | ||
101 | free(iwk); | ||
102 | free(workv); | ||
103 | free(B); | ||
104 | OK | ||
105 | } | ||
106 | |||
107 | //////////////////// complex svd //////////////////////////////////// | ||
108 | |||
109 | // not in clapack.h | ||
110 | |||
111 | int zgesvd_(char *jobu, char *jobvt, integer *m, integer *n, | ||
112 | doublecomplex *a, integer *lda, doublereal *s, doublecomplex *u, | ||
113 | integer *ldu, doublecomplex *vt, integer *ldvt, doublecomplex *work, | ||
114 | integer *lwork, doublereal *rwork, integer *info); | ||
115 | |||
116 | int svd_l_C(KCMAT(a),CMAT(u), DVEC(s),CMAT(v)) { | ||
117 | integer m = ar; | ||
118 | integer n = ac; | ||
119 | integer q = MIN(m,n); | ||
120 | REQUIRES(ur==m && uc==m && sn==q && vr==n && vc==n,BAD_SIZE); | ||
121 | DEBUGMSG("svd_l_C"); | ||
122 | double *B = (double*)malloc(2*m*n*sizeof(double)); | ||
123 | CHECK(!B,MEM); | ||
124 | memcpy(B,ap,m*n*2*sizeof(double)); | ||
125 | |||
126 | double *rwork = (double*) malloc(5*q*sizeof(double)); | ||
127 | CHECK(!rwork,MEM); | ||
128 | integer lwork = -1; | ||
129 | integer res; | ||
130 | // ask for optimal lwork | ||
131 | doublecomplex ans; | ||
132 | //printf("ask zgesvd\n"); | ||
133 | char* job = "A"; | ||
134 | zgesvd_ (job,job, | ||
135 | &m,&n,(doublecomplex*)B,&m, | ||
136 | sp, | ||
137 | (doublecomplex*)up,&m, | ||
138 | (doublecomplex*)vp,&n, | ||
139 | &ans, &lwork, | ||
140 | rwork, | ||
141 | &res); | ||
142 | lwork = ceil(ans.r); | ||
143 | //printf("ans = %d\n",lwork); | ||
144 | doublecomplex * work = (doublecomplex*)malloc(lwork*2*sizeof(double)); | ||
145 | CHECK(!work,MEM); | ||
146 | //printf("zgesvd\n"); | ||
147 | zgesvd_ (job,job, | ||
148 | &m,&n,(doublecomplex*)B,&m, | ||
149 | sp, | ||
150 | (doublecomplex*)up,&m, | ||
151 | (doublecomplex*)vp,&n, | ||
152 | work, &lwork, | ||
153 | rwork, | ||
154 | &res); | ||
155 | CHECK(res,res); | ||
156 | free(work); | ||
157 | free(rwork); | ||
158 | free(B); | ||
159 | OK | ||
160 | } | ||
161 | |||
162 | |||
163 | |||
164 | //////////////////// general complex eigensystem //////////// | ||
165 | |||
166 | int eig_l_C(KCMAT(a),CMAT(u), CVEC(s),CMAT(v)) { | ||
167 | integer n = ar; | ||
168 | REQUIRES(n>=2 && ac==n && (ur==1 || (ur==n && uc==n)) && sn==n && (vr==1 || (vr==n && vc==n)),BAD_SIZE); | ||
169 | DEBUGMSG("eig_l_C"); | ||
170 | double *B = (double*)malloc(2*n*n*sizeof(double)); | ||
171 | CHECK(!B,MEM); | ||
172 | memcpy(B,ap,n*n*2*sizeof(double)); | ||
173 | |||
174 | double *rwork = (double*) malloc(2*n*sizeof(double)); | ||
175 | CHECK(!rwork,MEM); | ||
176 | integer lwork = -1; | ||
177 | char jobvl = ur==1?'N':'V'; | ||
178 | char jobvr = vr==1?'N':'V'; | ||
179 | integer res; | ||
180 | // ask for optimal lwork | ||
181 | doublecomplex ans; | ||
182 | //printf("ask zgeev\n"); | ||
183 | zgeev_ (&jobvl,&jobvr, | ||
184 | &n,(doublecomplex*)B,&n, | ||
185 | (doublecomplex*)sp, | ||
186 | (doublecomplex*)up,&n, | ||
187 | (doublecomplex*)vp,&n, | ||
188 | &ans, &lwork, | ||
189 | rwork, | ||
190 | &res); | ||
191 | lwork = ceil(ans.r); | ||
192 | //printf("ans = %d\n",lwork); | ||
193 | doublecomplex * work = (doublecomplex*)malloc(lwork*2*sizeof(double)); | ||
194 | CHECK(!work,MEM); | ||
195 | //printf("zgeev\n"); | ||
196 | zgeev_ (&jobvl,&jobvr, | ||
197 | &n,(doublecomplex*)B,&n, | ||
198 | (doublecomplex*)sp, | ||
199 | (doublecomplex*)up,&n, | ||
200 | (doublecomplex*)vp,&n, | ||
201 | work, &lwork, | ||
202 | rwork, | ||
203 | &res); | ||
204 | CHECK(res,res); | ||
205 | free(work); | ||
206 | free(rwork); | ||
207 | free(B); | ||
208 | OK | ||
209 | } | ||
210 | |||
211 | |||
212 | |||
213 | //////////////////// general real eigensystem //////////// | ||
214 | |||
215 | int eig_l_R(KDMAT(a),DMAT(u), CVEC(s),DMAT(v)) { | ||
216 | integer n = ar; | ||
217 | REQUIRES(n>=2 && ac == n && (ur==1 || (ur==n && uc==n)) && sn==n && (vr==1 || (vr==n && vc==n)),BAD_SIZE); | ||
218 | DEBUGMSG("eig_l_R"); | ||
219 | double *B = (double*)malloc(n*n*sizeof(double)); | ||
220 | CHECK(!B,MEM); | ||
221 | memcpy(B,ap,n*n*sizeof(double)); | ||
222 | integer lwork = -1; | ||
223 | char jobvl = ur==1?'N':'V'; | ||
224 | char jobvr = vr==1?'N':'V'; | ||
225 | integer res; | ||
226 | // ask for optimal lwork | ||
227 | double ans; | ||
228 | //printf("ask dgeev\n"); | ||
229 | dgeev_ (&jobvl,&jobvr, | ||
230 | &n,B,&n, | ||
231 | sp, sp+n, | ||
232 | up,&n, | ||
233 | vp,&n, | ||
234 | &ans, &lwork, | ||
235 | &res); | ||
236 | lwork = ceil(ans); | ||
237 | //printf("ans = %d\n",lwork); | ||
238 | double * work = (double*)malloc(lwork*sizeof(double)); | ||
239 | CHECK(!work,MEM); | ||
240 | //printf("dgeev\n"); | ||
241 | dgeev_ (&jobvl,&jobvr, | ||
242 | &n,B,&n, | ||
243 | sp, sp+n, | ||
244 | up,&n, | ||
245 | vp,&n, | ||
246 | work, &lwork, | ||
247 | &res); | ||
248 | CHECK(res,res); | ||
249 | free(work); | ||
250 | free(B); | ||
251 | OK | ||
252 | } | ||
253 | |||
254 | |||
255 | //////////////////// symmetric real eigensystem //////////// | ||
256 | |||
257 | |||
258 | int eig_l_S(KDMAT(a),DVEC(s),DMAT(v)) { | ||
259 | integer n = ar; | ||
260 | REQUIRES(n>=2 && ac == n && sn==n && (vr==1 || (vr==n && vc==n)),BAD_SIZE); | ||
261 | DEBUGMSG("eig_l_S"); | ||
262 | memcpy(vp,ap,n*n*sizeof(double)); | ||
263 | integer lwork = -1; | ||
264 | char jobz = vr==1?'N':'V'; | ||
265 | char uplo = 'U'; | ||
266 | integer res; | ||
267 | // ask for optimal lwork | ||
268 | double ans; | ||
269 | //printf("ask dsyev\n"); | ||
270 | dsyev_ (&jobz,&uplo, | ||
271 | &n,vp,&n, | ||
272 | sp, | ||
273 | &ans, &lwork, | ||
274 | &res); | ||
275 | lwork = ceil(ans); | ||
276 | //printf("ans = %d\n",lwork); | ||
277 | double * work = (double*)malloc(lwork*sizeof(double)); | ||
278 | CHECK(!work,MEM); | ||
279 | dsyev_ (&jobz,&uplo, | ||
280 | &n,vp,&n, | ||
281 | sp, | ||
282 | work, &lwork, | ||
283 | &res); | ||
284 | CHECK(res,res); | ||
285 | free(work); | ||
286 | OK | ||
287 | } | ||
288 | |||
289 | //////////////////// hermitian complex eigensystem //////////// | ||
290 | |||
291 | int eig_l_H(KCMAT(a),DVEC(s),CMAT(v)) { | ||
292 | integer n = ar; | ||
293 | REQUIRES(n>=2 && ac==n && sn==n && (vr==1 || (vr==n && vc==n)),BAD_SIZE); | ||
294 | DEBUGMSG("eig_l_H"); | ||
295 | memcpy(vp,ap,2*n*n*sizeof(double)); | ||
296 | double *rwork = (double*) malloc((3*n-2)*sizeof(double)); | ||
297 | CHECK(!rwork,MEM); | ||
298 | integer lwork = -1; | ||
299 | char jobz = vr==1?'N':'V'; | ||
300 | char uplo = 'U'; | ||
301 | integer res; | ||
302 | // ask for optimal lwork | ||
303 | doublecomplex ans; | ||
304 | //printf("ask zheev\n"); | ||
305 | zheev_ (&jobz,&uplo, | ||
306 | &n,(doublecomplex*)vp,&n, | ||
307 | sp, | ||
308 | &ans, &lwork, | ||
309 | rwork, | ||
310 | &res); | ||
311 | lwork = ceil(ans.r); | ||
312 | //printf("ans = %d\n",lwork); | ||
313 | doublecomplex * work = (doublecomplex*)malloc(lwork*2*sizeof(double)); | ||
314 | CHECK(!work,MEM); | ||
315 | zheev_ (&jobz,&uplo, | ||
316 | &n,(doublecomplex*)vp,&n, | ||
317 | sp, | ||
318 | work, &lwork, | ||
319 | rwork, | ||
320 | &res); | ||
321 | CHECK(res,res); | ||
322 | free(work); | ||
323 | free(rwork); | ||
324 | OK | ||
325 | } | ||
326 | |||
327 | //////////////////// general real linear system //////////// | ||
328 | |||
329 | int linearSolveR_l(KDMAT(a),KDMAT(b),DMAT(x)) { | ||
330 | integer n = ar; | ||
331 | integer nhrs = bc; | ||
332 | REQUIRES(n>=1 && ar==ac && ar==br,BAD_SIZE); | ||
333 | DEBUGMSG("linearSolveR_l"); | ||
334 | double*AC = (double*)malloc(n*n*sizeof(double)); | ||
335 | memcpy(AC,ap,n*n*sizeof(double)); | ||
336 | memcpy(xp,bp,n*nhrs*sizeof(double)); | ||
337 | integer * ipiv = (integer*)malloc(n*sizeof(integer)); | ||
338 | integer res; | ||
339 | dgesv_ (&n,&nhrs, | ||
340 | AC, &n, | ||
341 | ipiv, | ||
342 | xp, &n, | ||
343 | &res); | ||
344 | if(res>0) { | ||
345 | return SINGULAR; | ||
346 | } | ||
347 | CHECK(res,res); | ||
348 | free(ipiv); | ||
349 | free(AC); | ||
350 | OK | ||
351 | } | ||
352 | |||
353 | //////////////////// general complex linear system //////////// | ||
354 | |||
355 | int linearSolveC_l(KCMAT(a),KCMAT(b),CMAT(x)) { | ||
356 | integer n = ar; | ||
357 | integer nhrs = bc; | ||
358 | REQUIRES(n>=1 && ar==ac && ar==br,BAD_SIZE); | ||
359 | DEBUGMSG("linearSolveC_l"); | ||
360 | double*AC = (double*)malloc(2*n*n*sizeof(double)); | ||
361 | memcpy(AC,ap,2*n*n*sizeof(double)); | ||
362 | memcpy(xp,bp,2*n*nhrs*sizeof(double)); | ||
363 | integer * ipiv = (integer*)malloc(n*sizeof(integer)); | ||
364 | integer res; | ||
365 | zgesv_ (&n,&nhrs, | ||
366 | (doublecomplex*)AC, &n, | ||
367 | ipiv, | ||
368 | (doublecomplex*)xp, &n, | ||
369 | &res); | ||
370 | if(res>0) { | ||
371 | return SINGULAR; | ||
372 | } | ||
373 | CHECK(res,res); | ||
374 | free(ipiv); | ||
375 | free(AC); | ||
376 | OK | ||
377 | } | ||
378 | |||
379 | //////////////////// least squares real linear system //////////// | ||
380 | |||
381 | int linearSolveLSR_l(KDMAT(a),KDMAT(b),DMAT(x)) { | ||
382 | integer m = ar; | ||
383 | integer n = ac; | ||
384 | integer nrhs = bc; | ||
385 | integer ldb = xr; | ||
386 | REQUIRES(m>=1 && n>=1 && ar==br && xr==MAX(m,n) && xc == bc, BAD_SIZE); | ||
387 | DEBUGMSG("linearSolveLSR_l"); | ||
388 | double*AC = (double*)malloc(m*n*sizeof(double)); | ||
389 | memcpy(AC,ap,m*n*sizeof(double)); | ||
390 | if (m>=n) { | ||
391 | memcpy(xp,bp,m*nrhs*sizeof(double)); | ||
392 | } else { | ||
393 | int k; | ||
394 | for(k = 0; k<nrhs; k++) { | ||
395 | memcpy(xp+ldb*k,bp+m*k,m*sizeof(double)); | ||
396 | } | ||
397 | } | ||
398 | integer res; | ||
399 | integer lwork = -1; | ||
400 | double ans; | ||
401 | dgels_ ("N",&m,&n,&nrhs, | ||
402 | AC,&m, | ||
403 | xp,&ldb, | ||
404 | &ans,&lwork, | ||
405 | &res); | ||
406 | lwork = ceil(ans); | ||
407 | //printf("ans = %d\n",lwork); | ||
408 | double * work = (double*)malloc(lwork*sizeof(double)); | ||
409 | dgels_ ("N",&m,&n,&nrhs, | ||
410 | AC,&m, | ||
411 | xp,&ldb, | ||
412 | work,&lwork, | ||
413 | &res); | ||
414 | if(res>0) { | ||
415 | return SINGULAR; | ||
416 | } | ||
417 | CHECK(res,res); | ||
418 | free(work); | ||
419 | free(AC); | ||
420 | OK | ||
421 | } | ||
422 | |||
423 | //////////////////// least squares complex linear system //////////// | ||
424 | |||
425 | int linearSolveLSC_l(KCMAT(a),KCMAT(b),CMAT(x)) { | ||
426 | integer m = ar; | ||
427 | integer n = ac; | ||
428 | integer nrhs = bc; | ||
429 | integer ldb = xr; | ||
430 | REQUIRES(m>=1 && n>=1 && ar==br && xr==MAX(m,n) && xc == bc, BAD_SIZE); | ||
431 | DEBUGMSG("linearSolveLSC_l"); | ||
432 | double*AC = (double*)malloc(2*m*n*sizeof(double)); | ||
433 | memcpy(AC,ap,2*m*n*sizeof(double)); | ||
434 | memcpy(AC,ap,2*m*n*sizeof(double)); | ||
435 | if (m>=n) { | ||
436 | memcpy(xp,bp,2*m*nrhs*sizeof(double)); | ||
437 | } else { | ||
438 | int k; | ||
439 | for(k = 0; k<nrhs; k++) { | ||
440 | memcpy(xp+2*ldb*k,bp+2*m*k,m*2*sizeof(double)); | ||
441 | } | ||
442 | } | ||
443 | integer res; | ||
444 | integer lwork = -1; | ||
445 | doublecomplex ans; | ||
446 | zgels_ ("N",&m,&n,&nrhs, | ||
447 | (doublecomplex*)AC,&m, | ||
448 | (doublecomplex*)xp,&ldb, | ||
449 | &ans,&lwork, | ||
450 | &res); | ||
451 | lwork = ceil(ans.r); | ||
452 | //printf("ans = %d\n",lwork); | ||
453 | doublecomplex * work = (doublecomplex*)malloc(lwork*sizeof(doublecomplex)); | ||
454 | zgels_ ("N",&m,&n,&nrhs, | ||
455 | (doublecomplex*)AC,&m, | ||
456 | (doublecomplex*)xp,&ldb, | ||
457 | work,&lwork, | ||
458 | &res); | ||
459 | if(res>0) { | ||
460 | return SINGULAR; | ||
461 | } | ||
462 | CHECK(res,res); | ||
463 | free(work); | ||
464 | free(AC); | ||
465 | OK | ||
466 | } | ||
467 | |||
468 | //////////////////// least squares real linear system using SVD //////////// | ||
469 | |||
470 | int linearSolveSVDR_l(double rcond,KDMAT(a),KDMAT(b),DMAT(x)) { | ||
471 | integer m = ar; | ||
472 | integer n = ac; | ||
473 | integer nrhs = bc; | ||
474 | integer ldb = xr; | ||
475 | REQUIRES(m>=1 && n>=1 && ar==br && xr==MAX(m,n) && xc == bc, BAD_SIZE); | ||
476 | DEBUGMSG("linearSolveSVDR_l"); | ||
477 | double*AC = (double*)malloc(m*n*sizeof(double)); | ||
478 | double*S = (double*)malloc(MIN(m,n)*sizeof(double)); | ||
479 | memcpy(AC,ap,m*n*sizeof(double)); | ||
480 | if (m>=n) { | ||
481 | memcpy(xp,bp,m*nrhs*sizeof(double)); | ||
482 | } else { | ||
483 | int k; | ||
484 | for(k = 0; k<nrhs; k++) { | ||
485 | memcpy(xp+ldb*k,bp+m*k,m*sizeof(double)); | ||
486 | } | ||
487 | } | ||
488 | integer res; | ||
489 | integer lwork = -1; | ||
490 | integer rank; | ||
491 | double ans; | ||
492 | dgelss_ (&m,&n,&nrhs, | ||
493 | AC,&m, | ||
494 | xp,&ldb, | ||
495 | S, | ||
496 | &rcond,&rank, | ||
497 | &ans,&lwork, | ||
498 | &res); | ||
499 | lwork = ceil(ans); | ||
500 | //printf("ans = %d\n",lwork); | ||
501 | double * work = (double*)malloc(lwork*sizeof(double)); | ||
502 | dgelss_ (&m,&n,&nrhs, | ||
503 | AC,&m, | ||
504 | xp,&ldb, | ||
505 | S, | ||
506 | &rcond,&rank, | ||
507 | work,&lwork, | ||
508 | &res); | ||
509 | if(res>0) { | ||
510 | return NOCONVER; | ||
511 | } | ||
512 | CHECK(res,res); | ||
513 | free(work); | ||
514 | free(S); | ||
515 | free(AC); | ||
516 | OK | ||
517 | } | ||
518 | |||
519 | //////////////////// least squares complex linear system using SVD //////////// | ||
520 | |||
521 | // not in clapack.h | ||
522 | |||
523 | int zgelss_(integer *m, integer *n, integer *nhrs, | ||
524 | doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, doublereal *s, | ||
525 | doublereal *rcond, integer* rank, | ||
526 | doublecomplex *work, integer* lwork, doublereal* rwork, | ||
527 | integer *info); | ||
528 | |||
529 | int linearSolveSVDC_l(double rcond, KCMAT(a),KCMAT(b),CMAT(x)) { | ||
530 | integer m = ar; | ||
531 | integer n = ac; | ||
532 | integer nrhs = bc; | ||
533 | integer ldb = xr; | ||
534 | REQUIRES(m>=1 && n>=1 && ar==br && xr==MAX(m,n) && xc == bc, BAD_SIZE); | ||
535 | DEBUGMSG("linearSolveSVDC_l"); | ||
536 | double*AC = (double*)malloc(2*m*n*sizeof(double)); | ||
537 | double*S = (double*)malloc(MIN(m,n)*sizeof(double)); | ||
538 | double*RWORK = (double*)malloc(5*MIN(m,n)*sizeof(double)); | ||
539 | memcpy(AC,ap,2*m*n*sizeof(double)); | ||
540 | if (m>=n) { | ||
541 | memcpy(xp,bp,2*m*nrhs*sizeof(double)); | ||
542 | } else { | ||
543 | int k; | ||
544 | for(k = 0; k<nrhs; k++) { | ||
545 | memcpy(xp+2*ldb*k,bp+2*m*k,m*2*sizeof(double)); | ||
546 | } | ||
547 | } | ||
548 | integer res; | ||
549 | integer lwork = -1; | ||
550 | integer rank; | ||
551 | doublecomplex ans; | ||
552 | zgelss_ (&m,&n,&nrhs, | ||
553 | (doublecomplex*)AC,&m, | ||
554 | (doublecomplex*)xp,&ldb, | ||
555 | S, | ||
556 | &rcond,&rank, | ||
557 | &ans,&lwork, | ||
558 | RWORK, | ||
559 | &res); | ||
560 | lwork = ceil(ans.r); | ||
561 | //printf("ans = %d\n",lwork); | ||
562 | doublecomplex * work = (doublecomplex*)malloc(lwork*sizeof(doublecomplex)); | ||
563 | zgelss_ (&m,&n,&nrhs, | ||
564 | (doublecomplex*)AC,&m, | ||
565 | (doublecomplex*)xp,&ldb, | ||
566 | S, | ||
567 | &rcond,&rank, | ||
568 | work,&lwork, | ||
569 | RWORK, | ||
570 | &res); | ||
571 | if(res>0) { | ||
572 | return NOCONVER; | ||
573 | } | ||
574 | CHECK(res,res); | ||
575 | free(work); | ||
576 | free(RWORK); | ||
577 | free(S); | ||
578 | free(AC); | ||
579 | OK | ||
580 | } | ||
581 | |||
582 | //////////////////// Cholesky factorization ///////////////////////// | ||
583 | |||
584 | int chol_l_H(KCMAT(a),CMAT(l)) { | ||
585 | integer n = ar; | ||
586 | REQUIRES(n>=1 && ac == n && lr==n && lc==n,BAD_SIZE); | ||
587 | DEBUGMSG("chol_l_H"); | ||
588 | memcpy(lp,ap,n*n*sizeof(doublecomplex)); | ||
589 | char uplo = 'U'; | ||
590 | integer res; | ||
591 | zpotrf_ (&uplo,&n,(doublecomplex*)lp,&n,&res); | ||
592 | CHECK(res>0,NODEFPOS); | ||
593 | CHECK(res,res); | ||
594 | doublecomplex zero = {0.,0.}; | ||
595 | int r,c; | ||
596 | for (r=0; r<lr-1; r++) { | ||
597 | for(c=r+1; c<lc; c++) { | ||
598 | ((doublecomplex*)lp)[r*lc+c] = zero; | ||
599 | } | ||
600 | } | ||
601 | OK | ||
602 | } | ||
603 | |||
604 | int chol_l_S(KDMAT(a),DMAT(l)) { | ||
605 | integer n = ar; | ||
606 | REQUIRES(n>=1 && ac == n && lr==n && lc==n,BAD_SIZE); | ||
607 | DEBUGMSG("chol_l_S"); | ||
608 | memcpy(lp,ap,n*n*sizeof(double)); | ||
609 | char uplo = 'U'; | ||
610 | integer res; | ||
611 | dpotrf_ (&uplo,&n,lp,&n,&res); | ||
612 | CHECK(res>0,NODEFPOS); | ||
613 | CHECK(res,res); | ||
614 | int r,c; | ||
615 | for (r=0; r<lr-1; r++) { | ||
616 | for(c=r+1; c<lc; c++) { | ||
617 | lp[r*lc+c] = 0.; | ||
618 | } | ||
619 | } | ||
620 | OK | ||
621 | } | ||
622 | |||
623 | //////////////////// QR factorization ///////////////////////// | ||
624 | // TO DO: unpack | ||
625 | |||
626 | int qr_l_R(KDMAT(a), DVEC(tau), DMAT(r)) { | ||
627 | integer m = ar; | ||
628 | integer n = ac; | ||
629 | integer mn = MIN(m,n); | ||
630 | REQUIRES(m>=1 && n >=1 && rr== m && rc == n && taun == mn, BAD_SIZE); | ||
631 | DEBUGMSG("qr_l_R"); | ||
632 | double *WORK = (double*)malloc(m*sizeof(double)); | ||
633 | CHECK(!WORK,MEM); | ||
634 | memcpy(rp,ap,m*n*sizeof(double)); | ||
635 | integer res; | ||
636 | dgeqr2_ (&m,&n,rp,&m,taup,WORK,&res); | ||
637 | CHECK(res,res); | ||
638 | free(WORK); | ||
639 | OK | ||
640 | } | ||
641 | |||
642 | int qr_l_C(KCMAT(a), CVEC(tau), CMAT(r)) { | ||
643 | integer m = ar; | ||
644 | integer n = ac; | ||
645 | integer mn = MIN(m,n); | ||
646 | REQUIRES(m>=1 && n >=1 && rr== m && rc == n && taun == mn, BAD_SIZE); | ||
647 | DEBUGMSG("qr_l_C"); | ||
648 | doublecomplex *WORK = (doublecomplex*)malloc(m*sizeof(doublecomplex)); | ||
649 | CHECK(!WORK,MEM); | ||
650 | memcpy(rp,ap,m*n*sizeof(doublecomplex)); | ||
651 | integer res; | ||
652 | zgeqr2_ (&m,&n,(doublecomplex*)rp,&m,(doublecomplex*)taup,WORK,&res); | ||
653 | CHECK(res,res); | ||
654 | free(WORK); | ||
655 | OK | ||
656 | } | ||
diff --git a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.h b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.h new file mode 100644 index 0000000..ea71847 --- /dev/null +++ b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.h | |||
@@ -0,0 +1,46 @@ | |||
1 | #include "f2c.h" | ||
2 | #include "clapack.h" | ||
3 | |||
4 | #define DVEC(A) int A##n, double*A##p | ||
5 | #define CVEC(A) int A##n, double*A##p | ||
6 | #define DMAT(A) int A##r, int A##c, double* A##p | ||
7 | #define CMAT(A) int A##r, int A##c, double* A##p | ||
8 | |||
9 | // const pointer versions for the parameters | ||
10 | #define KDVEC(A) int A##n, const double*A##p | ||
11 | #define KCVEC(A) int A##n, const double*A##p | ||
12 | #define KDMAT(A) int A##r, int A##c, const double* A##p | ||
13 | #define KCMAT(A) int A##r, int A##c, const double* A##p | ||
14 | |||
15 | int svd_l_R(KDMAT(x),DMAT(u),DVEC(s),DMAT(v)); | ||
16 | int svd_l_Rdd(KDMAT(x),DMAT(u),DVEC(s),DMAT(v)); | ||
17 | |||
18 | int svd_l_C(KCMAT(a),CMAT(u),DVEC(s),CMAT(v)); | ||
19 | |||
20 | int eig_l_C(KCMAT(a),CMAT(u),CVEC(s),CMAT(v)); | ||
21 | |||
22 | int eig_l_R(KDMAT(a),DMAT(u),CVEC(s),DMAT(v)); | ||
23 | |||
24 | int eig_l_S(KDMAT(a),DVEC(s),DMAT(v)); | ||
25 | |||
26 | int eig_l_H(KCMAT(a),DVEC(s),CMAT(v)); | ||
27 | |||
28 | int linearSolveR_l(KDMAT(a),KDMAT(b),DMAT(x)); | ||
29 | |||
30 | int linearSolveC_l(KCMAT(a),KCMAT(b),CMAT(x)); | ||
31 | |||
32 | int linearSolveLSR_l(KDMAT(a),KDMAT(b),DMAT(x)); | ||
33 | |||
34 | int linearSolveLSC_l(KCMAT(a),KCMAT(b),CMAT(x)); | ||
35 | |||
36 | int linearSolveSVDR_l(double,KDMAT(a),KDMAT(b),DMAT(x)); | ||
37 | |||
38 | int linearSolveSVDC_l(double,KCMAT(a),KCMAT(b),CMAT(x)); | ||
39 | |||
40 | int chol_l_H(KCMAT(a),CMAT(r)); | ||
41 | |||
42 | int chol_l_S(KDMAT(a),DMAT(r)); | ||
43 | |||
44 | int qr_l_R(KDMAT(a), DVEC(tau), DMAT(r)); | ||
45 | |||
46 | int qr_l_C(KCMAT(a), CVEC(tau), CMAT(r)); | ||
diff --git a/lib/Numeric/LinearAlgebra/Linear.hs b/lib/Numeric/LinearAlgebra/Linear.hs new file mode 100644 index 0000000..a3a0183 --- /dev/null +++ b/lib/Numeric/LinearAlgebra/Linear.hs | |||
@@ -0,0 +1,102 @@ | |||
1 | {-# OPTIONS_GHC -fglasgow-exts #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | {- | | ||
4 | Module : Numeric.LinearAlgebra.Linear | ||
5 | Copyright : (c) Alberto Ruiz 2006-7 | ||
6 | License : GPL-style | ||
7 | |||
8 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
9 | Stability : provisional | ||
10 | Portability : uses ffi | ||
11 | |||
12 | Basic optimized operations on vectors and matrices. | ||
13 | |||
14 | -} | ||
15 | ----------------------------------------------------------------------------- | ||
16 | |||
17 | module Numeric.LinearAlgebra.Linear ( | ||
18 | Linear(..), | ||
19 | multiply, dot, outer | ||
20 | ) where | ||
21 | |||
22 | |||
23 | import Data.Packed.Internal | ||
24 | import Data.Packed | ||
25 | import Numeric.GSL.Vector | ||
26 | import Complex | ||
27 | |||
28 | -- | basic optimized operations | ||
29 | class (Container c e) => Linear c e where | ||
30 | scale :: e -> c e -> c e | ||
31 | addConstant :: e -> c e -> c e | ||
32 | add :: c e -> c e -> c e | ||
33 | sub :: c e -> c e -> c e | ||
34 | -- | element by element multiplication | ||
35 | mul :: c e -> c e -> c e | ||
36 | -- | element by element division | ||
37 | divide :: c e -> c e -> c e | ||
38 | -- | scale the element by element reciprocal of the object: @scaleRecip 2 (fromList [5,i]) == 2 |> [0.4 :+ 0.0,0.0 :+ (-2.0)]@ | ||
39 | scaleRecip :: e -> c e -> c e | ||
40 | equal :: c e -> c e -> Bool | ||
41 | -- numequal :: Double -> c e -> c e -> Bool | ||
42 | |||
43 | instance Linear Vector Double where | ||
44 | scale = vectorMapValR Scale | ||
45 | scaleRecip = vectorMapValR Recip | ||
46 | addConstant = vectorMapValR AddConstant | ||
47 | add = vectorZipR Add | ||
48 | sub = vectorZipR Sub | ||
49 | mul = vectorZipR Mul | ||
50 | divide = vectorZipR Div | ||
51 | equal u v = dim u == dim v && vectorMax (vectorMapR Abs (sub u v)) == 0.0 | ||
52 | |||
53 | instance Linear Vector (Complex Double) where | ||
54 | scale = vectorMapValC Scale | ||
55 | scaleRecip = vectorMapValC Recip | ||
56 | addConstant = vectorMapValC AddConstant | ||
57 | add = vectorZipC Add | ||
58 | sub = vectorZipC Sub | ||
59 | mul = vectorZipC Mul | ||
60 | divide = vectorZipC Div | ||
61 | equal u v = dim u == dim v && vectorMax (liftVector magnitude (sub u v)) == 0.0 | ||
62 | |||
63 | instance Linear Matrix Double where | ||
64 | scale x = liftMatrix (scale x) | ||
65 | scaleRecip x = liftMatrix (scaleRecip x) | ||
66 | addConstant x = liftMatrix (addConstant x) | ||
67 | add = liftMatrix2 add | ||
68 | sub = liftMatrix2 sub | ||
69 | mul = liftMatrix2 mul | ||
70 | divide = liftMatrix2 divide | ||
71 | equal a b = cols a == cols b && cdat a `equal` cdat b | ||
72 | |||
73 | |||
74 | instance Linear Matrix (Complex Double) where | ||
75 | scale x = liftMatrix (scale x) | ||
76 | scaleRecip x = liftMatrix (scaleRecip x) | ||
77 | addConstant x = liftMatrix (addConstant x) | ||
78 | add = liftMatrix2 add | ||
79 | sub = liftMatrix2 sub | ||
80 | mul = liftMatrix2 mul | ||
81 | divide = liftMatrix2 divide | ||
82 | equal a b = cols a == cols b && cdat a `equal` cdat b | ||
83 | |||
84 | -------------------------------------------------- | ||
85 | |||
86 | -- | euclidean inner product | ||
87 | dot :: (Field t) => Vector t -> Vector t -> t | ||
88 | dot u v = dat (multiply r c) `at` 0 | ||
89 | where r = asRow u | ||
90 | c = asColumn v | ||
91 | |||
92 | |||
93 | {- | Outer product of two vectors. | ||
94 | |||
95 | @\> 'fromList' [1,2,3] \`outer\` 'fromList' [5,2,3] | ||
96 | (3><3) | ||
97 | [ 5.0, 2.0, 3.0 | ||
98 | , 10.0, 4.0, 6.0 | ||
99 | , 15.0, 6.0, 9.0 ]@ | ||
100 | -} | ||
101 | outer :: (Field t) => Vector t -> Vector t -> Matrix t | ||
102 | outer u v = asColumn u `multiply` asRow v | ||