From c99b8fd6e3f8a2fb365ec12baf838f864b118ece Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Mon, 1 Oct 2007 15:04:16 +0000 Subject: LinearAlgebra and GSL moved to Numeric --- lib/Data/Packed/Vector.hs | 2 +- lib/GSL.hs | 38 - lib/GSL/Differentiation.hs | 79 - lib/GSL/Fourier.hs | 46 - lib/GSL/Integration.hs | 90 - lib/GSL/Matrix.hs | 301 -- lib/GSL/Minimization.hs | 213 -- lib/GSL/Polynomials.hs | 54 - lib/GSL/Special.hs | 74 - lib/GSL/Special/Airy.hs | 166 - lib/GSL/Special/Bessel.hs | 809 ---- lib/GSL/Special/Clausen.hs | 37 - lib/GSL/Special/Coulomb.hs | 103 - lib/GSL/Special/Coupling.hs | 81 - lib/GSL/Special/Dawson.hs | 37 - lib/GSL/Special/Debye.hs | 85 - lib/GSL/Special/Dilog.hs | 58 - lib/GSL/Special/Elementary.hs | 45 - lib/GSL/Special/Ellint.hs | 181 - lib/GSL/Special/Erf.hs | 117 - lib/GSL/Special/Exp.hs | 129 - lib/GSL/Special/Expint.hs | 213 -- lib/GSL/Special/Fermi_dirac.hs | 165 - lib/GSL/Special/Gamma.hs | 362 -- lib/GSL/Special/Gegenbauer.hs | 92 - lib/GSL/Special/Hyperg.hs | 197 - lib/GSL/Special/Internal.hs | 68 - lib/GSL/Special/Laguerre.hs | 85 - lib/GSL/Special/Lambert.hs | 53 - lib/GSL/Special/Legendre.hs | 278 -- lib/GSL/Special/Log.hs | 74 - lib/GSL/Special/Pow_int.hs | 37 - lib/GSL/Special/Psi.hs | 117 - lib/GSL/Special/Synchrotron.hs | 53 - lib/GSL/Special/Trig.hs | 164 - lib/GSL/Special/Zeta.hs | 133 - lib/GSL/Special/airy.h | 24 - lib/GSL/Special/auto.hs | 233 -- lib/GSL/Special/autoall.sh | 41 - lib/GSL/Special/bessel.h | 100 - lib/GSL/Special/clausen.h | 2 - lib/GSL/Special/coulomb.h | 11 - lib/GSL/Special/coupling.h | 10 - lib/GSL/Special/dawson.h | 2 - lib/GSL/Special/debye.h | 8 - lib/GSL/Special/dilog.h | 5 - lib/GSL/Special/elementary.h | 3 - lib/GSL/Special/ellint.h | 20 - lib/GSL/Special/erf.h | 12 - lib/GSL/Special/exp.h | 18 - lib/GSL/Special/expint.h | 24 - lib/GSL/Special/fermi_dirac.h | 18 - lib/GSL/Special/gamma.h | 43 - lib/GSL/Special/gegenbauer.h | 9 - lib/GSL/Special/gsl_sf_exp.h | 146 - lib/GSL/Special/gsl_sf_log.h | 90 - lib/GSL/Special/hyperg.h | 22 - lib/GSL/Special/laguerre.h | 8 - lib/GSL/Special/lambert.h | 4 - lib/GSL/Special/legendre.h | 44 - lib/GSL/Special/log.h | 9 - lib/GSL/Special/pow_int.h | 2 - lib/GSL/Special/psi.h | 12 - lib/GSL/Special/synchrotron.h | 4 - lib/GSL/Special/trig.h | 25 - lib/GSL/Special/zeta.h | 14 - lib/GSL/Vector.hs | 144 - lib/GSL/gsl-aux.c | 743 ---- lib/GSL/gsl-aux.h | 62 - lib/Graphics/Plot.hs | 8 +- lib/LinearAlgebra.hs | 27 - lib/LinearAlgebra/Algorithms.hs | 259 -- lib/LinearAlgebra/Instances.hs | 140 - lib/LinearAlgebra/Interface.hs | 106 - lib/LinearAlgebra/LAPACK.hs | 335 -- lib/LinearAlgebra/LAPACK/clapack.h | 5079 ------------------------- lib/LinearAlgebra/LAPACK/f2c.h | 223 -- lib/LinearAlgebra/LAPACK/lapack-aux.c | 656 ---- lib/LinearAlgebra/LAPACK/lapack-aux.h | 46 - lib/LinearAlgebra/Linear.hs | 102 - lib/Numeric/GSL.hs | 38 + lib/Numeric/GSL/Differentiation.hs | 79 + lib/Numeric/GSL/Fourier.hs | 46 + lib/Numeric/GSL/Integration.hs | 90 + lib/Numeric/GSL/Matrix.hs | 302 ++ lib/Numeric/GSL/Minimization.hs | 213 ++ lib/Numeric/GSL/Polynomials.hs | 54 + lib/Numeric/GSL/Special.hs | 74 + lib/Numeric/GSL/Special/Airy.hs | 166 + lib/Numeric/GSL/Special/Bessel.hs | 809 ++++ lib/Numeric/GSL/Special/Clausen.hs | 37 + lib/Numeric/GSL/Special/Coulomb.hs | 103 + lib/Numeric/GSL/Special/Coupling.hs | 81 + lib/Numeric/GSL/Special/Dawson.hs | 37 + lib/Numeric/GSL/Special/Debye.hs | 85 + lib/Numeric/GSL/Special/Dilog.hs | 58 + lib/Numeric/GSL/Special/Elementary.hs | 45 + lib/Numeric/GSL/Special/Ellint.hs | 181 + lib/Numeric/GSL/Special/Erf.hs | 117 + lib/Numeric/GSL/Special/Exp.hs | 129 + lib/Numeric/GSL/Special/Expint.hs | 213 ++ lib/Numeric/GSL/Special/Fermi_dirac.hs | 165 + lib/Numeric/GSL/Special/Gamma.hs | 362 ++ lib/Numeric/GSL/Special/Gegenbauer.hs | 92 + lib/Numeric/GSL/Special/Hyperg.hs | 197 + lib/Numeric/GSL/Special/Internal.hs | 68 + lib/Numeric/GSL/Special/Laguerre.hs | 85 + lib/Numeric/GSL/Special/Lambert.hs | 53 + lib/Numeric/GSL/Special/Legendre.hs | 278 ++ lib/Numeric/GSL/Special/Log.hs | 74 + lib/Numeric/GSL/Special/Pow_int.hs | 37 + lib/Numeric/GSL/Special/Psi.hs | 117 + lib/Numeric/GSL/Special/Synchrotron.hs | 53 + lib/Numeric/GSL/Special/Trig.hs | 164 + lib/Numeric/GSL/Special/Zeta.hs | 133 + lib/Numeric/GSL/Special/airy.h | 24 + lib/Numeric/GSL/Special/auto.hs | 233 ++ lib/Numeric/GSL/Special/autoall.sh | 41 + lib/Numeric/GSL/Special/bessel.h | 100 + lib/Numeric/GSL/Special/clausen.h | 2 + lib/Numeric/GSL/Special/coulomb.h | 11 + lib/Numeric/GSL/Special/coupling.h | 10 + lib/Numeric/GSL/Special/dawson.h | 2 + lib/Numeric/GSL/Special/debye.h | 8 + lib/Numeric/GSL/Special/dilog.h | 5 + lib/Numeric/GSL/Special/elementary.h | 3 + lib/Numeric/GSL/Special/ellint.h | 20 + lib/Numeric/GSL/Special/erf.h | 12 + lib/Numeric/GSL/Special/exp.h | 18 + lib/Numeric/GSL/Special/expint.h | 24 + lib/Numeric/GSL/Special/fermi_dirac.h | 18 + lib/Numeric/GSL/Special/gamma.h | 43 + lib/Numeric/GSL/Special/gegenbauer.h | 9 + lib/Numeric/GSL/Special/gsl_sf_exp.h | 146 + lib/Numeric/GSL/Special/gsl_sf_log.h | 90 + lib/Numeric/GSL/Special/hyperg.h | 22 + lib/Numeric/GSL/Special/laguerre.h | 8 + lib/Numeric/GSL/Special/lambert.h | 4 + lib/Numeric/GSL/Special/legendre.h | 44 + lib/Numeric/GSL/Special/log.h | 9 + lib/Numeric/GSL/Special/pow_int.h | 2 + lib/Numeric/GSL/Special/psi.h | 12 + lib/Numeric/GSL/Special/synchrotron.h | 4 + lib/Numeric/GSL/Special/trig.h | 25 + lib/Numeric/GSL/Special/zeta.h | 14 + lib/Numeric/GSL/Vector.hs | 145 + lib/Numeric/GSL/gsl-aux.c | 743 ++++ lib/Numeric/GSL/gsl-aux.h | 62 + lib/Numeric/LinearAlgebra.hs | 27 + lib/Numeric/LinearAlgebra/Algorithms.hs | 259 ++ lib/Numeric/LinearAlgebra/Instances.hs | 140 + lib/Numeric/LinearAlgebra/Interface.hs | 106 + lib/Numeric/LinearAlgebra/LAPACK.hs | 335 ++ lib/Numeric/LinearAlgebra/LAPACK/clapack.h | 5079 +++++++++++++++++++++++++ lib/Numeric/LinearAlgebra/LAPACK/f2c.h | 223 ++ lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c | 656 ++++ lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.h | 46 + lib/Numeric/LinearAlgebra/Linear.hs | 102 + 158 files changed, 13727 insertions(+), 13723 deletions(-) delete mode 100644 lib/GSL.hs delete mode 100644 lib/GSL/Differentiation.hs delete mode 100644 lib/GSL/Fourier.hs delete mode 100644 lib/GSL/Integration.hs delete mode 100644 lib/GSL/Matrix.hs delete mode 100644 lib/GSL/Minimization.hs delete mode 100644 lib/GSL/Polynomials.hs delete mode 100644 lib/GSL/Special.hs delete mode 100644 lib/GSL/Special/Airy.hs delete mode 100644 lib/GSL/Special/Bessel.hs delete mode 100644 lib/GSL/Special/Clausen.hs delete mode 100644 lib/GSL/Special/Coulomb.hs delete mode 100644 lib/GSL/Special/Coupling.hs delete mode 100644 lib/GSL/Special/Dawson.hs delete mode 100644 lib/GSL/Special/Debye.hs delete mode 100644 lib/GSL/Special/Dilog.hs delete mode 100644 lib/GSL/Special/Elementary.hs delete mode 100644 lib/GSL/Special/Ellint.hs delete mode 100644 lib/GSL/Special/Erf.hs delete mode 100644 lib/GSL/Special/Exp.hs delete mode 100644 lib/GSL/Special/Expint.hs delete mode 100644 lib/GSL/Special/Fermi_dirac.hs delete mode 100644 lib/GSL/Special/Gamma.hs delete mode 100644 lib/GSL/Special/Gegenbauer.hs delete mode 100644 lib/GSL/Special/Hyperg.hs delete mode 100644 lib/GSL/Special/Internal.hs delete mode 100644 lib/GSL/Special/Laguerre.hs delete mode 100644 lib/GSL/Special/Lambert.hs delete mode 100644 lib/GSL/Special/Legendre.hs delete mode 100644 lib/GSL/Special/Log.hs delete mode 100644 lib/GSL/Special/Pow_int.hs delete mode 100644 lib/GSL/Special/Psi.hs delete mode 100644 lib/GSL/Special/Synchrotron.hs delete mode 100644 lib/GSL/Special/Trig.hs delete mode 100644 lib/GSL/Special/Zeta.hs delete mode 100644 lib/GSL/Special/airy.h delete mode 100644 lib/GSL/Special/auto.hs delete mode 100644 lib/GSL/Special/autoall.sh delete mode 100644 lib/GSL/Special/bessel.h delete mode 100644 lib/GSL/Special/clausen.h delete mode 100644 lib/GSL/Special/coulomb.h delete mode 100644 lib/GSL/Special/coupling.h delete mode 100644 lib/GSL/Special/dawson.h delete mode 100644 lib/GSL/Special/debye.h delete mode 100644 lib/GSL/Special/dilog.h delete mode 100644 lib/GSL/Special/elementary.h delete mode 100644 lib/GSL/Special/ellint.h delete mode 100644 lib/GSL/Special/erf.h delete mode 100644 lib/GSL/Special/exp.h delete mode 100644 lib/GSL/Special/expint.h delete mode 100644 lib/GSL/Special/fermi_dirac.h delete mode 100644 lib/GSL/Special/gamma.h delete mode 100644 lib/GSL/Special/gegenbauer.h delete mode 100644 lib/GSL/Special/gsl_sf_exp.h delete mode 100644 lib/GSL/Special/gsl_sf_log.h delete mode 100644 lib/GSL/Special/hyperg.h delete mode 100644 lib/GSL/Special/laguerre.h delete mode 100644 lib/GSL/Special/lambert.h delete mode 100644 lib/GSL/Special/legendre.h delete mode 100644 lib/GSL/Special/log.h delete mode 100644 lib/GSL/Special/pow_int.h delete mode 100644 lib/GSL/Special/psi.h delete mode 100644 lib/GSL/Special/synchrotron.h delete mode 100644 lib/GSL/Special/trig.h delete mode 100644 lib/GSL/Special/zeta.h delete mode 100644 lib/GSL/Vector.hs delete mode 100644 lib/GSL/gsl-aux.c delete mode 100644 lib/GSL/gsl-aux.h delete mode 100644 lib/LinearAlgebra.hs delete mode 100644 lib/LinearAlgebra/Algorithms.hs delete mode 100644 lib/LinearAlgebra/Instances.hs delete mode 100644 lib/LinearAlgebra/Interface.hs delete mode 100644 lib/LinearAlgebra/LAPACK.hs delete mode 100644 lib/LinearAlgebra/LAPACK/clapack.h delete mode 100644 lib/LinearAlgebra/LAPACK/f2c.h delete mode 100644 lib/LinearAlgebra/LAPACK/lapack-aux.c delete mode 100644 lib/LinearAlgebra/LAPACK/lapack-aux.h delete mode 100644 lib/LinearAlgebra/Linear.hs create mode 100644 lib/Numeric/GSL.hs create mode 100644 lib/Numeric/GSL/Differentiation.hs create mode 100644 lib/Numeric/GSL/Fourier.hs create mode 100644 lib/Numeric/GSL/Integration.hs create mode 100644 lib/Numeric/GSL/Matrix.hs create mode 100644 lib/Numeric/GSL/Minimization.hs create mode 100644 lib/Numeric/GSL/Polynomials.hs create mode 100644 lib/Numeric/GSL/Special.hs create mode 100644 lib/Numeric/GSL/Special/Airy.hs create mode 100644 lib/Numeric/GSL/Special/Bessel.hs create mode 100644 lib/Numeric/GSL/Special/Clausen.hs create mode 100644 lib/Numeric/GSL/Special/Coulomb.hs create mode 100644 lib/Numeric/GSL/Special/Coupling.hs create mode 100644 lib/Numeric/GSL/Special/Dawson.hs create mode 100644 lib/Numeric/GSL/Special/Debye.hs create mode 100644 lib/Numeric/GSL/Special/Dilog.hs create mode 100644 lib/Numeric/GSL/Special/Elementary.hs create mode 100644 lib/Numeric/GSL/Special/Ellint.hs create mode 100644 lib/Numeric/GSL/Special/Erf.hs create mode 100644 lib/Numeric/GSL/Special/Exp.hs create mode 100644 lib/Numeric/GSL/Special/Expint.hs create mode 100644 lib/Numeric/GSL/Special/Fermi_dirac.hs create mode 100644 lib/Numeric/GSL/Special/Gamma.hs create mode 100644 lib/Numeric/GSL/Special/Gegenbauer.hs create mode 100644 lib/Numeric/GSL/Special/Hyperg.hs create mode 100644 lib/Numeric/GSL/Special/Internal.hs create mode 100644 lib/Numeric/GSL/Special/Laguerre.hs create mode 100644 lib/Numeric/GSL/Special/Lambert.hs create mode 100644 lib/Numeric/GSL/Special/Legendre.hs create mode 100644 lib/Numeric/GSL/Special/Log.hs create mode 100644 lib/Numeric/GSL/Special/Pow_int.hs create mode 100644 lib/Numeric/GSL/Special/Psi.hs create mode 100644 lib/Numeric/GSL/Special/Synchrotron.hs create mode 100644 lib/Numeric/GSL/Special/Trig.hs create mode 100644 lib/Numeric/GSL/Special/Zeta.hs create mode 100644 lib/Numeric/GSL/Special/airy.h create mode 100644 lib/Numeric/GSL/Special/auto.hs create mode 100644 lib/Numeric/GSL/Special/autoall.sh create mode 100644 lib/Numeric/GSL/Special/bessel.h create mode 100644 lib/Numeric/GSL/Special/clausen.h create mode 100644 lib/Numeric/GSL/Special/coulomb.h create mode 100644 lib/Numeric/GSL/Special/coupling.h create mode 100644 lib/Numeric/GSL/Special/dawson.h create mode 100644 lib/Numeric/GSL/Special/debye.h create mode 100644 lib/Numeric/GSL/Special/dilog.h create mode 100644 lib/Numeric/GSL/Special/elementary.h create mode 100644 lib/Numeric/GSL/Special/ellint.h create mode 100644 lib/Numeric/GSL/Special/erf.h create mode 100644 lib/Numeric/GSL/Special/exp.h create mode 100644 lib/Numeric/GSL/Special/expint.h create mode 100644 lib/Numeric/GSL/Special/fermi_dirac.h create mode 100644 lib/Numeric/GSL/Special/gamma.h create mode 100644 lib/Numeric/GSL/Special/gegenbauer.h create mode 100644 lib/Numeric/GSL/Special/gsl_sf_exp.h create mode 100644 lib/Numeric/GSL/Special/gsl_sf_log.h create mode 100644 lib/Numeric/GSL/Special/hyperg.h create mode 100644 lib/Numeric/GSL/Special/laguerre.h create mode 100644 lib/Numeric/GSL/Special/lambert.h create mode 100644 lib/Numeric/GSL/Special/legendre.h create mode 100644 lib/Numeric/GSL/Special/log.h create mode 100644 lib/Numeric/GSL/Special/pow_int.h create mode 100644 lib/Numeric/GSL/Special/psi.h create mode 100644 lib/Numeric/GSL/Special/synchrotron.h create mode 100644 lib/Numeric/GSL/Special/trig.h create mode 100644 lib/Numeric/GSL/Special/zeta.h create mode 100644 lib/Numeric/GSL/Vector.hs create mode 100644 lib/Numeric/GSL/gsl-aux.c create mode 100644 lib/Numeric/GSL/gsl-aux.h create mode 100644 lib/Numeric/LinearAlgebra.hs create mode 100644 lib/Numeric/LinearAlgebra/Algorithms.hs create mode 100644 lib/Numeric/LinearAlgebra/Instances.hs create mode 100644 lib/Numeric/LinearAlgebra/Interface.hs create mode 100644 lib/Numeric/LinearAlgebra/LAPACK.hs create mode 100644 lib/Numeric/LinearAlgebra/LAPACK/clapack.h create mode 100644 lib/Numeric/LinearAlgebra/LAPACK/f2c.h create mode 100644 lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c create mode 100644 lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.h create mode 100644 lib/Numeric/LinearAlgebra/Linear.hs (limited to 'lib') diff --git a/lib/Data/Packed/Vector.hs b/lib/Data/Packed/Vector.hs index 3fc625c..c893fe7 100644 --- a/lib/Data/Packed/Vector.hs +++ b/lib/Data/Packed/Vector.hs @@ -24,7 +24,7 @@ module Data.Packed.Vector ( import Data.Packed.Internal import Complex -import GSL.Vector +import Numeric.GSL.Vector {- | Creates a real vector containing a range of values: diff --git a/lib/GSL.hs b/lib/GSL.hs deleted file mode 100644 index f04cf26..0000000 --- a/lib/GSL.hs +++ /dev/null @@ -1,38 +0,0 @@ -{- | - -Module : GSL -Copyright : (c) Alberto Ruiz 2006-7 -License : GPL-style - -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses -fffi and -fglasgow-exts - -This module reexports all the available GSL functions (except those in "LinearAlgebra"). - --} - -module GSL ( - module GSL.Integration -, module GSL.Differentiation -, module GSL.Fourier -, module GSL.Polynomials -, module GSL.Minimization -, module GSL.Special -, module Complex -, setErrorHandlerOff -) where - -import GSL.Integration -import GSL.Differentiation -import GSL.Special -import GSL.Fourier -import GSL.Polynomials -import GSL.Minimization -import Complex -import GSL.Special - - --- | This action removes the GSL default error handler (which aborts the program), so that --- GSL errors can be handled by Haskell (using Control.Exception) and ghci doesn't abort. -foreign import ccall "GSL/gsl-aux.h no_abort_on_error" setErrorHandlerOff :: IO () diff --git a/lib/GSL/Differentiation.hs b/lib/GSL/Differentiation.hs deleted file mode 100644 index e8e22d2..0000000 --- a/lib/GSL/Differentiation.hs +++ /dev/null @@ -1,79 +0,0 @@ -{-# OPTIONS #-} ------------------------------------------------------------------------------ -{- | -Module : GSL.Differentiation -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style - -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Numerical differentiation. - - - -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.\" --} ------------------------------------------------------------------------------ -module GSL.Differentiation ( - derivCentral, - derivForward, - derivBackward -) where - -import Foreign -import Data.Packed.Internal(mkfun,check,(//)) - -derivGen :: - Int -- ^ type: 0 central, 1 forward, 2 backward - -> Double -- ^ initial step size - -> (Double -> Double) -- ^ function - -> Double -- ^ point where the derivative is taken - -> (Double, Double) -- ^ result and error -derivGen c h f x = unsafePerformIO $ do - r <- malloc - e <- malloc - fp <- mkfun (\x _ -> f x) - c_deriv c fp x h r e // check "deriv" [] - vr <- peek r - ve <- peek e - let result = (vr,ve) - free r - free e - freeHaskellFunPtr fp - return result - -foreign import ccall "gsl-aux.h deriv" - c_deriv :: Int -> FunPtr (Double -> Ptr () -> Double) -> Double -> Double - -> Ptr Double -> Ptr Double -> IO Int - - -{- | Adaptive central difference algorithm, /gsl_deriv_central/. For example: - -> > let deriv = derivCentral 0.01 -> > deriv sin (pi/4) ->(0.7071067812000676,1.0600063101654055e-10) -> > cos (pi/4) ->0.7071067811865476 - --} -derivCentral :: Double -- ^ initial step size - -> (Double -> Double) -- ^ function - -> Double -- ^ point where the derivative is taken - -> (Double, Double) -- ^ result and absolute error -derivCentral = derivGen 0 - --- | 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. -derivForward :: Double -- ^ initial step size - -> (Double -> Double) -- ^ function - -> Double -- ^ point where the derivative is taken - -> (Double, Double) -- ^ result and absolute error -derivForward = derivGen 1 - --- | Adaptive backward difference algorithm, /gsl_deriv_backward/. -derivBackward ::Double -- ^ initial step size - -> (Double -> Double) -- ^ function - -> Double -- ^ point where the derivative is taken - -> (Double, Double) -- ^ result and absolute error -derivBackward = derivGen 2 diff --git a/lib/GSL/Fourier.hs b/lib/GSL/Fourier.hs deleted file mode 100644 index 9788602..0000000 --- a/lib/GSL/Fourier.hs +++ /dev/null @@ -1,46 +0,0 @@ -{-# OPTIONS_GHC -fglasgow-exts #-} ------------------------------------------------------------------------------ -{- | -Module : GSL.Fourier -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style - -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Fourier Transform. - - - --} ------------------------------------------------------------------------------ -module GSL.Fourier ( - fft, - ifft -) where - -import Data.Packed.Internal -import Complex -import Foreign - -genfft code v = unsafePerformIO $ do - r <- createVector (dim v) - c_fft code // vec v // vec r // check "fft" [v] - return r - -foreign import ccall "gsl-aux.h fft" c_fft :: Int -> TCVCV - - -{- | Fast 1D Fourier transform of a 'Vector' @(@'Complex' 'Double'@)@ using /gsl_fft_complex_forward/. It uses the same scaling conventions as GNU Octave. - -@> fft ('GSL.Matrix.fromList' [1,2,3,4]) -vector (4) [10.0 :+ 0.0,(-2.0) :+ 2.0,(-2.0) :+ 0.0,(-2.0) :+ (-2.0)]@ - --} -fft :: Vector (Complex Double) -> Vector (Complex Double) -fft = genfft 0 - --- | The inverse of 'fft', using /gsl_fft_complex_inverse/. -ifft :: Vector (Complex Double) -> Vector (Complex Double) -ifft = genfft 1 diff --git a/lib/GSL/Integration.hs b/lib/GSL/Integration.hs deleted file mode 100644 index 4152c9d..0000000 --- a/lib/GSL/Integration.hs +++ /dev/null @@ -1,90 +0,0 @@ -{-# OPTIONS #-} ------------------------------------------------------------------------------ -{- | -Module : GSL.Integration -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style - -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Numerical integration routines. - - --} ------------------------------------------------------------------------------ - -module GSL.Integration ( - integrateQNG, - integrateQAGS -) where - -import Foreign -import Data.Packed.Internal(mkfun,check,(//)) - - --------------------------------------------------------------------- -{- | Numerical integration using /gsl_integration_qags/ (adaptive integration with singularities). For example: - -@\> let quad = integrateQAGS 1E-9 1000 -\> let f a x = x**(-0.5) * log (a*x) -\> quad (f 1) 0 1 -(-3.999999999999974,4.871658632055187e-13)@ - --} - -integrateQAGS :: Double -- ^ precision (e.g. 1E-9) - -> Int -- ^ size of auxiliary workspace (e.g. 1000) - -> (Double -> Double) -- ^ function to be integrated on the interval (a,b) - -> Double -- ^ a - -> Double -- ^ b - -> (Double, Double) -- ^ result of the integration and error -integrateQAGS prec n f a b = unsafePerformIO $ do - r <- malloc - e <- malloc - fp <- mkfun (\x _ -> f x) - c_integrate_qags fp a b prec n r e // check "integrate_qags" [] - vr <- peek r - ve <- peek e - let result = (vr,ve) - free r - free e - freeHaskellFunPtr fp - return result - -foreign import ccall "gsl-aux.h integrate_qags" - c_integrate_qags :: FunPtr (Double-> Ptr() -> Double) -> Double -> Double -> Double -> Int - -> Ptr Double -> Ptr Double -> IO Int - ------------------------------------------------------------------ -{- | Numerical integration using /gsl_integration_qng/ (useful for fast integration of smooth functions). For example: - -@\> let quad = integrateQNG 1E-6 -\> quad (\\x -> 4\/(1+x*x)) 0 1 -(3.141592653589793,3.487868498008632e-14)@ - --} - -integrateQNG :: Double -- ^ precision (e.g. 1E-9) - -> (Double -> Double) -- ^ function to be integrated on the interval (a,b) - -> Double -- ^ a - -> Double -- ^ b - -> (Double, Double) -- ^ result of the integration and error -integrateQNG prec f a b = unsafePerformIO $ do - r <- malloc - e <- malloc - fp <- mkfun (\x _ -> f x) - c_integrate_qng fp a b prec r e // check "integrate_qng" [] - vr <- peek r - ve <- peek e - let result = (vr,ve) - free r - free e - freeHaskellFunPtr fp - return result - -foreign import ccall "gsl-aux.h integrate_qng" - c_integrate_qng :: FunPtr (Double-> Ptr() -> Double) -> Double -> Double -> Double - -> Ptr Double -> Ptr Double -> IO Int - diff --git a/lib/GSL/Matrix.hs b/lib/GSL/Matrix.hs deleted file mode 100644 index 3a54226..0000000 --- a/lib/GSL/Matrix.hs +++ /dev/null @@ -1,301 +0,0 @@ ------------------------------------------------------------------------------ --- | --- Module : GSL.Matrix --- Copyright : (c) Alberto Ruiz 2007 --- License : GPL-style --- --- Maintainer : Alberto Ruiz --- Stability : provisional --- Portability : portable (uses FFI) --- --- A few linear algebra computations based on the GSL (). --- ------------------------------------------------------------------------------ - -module GSL.Matrix( - eigSg, eigHg, - svdg, - qr, - cholR, -- cholC, - luSolveR, luSolveC, - luR, luC -) where - -import Data.Packed.Internal -import Data.Packed.Matrix(fromLists,ident,takeDiag) -import GSL.Vector -import Foreign -import Complex - -{- | eigendecomposition of a real symmetric matrix using /gsl_eigen_symmv/. - -> > let (l,v) = eigS $ 'fromLists' [[1,2],[2,1]] -> > l -> 3.000 -1.000 -> -> > v -> 0.707 -0.707 -> 0.707 0.707 -> -> > v <> diag l <> trans v -> 1.000 2.000 -> 2.000 1.000 - --} -eigSg :: Matrix Double -> (Vector Double, Matrix Double) -eigSg m - | r == 1 = (fromList [cdat m `at` 0], singleton 1) - | otherwise = unsafePerformIO $ do - l <- createVector r - v <- createMatrix RowMajor r r - c_eigS // mat cdat m // vec l // mat dat v // check "eigSg" [cdat m] - return (l,v) - where r = rows m -foreign import ccall "gsl-aux.h eigensystemR" c_eigS :: TMVM - ------------------------------------------------------------------- - - - -{- | eigendecomposition of a complex hermitian matrix using /gsl_eigen_hermv/ - -> > let (l,v) = eigH $ 'fromLists' [[1,2+i],[2-i,3]] -> -> > l -> 4.449 -0.449 -> -> > v -> -0.544 0.839 -> (-0.751,0.375) (-0.487,0.243) -> -> > v <> diag l <> (conjTrans) v -> 1.000 (2.000,1.000) -> (2.000,-1.000) 3.000 - --} -eigHg :: Matrix (Complex Double)-> (Vector Double, Matrix (Complex Double)) -eigHg m - | r == 1 = (fromList [realPart $ cdat m `at` 0], singleton 1) - | otherwise = unsafePerformIO $ do - l <- createVector r - v <- createMatrix RowMajor r r - c_eigH // mat cdat m // vec l // mat dat v // check "eigHg" [cdat m] - return (l,v) - where r = rows m -foreign import ccall "gsl-aux.h eigensystemC" c_eigH :: TCMVCM - - -{- | Singular value decomposition of a real matrix, using /gsl_linalg_SV_decomp_mod/: - -@\> let (u,s,v) = svdg $ 'fromLists' [[1,2,3],[-4,1,7]] -\ -\> u -0.310 -0.951 -0.951 0.310 -\ -\> s -8.497 2.792 -\ -\> v --0.411 -0.785 - 0.185 -0.570 - 0.893 -0.243 -\ -\> u \<\> 'diag' s \<\> 'trans' v - 1. 2. 3. --4. 1. 7.@ - --} -svdg :: Matrix Double -> (Matrix Double, Vector Double, Matrix Double) -svdg x = if rows x >= cols x - then svd' x - else (v, s, u) where (u,s,v) = svd' (trans x) - -svd' x = unsafePerformIO $ do - u <- createMatrix RowMajor r c - s <- createVector c - v <- createMatrix RowMajor c c - c_svd // mat cdat x // mat dat u // vec s // mat dat v // check "svdg" [cdat x] - return (u,s,v) - where r = rows x - c = cols x -foreign import ccall "gsl-aux.h svd" c_svd :: TMMVM - -{- | QR decomposition of a real matrix using /gsl_linalg_QR_decomp/ and /gsl_linalg_QR_unpack/. - -@\> let (q,r) = qr $ 'fromLists' [[1,3,5,7],[2,0,-2,4]] -\ -\> q --0.447 -0.894 --0.894 0.447 -\ -\> r --2.236 -1.342 -0.447 -6.708 - 0. -2.683 -5.367 -4.472 -\ -\> q \<\> r -1.000 3.000 5.000 7.000 -2.000 0. -2.000 4.000@ - --} -qr :: Matrix Double -> (Matrix Double, Matrix Double) -qr x = unsafePerformIO $ do - q <- createMatrix RowMajor r r - rot <- createMatrix RowMajor r c - c_qr // mat cdat x // mat dat q // mat dat rot // check "qr" [cdat x] - return (q,rot) - where r = rows x - c = cols x -foreign import ccall "gsl-aux.h QR" c_qr :: TMMM - -{- | Cholesky decomposition of a symmetric positive definite real matrix using /gsl_linalg_cholesky_decomp/. - -@\> chol $ (2><2) [1,2, - 2,9::Double] -(2><2) - [ 1.0, 0.0 - , 2.0, 2.23606797749979 ]@ - --} -cholR :: Matrix Double -> Matrix Double -cholR x = unsafePerformIO $ do - res <- createMatrix RowMajor r r - c_cholR // mat cdat x // mat dat res // check "cholR" [cdat x] - return res - where r = rows x -foreign import ccall "gsl-aux.h cholR" c_cholR :: TMM - -cholC :: Matrix (Complex Double) -> Matrix (Complex Double) -cholC x = unsafePerformIO $ do - res <- createMatrix RowMajor r r - c_cholC // mat cdat x // mat dat res // check "cholC" [cdat x] - return res - where r = rows x -foreign import ccall "gsl-aux.h cholC" c_cholC :: TCMCM - - --------------------------------------------------------- - -{- -| efficient multiplication by the inverse of a matrix (for real matrices) --} -luSolveR :: Matrix Double -> Matrix Double -> Matrix Double -luSolveR a b - | n1==n2 && n1==r = unsafePerformIO $ do - s <- createMatrix RowMajor r c - c_luSolveR // mat cdat a // mat cdat b // mat dat s // check "luSolveR" [cdat a, cdat b] - return s - | otherwise = error "luSolveR of nonsquare matrix" - where n1 = rows a - n2 = cols a - r = rows b - c = cols b -foreign import ccall "gsl-aux.h luSolveR" c_luSolveR :: TMMM - -{- -| efficient multiplication by the inverse of a matrix (for complex matrices). --} -luSolveC :: Matrix (Complex Double) -> Matrix (Complex Double) -> Matrix (Complex Double) -luSolveC a b - | n1==n2 && n1==r = unsafePerformIO $ do - s <- createMatrix RowMajor r c - c_luSolveC // mat cdat a // mat cdat b // mat dat s // check "luSolveC" [cdat a, cdat b] - return s - | otherwise = error "luSolveC of nonsquare matrix" - where n1 = rows a - n2 = cols a - r = rows b - c = cols b -foreign import ccall "gsl-aux.h luSolveC" c_luSolveC :: TCMCMCM - -{- | lu decomposition of real matrix (packed as a vector including l, u, the permutation and sign) --} -luRaux :: Matrix Double -> Vector Double -luRaux x = unsafePerformIO $ do - res <- createVector (r*r+r+1) - c_luRaux // mat cdat x // vec res // check "luRaux" [cdat x] - return res - where r = rows x - c = cols x -foreign import ccall "gsl-aux.h luRaux" c_luRaux :: TMV - -{- | lu decomposition of complex matrix (packed as a vector including l, u, the permutation and sign) --} -luCaux :: Matrix (Complex Double) -> Vector (Complex Double) -luCaux x = unsafePerformIO $ do - res <- createVector (r*r+r+1) - c_luCaux // mat cdat x // vec res // check "luCaux" [cdat x] - return res - where r = rows x - c = cols x -foreign import ccall "gsl-aux.h luCaux" c_luCaux :: TCMCV - -{- | The LU decomposition of a square matrix. Is based on /gsl_linalg_LU_decomp/ and /gsl_linalg_complex_LU_decomp/ as described in . - -@\> let m = 'fromLists' [[1,2,-3],[2+3*i,-7,0],[1,-i,2*i]] -\> let (l,u,p,s) = luR m@ - -L is the lower triangular: - -@\> l - 1. 0. 0. -0.154-0.231i 1. 0. -0.154-0.231i 0.624-0.522i 1.@ - -U is the upper triangular: - -@\> u -2.+3.i -7. 0. - 0. 3.077-1.615i -3. - 0. 0. 1.873+0.433i@ - -p is a permutation: - -@\> p -[1,0,2]@ - -L \* U obtains a permuted version of the original matrix: - -@\> extractRows p m - 2.+3.i -7. 0. - 1. 2. -3. - 1. -1.i 2.i -\ -\> l \<\> u - 2.+3.i -7. 0. - 1. 2. -3. - 1. -1.i 2.i@ - -s is the sign of the permutation, required to obtain sign of the determinant: - -@\> s * product ('toList' $ 'takeDiag' u) -(-18.0) :+ (-16.000000000000004) -\> 'LinearAlgebra.Algorithms.det' m -(-18.0) :+ (-16.000000000000004)@ - - -} -luR :: Matrix Double -> (Matrix Double, Matrix Double, [Int], Double) -luR m = (l,u,p, fromIntegral s') where - r = rows m - v = luRaux m - lu = reshape r $ subVector 0 (r*r) v - s':p = map round . toList . subVector (r*r) (r+1) $ v - u = triang r r 0 1`mul` lu - l = (triang r r 0 0 `mul` lu) `add` ident r - add = liftMatrix2 $ vectorZipR Add - mul = liftMatrix2 $ vectorZipR Mul - --- | Complex version of 'luR'. -luC :: Matrix (Complex Double) -> (Matrix (Complex Double), Matrix (Complex Double), [Int], Complex Double) -luC m = (l,u,p, fromIntegral s') where - r = rows m - v = luCaux m - lu = reshape r $ subVector 0 (r*r) v - s':p = map (round.realPart) . toList . subVector (r*r) (r+1) $ v - u = triang r r 0 1 `mul` lu - l = (triang r r 0 0 `mul` lu) `add` liftMatrix comp (ident r) - add = liftMatrix2 $ vectorZipC Add - mul = liftMatrix2 $ vectorZipC Mul - -{- auxiliary function to get triangular matrices --} -triang r c h v = reshape c $ fromList [el i j | i<-[0..r-1], j<-[0..c-1]] - where el i j = if j-i>=h then v else 1 - v diff --git a/lib/GSL/Minimization.hs b/lib/GSL/Minimization.hs deleted file mode 100644 index aa89475..0000000 --- a/lib/GSL/Minimization.hs +++ /dev/null @@ -1,213 +0,0 @@ -{-# OPTIONS_GHC -fglasgow-exts #-} ------------------------------------------------------------------------------ -{- | -Module : GSL.Minimization -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style - -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Minimization of a multidimensional function Minimization of a multidimensional function using some of the algorithms described in: - - - --} ------------------------------------------------------------------------------ -module GSL.Minimization ( - minimizeConjugateGradient, - minimizeNMSimplex -) where - - -import Data.Packed.Internal -import Data.Packed.Matrix -import Foreign -import Complex - - -------------------------------------------------------------------------- - -{- | 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: - -@minimize f xi = minimizeNMSimplex f xi (replicate (length xi) 1) 1e-2 100 -\ -f [x,y] = 10*(x-1)^2 + 20*(y-2)^2 + 30 -\ -main = do - let (s,p) = minimize f [5,7] - print s - print p -\ -\> main -[0.9920430849306285,1.9969168063253164] -0. 512.500 1.082 6.500 5. - 1. 290.625 1.372 5.250 4. - 2. 290.625 1.372 5.250 4. - 3. 252.500 1.372 5.500 1. - 4. 101.406 1.823 2.625 3.500 - 5. 101.406 1.823 2.625 3.500 - 6. 60. 1.823 0. 3. - 7. 42.275 1.303 2.094 1.875 - 8. 42.275 1.303 2.094 1.875 - 9. 35.684 1.026 0.258 1.906 -10. 35.664 0.804 0.588 2.445 -11. 30.680 0.467 1.258 2.025 -12. 30.680 0.356 1.258 2.025 -13. 30.539 0.285 1.093 1.849 -14. 30.137 0.168 0.883 2.004 -15. 30.137 0.123 0.883 2.004 -16. 30.090 0.100 0.958 2.060 -17. 30.005 6.051e-2 1.022 2.004 -18. 30.005 4.249e-2 1.022 2.004 -19. 30.005 4.249e-2 1.022 2.004 -20. 30.005 2.742e-2 1.022 2.004 -21. 30.005 2.119e-2 1.022 2.004 -22. 30.001 1.530e-2 0.992 1.997 -23. 30.001 1.259e-2 0.992 1.997 -24. 30.001 7.663e-3 0.992 1.997@ - -The path to the solution can be graphically shown by means of: - -@'GSL.Plot.mplot' $ drop 3 ('toColumns' p)@ - --} -minimizeNMSimplex :: ([Double] -> Double) -- ^ function to minimize - -> [Double] -- ^ starting point - -> [Double] -- ^ sizes of the initial search box - -> Double -- ^ desired precision of the solution - -> Int -- ^ maximum number of iterations allowed - -> ([Double], Matrix Double) - -- ^ solution vector, and the optimization trajectory followed by the algorithm -minimizeNMSimplex f xi sz tol maxit = unsafePerformIO $ do - let xiv = fromList xi - szv = fromList sz - n = dim xiv - fp <- mkVecfun (iv (f.toList)) - rawpath <- createMIO maxit (n+3) - (c_minimizeNMSimplex fp tol maxit // vec xiv // vec szv) - "minimizeNMSimplex" [xiv,szv] - let it = round (rawpath @@> (maxit-1,0)) - path = takeRows it rawpath - [sol] = toLists $ dropRows (it-1) path - freeHaskellFunPtr fp - return (drop 3 sol, path) - - -foreign import ccall "gsl-aux.h minimize" - c_minimizeNMSimplex:: FunPtr (Int -> Ptr Double -> Double) -> Double -> Int - -> TVVM - ----------------------------------------------------------------------------------- - -{- | The Fletcher-Reeves conjugate gradient algorithm /gsl_multimin_fminimizer_conjugate_fr/. This is the example in the GSL manual: - -@minimize = minimizeConjugateGradient 1E-2 1E-4 1E-3 30 -f [x,y] = 10*(x-1)^2 + 20*(y-2)^2 + 30 -\ -df [x,y] = [20*(x-1), 40*(y-2)] -\ -main = do - let (s,p) = minimize f df [5,7] - print s - print p -\ -\> main -[1.0,2.0] - 0. 687.848 4.996 6.991 - 1. 683.555 4.989 6.972 - 2. 675.013 4.974 6.935 - 3. 658.108 4.944 6.861 - 4. 625.013 4.885 6.712 - 5. 561.684 4.766 6.415 - 6. 446.467 4.528 5.821 - 7. 261.794 4.053 4.632 - 8. 75.498 3.102 2.255 - 9. 67.037 2.852 1.630 -10. 45.316 2.191 1.762 -11. 30.186 0.869 2.026 -12. 30. 1. 2.@ - -The path to the solution can be graphically shown by means of: - -@'GSL.Plot.mplot' $ drop 2 ('toColumns' p)@ - --} -minimizeConjugateGradient :: - Double -- ^ initial step size - -> Double -- ^ minimization parameter - -> Double -- ^ desired precision of the solution (gradient test) - -> Int -- ^ maximum number of iterations allowed - -> ([Double] -> Double) -- ^ function to minimize - -> ([Double] -> [Double]) -- ^ gradient - -> [Double] -- ^ starting point - -> ([Double], Matrix Double) -- ^ solution vector, and the optimization trajectory followed by the algorithm -minimizeConjugateGradient istep minimpar tol maxit f df xi = unsafePerformIO $ do - let xiv = fromList xi - n = dim xiv - f' = f . toList - df' = (fromList . df . toList) - fp <- mkVecfun (iv f') - dfp <- mkVecVecfun (aux_vTov df') - print "entro" - rawpath <- createMIO maxit (n+2) - (c_minimizeConjugateGradient fp dfp istep minimpar tol maxit // vec xiv) - "minimizeDerivV" [xiv] - print "salgo" - let it = round (rawpath @@> (maxit-1,0)) - path = takeRows it rawpath - sol = toList $ cdat $ dropColumns 2 $ dropRows (it-1) path - freeHaskellFunPtr fp - freeHaskellFunPtr dfp - return (sol,path) - - -foreign import ccall "gsl-aux.h minimizeWithDeriv" - c_minimizeConjugateGradient :: FunPtr (Int -> Ptr Double -> Double) - -> FunPtr (Int -> Ptr Double -> Ptr Double -> IO ()) - -> Double -> Double -> Double -> Int - -> TVM - ---------------------------------------------------------------------- -iv :: (Vector Double -> Double) -> (Int -> Ptr Double -> Double) -iv f n p = f (createV n copy "iv" []) where - copy n q = do - copyArray q p n - return 0 - --- | conversion of Haskell functions into function pointers that can be used in the C side -foreign import ccall "wrapper" - mkVecfun :: (Int -> Ptr Double -> Double) - -> IO( FunPtr (Int -> Ptr Double -> Double)) - --- | another required conversion -foreign import ccall "wrapper" - mkVecVecfun :: (Int -> Ptr Double -> Ptr Double -> IO ()) - -> IO (FunPtr (Int -> Ptr Double -> Ptr Double->IO())) - -aux_vTov :: (Vector Double -> Vector Double) -> (Int -> Ptr Double -> Ptr Double -> IO()) -aux_vTov f n p r = g where - V {fptr = pr, ptr = t} = f x - x = createV n copy "aux_vTov" [] - copy n q = do - copyArray q p n - return 0 - g = withForeignPtr pr $ \_ -> copyArray r t n - --------------------------------------------------------------------- - -createV n fun msg ptrs = unsafePerformIO $ do - r <- createVector n - fun // vec r // check msg ptrs - return r - -createM r c fun msg ptrs = unsafePerformIO $ do - r <- createMatrix RowMajor r c - fun // mat cdat r // check msg ptrs - return r - -createMIO r c fun msg ptrs = do - r <- createMatrix RowMajor r c - fun // mat cdat r // check msg ptrs - return r diff --git a/lib/GSL/Polynomials.hs b/lib/GSL/Polynomials.hs deleted file mode 100644 index a87fa56..0000000 --- a/lib/GSL/Polynomials.hs +++ /dev/null @@ -1,54 +0,0 @@ -{-# OPTIONS_GHC -fglasgow-exts #-} ------------------------------------------------------------------------------ -{- | -Module : GSL.Polynomials -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style - -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Polynomials. - - - --} ------------------------------------------------------------------------------ -module GSL.Polynomials ( - polySolve -) where - -import Data.Packed.Internal -import Complex -import Foreign - -{- | Solution of general polynomial equations, using /gsl_poly_complex_solve/. For example, - the three solutions of x^3 + 8 = 0 - -@\> polySolve [8,0,0,1] -[(-1.9999999999999998) :+ 0.0, - 1.0 :+ 1.732050807568877, - 1.0 :+ (-1.732050807568877)]@ - -The example in the GSL manual: To find the roots of x^5 -1 = 0: - -@\> polySolve [-1, 0, 0, 0, 0, 1] -[(-0.8090169943749475) :+ 0.5877852522924731, -(-0.8090169943749475) :+ (-0.5877852522924731), -0.30901699437494734 :+ 0.9510565162951536, -0.30901699437494734 :+ (-0.9510565162951536), -1.0 :+ 0.0]@ - --} -polySolve :: [Double] -> [Complex Double] -polySolve = toList . polySolve' . fromList - -polySolve' :: Vector Double -> Vector (Complex Double) -polySolve' v | dim v > 1 = unsafePerformIO $ do - r <- createVector (dim v-1) - c_polySolve // vec v // vec r // check "polySolve" [v] - return r - | otherwise = error "polySolve on a polynomial of degree zero" - -foreign import ccall "gsl-aux.h polySolve" c_polySolve:: TVCV diff --git a/lib/GSL/Special.hs b/lib/GSL/Special.hs deleted file mode 100644 index fa002b9..0000000 --- a/lib/GSL/Special.hs +++ /dev/null @@ -1,74 +0,0 @@ ------------------------------------------------------------------------------ -{- | -Module : GSL.Special -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style - -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected special functions. - - --} ------------------------------------------------------------------------------ - -module GSL.Special ( - module GSL.Special.Airy -, module GSL.Special.Bessel -, module GSL.Special.Clausen -, module GSL.Special.Coulomb -, module GSL.Special.Coupling -, module GSL.Special.Dawson -, module GSL.Special.Debye -, module GSL.Special.Dilog -, module GSL.Special.Elementary -, module GSL.Special.Ellint -, module GSL.Special.Erf -, module GSL.Special.Exp -, module GSL.Special.Expint -, module GSL.Special.Fermi_dirac -, module GSL.Special.Gamma -, module GSL.Special.Gegenbauer -, module GSL.Special.Hyperg -, module GSL.Special.Laguerre -, module GSL.Special.Lambert -, module GSL.Special.Legendre -, module GSL.Special.Log -, module GSL.Special.Pow_int -, module GSL.Special.Psi -, module GSL.Special.Synchrotron -, module GSL.Special.Trig -, module GSL.Special.Zeta -) -where - -import Foreign -import GSL.Special.Internal -import GSL.Special.Airy -import GSL.Special.Bessel -import GSL.Special.Clausen -import GSL.Special.Coulomb -import GSL.Special.Coupling -import GSL.Special.Dawson -import GSL.Special.Debye -import GSL.Special.Dilog -import GSL.Special.Elementary -import GSL.Special.Ellint -import GSL.Special.Erf -import GSL.Special.Exp -import GSL.Special.Expint -import GSL.Special.Fermi_dirac -import GSL.Special.Gamma -import GSL.Special.Gegenbauer -import GSL.Special.Hyperg -import GSL.Special.Laguerre -import GSL.Special.Lambert -import GSL.Special.Legendre -import GSL.Special.Log -import GSL.Special.Pow_int -import GSL.Special.Psi -import GSL.Special.Synchrotron -import GSL.Special.Trig -import GSL.Special.Zeta diff --git a/lib/GSL/Special/Airy.hs b/lib/GSL/Special/Airy.hs deleted file mode 100644 index 872f7c5..0000000 --- a/lib/GSL/Special/Airy.hs +++ /dev/null @@ -1,166 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Airy -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Airy( - Precision (..) -, airy_Ai_e -, airy_Ai -, airy_Bi_e -, airy_Bi -, airy_Ai_scaled_e -, airy_Ai_scaled -, airy_Bi_scaled_e -, airy_Bi_scaled -, airy_Ai_deriv_e -, airy_Ai_deriv -, airy_Bi_deriv_e -, airy_Bi_deriv -, airy_Ai_deriv_scaled_e -, airy_Ai_deriv_scaled -, airy_Bi_deriv_scaled_e -, airy_Bi_deriv_scaled -, airy_zero_Ai_e -, airy_zero_Ai -, airy_zero_Bi_e -, airy_zero_Bi -, airy_zero_Ai_deriv_e -, airy_zero_Ai_deriv -, airy_zero_Bi_deriv_e -, airy_zero_Bi_deriv -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_airy_Ai_e(double x,gsl_mode_t mode,gsl_sf_result* result); -airy_Ai_e :: Double -> Precision -> (Double,Double) -airy_Ai_e x mode = createSFR "airy_Ai_e" $ gsl_sf_airy_Ai_e x (precCode mode) -foreign import ccall "airy.h gsl_sf_airy_Ai_e" gsl_sf_airy_Ai_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_airy_Ai(double x,gsl_mode_t mode); -airy_Ai :: Double -> Precision -> Double -airy_Ai x mode = gsl_sf_airy_Ai x (precCode mode) -foreign import ccall "airy.h gsl_sf_airy_Ai" gsl_sf_airy_Ai :: Double -> Gsl_mode_t -> Double - --- | wrapper for int gsl_sf_airy_Bi_e(double x,gsl_mode_t mode,gsl_sf_result* result); -airy_Bi_e :: Double -> Precision -> (Double,Double) -airy_Bi_e x mode = createSFR "airy_Bi_e" $ gsl_sf_airy_Bi_e x (precCode mode) -foreign import ccall "airy.h gsl_sf_airy_Bi_e" gsl_sf_airy_Bi_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_airy_Bi(double x,gsl_mode_t mode); -airy_Bi :: Double -> Precision -> Double -airy_Bi x mode = gsl_sf_airy_Bi x (precCode mode) -foreign import ccall "airy.h gsl_sf_airy_Bi" gsl_sf_airy_Bi :: Double -> Gsl_mode_t -> Double - --- | wrapper for int gsl_sf_airy_Ai_scaled_e(double x,gsl_mode_t mode,gsl_sf_result* result); -airy_Ai_scaled_e :: Double -> Precision -> (Double,Double) -airy_Ai_scaled_e x mode = createSFR "airy_Ai_scaled_e" $ gsl_sf_airy_Ai_scaled_e x (precCode mode) -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) - --- | wrapper for double gsl_sf_airy_Ai_scaled(double x,gsl_mode_t mode); -airy_Ai_scaled :: Double -> Precision -> Double -airy_Ai_scaled x mode = gsl_sf_airy_Ai_scaled x (precCode mode) -foreign import ccall "airy.h gsl_sf_airy_Ai_scaled" gsl_sf_airy_Ai_scaled :: Double -> Gsl_mode_t -> Double - --- | wrapper for int gsl_sf_airy_Bi_scaled_e(double x,gsl_mode_t mode,gsl_sf_result* result); -airy_Bi_scaled_e :: Double -> Precision -> (Double,Double) -airy_Bi_scaled_e x mode = createSFR "airy_Bi_scaled_e" $ gsl_sf_airy_Bi_scaled_e x (precCode mode) -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) - --- | wrapper for double gsl_sf_airy_Bi_scaled(double x,gsl_mode_t mode); -airy_Bi_scaled :: Double -> Precision -> Double -airy_Bi_scaled x mode = gsl_sf_airy_Bi_scaled x (precCode mode) -foreign import ccall "airy.h gsl_sf_airy_Bi_scaled" gsl_sf_airy_Bi_scaled :: Double -> Gsl_mode_t -> Double - --- | wrapper for int gsl_sf_airy_Ai_deriv_e(double x,gsl_mode_t mode,gsl_sf_result* result); -airy_Ai_deriv_e :: Double -> Precision -> (Double,Double) -airy_Ai_deriv_e x mode = createSFR "airy_Ai_deriv_e" $ gsl_sf_airy_Ai_deriv_e x (precCode mode) -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) - --- | wrapper for double gsl_sf_airy_Ai_deriv(double x,gsl_mode_t mode); -airy_Ai_deriv :: Double -> Precision -> Double -airy_Ai_deriv x mode = gsl_sf_airy_Ai_deriv x (precCode mode) -foreign import ccall "airy.h gsl_sf_airy_Ai_deriv" gsl_sf_airy_Ai_deriv :: Double -> Gsl_mode_t -> Double - --- | wrapper for int gsl_sf_airy_Bi_deriv_e(double x,gsl_mode_t mode,gsl_sf_result* result); -airy_Bi_deriv_e :: Double -> Precision -> (Double,Double) -airy_Bi_deriv_e x mode = createSFR "airy_Bi_deriv_e" $ gsl_sf_airy_Bi_deriv_e x (precCode mode) -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) - --- | wrapper for double gsl_sf_airy_Bi_deriv(double x,gsl_mode_t mode); -airy_Bi_deriv :: Double -> Precision -> Double -airy_Bi_deriv x mode = gsl_sf_airy_Bi_deriv x (precCode mode) -foreign import ccall "airy.h gsl_sf_airy_Bi_deriv" gsl_sf_airy_Bi_deriv :: Double -> Gsl_mode_t -> Double - --- | wrapper for int gsl_sf_airy_Ai_deriv_scaled_e(double x,gsl_mode_t mode,gsl_sf_result* result); -airy_Ai_deriv_scaled_e :: Double -> Precision -> (Double,Double) -airy_Ai_deriv_scaled_e x mode = createSFR "airy_Ai_deriv_scaled_e" $ gsl_sf_airy_Ai_deriv_scaled_e x (precCode mode) -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) - --- | wrapper for double gsl_sf_airy_Ai_deriv_scaled(double x,gsl_mode_t mode); -airy_Ai_deriv_scaled :: Double -> Precision -> Double -airy_Ai_deriv_scaled x mode = gsl_sf_airy_Ai_deriv_scaled x (precCode mode) -foreign import ccall "airy.h gsl_sf_airy_Ai_deriv_scaled" gsl_sf_airy_Ai_deriv_scaled :: Double -> Gsl_mode_t -> Double - --- | wrapper for int gsl_sf_airy_Bi_deriv_scaled_e(double x,gsl_mode_t mode,gsl_sf_result* result); -airy_Bi_deriv_scaled_e :: Double -> Precision -> (Double,Double) -airy_Bi_deriv_scaled_e x mode = createSFR "airy_Bi_deriv_scaled_e" $ gsl_sf_airy_Bi_deriv_scaled_e x (precCode mode) -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) - --- | wrapper for double gsl_sf_airy_Bi_deriv_scaled(double x,gsl_mode_t mode); -airy_Bi_deriv_scaled :: Double -> Precision -> Double -airy_Bi_deriv_scaled x mode = gsl_sf_airy_Bi_deriv_scaled x (precCode mode) -foreign import ccall "airy.h gsl_sf_airy_Bi_deriv_scaled" gsl_sf_airy_Bi_deriv_scaled :: Double -> Gsl_mode_t -> Double - --- | wrapper for int gsl_sf_airy_zero_Ai_e(int s,gsl_sf_result* result); -airy_zero_Ai_e :: Int -> (Double,Double) -airy_zero_Ai_e s = createSFR "airy_zero_Ai_e" $ gsl_sf_airy_zero_Ai_e s -foreign import ccall "airy.h gsl_sf_airy_zero_Ai_e" gsl_sf_airy_zero_Ai_e :: Int -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_airy_zero_Ai(int s); -airy_zero_Ai :: Int -> Double -airy_zero_Ai = gsl_sf_airy_zero_Ai -foreign import ccall "airy.h gsl_sf_airy_zero_Ai" gsl_sf_airy_zero_Ai :: Int -> Double - --- | wrapper for int gsl_sf_airy_zero_Bi_e(int s,gsl_sf_result* result); -airy_zero_Bi_e :: Int -> (Double,Double) -airy_zero_Bi_e s = createSFR "airy_zero_Bi_e" $ gsl_sf_airy_zero_Bi_e s -foreign import ccall "airy.h gsl_sf_airy_zero_Bi_e" gsl_sf_airy_zero_Bi_e :: Int -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_airy_zero_Bi(int s); -airy_zero_Bi :: Int -> Double -airy_zero_Bi = gsl_sf_airy_zero_Bi -foreign import ccall "airy.h gsl_sf_airy_zero_Bi" gsl_sf_airy_zero_Bi :: Int -> Double - --- | wrapper for int gsl_sf_airy_zero_Ai_deriv_e(int s,gsl_sf_result* result); -airy_zero_Ai_deriv_e :: Int -> (Double,Double) -airy_zero_Ai_deriv_e s = createSFR "airy_zero_Ai_deriv_e" $ gsl_sf_airy_zero_Ai_deriv_e s -foreign import ccall "airy.h gsl_sf_airy_zero_Ai_deriv_e" gsl_sf_airy_zero_Ai_deriv_e :: Int -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_airy_zero_Ai_deriv(int s); -airy_zero_Ai_deriv :: Int -> Double -airy_zero_Ai_deriv = gsl_sf_airy_zero_Ai_deriv -foreign import ccall "airy.h gsl_sf_airy_zero_Ai_deriv" gsl_sf_airy_zero_Ai_deriv :: Int -> Double - --- | wrapper for int gsl_sf_airy_zero_Bi_deriv_e(int s,gsl_sf_result* result); -airy_zero_Bi_deriv_e :: Int -> (Double,Double) -airy_zero_Bi_deriv_e s = createSFR "airy_zero_Bi_deriv_e" $ gsl_sf_airy_zero_Bi_deriv_e s -foreign import ccall "airy.h gsl_sf_airy_zero_Bi_deriv_e" gsl_sf_airy_zero_Bi_deriv_e :: Int -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_airy_zero_Bi_deriv(int s); -airy_zero_Bi_deriv :: Int -> Double -airy_zero_Bi_deriv = gsl_sf_airy_zero_Bi_deriv -foreign import ccall "airy.h gsl_sf_airy_zero_Bi_deriv" gsl_sf_airy_zero_Bi_deriv :: Int -> Double diff --git a/lib/GSL/Special/Bessel.hs b/lib/GSL/Special/Bessel.hs deleted file mode 100644 index 4a96926..0000000 --- a/lib/GSL/Special/Bessel.hs +++ /dev/null @@ -1,809 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Bessel -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Bessel( - bessel_J0_e -, bessel_J0 -, bessel_J1_e -, bessel_J1 -, bessel_Jn_e -, bessel_Jn -, bessel_Y0_e -, bessel_Y0 -, bessel_Y1_e -, bessel_Y1 -, bessel_Yn_e -, bessel_Yn -, bessel_I0_e -, bessel_I0 -, bessel_I1_e -, bessel_I1 -, bessel_In_e -, bessel_In -, bessel_I0_scaled_e -, bessel_I0_scaled -, bessel_I1_scaled_e -, bessel_I1_scaled -, bessel_In_scaled_e -, bessel_In_scaled -, bessel_K0_e -, bessel_K0 -, bessel_K1_e -, bessel_K1 -, bessel_Kn_e -, bessel_Kn -, bessel_K0_scaled_e -, bessel_K0_scaled -, bessel_K1_scaled_e -, bessel_K1_scaled -, bessel_Kn_scaled_e -, bessel_Kn_scaled -, bessel_j0_e -, bessel_j0 -, bessel_j1_e -, bessel_j1 -, bessel_j2_e -, bessel_j2 -, bessel_jl_e -, bessel_jl -, bessel_y0_e -, bessel_y0 -, bessel_y1_e -, bessel_y1 -, bessel_y2_e -, bessel_y2 -, bessel_yl_e -, bessel_yl -, bessel_i0_scaled_e -, bessel_i0_scaled -, bessel_i1_scaled_e -, bessel_i1_scaled -, bessel_i2_scaled_e -, bessel_i2_scaled -, bessel_il_scaled_e -, bessel_il_scaled -, bessel_k0_scaled_e -, bessel_k0_scaled -, bessel_k1_scaled_e -, bessel_k1_scaled -, bessel_k2_scaled_e -, bessel_k2_scaled -, bessel_kl_scaled_e -, bessel_kl_scaled -, bessel_Jnu_e -, bessel_Jnu -, bessel_Ynu_e -, bessel_Ynu -, bessel_Inu_scaled_e -, bessel_Inu_scaled -, bessel_Inu_e -, bessel_Inu -, bessel_Knu_scaled_e -, bessel_Knu_scaled -, bessel_Knu_e -, bessel_Knu -, bessel_lnKnu_e -, bessel_lnKnu -, bessel_zero_J0_e -, bessel_zero_J0 -, bessel_zero_J1_e -, bessel_zero_J1 -, bessel_zero_Jnu_e -, bessel_zero_Jnu -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_bessel_J0_e(double x,gsl_sf_result* result); --- --- -bessel_J0_e :: Double -> (Double,Double) -bessel_J0_e x = createSFR "bessel_J0_e" $ gsl_sf_bessel_J0_e x -foreign import ccall "bessel.h gsl_sf_bessel_J0_e" gsl_sf_bessel_J0_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_J0(double x); --- --- -bessel_J0 :: Double -> Double -bessel_J0 = gsl_sf_bessel_J0 -foreign import ccall "bessel.h gsl_sf_bessel_J0" gsl_sf_bessel_J0 :: Double -> Double - --- | wrapper for int gsl_sf_bessel_J1_e(double x,gsl_sf_result* result); --- --- -bessel_J1_e :: Double -> (Double,Double) -bessel_J1_e x = createSFR "bessel_J1_e" $ gsl_sf_bessel_J1_e x -foreign import ccall "bessel.h gsl_sf_bessel_J1_e" gsl_sf_bessel_J1_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_J1(double x); --- --- -bessel_J1 :: Double -> Double -bessel_J1 = gsl_sf_bessel_J1 -foreign import ccall "bessel.h gsl_sf_bessel_J1" gsl_sf_bessel_J1 :: Double -> Double - --- | wrapper for int gsl_sf_bessel_Jn_e(int n,double x,gsl_sf_result* result); --- --- -bessel_Jn_e :: Int -> Double -> (Double,Double) -bessel_Jn_e n x = createSFR "bessel_Jn_e" $ gsl_sf_bessel_Jn_e n x -foreign import ccall "bessel.h gsl_sf_bessel_Jn_e" gsl_sf_bessel_Jn_e :: Int -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_Jn(int n,double x); --- --- -bessel_Jn :: Int -> Double -> Double -bessel_Jn = gsl_sf_bessel_Jn -foreign import ccall "bessel.h gsl_sf_bessel_Jn" gsl_sf_bessel_Jn :: Int -> Double -> Double - --- | wrapper for int gsl_sf_bessel_Jn_array(int nmin,int nmax,double x,double* result_array); --- --- -bessel_Jn_array :: Int -> Int -> Double -> Ptr Double -> Int -bessel_Jn_array = gsl_sf_bessel_Jn_array -foreign import ccall "bessel.h gsl_sf_bessel_Jn_array" gsl_sf_bessel_Jn_array :: Int -> Int -> Double -> Ptr Double -> Int - --- | wrapper for int gsl_sf_bessel_Y0_e(double x,gsl_sf_result* result); --- --- -bessel_Y0_e :: Double -> (Double,Double) -bessel_Y0_e x = createSFR "bessel_Y0_e" $ gsl_sf_bessel_Y0_e x -foreign import ccall "bessel.h gsl_sf_bessel_Y0_e" gsl_sf_bessel_Y0_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_Y0(double x); --- --- -bessel_Y0 :: Double -> Double -bessel_Y0 = gsl_sf_bessel_Y0 -foreign import ccall "bessel.h gsl_sf_bessel_Y0" gsl_sf_bessel_Y0 :: Double -> Double - --- | wrapper for int gsl_sf_bessel_Y1_e(double x,gsl_sf_result* result); --- --- -bessel_Y1_e :: Double -> (Double,Double) -bessel_Y1_e x = createSFR "bessel_Y1_e" $ gsl_sf_bessel_Y1_e x -foreign import ccall "bessel.h gsl_sf_bessel_Y1_e" gsl_sf_bessel_Y1_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_Y1(double x); --- --- -bessel_Y1 :: Double -> Double -bessel_Y1 = gsl_sf_bessel_Y1 -foreign import ccall "bessel.h gsl_sf_bessel_Y1" gsl_sf_bessel_Y1 :: Double -> Double - --- | wrapper for int gsl_sf_bessel_Yn_e(int n,double x,gsl_sf_result* result); --- --- -bessel_Yn_e :: Int -> Double -> (Double,Double) -bessel_Yn_e n x = createSFR "bessel_Yn_e" $ gsl_sf_bessel_Yn_e n x -foreign import ccall "bessel.h gsl_sf_bessel_Yn_e" gsl_sf_bessel_Yn_e :: Int -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_Yn(int n,double x); --- --- -bessel_Yn :: Int -> Double -> Double -bessel_Yn = gsl_sf_bessel_Yn -foreign import ccall "bessel.h gsl_sf_bessel_Yn" gsl_sf_bessel_Yn :: Int -> Double -> Double - --- | wrapper for int gsl_sf_bessel_Yn_array(int nmin,int nmax,double x,double* result_array); --- --- -bessel_Yn_array :: Int -> Int -> Double -> Ptr Double -> Int -bessel_Yn_array = gsl_sf_bessel_Yn_array -foreign import ccall "bessel.h gsl_sf_bessel_Yn_array" gsl_sf_bessel_Yn_array :: Int -> Int -> Double -> Ptr Double -> Int - --- | wrapper for int gsl_sf_bessel_I0_e(double x,gsl_sf_result* result); --- --- -bessel_I0_e :: Double -> (Double,Double) -bessel_I0_e x = createSFR "bessel_I0_e" $ gsl_sf_bessel_I0_e x -foreign import ccall "bessel.h gsl_sf_bessel_I0_e" gsl_sf_bessel_I0_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_I0(double x); --- --- -bessel_I0 :: Double -> Double -bessel_I0 = gsl_sf_bessel_I0 -foreign import ccall "bessel.h gsl_sf_bessel_I0" gsl_sf_bessel_I0 :: Double -> Double - --- | wrapper for int gsl_sf_bessel_I1_e(double x,gsl_sf_result* result); --- --- -bessel_I1_e :: Double -> (Double,Double) -bessel_I1_e x = createSFR "bessel_I1_e" $ gsl_sf_bessel_I1_e x -foreign import ccall "bessel.h gsl_sf_bessel_I1_e" gsl_sf_bessel_I1_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_I1(double x); --- --- -bessel_I1 :: Double -> Double -bessel_I1 = gsl_sf_bessel_I1 -foreign import ccall "bessel.h gsl_sf_bessel_I1" gsl_sf_bessel_I1 :: Double -> Double - --- | wrapper for int gsl_sf_bessel_In_e(int n,double x,gsl_sf_result* result); --- --- -bessel_In_e :: Int -> Double -> (Double,Double) -bessel_In_e n x = createSFR "bessel_In_e" $ gsl_sf_bessel_In_e n x -foreign import ccall "bessel.h gsl_sf_bessel_In_e" gsl_sf_bessel_In_e :: Int -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_In(int n,double x); --- --- -bessel_In :: Int -> Double -> Double -bessel_In = gsl_sf_bessel_In -foreign import ccall "bessel.h gsl_sf_bessel_In" gsl_sf_bessel_In :: Int -> Double -> Double - --- | wrapper for int gsl_sf_bessel_In_array(int nmin,int nmax,double x,double* result_array); --- --- -bessel_In_array :: Int -> Int -> Double -> Ptr Double -> Int -bessel_In_array = gsl_sf_bessel_In_array -foreign import ccall "bessel.h gsl_sf_bessel_In_array" gsl_sf_bessel_In_array :: Int -> Int -> Double -> Ptr Double -> Int - --- | wrapper for int gsl_sf_bessel_I0_scaled_e(double x,gsl_sf_result* result); --- --- -bessel_I0_scaled_e :: Double -> (Double,Double) -bessel_I0_scaled_e x = createSFR "bessel_I0_scaled_e" $ gsl_sf_bessel_I0_scaled_e x -foreign import ccall "bessel.h gsl_sf_bessel_I0_scaled_e" gsl_sf_bessel_I0_scaled_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_I0_scaled(double x); --- --- -bessel_I0_scaled :: Double -> Double -bessel_I0_scaled = gsl_sf_bessel_I0_scaled -foreign import ccall "bessel.h gsl_sf_bessel_I0_scaled" gsl_sf_bessel_I0_scaled :: Double -> Double - --- | wrapper for int gsl_sf_bessel_I1_scaled_e(double x,gsl_sf_result* result); --- --- -bessel_I1_scaled_e :: Double -> (Double,Double) -bessel_I1_scaled_e x = createSFR "bessel_I1_scaled_e" $ gsl_sf_bessel_I1_scaled_e x -foreign import ccall "bessel.h gsl_sf_bessel_I1_scaled_e" gsl_sf_bessel_I1_scaled_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_I1_scaled(double x); --- --- -bessel_I1_scaled :: Double -> Double -bessel_I1_scaled = gsl_sf_bessel_I1_scaled -foreign import ccall "bessel.h gsl_sf_bessel_I1_scaled" gsl_sf_bessel_I1_scaled :: Double -> Double - --- | wrapper for int gsl_sf_bessel_In_scaled_e(int n,double x,gsl_sf_result* result); --- --- -bessel_In_scaled_e :: Int -> Double -> (Double,Double) -bessel_In_scaled_e n x = createSFR "bessel_In_scaled_e" $ gsl_sf_bessel_In_scaled_e n x -foreign import ccall "bessel.h gsl_sf_bessel_In_scaled_e" gsl_sf_bessel_In_scaled_e :: Int -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_In_scaled(int n,double x); --- --- -bessel_In_scaled :: Int -> Double -> Double -bessel_In_scaled = gsl_sf_bessel_In_scaled -foreign import ccall "bessel.h gsl_sf_bessel_In_scaled" gsl_sf_bessel_In_scaled :: Int -> Double -> Double - --- | wrapper for int gsl_sf_bessel_In_scaled_array(int nmin,int nmax,double x,double* result_array); --- --- -bessel_In_scaled_array :: Int -> Int -> Double -> Ptr Double -> Int -bessel_In_scaled_array = gsl_sf_bessel_In_scaled_array -foreign import ccall "bessel.h gsl_sf_bessel_In_scaled_array" gsl_sf_bessel_In_scaled_array :: Int -> Int -> Double -> Ptr Double -> Int - --- | wrapper for int gsl_sf_bessel_K0_e(double x,gsl_sf_result* result); --- --- -bessel_K0_e :: Double -> (Double,Double) -bessel_K0_e x = createSFR "bessel_K0_e" $ gsl_sf_bessel_K0_e x -foreign import ccall "bessel.h gsl_sf_bessel_K0_e" gsl_sf_bessel_K0_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_K0(double x); --- --- -bessel_K0 :: Double -> Double -bessel_K0 = gsl_sf_bessel_K0 -foreign import ccall "bessel.h gsl_sf_bessel_K0" gsl_sf_bessel_K0 :: Double -> Double - --- | wrapper for int gsl_sf_bessel_K1_e(double x,gsl_sf_result* result); --- --- -bessel_K1_e :: Double -> (Double,Double) -bessel_K1_e x = createSFR "bessel_K1_e" $ gsl_sf_bessel_K1_e x -foreign import ccall "bessel.h gsl_sf_bessel_K1_e" gsl_sf_bessel_K1_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_K1(double x); --- --- -bessel_K1 :: Double -> Double -bessel_K1 = gsl_sf_bessel_K1 -foreign import ccall "bessel.h gsl_sf_bessel_K1" gsl_sf_bessel_K1 :: Double -> Double - --- | wrapper for int gsl_sf_bessel_Kn_e(int n,double x,gsl_sf_result* result); --- --- -bessel_Kn_e :: Int -> Double -> (Double,Double) -bessel_Kn_e n x = createSFR "bessel_Kn_e" $ gsl_sf_bessel_Kn_e n x -foreign import ccall "bessel.h gsl_sf_bessel_Kn_e" gsl_sf_bessel_Kn_e :: Int -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_Kn(int n,double x); --- --- -bessel_Kn :: Int -> Double -> Double -bessel_Kn = gsl_sf_bessel_Kn -foreign import ccall "bessel.h gsl_sf_bessel_Kn" gsl_sf_bessel_Kn :: Int -> Double -> Double - --- | wrapper for int gsl_sf_bessel_Kn_array(int nmin,int nmax,double x,double* result_array); --- --- -bessel_Kn_array :: Int -> Int -> Double -> Ptr Double -> Int -bessel_Kn_array = gsl_sf_bessel_Kn_array -foreign import ccall "bessel.h gsl_sf_bessel_Kn_array" gsl_sf_bessel_Kn_array :: Int -> Int -> Double -> Ptr Double -> Int - --- | wrapper for int gsl_sf_bessel_K0_scaled_e(double x,gsl_sf_result* result); --- --- -bessel_K0_scaled_e :: Double -> (Double,Double) -bessel_K0_scaled_e x = createSFR "bessel_K0_scaled_e" $ gsl_sf_bessel_K0_scaled_e x -foreign import ccall "bessel.h gsl_sf_bessel_K0_scaled_e" gsl_sf_bessel_K0_scaled_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_K0_scaled(double x); --- --- -bessel_K0_scaled :: Double -> Double -bessel_K0_scaled = gsl_sf_bessel_K0_scaled -foreign import ccall "bessel.h gsl_sf_bessel_K0_scaled" gsl_sf_bessel_K0_scaled :: Double -> Double - --- | wrapper for int gsl_sf_bessel_K1_scaled_e(double x,gsl_sf_result* result); --- --- -bessel_K1_scaled_e :: Double -> (Double,Double) -bessel_K1_scaled_e x = createSFR "bessel_K1_scaled_e" $ gsl_sf_bessel_K1_scaled_e x -foreign import ccall "bessel.h gsl_sf_bessel_K1_scaled_e" gsl_sf_bessel_K1_scaled_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_K1_scaled(double x); --- --- -bessel_K1_scaled :: Double -> Double -bessel_K1_scaled = gsl_sf_bessel_K1_scaled -foreign import ccall "bessel.h gsl_sf_bessel_K1_scaled" gsl_sf_bessel_K1_scaled :: Double -> Double - --- | wrapper for int gsl_sf_bessel_Kn_scaled_e(int n,double x,gsl_sf_result* result); --- --- -bessel_Kn_scaled_e :: Int -> Double -> (Double,Double) -bessel_Kn_scaled_e n x = createSFR "bessel_Kn_scaled_e" $ gsl_sf_bessel_Kn_scaled_e n x -foreign import ccall "bessel.h gsl_sf_bessel_Kn_scaled_e" gsl_sf_bessel_Kn_scaled_e :: Int -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_Kn_scaled(int n,double x); --- --- -bessel_Kn_scaled :: Int -> Double -> Double -bessel_Kn_scaled = gsl_sf_bessel_Kn_scaled -foreign import ccall "bessel.h gsl_sf_bessel_Kn_scaled" gsl_sf_bessel_Kn_scaled :: Int -> Double -> Double - --- | wrapper for int gsl_sf_bessel_Kn_scaled_array(int nmin,int nmax,double x,double* result_array); --- --- -bessel_Kn_scaled_array :: Int -> Int -> Double -> Ptr Double -> Int -bessel_Kn_scaled_array = gsl_sf_bessel_Kn_scaled_array -foreign import ccall "bessel.h gsl_sf_bessel_Kn_scaled_array" gsl_sf_bessel_Kn_scaled_array :: Int -> Int -> Double -> Ptr Double -> Int - --- | wrapper for int gsl_sf_bessel_j0_e(double x,gsl_sf_result* result); --- --- -bessel_j0_e :: Double -> (Double,Double) -bessel_j0_e x = createSFR "bessel_j0_e" $ gsl_sf_bessel_j0_e x -foreign import ccall "bessel.h gsl_sf_bessel_j0_e" gsl_sf_bessel_j0_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_j0(double x); --- --- -bessel_j0 :: Double -> Double -bessel_j0 = gsl_sf_bessel_j0 -foreign import ccall "bessel.h gsl_sf_bessel_j0" gsl_sf_bessel_j0 :: Double -> Double - --- | wrapper for int gsl_sf_bessel_j1_e(double x,gsl_sf_result* result); --- --- -bessel_j1_e :: Double -> (Double,Double) -bessel_j1_e x = createSFR "bessel_j1_e" $ gsl_sf_bessel_j1_e x -foreign import ccall "bessel.h gsl_sf_bessel_j1_e" gsl_sf_bessel_j1_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_j1(double x); --- --- -bessel_j1 :: Double -> Double -bessel_j1 = gsl_sf_bessel_j1 -foreign import ccall "bessel.h gsl_sf_bessel_j1" gsl_sf_bessel_j1 :: Double -> Double - --- | wrapper for int gsl_sf_bessel_j2_e(double x,gsl_sf_result* result); --- --- -bessel_j2_e :: Double -> (Double,Double) -bessel_j2_e x = createSFR "bessel_j2_e" $ gsl_sf_bessel_j2_e x -foreign import ccall "bessel.h gsl_sf_bessel_j2_e" gsl_sf_bessel_j2_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_j2(double x); --- --- -bessel_j2 :: Double -> Double -bessel_j2 = gsl_sf_bessel_j2 -foreign import ccall "bessel.h gsl_sf_bessel_j2" gsl_sf_bessel_j2 :: Double -> Double - --- | wrapper for int gsl_sf_bessel_jl_e(int l,double x,gsl_sf_result* result); --- --- -bessel_jl_e :: Int -> Double -> (Double,Double) -bessel_jl_e l x = createSFR "bessel_jl_e" $ gsl_sf_bessel_jl_e l x -foreign import ccall "bessel.h gsl_sf_bessel_jl_e" gsl_sf_bessel_jl_e :: Int -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_jl(int l,double x); --- --- -bessel_jl :: Int -> Double -> Double -bessel_jl = gsl_sf_bessel_jl -foreign import ccall "bessel.h gsl_sf_bessel_jl" gsl_sf_bessel_jl :: Int -> Double -> Double - --- | wrapper for int gsl_sf_bessel_jl_array(int lmax,double x,double* result_array); --- --- -bessel_jl_array :: Int -> Double -> Ptr Double -> Int -bessel_jl_array = gsl_sf_bessel_jl_array -foreign import ccall "bessel.h gsl_sf_bessel_jl_array" gsl_sf_bessel_jl_array :: Int -> Double -> Ptr Double -> Int - --- | wrapper for int gsl_sf_bessel_jl_steed_array(int lmax,double x,double* jl_x_array); --- --- -bessel_jl_steed_array :: Int -> Double -> Ptr Double -> Int -bessel_jl_steed_array = gsl_sf_bessel_jl_steed_array -foreign import ccall "bessel.h gsl_sf_bessel_jl_steed_array" gsl_sf_bessel_jl_steed_array :: Int -> Double -> Ptr Double -> Int - --- | wrapper for int gsl_sf_bessel_y0_e(double x,gsl_sf_result* result); --- --- -bessel_y0_e :: Double -> (Double,Double) -bessel_y0_e x = createSFR "bessel_y0_e" $ gsl_sf_bessel_y0_e x -foreign import ccall "bessel.h gsl_sf_bessel_y0_e" gsl_sf_bessel_y0_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_y0(double x); --- --- -bessel_y0 :: Double -> Double -bessel_y0 = gsl_sf_bessel_y0 -foreign import ccall "bessel.h gsl_sf_bessel_y0" gsl_sf_bessel_y0 :: Double -> Double - --- | wrapper for int gsl_sf_bessel_y1_e(double x,gsl_sf_result* result); --- --- -bessel_y1_e :: Double -> (Double,Double) -bessel_y1_e x = createSFR "bessel_y1_e" $ gsl_sf_bessel_y1_e x -foreign import ccall "bessel.h gsl_sf_bessel_y1_e" gsl_sf_bessel_y1_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_y1(double x); --- --- -bessel_y1 :: Double -> Double -bessel_y1 = gsl_sf_bessel_y1 -foreign import ccall "bessel.h gsl_sf_bessel_y1" gsl_sf_bessel_y1 :: Double -> Double - --- | wrapper for int gsl_sf_bessel_y2_e(double x,gsl_sf_result* result); --- --- -bessel_y2_e :: Double -> (Double,Double) -bessel_y2_e x = createSFR "bessel_y2_e" $ gsl_sf_bessel_y2_e x -foreign import ccall "bessel.h gsl_sf_bessel_y2_e" gsl_sf_bessel_y2_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_y2(double x); --- --- -bessel_y2 :: Double -> Double -bessel_y2 = gsl_sf_bessel_y2 -foreign import ccall "bessel.h gsl_sf_bessel_y2" gsl_sf_bessel_y2 :: Double -> Double - --- | wrapper for int gsl_sf_bessel_yl_e(int l,double x,gsl_sf_result* result); --- --- -bessel_yl_e :: Int -> Double -> (Double,Double) -bessel_yl_e l x = createSFR "bessel_yl_e" $ gsl_sf_bessel_yl_e l x -foreign import ccall "bessel.h gsl_sf_bessel_yl_e" gsl_sf_bessel_yl_e :: Int -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_yl(int l,double x); --- --- -bessel_yl :: Int -> Double -> Double -bessel_yl = gsl_sf_bessel_yl -foreign import ccall "bessel.h gsl_sf_bessel_yl" gsl_sf_bessel_yl :: Int -> Double -> Double - --- | wrapper for int gsl_sf_bessel_yl_array(int lmax,double x,double* result_array); --- --- -bessel_yl_array :: Int -> Double -> Ptr Double -> Int -bessel_yl_array = gsl_sf_bessel_yl_array -foreign import ccall "bessel.h gsl_sf_bessel_yl_array" gsl_sf_bessel_yl_array :: Int -> Double -> Ptr Double -> Int - --- | wrapper for int gsl_sf_bessel_i0_scaled_e(double x,gsl_sf_result* result); --- --- -bessel_i0_scaled_e :: Double -> (Double,Double) -bessel_i0_scaled_e x = createSFR "bessel_i0_scaled_e" $ gsl_sf_bessel_i0_scaled_e x -foreign import ccall "bessel.h gsl_sf_bessel_i0_scaled_e" gsl_sf_bessel_i0_scaled_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_i0_scaled(double x); --- --- -bessel_i0_scaled :: Double -> Double -bessel_i0_scaled = gsl_sf_bessel_i0_scaled -foreign import ccall "bessel.h gsl_sf_bessel_i0_scaled" gsl_sf_bessel_i0_scaled :: Double -> Double - --- | wrapper for int gsl_sf_bessel_i1_scaled_e(double x,gsl_sf_result* result); --- --- -bessel_i1_scaled_e :: Double -> (Double,Double) -bessel_i1_scaled_e x = createSFR "bessel_i1_scaled_e" $ gsl_sf_bessel_i1_scaled_e x -foreign import ccall "bessel.h gsl_sf_bessel_i1_scaled_e" gsl_sf_bessel_i1_scaled_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_i1_scaled(double x); --- --- -bessel_i1_scaled :: Double -> Double -bessel_i1_scaled = gsl_sf_bessel_i1_scaled -foreign import ccall "bessel.h gsl_sf_bessel_i1_scaled" gsl_sf_bessel_i1_scaled :: Double -> Double - --- | wrapper for int gsl_sf_bessel_i2_scaled_e(double x,gsl_sf_result* result); --- --- -bessel_i2_scaled_e :: Double -> (Double,Double) -bessel_i2_scaled_e x = createSFR "bessel_i2_scaled_e" $ gsl_sf_bessel_i2_scaled_e x -foreign import ccall "bessel.h gsl_sf_bessel_i2_scaled_e" gsl_sf_bessel_i2_scaled_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_i2_scaled(double x); --- --- -bessel_i2_scaled :: Double -> Double -bessel_i2_scaled = gsl_sf_bessel_i2_scaled -foreign import ccall "bessel.h gsl_sf_bessel_i2_scaled" gsl_sf_bessel_i2_scaled :: Double -> Double - --- | wrapper for int gsl_sf_bessel_il_scaled_e(int l,double x,gsl_sf_result* result); --- --- -bessel_il_scaled_e :: Int -> Double -> (Double,Double) -bessel_il_scaled_e l x = createSFR "bessel_il_scaled_e" $ gsl_sf_bessel_il_scaled_e l x -foreign import ccall "bessel.h gsl_sf_bessel_il_scaled_e" gsl_sf_bessel_il_scaled_e :: Int -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_il_scaled(int l,double x); --- --- -bessel_il_scaled :: Int -> Double -> Double -bessel_il_scaled = gsl_sf_bessel_il_scaled -foreign import ccall "bessel.h gsl_sf_bessel_il_scaled" gsl_sf_bessel_il_scaled :: Int -> Double -> Double - --- | wrapper for int gsl_sf_bessel_il_scaled_array(int lmax,double x,double* result_array); --- --- -bessel_il_scaled_array :: Int -> Double -> Ptr Double -> Int -bessel_il_scaled_array = gsl_sf_bessel_il_scaled_array -foreign import ccall "bessel.h gsl_sf_bessel_il_scaled_array" gsl_sf_bessel_il_scaled_array :: Int -> Double -> Ptr Double -> Int - --- | wrapper for int gsl_sf_bessel_k0_scaled_e(double x,gsl_sf_result* result); --- --- -bessel_k0_scaled_e :: Double -> (Double,Double) -bessel_k0_scaled_e x = createSFR "bessel_k0_scaled_e" $ gsl_sf_bessel_k0_scaled_e x -foreign import ccall "bessel.h gsl_sf_bessel_k0_scaled_e" gsl_sf_bessel_k0_scaled_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_k0_scaled(double x); --- --- -bessel_k0_scaled :: Double -> Double -bessel_k0_scaled = gsl_sf_bessel_k0_scaled -foreign import ccall "bessel.h gsl_sf_bessel_k0_scaled" gsl_sf_bessel_k0_scaled :: Double -> Double - --- | wrapper for int gsl_sf_bessel_k1_scaled_e(double x,gsl_sf_result* result); --- --- -bessel_k1_scaled_e :: Double -> (Double,Double) -bessel_k1_scaled_e x = createSFR "bessel_k1_scaled_e" $ gsl_sf_bessel_k1_scaled_e x -foreign import ccall "bessel.h gsl_sf_bessel_k1_scaled_e" gsl_sf_bessel_k1_scaled_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_k1_scaled(double x); --- --- -bessel_k1_scaled :: Double -> Double -bessel_k1_scaled = gsl_sf_bessel_k1_scaled -foreign import ccall "bessel.h gsl_sf_bessel_k1_scaled" gsl_sf_bessel_k1_scaled :: Double -> Double - --- | wrapper for int gsl_sf_bessel_k2_scaled_e(double x,gsl_sf_result* result); --- --- -bessel_k2_scaled_e :: Double -> (Double,Double) -bessel_k2_scaled_e x = createSFR "bessel_k2_scaled_e" $ gsl_sf_bessel_k2_scaled_e x -foreign import ccall "bessel.h gsl_sf_bessel_k2_scaled_e" gsl_sf_bessel_k2_scaled_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_k2_scaled(double x); --- --- -bessel_k2_scaled :: Double -> Double -bessel_k2_scaled = gsl_sf_bessel_k2_scaled -foreign import ccall "bessel.h gsl_sf_bessel_k2_scaled" gsl_sf_bessel_k2_scaled :: Double -> Double - --- | wrapper for int gsl_sf_bessel_kl_scaled_e(int l,double x,gsl_sf_result* result); --- --- -bessel_kl_scaled_e :: Int -> Double -> (Double,Double) -bessel_kl_scaled_e l x = createSFR "bessel_kl_scaled_e" $ gsl_sf_bessel_kl_scaled_e l x -foreign import ccall "bessel.h gsl_sf_bessel_kl_scaled_e" gsl_sf_bessel_kl_scaled_e :: Int -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_kl_scaled(int l,double x); --- --- -bessel_kl_scaled :: Int -> Double -> Double -bessel_kl_scaled = gsl_sf_bessel_kl_scaled -foreign import ccall "bessel.h gsl_sf_bessel_kl_scaled" gsl_sf_bessel_kl_scaled :: Int -> Double -> Double - --- | wrapper for int gsl_sf_bessel_kl_scaled_array(int lmax,double x,double* result_array); --- --- -bessel_kl_scaled_array :: Int -> Double -> Ptr Double -> Int -bessel_kl_scaled_array = gsl_sf_bessel_kl_scaled_array -foreign import ccall "bessel.h gsl_sf_bessel_kl_scaled_array" gsl_sf_bessel_kl_scaled_array :: Int -> Double -> Ptr Double -> Int - --- | wrapper for int gsl_sf_bessel_Jnu_e(double nu,double x,gsl_sf_result* result); --- --- -bessel_Jnu_e :: Double -> Double -> (Double,Double) -bessel_Jnu_e nu x = createSFR "bessel_Jnu_e" $ gsl_sf_bessel_Jnu_e nu x -foreign import ccall "bessel.h gsl_sf_bessel_Jnu_e" gsl_sf_bessel_Jnu_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_Jnu(double nu,double x); --- --- -bessel_Jnu :: Double -> Double -> Double -bessel_Jnu = gsl_sf_bessel_Jnu -foreign import ccall "bessel.h gsl_sf_bessel_Jnu" gsl_sf_bessel_Jnu :: Double -> Double -> Double - --- | wrapper for int gsl_sf_bessel_Ynu_e(double nu,double x,gsl_sf_result* result); --- --- -bessel_Ynu_e :: Double -> Double -> (Double,Double) -bessel_Ynu_e nu x = createSFR "bessel_Ynu_e" $ gsl_sf_bessel_Ynu_e nu x -foreign import ccall "bessel.h gsl_sf_bessel_Ynu_e" gsl_sf_bessel_Ynu_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_Ynu(double nu,double x); --- --- -bessel_Ynu :: Double -> Double -> Double -bessel_Ynu = gsl_sf_bessel_Ynu -foreign import ccall "bessel.h gsl_sf_bessel_Ynu" gsl_sf_bessel_Ynu :: Double -> Double -> Double - --- | wrapper for int gsl_sf_bessel_sequence_Jnu_e(double nu,gsl_mode_t mode,size_t size,double* v); --- --- -bessel_sequence_Jnu_e :: Double -> Precision -> Size_t -> Ptr Double -> Int -bessel_sequence_Jnu_e nu mode size v = gsl_sf_bessel_sequence_Jnu_e nu (precCode mode) size v -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 - --- | wrapper for int gsl_sf_bessel_Inu_scaled_e(double nu,double x,gsl_sf_result* result); --- --- -bessel_Inu_scaled_e :: Double -> Double -> (Double,Double) -bessel_Inu_scaled_e nu x = createSFR "bessel_Inu_scaled_e" $ gsl_sf_bessel_Inu_scaled_e nu x -foreign import ccall "bessel.h gsl_sf_bessel_Inu_scaled_e" gsl_sf_bessel_Inu_scaled_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_Inu_scaled(double nu,double x); --- --- -bessel_Inu_scaled :: Double -> Double -> Double -bessel_Inu_scaled = gsl_sf_bessel_Inu_scaled -foreign import ccall "bessel.h gsl_sf_bessel_Inu_scaled" gsl_sf_bessel_Inu_scaled :: Double -> Double -> Double - --- | wrapper for int gsl_sf_bessel_Inu_e(double nu,double x,gsl_sf_result* result); --- --- -bessel_Inu_e :: Double -> Double -> (Double,Double) -bessel_Inu_e nu x = createSFR "bessel_Inu_e" $ gsl_sf_bessel_Inu_e nu x -foreign import ccall "bessel.h gsl_sf_bessel_Inu_e" gsl_sf_bessel_Inu_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_Inu(double nu,double x); --- --- -bessel_Inu :: Double -> Double -> Double -bessel_Inu = gsl_sf_bessel_Inu -foreign import ccall "bessel.h gsl_sf_bessel_Inu" gsl_sf_bessel_Inu :: Double -> Double -> Double - --- | wrapper for int gsl_sf_bessel_Knu_scaled_e(double nu,double x,gsl_sf_result* result); --- --- -bessel_Knu_scaled_e :: Double -> Double -> (Double,Double) -bessel_Knu_scaled_e nu x = createSFR "bessel_Knu_scaled_e" $ gsl_sf_bessel_Knu_scaled_e nu x -foreign import ccall "bessel.h gsl_sf_bessel_Knu_scaled_e" gsl_sf_bessel_Knu_scaled_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_Knu_scaled(double nu,double x); --- --- -bessel_Knu_scaled :: Double -> Double -> Double -bessel_Knu_scaled = gsl_sf_bessel_Knu_scaled -foreign import ccall "bessel.h gsl_sf_bessel_Knu_scaled" gsl_sf_bessel_Knu_scaled :: Double -> Double -> Double - --- | wrapper for int gsl_sf_bessel_Knu_e(double nu,double x,gsl_sf_result* result); --- --- -bessel_Knu_e :: Double -> Double -> (Double,Double) -bessel_Knu_e nu x = createSFR "bessel_Knu_e" $ gsl_sf_bessel_Knu_e nu x -foreign import ccall "bessel.h gsl_sf_bessel_Knu_e" gsl_sf_bessel_Knu_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_Knu(double nu,double x); --- --- -bessel_Knu :: Double -> Double -> Double -bessel_Knu = gsl_sf_bessel_Knu -foreign import ccall "bessel.h gsl_sf_bessel_Knu" gsl_sf_bessel_Knu :: Double -> Double -> Double - --- | wrapper for int gsl_sf_bessel_lnKnu_e(double nu,double x,gsl_sf_result* result); --- --- -bessel_lnKnu_e :: Double -> Double -> (Double,Double) -bessel_lnKnu_e nu x = createSFR "bessel_lnKnu_e" $ gsl_sf_bessel_lnKnu_e nu x -foreign import ccall "bessel.h gsl_sf_bessel_lnKnu_e" gsl_sf_bessel_lnKnu_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_lnKnu(double nu,double x); --- --- -bessel_lnKnu :: Double -> Double -> Double -bessel_lnKnu = gsl_sf_bessel_lnKnu -foreign import ccall "bessel.h gsl_sf_bessel_lnKnu" gsl_sf_bessel_lnKnu :: Double -> Double -> Double - --- | wrapper for int gsl_sf_bessel_zero_J0_e(int s,gsl_sf_result* result); --- --- -bessel_zero_J0_e :: Int -> (Double,Double) -bessel_zero_J0_e s = createSFR "bessel_zero_J0_e" $ gsl_sf_bessel_zero_J0_e s -foreign import ccall "bessel.h gsl_sf_bessel_zero_J0_e" gsl_sf_bessel_zero_J0_e :: Int -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_zero_J0(int s); --- --- -bessel_zero_J0 :: Int -> Double -bessel_zero_J0 = gsl_sf_bessel_zero_J0 -foreign import ccall "bessel.h gsl_sf_bessel_zero_J0" gsl_sf_bessel_zero_J0 :: Int -> Double - --- | wrapper for int gsl_sf_bessel_zero_J1_e(int s,gsl_sf_result* result); --- --- -bessel_zero_J1_e :: Int -> (Double,Double) -bessel_zero_J1_e s = createSFR "bessel_zero_J1_e" $ gsl_sf_bessel_zero_J1_e s -foreign import ccall "bessel.h gsl_sf_bessel_zero_J1_e" gsl_sf_bessel_zero_J1_e :: Int -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_zero_J1(int s); --- --- -bessel_zero_J1 :: Int -> Double -bessel_zero_J1 = gsl_sf_bessel_zero_J1 -foreign import ccall "bessel.h gsl_sf_bessel_zero_J1" gsl_sf_bessel_zero_J1 :: Int -> Double - --- | wrapper for int gsl_sf_bessel_zero_Jnu_e(double nu,int s,gsl_sf_result* result); --- --- -bessel_zero_Jnu_e :: Double -> Int -> (Double,Double) -bessel_zero_Jnu_e nu s = createSFR "bessel_zero_Jnu_e" $ gsl_sf_bessel_zero_Jnu_e nu s -foreign import ccall "bessel.h gsl_sf_bessel_zero_Jnu_e" gsl_sf_bessel_zero_Jnu_e :: Double -> Int -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_bessel_zero_Jnu(double nu,int s); --- --- -bessel_zero_Jnu :: Double -> Int -> Double -bessel_zero_Jnu = gsl_sf_bessel_zero_Jnu -foreign import ccall "bessel.h gsl_sf_bessel_zero_Jnu" gsl_sf_bessel_zero_Jnu :: Double -> Int -> Double diff --git a/lib/GSL/Special/Clausen.hs b/lib/GSL/Special/Clausen.hs deleted file mode 100644 index 57c8878..0000000 --- a/lib/GSL/Special/Clausen.hs +++ /dev/null @@ -1,37 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Clausen -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Clausen( - clausen_e -, clausen -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_clausen_e(double x,gsl_sf_result* result); --- --- -clausen_e :: Double -> (Double,Double) -clausen_e x = createSFR "clausen_e" $ gsl_sf_clausen_e x -foreign import ccall "clausen.h gsl_sf_clausen_e" gsl_sf_clausen_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_clausen(double x); --- --- -clausen :: Double -> Double -clausen = gsl_sf_clausen -foreign import ccall "clausen.h gsl_sf_clausen" gsl_sf_clausen :: Double -> Double diff --git a/lib/GSL/Special/Coulomb.hs b/lib/GSL/Special/Coulomb.hs deleted file mode 100644 index a60b724..0000000 --- a/lib/GSL/Special/Coulomb.hs +++ /dev/null @@ -1,103 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Coulomb -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Coulomb( - hydrogenicR_1_e -, hydrogenicR_1 -, hydrogenicR_e -, hydrogenicR -, coulomb_CL_e -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_hydrogenicR_1_e(double Z,double r,gsl_sf_result* result); --- --- -hydrogenicR_1_e :: Double -> Double -> (Double,Double) -hydrogenicR_1_e zZ r = createSFR "hydrogenicR_1_e" $ gsl_sf_hydrogenicR_1_e zZ r -foreign import ccall "coulomb.h gsl_sf_hydrogenicR_1_e" gsl_sf_hydrogenicR_1_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_hydrogenicR_1(double Z,double r); --- --- -hydrogenicR_1 :: Double -> Double -> Double -hydrogenicR_1 = gsl_sf_hydrogenicR_1 -foreign import ccall "coulomb.h gsl_sf_hydrogenicR_1" gsl_sf_hydrogenicR_1 :: Double -> Double -> Double - --- | wrapper for int gsl_sf_hydrogenicR_e(int n,int l,double Z,double r,gsl_sf_result* result); --- --- -hydrogenicR_e :: Int -> Int -> Double -> Double -> (Double,Double) -hydrogenicR_e n l zZ r = createSFR "hydrogenicR_e" $ gsl_sf_hydrogenicR_e n l zZ r -foreign import ccall "coulomb.h gsl_sf_hydrogenicR_e" gsl_sf_hydrogenicR_e :: Int -> Int -> Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_hydrogenicR(int n,int l,double Z,double r); --- --- -hydrogenicR :: Int -> Int -> Double -> Double -> Double -hydrogenicR = gsl_sf_hydrogenicR -foreign import ccall "coulomb.h gsl_sf_hydrogenicR" gsl_sf_hydrogenicR :: Int -> Int -> Double -> Double -> Double - --- | 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); --- --- -coulomb_wave_FG_e :: Double -> Double -> Double -> Int -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int -coulomb_wave_FG_e = gsl_sf_coulomb_wave_FG_e -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 - --- | wrapper for int gsl_sf_coulomb_wave_F_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent); --- --- -coulomb_wave_F_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Int -coulomb_wave_F_array = gsl_sf_coulomb_wave_F_array -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 - --- | 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); --- --- -coulomb_wave_FG_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int -coulomb_wave_FG_array = gsl_sf_coulomb_wave_FG_array -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 - --- | 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); --- --- -coulomb_wave_FGp_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int -coulomb_wave_FGp_array = gsl_sf_coulomb_wave_FGp_array -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 - --- | wrapper for int gsl_sf_coulomb_wave_sphF_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent); --- --- -coulomb_wave_sphF_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Int -coulomb_wave_sphF_array = gsl_sf_coulomb_wave_sphF_array -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 - --- | wrapper for int gsl_sf_coulomb_CL_e(double L,double eta,gsl_sf_result* result); --- --- -coulomb_CL_e :: Double -> Double -> (Double,Double) -coulomb_CL_e lL eta = createSFR "coulomb_CL_e" $ gsl_sf_coulomb_CL_e lL eta -foreign import ccall "coulomb.h gsl_sf_coulomb_CL_e" gsl_sf_coulomb_CL_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for int gsl_sf_coulomb_CL_array(double Lmin,int kmax,double eta,double* cl); --- --- -coulomb_CL_array :: Double -> Int -> Double -> Ptr Double -> Int -coulomb_CL_array = gsl_sf_coulomb_CL_array -foreign import ccall "coulomb.h gsl_sf_coulomb_CL_array" gsl_sf_coulomb_CL_array :: Double -> Int -> Double -> Ptr Double -> Int diff --git a/lib/GSL/Special/Coupling.hs b/lib/GSL/Special/Coupling.hs deleted file mode 100644 index fb949d1..0000000 --- a/lib/GSL/Special/Coupling.hs +++ /dev/null @@ -1,81 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Coupling -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Coupling( - coupling_3j_e -, coupling_3j -, coupling_6j_e -, coupling_6j -, coupling_RacahW_e -, coupling_RacahW -, coupling_9j_e -, coupling_9j --- , coupling_6j_INCORRECT_e --- , coupling_6j_INCORRECT -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | 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); -coupling_3j_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double) -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 -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) - --- | 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); -coupling_3j :: Int -> Int -> Int -> Int -> Int -> Int -> Double -coupling_3j = gsl_sf_coupling_3j -foreign import ccall "coupling.h gsl_sf_coupling_3j" gsl_sf_coupling_3j :: Int -> Int -> Int -> Int -> Int -> Int -> Double - --- | 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); -coupling_6j_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double) -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 -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) - --- | 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); -coupling_6j :: Int -> Int -> Int -> Int -> Int -> Int -> Double -coupling_6j = gsl_sf_coupling_6j -foreign import ccall "coupling.h gsl_sf_coupling_6j" gsl_sf_coupling_6j :: Int -> Int -> Int -> Int -> Int -> Int -> Double - --- | 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); -coupling_RacahW_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double) -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 -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) - --- | 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); -coupling_RacahW :: Int -> Int -> Int -> Int -> Int -> Int -> Double -coupling_RacahW = gsl_sf_coupling_RacahW -foreign import ccall "coupling.h gsl_sf_coupling_RacahW" gsl_sf_coupling_RacahW :: Int -> Int -> Int -> Int -> Int -> Int -> Double - --- | 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); -coupling_9j_e :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double) -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 -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) - --- | 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); -coupling_9j :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Double -coupling_9j = gsl_sf_coupling_9j -foreign import ccall "coupling.h gsl_sf_coupling_9j" gsl_sf_coupling_9j :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Double - --- | 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); -coupling_6j_INCORRECT_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double) -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 -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) - --- | 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); -coupling_6j_INCORRECT :: Int -> Int -> Int -> Int -> Int -> Int -> Double -coupling_6j_INCORRECT = gsl_sf_coupling_6j_INCORRECT -foreign import ccall "coupling.h gsl_sf_coupling_6j_INCORRECT" gsl_sf_coupling_6j_INCORRECT :: Int -> Int -> Int -> Int -> Int -> Int -> Double diff --git a/lib/GSL/Special/Dawson.hs b/lib/GSL/Special/Dawson.hs deleted file mode 100644 index 69d0127..0000000 --- a/lib/GSL/Special/Dawson.hs +++ /dev/null @@ -1,37 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Dawson -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Dawson( - dawson_e -, dawson -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_dawson_e(double x,gsl_sf_result* result); --- --- -dawson_e :: Double -> (Double,Double) -dawson_e x = createSFR "dawson_e" $ gsl_sf_dawson_e x -foreign import ccall "dawson.h gsl_sf_dawson_e" gsl_sf_dawson_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_dawson(double x); --- --- -dawson :: Double -> Double -dawson = gsl_sf_dawson -foreign import ccall "dawson.h gsl_sf_dawson" gsl_sf_dawson :: Double -> Double diff --git a/lib/GSL/Special/Debye.hs b/lib/GSL/Special/Debye.hs deleted file mode 100644 index 55f5158..0000000 --- a/lib/GSL/Special/Debye.hs +++ /dev/null @@ -1,85 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Debye -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Debye( - debye_1_e -, debye_1 -, debye_2_e -, debye_2 -, debye_3_e -, debye_3 -, debye_4_e -, debye_4 -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_debye_1_e(double x,gsl_sf_result* result); --- --- -debye_1_e :: Double -> (Double,Double) -debye_1_e x = createSFR "debye_1_e" $ gsl_sf_debye_1_e x -foreign import ccall "debye.h gsl_sf_debye_1_e" gsl_sf_debye_1_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_debye_1(double x); --- --- -debye_1 :: Double -> Double -debye_1 = gsl_sf_debye_1 -foreign import ccall "debye.h gsl_sf_debye_1" gsl_sf_debye_1 :: Double -> Double - --- | wrapper for int gsl_sf_debye_2_e(double x,gsl_sf_result* result); --- --- -debye_2_e :: Double -> (Double,Double) -debye_2_e x = createSFR "debye_2_e" $ gsl_sf_debye_2_e x -foreign import ccall "debye.h gsl_sf_debye_2_e" gsl_sf_debye_2_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_debye_2(double x); --- --- -debye_2 :: Double -> Double -debye_2 = gsl_sf_debye_2 -foreign import ccall "debye.h gsl_sf_debye_2" gsl_sf_debye_2 :: Double -> Double - --- | wrapper for int gsl_sf_debye_3_e(double x,gsl_sf_result* result); --- --- -debye_3_e :: Double -> (Double,Double) -debye_3_e x = createSFR "debye_3_e" $ gsl_sf_debye_3_e x -foreign import ccall "debye.h gsl_sf_debye_3_e" gsl_sf_debye_3_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_debye_3(double x); --- --- -debye_3 :: Double -> Double -debye_3 = gsl_sf_debye_3 -foreign import ccall "debye.h gsl_sf_debye_3" gsl_sf_debye_3 :: Double -> Double - --- | wrapper for int gsl_sf_debye_4_e(double x,gsl_sf_result* result); --- --- -debye_4_e :: Double -> (Double,Double) -debye_4_e x = createSFR "debye_4_e" $ gsl_sf_debye_4_e x -foreign import ccall "debye.h gsl_sf_debye_4_e" gsl_sf_debye_4_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_debye_4(double x); --- --- -debye_4 :: Double -> Double -debye_4 = gsl_sf_debye_4 -foreign import ccall "debye.h gsl_sf_debye_4" gsl_sf_debye_4 :: Double -> Double diff --git a/lib/GSL/Special/Dilog.hs b/lib/GSL/Special/Dilog.hs deleted file mode 100644 index 5575895..0000000 --- a/lib/GSL/Special/Dilog.hs +++ /dev/null @@ -1,58 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Dilog -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Dilog( - dilog_e -, dilog -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_dilog_e(double x,gsl_sf_result* result); --- --- -dilog_e :: Double -> (Double,Double) -dilog_e x = createSFR "dilog_e" $ gsl_sf_dilog_e x -foreign import ccall "dilog.h gsl_sf_dilog_e" gsl_sf_dilog_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_dilog(double x); --- --- -dilog :: Double -> Double -dilog = gsl_sf_dilog -foreign import ccall "dilog.h gsl_sf_dilog" gsl_sf_dilog :: Double -> Double - --- | wrapper for int gsl_sf_complex_dilog_xy_e(double x,double y,gsl_sf_result* result_re,gsl_sf_result* result_im); --- --- -complex_dilog_xy_e :: Double -> Double -> Ptr Double -> (Double,Double) -complex_dilog_xy_e x y result_re = createSFR "complex_dilog_xy_e" $ gsl_sf_complex_dilog_xy_e x y result_re -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) - --- | wrapper for int gsl_sf_complex_dilog_e(double r,double theta,gsl_sf_result* result_re,gsl_sf_result* result_im); --- --- -complex_dilog_e :: Double -> Double -> Ptr Double -> (Double,Double) -complex_dilog_e r theta result_re = createSFR "complex_dilog_e" $ gsl_sf_complex_dilog_e r theta result_re -foreign import ccall "dilog.h gsl_sf_complex_dilog_e" gsl_sf_complex_dilog_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) - --- | wrapper for int gsl_sf_complex_spence_xy_e(double x,double y,gsl_sf_result* real_sp,gsl_sf_result* imag_sp); --- --- -complex_spence_xy_e :: Double -> Double -> Ptr Double -> (Double,Double) -complex_spence_xy_e x y real_sp = createSFR "complex_spence_xy_e" $ gsl_sf_complex_spence_xy_e x y real_sp -foreign import ccall "dilog.h gsl_sf_complex_spence_xy_e" gsl_sf_complex_spence_xy_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) diff --git a/lib/GSL/Special/Elementary.hs b/lib/GSL/Special/Elementary.hs deleted file mode 100644 index da927a2..0000000 --- a/lib/GSL/Special/Elementary.hs +++ /dev/null @@ -1,45 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Elementary -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Elementary( - multiply_e -, multiply -, multiply_err_e -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_multiply_e(double x,double y,gsl_sf_result* result); --- --- -multiply_e :: Double -> Double -> (Double,Double) -multiply_e x y = createSFR "multiply_e" $ gsl_sf_multiply_e x y -foreign import ccall "elementary.h gsl_sf_multiply_e" gsl_sf_multiply_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_multiply(double x,double y); --- --- -multiply :: Double -> Double -> Double -multiply = gsl_sf_multiply -foreign import ccall "elementary.h gsl_sf_multiply" gsl_sf_multiply :: Double -> Double -> Double - --- | wrapper for int gsl_sf_multiply_err_e(double x,double dx,double y,double dy,gsl_sf_result* result); --- --- -multiply_err_e :: Double -> Double -> Double -> Double -> (Double,Double) -multiply_err_e x dx y dy = createSFR "multiply_err_e" $ gsl_sf_multiply_err_e x dx y dy -foreign import ccall "elementary.h gsl_sf_multiply_err_e" gsl_sf_multiply_err_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int) diff --git a/lib/GSL/Special/Ellint.hs b/lib/GSL/Special/Ellint.hs deleted file mode 100644 index dddbe21..0000000 --- a/lib/GSL/Special/Ellint.hs +++ /dev/null @@ -1,181 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Ellint -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Ellint( - ellint_Kcomp_e -, ellint_Kcomp -, ellint_Ecomp_e -, ellint_Ecomp -, ellint_F_e -, ellint_F -, ellint_E_e -, ellint_E -, ellint_P_e -, ellint_P -, ellint_D_e -, ellint_D -, ellint_RC_e -, ellint_RC -, ellint_RD_e -, ellint_RD -, ellint_RF_e -, ellint_RF -, ellint_RJ_e -, ellint_RJ -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_ellint_Kcomp_e(double k,gsl_mode_t mode,gsl_sf_result* result); --- --- -ellint_Kcomp_e :: Double -> Precision -> (Double,Double) -ellint_Kcomp_e k mode = createSFR "ellint_Kcomp_e" $ gsl_sf_ellint_Kcomp_e k (precCode mode) -foreign import ccall "ellint.h gsl_sf_ellint_Kcomp_e" gsl_sf_ellint_Kcomp_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_ellint_Kcomp(double k,gsl_mode_t mode); --- --- -ellint_Kcomp :: Double -> Precision -> Double -ellint_Kcomp k mode = gsl_sf_ellint_Kcomp k (precCode mode) -foreign import ccall "ellint.h gsl_sf_ellint_Kcomp" gsl_sf_ellint_Kcomp :: Double -> Gsl_mode_t -> Double - --- | wrapper for int gsl_sf_ellint_Ecomp_e(double k,gsl_mode_t mode,gsl_sf_result* result); --- --- -ellint_Ecomp_e :: Double -> Precision -> (Double,Double) -ellint_Ecomp_e k mode = createSFR "ellint_Ecomp_e" $ gsl_sf_ellint_Ecomp_e k (precCode mode) -foreign import ccall "ellint.h gsl_sf_ellint_Ecomp_e" gsl_sf_ellint_Ecomp_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_ellint_Ecomp(double k,gsl_mode_t mode); --- --- -ellint_Ecomp :: Double -> Precision -> Double -ellint_Ecomp k mode = gsl_sf_ellint_Ecomp k (precCode mode) -foreign import ccall "ellint.h gsl_sf_ellint_Ecomp" gsl_sf_ellint_Ecomp :: Double -> Gsl_mode_t -> Double - --- | wrapper for int gsl_sf_ellint_F_e(double phi,double k,gsl_mode_t mode,gsl_sf_result* result); --- --- -ellint_F_e :: Double -> Double -> Precision -> (Double,Double) -ellint_F_e phi k mode = createSFR "ellint_F_e" $ gsl_sf_ellint_F_e phi k (precCode mode) -foreign import ccall "ellint.h gsl_sf_ellint_F_e" gsl_sf_ellint_F_e :: Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_ellint_F(double phi,double k,gsl_mode_t mode); --- --- -ellint_F :: Double -> Double -> Precision -> Double -ellint_F phi k mode = gsl_sf_ellint_F phi k (precCode mode) -foreign import ccall "ellint.h gsl_sf_ellint_F" gsl_sf_ellint_F :: Double -> Double -> Gsl_mode_t -> Double - --- | wrapper for int gsl_sf_ellint_E_e(double phi,double k,gsl_mode_t mode,gsl_sf_result* result); --- --- -ellint_E_e :: Double -> Double -> Precision -> (Double,Double) -ellint_E_e phi k mode = createSFR "ellint_E_e" $ gsl_sf_ellint_E_e phi k (precCode mode) -foreign import ccall "ellint.h gsl_sf_ellint_E_e" gsl_sf_ellint_E_e :: Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_ellint_E(double phi,double k,gsl_mode_t mode); --- --- -ellint_E :: Double -> Double -> Precision -> Double -ellint_E phi k mode = gsl_sf_ellint_E phi k (precCode mode) -foreign import ccall "ellint.h gsl_sf_ellint_E" gsl_sf_ellint_E :: Double -> Double -> Gsl_mode_t -> Double - --- | wrapper for int gsl_sf_ellint_P_e(double phi,double k,double n,gsl_mode_t mode,gsl_sf_result* result); --- --- -ellint_P_e :: Double -> Double -> Double -> Precision -> (Double,Double) -ellint_P_e phi k n mode = createSFR "ellint_P_e" $ gsl_sf_ellint_P_e phi k n (precCode mode) -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) - --- | wrapper for double gsl_sf_ellint_P(double phi,double k,double n,gsl_mode_t mode); --- --- -ellint_P :: Double -> Double -> Double -> Precision -> Double -ellint_P phi k n mode = gsl_sf_ellint_P phi k n (precCode mode) -foreign import ccall "ellint.h gsl_sf_ellint_P" gsl_sf_ellint_P :: Double -> Double -> Double -> Gsl_mode_t -> Double - --- | wrapper for int gsl_sf_ellint_D_e(double phi,double k,double n,gsl_mode_t mode,gsl_sf_result* result); --- --- -ellint_D_e :: Double -> Double -> Double -> Precision -> (Double,Double) -ellint_D_e phi k n mode = createSFR "ellint_D_e" $ gsl_sf_ellint_D_e phi k n (precCode mode) -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) - --- | wrapper for double gsl_sf_ellint_D(double phi,double k,double n,gsl_mode_t mode); --- --- -ellint_D :: Double -> Double -> Double -> Precision -> Double -ellint_D phi k n mode = gsl_sf_ellint_D phi k n (precCode mode) -foreign import ccall "ellint.h gsl_sf_ellint_D" gsl_sf_ellint_D :: Double -> Double -> Double -> Gsl_mode_t -> Double - --- | wrapper for int gsl_sf_ellint_RC_e(double x,double y,gsl_mode_t mode,gsl_sf_result* result); --- --- -ellint_RC_e :: Double -> Double -> Precision -> (Double,Double) -ellint_RC_e x y mode = createSFR "ellint_RC_e" $ gsl_sf_ellint_RC_e x y (precCode mode) -foreign import ccall "ellint.h gsl_sf_ellint_RC_e" gsl_sf_ellint_RC_e :: Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_ellint_RC(double x,double y,gsl_mode_t mode); --- --- -ellint_RC :: Double -> Double -> Precision -> Double -ellint_RC x y mode = gsl_sf_ellint_RC x y (precCode mode) -foreign import ccall "ellint.h gsl_sf_ellint_RC" gsl_sf_ellint_RC :: Double -> Double -> Gsl_mode_t -> Double - --- | wrapper for int gsl_sf_ellint_RD_e(double x,double y,double z,gsl_mode_t mode,gsl_sf_result* result); --- --- -ellint_RD_e :: Double -> Double -> Double -> Precision -> (Double,Double) -ellint_RD_e x y z mode = createSFR "ellint_RD_e" $ gsl_sf_ellint_RD_e x y z (precCode mode) -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) - --- | wrapper for double gsl_sf_ellint_RD(double x,double y,double z,gsl_mode_t mode); --- --- -ellint_RD :: Double -> Double -> Double -> Precision -> Double -ellint_RD x y z mode = gsl_sf_ellint_RD x y z (precCode mode) -foreign import ccall "ellint.h gsl_sf_ellint_RD" gsl_sf_ellint_RD :: Double -> Double -> Double -> Gsl_mode_t -> Double - --- | wrapper for int gsl_sf_ellint_RF_e(double x,double y,double z,gsl_mode_t mode,gsl_sf_result* result); --- --- -ellint_RF_e :: Double -> Double -> Double -> Precision -> (Double,Double) -ellint_RF_e x y z mode = createSFR "ellint_RF_e" $ gsl_sf_ellint_RF_e x y z (precCode mode) -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) - --- | wrapper for double gsl_sf_ellint_RF(double x,double y,double z,gsl_mode_t mode); --- --- -ellint_RF :: Double -> Double -> Double -> Precision -> Double -ellint_RF x y z mode = gsl_sf_ellint_RF x y z (precCode mode) -foreign import ccall "ellint.h gsl_sf_ellint_RF" gsl_sf_ellint_RF :: Double -> Double -> Double -> Gsl_mode_t -> Double - --- | wrapper for int gsl_sf_ellint_RJ_e(double x,double y,double z,double p,gsl_mode_t mode,gsl_sf_result* result); --- --- -ellint_RJ_e :: Double -> Double -> Double -> Double -> Precision -> (Double,Double) -ellint_RJ_e x y z p mode = createSFR "ellint_RJ_e" $ gsl_sf_ellint_RJ_e x y z p (precCode mode) -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) - --- | wrapper for double gsl_sf_ellint_RJ(double x,double y,double z,double p,gsl_mode_t mode); --- --- -ellint_RJ :: Double -> Double -> Double -> Double -> Precision -> Double -ellint_RJ x y z p mode = gsl_sf_ellint_RJ x y z p (precCode mode) -foreign import ccall "ellint.h gsl_sf_ellint_RJ" gsl_sf_ellint_RJ :: Double -> Double -> Double -> Double -> Gsl_mode_t -> Double diff --git a/lib/GSL/Special/Erf.hs b/lib/GSL/Special/Erf.hs deleted file mode 100644 index 6dc5abb..0000000 --- a/lib/GSL/Special/Erf.hs +++ /dev/null @@ -1,117 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Erf -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Erf( - erfc_e -, erfc -, log_erfc_e -, log_erfc -, erf_e -, erf -, erf_Z_e -, erf_Q_e -, erf_Z -, erf_Q -, hazard_e -, hazard -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_erfc_e(double x,gsl_sf_result* result); --- --- -erfc_e :: Double -> (Double,Double) -erfc_e x = createSFR "erfc_e" $ gsl_sf_erfc_e x -foreign import ccall "erf.h gsl_sf_erfc_e" gsl_sf_erfc_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_erfc(double x); --- --- -erfc :: Double -> Double -erfc = gsl_sf_erfc -foreign import ccall "erf.h gsl_sf_erfc" gsl_sf_erfc :: Double -> Double - --- | wrapper for int gsl_sf_log_erfc_e(double x,gsl_sf_result* result); --- --- -log_erfc_e :: Double -> (Double,Double) -log_erfc_e x = createSFR "log_erfc_e" $ gsl_sf_log_erfc_e x -foreign import ccall "erf.h gsl_sf_log_erfc_e" gsl_sf_log_erfc_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_log_erfc(double x); --- --- -log_erfc :: Double -> Double -log_erfc = gsl_sf_log_erfc -foreign import ccall "erf.h gsl_sf_log_erfc" gsl_sf_log_erfc :: Double -> Double - --- | wrapper for int gsl_sf_erf_e(double x,gsl_sf_result* result); --- --- -erf_e :: Double -> (Double,Double) -erf_e x = createSFR "erf_e" $ gsl_sf_erf_e x -foreign import ccall "erf.h gsl_sf_erf_e" gsl_sf_erf_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_erf(double x); --- --- -erf :: Double -> Double -erf = gsl_sf_erf -foreign import ccall "erf.h gsl_sf_erf" gsl_sf_erf :: Double -> Double - --- | wrapper for int gsl_sf_erf_Z_e(double x,gsl_sf_result* result); --- --- -erf_Z_e :: Double -> (Double,Double) -erf_Z_e x = createSFR "erf_Z_e" $ gsl_sf_erf_Z_e x -foreign import ccall "erf.h gsl_sf_erf_Z_e" gsl_sf_erf_Z_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for int gsl_sf_erf_Q_e(double x,gsl_sf_result* result); --- --- -erf_Q_e :: Double -> (Double,Double) -erf_Q_e x = createSFR "erf_Q_e" $ gsl_sf_erf_Q_e x -foreign import ccall "erf.h gsl_sf_erf_Q_e" gsl_sf_erf_Q_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_erf_Z(double x); --- --- -erf_Z :: Double -> Double -erf_Z = gsl_sf_erf_Z -foreign import ccall "erf.h gsl_sf_erf_Z" gsl_sf_erf_Z :: Double -> Double - --- | wrapper for double gsl_sf_erf_Q(double x); --- --- -erf_Q :: Double -> Double -erf_Q = gsl_sf_erf_Q -foreign import ccall "erf.h gsl_sf_erf_Q" gsl_sf_erf_Q :: Double -> Double - --- | wrapper for int gsl_sf_hazard_e(double x,gsl_sf_result* result); --- --- -hazard_e :: Double -> (Double,Double) -hazard_e x = createSFR "hazard_e" $ gsl_sf_hazard_e x -foreign import ccall "erf.h gsl_sf_hazard_e" gsl_sf_hazard_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_hazard(double x); --- --- -hazard :: Double -> Double -hazard = gsl_sf_hazard -foreign import ccall "erf.h gsl_sf_hazard" gsl_sf_hazard :: Double -> Double diff --git a/lib/GSL/Special/Exp.hs b/lib/GSL/Special/Exp.hs deleted file mode 100644 index 8c3e5b8..0000000 --- a/lib/GSL/Special/Exp.hs +++ /dev/null @@ -1,129 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Exp -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Exp( - exp_e -, GSL.Special.Exp.exp -, exp_e10_e -, exp_mult_e -, exp_mult -, exp_mult_e10_e -, expm1_e -, expm1 -, exprel_e -, exprel -, exprel_2_e -, exprel_2 -, exprel_n_e -, exprel_n -, exp_err_e -, exp_err_e10_e -, exp_mult_err_e -, exp_mult_err_e10_e -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_exp_e(double x,gsl_sf_result* result); -exp_e :: Double -> (Double,Double) -exp_e x = createSFR "exp_e" $ gsl_sf_exp_e x -foreign import ccall "exp.h gsl_sf_exp_e" gsl_sf_exp_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_exp(double x); -exp :: Double -> Double -exp = gsl_sf_exp -foreign import ccall "exp.h gsl_sf_exp" gsl_sf_exp :: Double -> Double - --- | wrapper for int gsl_sf_exp_e10_e(double x,gsl_sf_result_e10* result); -exp_e10_e :: Double -> (Double,Int,Double) -exp_e10_e x = createSFR_E10 "exp_e10_e" $ gsl_sf_exp_e10_e x -foreign import ccall "exp.h gsl_sf_exp_e10_e" gsl_sf_exp_e10_e :: Double -> Ptr () -> IO(Int) - --- | wrapper for int gsl_sf_exp_mult_e(double x,double y,gsl_sf_result* result); -exp_mult_e :: Double -> Double -> (Double,Double) -exp_mult_e x y = createSFR "exp_mult_e" $ gsl_sf_exp_mult_e x y -foreign import ccall "exp.h gsl_sf_exp_mult_e" gsl_sf_exp_mult_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_exp_mult(double x,double y); -exp_mult :: Double -> Double -> Double -exp_mult = gsl_sf_exp_mult -foreign import ccall "exp.h gsl_sf_exp_mult" gsl_sf_exp_mult :: Double -> Double -> Double - --- | wrapper for int gsl_sf_exp_mult_e10_e(double x,double y,gsl_sf_result_e10* result); -exp_mult_e10_e :: Double -> Double -> (Double,Int,Double) -exp_mult_e10_e x y = createSFR_E10 "exp_mult_e10_e" $ gsl_sf_exp_mult_e10_e x y -foreign import ccall "exp.h gsl_sf_exp_mult_e10_e" gsl_sf_exp_mult_e10_e :: Double -> Double -> Ptr () -> IO(Int) - --- | wrapper for int gsl_sf_expm1_e(double x,gsl_sf_result* result); -expm1_e :: Double -> (Double,Double) -expm1_e x = createSFR "expm1_e" $ gsl_sf_expm1_e x -foreign import ccall "exp.h gsl_sf_expm1_e" gsl_sf_expm1_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_expm1(double x); -expm1 :: Double -> Double -expm1 = gsl_sf_expm1 -foreign import ccall "exp.h gsl_sf_expm1" gsl_sf_expm1 :: Double -> Double - --- | wrapper for int gsl_sf_exprel_e(double x,gsl_sf_result* result); -exprel_e :: Double -> (Double,Double) -exprel_e x = createSFR "exprel_e" $ gsl_sf_exprel_e x -foreign import ccall "exp.h gsl_sf_exprel_e" gsl_sf_exprel_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_exprel(double x); -exprel :: Double -> Double -exprel = gsl_sf_exprel -foreign import ccall "exp.h gsl_sf_exprel" gsl_sf_exprel :: Double -> Double - --- | wrapper for int gsl_sf_exprel_2_e(double x,gsl_sf_result* result); -exprel_2_e :: Double -> (Double,Double) -exprel_2_e x = createSFR "exprel_2_e" $ gsl_sf_exprel_2_e x -foreign import ccall "exp.h gsl_sf_exprel_2_e" gsl_sf_exprel_2_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_exprel_2(double x); -exprel_2 :: Double -> Double -exprel_2 = gsl_sf_exprel_2 -foreign import ccall "exp.h gsl_sf_exprel_2" gsl_sf_exprel_2 :: Double -> Double - --- | wrapper for int gsl_sf_exprel_n_e(int n,double x,gsl_sf_result* result); -exprel_n_e :: Int -> Double -> (Double,Double) -exprel_n_e n x = createSFR "exprel_n_e" $ gsl_sf_exprel_n_e n x -foreign import ccall "exp.h gsl_sf_exprel_n_e" gsl_sf_exprel_n_e :: Int -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_exprel_n(int n,double x); -exprel_n :: Int -> Double -> Double -exprel_n = gsl_sf_exprel_n -foreign import ccall "exp.h gsl_sf_exprel_n" gsl_sf_exprel_n :: Int -> Double -> Double - --- | wrapper for int gsl_sf_exp_err_e(double x,double dx,gsl_sf_result* result); -exp_err_e :: Double -> Double -> (Double,Double) -exp_err_e x dx = createSFR "exp_err_e" $ gsl_sf_exp_err_e x dx -foreign import ccall "exp.h gsl_sf_exp_err_e" gsl_sf_exp_err_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for int gsl_sf_exp_err_e10_e(double x,double dx,gsl_sf_result_e10* result); -exp_err_e10_e :: Double -> Double -> (Double,Int,Double) -exp_err_e10_e x dx = createSFR_E10 "exp_err_e10_e" $ gsl_sf_exp_err_e10_e x dx -foreign import ccall "exp.h gsl_sf_exp_err_e10_e" gsl_sf_exp_err_e10_e :: Double -> Double -> Ptr () -> IO(Int) - --- | wrapper for int gsl_sf_exp_mult_err_e(double x,double dx,double y,double dy,gsl_sf_result* result); -exp_mult_err_e :: Double -> Double -> Double -> Double -> (Double,Double) -exp_mult_err_e x dx y dy = createSFR "exp_mult_err_e" $ gsl_sf_exp_mult_err_e x dx y dy -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) - --- | wrapper for int gsl_sf_exp_mult_err_e10_e(double x,double dx,double y,double dy,gsl_sf_result_e10* result); -exp_mult_err_e10_e :: Double -> Double -> Double -> Double -> (Double,Int,Double) -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 -foreign import ccall "exp.h gsl_sf_exp_mult_err_e10_e" gsl_sf_exp_mult_err_e10_e :: Double -> Double -> Double -> Double -> Ptr () -> IO(Int) diff --git a/lib/GSL/Special/Expint.hs b/lib/GSL/Special/Expint.hs deleted file mode 100644 index 4e1b2b5..0000000 --- a/lib/GSL/Special/Expint.hs +++ /dev/null @@ -1,213 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Expint -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Expint( - expint_E1_e -, expint_E1 -, expint_E2_e -, expint_E2 -, expint_E1_scaled_e -, expint_E1_scaled -, expint_E2_scaled_e -, expint_E2_scaled -, expint_Ei_e -, expint_Ei -, expint_Ei_scaled_e -, expint_Ei_scaled -, shi_e -, shi -, chi_e -, chi -, expint_3_e -, expint_3 -, si_e -, si -, ci_e -, ci -, atanint_e -, atanint -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_expint_E1_e(double x,gsl_sf_result* result); --- --- -expint_E1_e :: Double -> (Double,Double) -expint_E1_e x = createSFR "expint_E1_e" $ gsl_sf_expint_E1_e x -foreign import ccall "expint.h gsl_sf_expint_E1_e" gsl_sf_expint_E1_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_expint_E1(double x); --- --- -expint_E1 :: Double -> Double -expint_E1 = gsl_sf_expint_E1 -foreign import ccall "expint.h gsl_sf_expint_E1" gsl_sf_expint_E1 :: Double -> Double - --- | wrapper for int gsl_sf_expint_E2_e(double x,gsl_sf_result* result); --- --- -expint_E2_e :: Double -> (Double,Double) -expint_E2_e x = createSFR "expint_E2_e" $ gsl_sf_expint_E2_e x -foreign import ccall "expint.h gsl_sf_expint_E2_e" gsl_sf_expint_E2_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_expint_E2(double x); --- --- -expint_E2 :: Double -> Double -expint_E2 = gsl_sf_expint_E2 -foreign import ccall "expint.h gsl_sf_expint_E2" gsl_sf_expint_E2 :: Double -> Double - --- | wrapper for int gsl_sf_expint_E1_scaled_e(double x,gsl_sf_result* result); --- --- -expint_E1_scaled_e :: Double -> (Double,Double) -expint_E1_scaled_e x = createSFR "expint_E1_scaled_e" $ gsl_sf_expint_E1_scaled_e x -foreign import ccall "expint.h gsl_sf_expint_E1_scaled_e" gsl_sf_expint_E1_scaled_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_expint_E1_scaled(double x); --- --- -expint_E1_scaled :: Double -> Double -expint_E1_scaled = gsl_sf_expint_E1_scaled -foreign import ccall "expint.h gsl_sf_expint_E1_scaled" gsl_sf_expint_E1_scaled :: Double -> Double - --- | wrapper for int gsl_sf_expint_E2_scaled_e(double x,gsl_sf_result* result); --- --- -expint_E2_scaled_e :: Double -> (Double,Double) -expint_E2_scaled_e x = createSFR "expint_E2_scaled_e" $ gsl_sf_expint_E2_scaled_e x -foreign import ccall "expint.h gsl_sf_expint_E2_scaled_e" gsl_sf_expint_E2_scaled_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_expint_E2_scaled(double x); --- --- -expint_E2_scaled :: Double -> Double -expint_E2_scaled = gsl_sf_expint_E2_scaled -foreign import ccall "expint.h gsl_sf_expint_E2_scaled" gsl_sf_expint_E2_scaled :: Double -> Double - --- | wrapper for int gsl_sf_expint_Ei_e(double x,gsl_sf_result* result); --- --- -expint_Ei_e :: Double -> (Double,Double) -expint_Ei_e x = createSFR "expint_Ei_e" $ gsl_sf_expint_Ei_e x -foreign import ccall "expint.h gsl_sf_expint_Ei_e" gsl_sf_expint_Ei_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_expint_Ei(double x); --- --- -expint_Ei :: Double -> Double -expint_Ei = gsl_sf_expint_Ei -foreign import ccall "expint.h gsl_sf_expint_Ei" gsl_sf_expint_Ei :: Double -> Double - --- | wrapper for int gsl_sf_expint_Ei_scaled_e(double x,gsl_sf_result* result); --- --- -expint_Ei_scaled_e :: Double -> (Double,Double) -expint_Ei_scaled_e x = createSFR "expint_Ei_scaled_e" $ gsl_sf_expint_Ei_scaled_e x -foreign import ccall "expint.h gsl_sf_expint_Ei_scaled_e" gsl_sf_expint_Ei_scaled_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_expint_Ei_scaled(double x); --- --- -expint_Ei_scaled :: Double -> Double -expint_Ei_scaled = gsl_sf_expint_Ei_scaled -foreign import ccall "expint.h gsl_sf_expint_Ei_scaled" gsl_sf_expint_Ei_scaled :: Double -> Double - --- | wrapper for int gsl_sf_Shi_e(double x,gsl_sf_result* result); --- --- -shi_e :: Double -> (Double,Double) -shi_e x = createSFR "shi_e" $ gsl_sf_Shi_e x -foreign import ccall "expint.h gsl_sf_Shi_e" gsl_sf_Shi_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_Shi(double x); --- --- -shi :: Double -> Double -shi = gsl_sf_Shi -foreign import ccall "expint.h gsl_sf_Shi" gsl_sf_Shi :: Double -> Double - --- | wrapper for int gsl_sf_Chi_e(double x,gsl_sf_result* result); --- --- -chi_e :: Double -> (Double,Double) -chi_e x = createSFR "chi_e" $ gsl_sf_Chi_e x -foreign import ccall "expint.h gsl_sf_Chi_e" gsl_sf_Chi_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_Chi(double x); --- --- -chi :: Double -> Double -chi = gsl_sf_Chi -foreign import ccall "expint.h gsl_sf_Chi" gsl_sf_Chi :: Double -> Double - --- | wrapper for int gsl_sf_expint_3_e(double x,gsl_sf_result* result); --- --- -expint_3_e :: Double -> (Double,Double) -expint_3_e x = createSFR "expint_3_e" $ gsl_sf_expint_3_e x -foreign import ccall "expint.h gsl_sf_expint_3_e" gsl_sf_expint_3_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_expint_3(double x); --- --- -expint_3 :: Double -> Double -expint_3 = gsl_sf_expint_3 -foreign import ccall "expint.h gsl_sf_expint_3" gsl_sf_expint_3 :: Double -> Double - --- | wrapper for int gsl_sf_Si_e(double x,gsl_sf_result* result); --- --- -si_e :: Double -> (Double,Double) -si_e x = createSFR "si_e" $ gsl_sf_Si_e x -foreign import ccall "expint.h gsl_sf_Si_e" gsl_sf_Si_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_Si(double x); --- --- -si :: Double -> Double -si = gsl_sf_Si -foreign import ccall "expint.h gsl_sf_Si" gsl_sf_Si :: Double -> Double - --- | wrapper for int gsl_sf_Ci_e(double x,gsl_sf_result* result); --- --- -ci_e :: Double -> (Double,Double) -ci_e x = createSFR "ci_e" $ gsl_sf_Ci_e x -foreign import ccall "expint.h gsl_sf_Ci_e" gsl_sf_Ci_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_Ci(double x); --- --- -ci :: Double -> Double -ci = gsl_sf_Ci -foreign import ccall "expint.h gsl_sf_Ci" gsl_sf_Ci :: Double -> Double - --- | wrapper for int gsl_sf_atanint_e(double x,gsl_sf_result* result); --- --- -atanint_e :: Double -> (Double,Double) -atanint_e x = createSFR "atanint_e" $ gsl_sf_atanint_e x -foreign import ccall "expint.h gsl_sf_atanint_e" gsl_sf_atanint_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_atanint(double x); --- --- -atanint :: Double -> Double -atanint = gsl_sf_atanint -foreign import ccall "expint.h gsl_sf_atanint" gsl_sf_atanint :: Double -> Double diff --git a/lib/GSL/Special/Fermi_dirac.hs b/lib/GSL/Special/Fermi_dirac.hs deleted file mode 100644 index 18dc3b2..0000000 --- a/lib/GSL/Special/Fermi_dirac.hs +++ /dev/null @@ -1,165 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Fermi_dirac -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Fermi_dirac( - fermi_dirac_m1_e -, fermi_dirac_m1 -, fermi_dirac_0_e -, fermi_dirac_0 -, fermi_dirac_1_e -, fermi_dirac_1 -, fermi_dirac_2_e -, fermi_dirac_2 -, fermi_dirac_int_e -, fermi_dirac_int -, fermi_dirac_mhalf_e -, fermi_dirac_mhalf -, fermi_dirac_half_e -, fermi_dirac_half -, fermi_dirac_3half_e -, fermi_dirac_3half -, fermi_dirac_inc_0_e -, fermi_dirac_inc_0 -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_fermi_dirac_m1_e(double x,gsl_sf_result* result); --- --- -fermi_dirac_m1_e :: Double -> (Double,Double) -fermi_dirac_m1_e x = createSFR "fermi_dirac_m1_e" $ gsl_sf_fermi_dirac_m1_e x -foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_m1_e" gsl_sf_fermi_dirac_m1_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_fermi_dirac_m1(double x); --- --- -fermi_dirac_m1 :: Double -> Double -fermi_dirac_m1 = gsl_sf_fermi_dirac_m1 -foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_m1" gsl_sf_fermi_dirac_m1 :: Double -> Double - --- | wrapper for int gsl_sf_fermi_dirac_0_e(double x,gsl_sf_result* result); --- --- -fermi_dirac_0_e :: Double -> (Double,Double) -fermi_dirac_0_e x = createSFR "fermi_dirac_0_e" $ gsl_sf_fermi_dirac_0_e x -foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_0_e" gsl_sf_fermi_dirac_0_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_fermi_dirac_0(double x); --- --- -fermi_dirac_0 :: Double -> Double -fermi_dirac_0 = gsl_sf_fermi_dirac_0 -foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_0" gsl_sf_fermi_dirac_0 :: Double -> Double - --- | wrapper for int gsl_sf_fermi_dirac_1_e(double x,gsl_sf_result* result); --- --- -fermi_dirac_1_e :: Double -> (Double,Double) -fermi_dirac_1_e x = createSFR "fermi_dirac_1_e" $ gsl_sf_fermi_dirac_1_e x -foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_1_e" gsl_sf_fermi_dirac_1_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_fermi_dirac_1(double x); --- --- -fermi_dirac_1 :: Double -> Double -fermi_dirac_1 = gsl_sf_fermi_dirac_1 -foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_1" gsl_sf_fermi_dirac_1 :: Double -> Double - --- | wrapper for int gsl_sf_fermi_dirac_2_e(double x,gsl_sf_result* result); --- --- -fermi_dirac_2_e :: Double -> (Double,Double) -fermi_dirac_2_e x = createSFR "fermi_dirac_2_e" $ gsl_sf_fermi_dirac_2_e x -foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_2_e" gsl_sf_fermi_dirac_2_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_fermi_dirac_2(double x); --- --- -fermi_dirac_2 :: Double -> Double -fermi_dirac_2 = gsl_sf_fermi_dirac_2 -foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_2" gsl_sf_fermi_dirac_2 :: Double -> Double - --- | wrapper for int gsl_sf_fermi_dirac_int_e(int j,double x,gsl_sf_result* result); --- --- -fermi_dirac_int_e :: Int -> Double -> (Double,Double) -fermi_dirac_int_e j x = createSFR "fermi_dirac_int_e" $ gsl_sf_fermi_dirac_int_e j x -foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_int_e" gsl_sf_fermi_dirac_int_e :: Int -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_fermi_dirac_int(int j,double x); --- --- -fermi_dirac_int :: Int -> Double -> Double -fermi_dirac_int = gsl_sf_fermi_dirac_int -foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_int" gsl_sf_fermi_dirac_int :: Int -> Double -> Double - --- | wrapper for int gsl_sf_fermi_dirac_mhalf_e(double x,gsl_sf_result* result); --- --- -fermi_dirac_mhalf_e :: Double -> (Double,Double) -fermi_dirac_mhalf_e x = createSFR "fermi_dirac_mhalf_e" $ gsl_sf_fermi_dirac_mhalf_e x -foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_mhalf_e" gsl_sf_fermi_dirac_mhalf_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_fermi_dirac_mhalf(double x); --- --- -fermi_dirac_mhalf :: Double -> Double -fermi_dirac_mhalf = gsl_sf_fermi_dirac_mhalf -foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_mhalf" gsl_sf_fermi_dirac_mhalf :: Double -> Double - --- | wrapper for int gsl_sf_fermi_dirac_half_e(double x,gsl_sf_result* result); --- --- -fermi_dirac_half_e :: Double -> (Double,Double) -fermi_dirac_half_e x = createSFR "fermi_dirac_half_e" $ gsl_sf_fermi_dirac_half_e x -foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_half_e" gsl_sf_fermi_dirac_half_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_fermi_dirac_half(double x); --- --- -fermi_dirac_half :: Double -> Double -fermi_dirac_half = gsl_sf_fermi_dirac_half -foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_half" gsl_sf_fermi_dirac_half :: Double -> Double - --- | wrapper for int gsl_sf_fermi_dirac_3half_e(double x,gsl_sf_result* result); --- --- -fermi_dirac_3half_e :: Double -> (Double,Double) -fermi_dirac_3half_e x = createSFR "fermi_dirac_3half_e" $ gsl_sf_fermi_dirac_3half_e x -foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_3half_e" gsl_sf_fermi_dirac_3half_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_fermi_dirac_3half(double x); --- --- -fermi_dirac_3half :: Double -> Double -fermi_dirac_3half = gsl_sf_fermi_dirac_3half -foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_3half" gsl_sf_fermi_dirac_3half :: Double -> Double - --- | wrapper for int gsl_sf_fermi_dirac_inc_0_e(double x,double b,gsl_sf_result* result); --- --- -fermi_dirac_inc_0_e :: Double -> Double -> (Double,Double) -fermi_dirac_inc_0_e x b = createSFR "fermi_dirac_inc_0_e" $ gsl_sf_fermi_dirac_inc_0_e x b -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) - --- | wrapper for double gsl_sf_fermi_dirac_inc_0(double x,double b); --- --- -fermi_dirac_inc_0 :: Double -> Double -> Double -fermi_dirac_inc_0 = gsl_sf_fermi_dirac_inc_0 -foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_inc_0" gsl_sf_fermi_dirac_inc_0 :: Double -> Double -> Double diff --git a/lib/GSL/Special/Gamma.hs b/lib/GSL/Special/Gamma.hs deleted file mode 100644 index ae5010d..0000000 --- a/lib/GSL/Special/Gamma.hs +++ /dev/null @@ -1,362 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Gamma -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Gamma( - lngamma_e -, lngamma -, gamma_e -, gamma -, gammastar_e -, gammastar -, gammainv_e -, gammainv -, taylorcoeff_e -, taylorcoeff -, fact_e -, fact -, doublefact_e -, doublefact -, lnfact_e -, lnfact -, lndoublefact_e -, lndoublefact -, lnchoose_e -, lnchoose -, choose_e -, choose -, lnpoch_e -, lnpoch -, poch_e -, poch -, pochrel_e -, pochrel -, gamma_inc_Q_e -, gamma_inc_Q -, gamma_inc_P_e -, gamma_inc_P -, gamma_inc_e -, gamma_inc -, lnbeta_e -, lnbeta -, beta_e -, beta -, beta_inc_e -, beta_inc -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_lngamma_e(double x,gsl_sf_result* result); --- --- -lngamma_e :: Double -> (Double,Double) -lngamma_e x = createSFR "lngamma_e" $ gsl_sf_lngamma_e x -foreign import ccall "gamma.h gsl_sf_lngamma_e" gsl_sf_lngamma_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_lngamma(double x); --- --- -lngamma :: Double -> Double -lngamma = gsl_sf_lngamma -foreign import ccall "gamma.h gsl_sf_lngamma" gsl_sf_lngamma :: Double -> Double - --- | wrapper for int gsl_sf_lngamma_sgn_e(double x,gsl_sf_result* result_lg,double* sgn); --- --- -lngamma_sgn_e :: Double -> Ptr Double -> Ptr Double -> Int -lngamma_sgn_e = gsl_sf_lngamma_sgn_e -foreign import ccall "gamma.h gsl_sf_lngamma_sgn_e" gsl_sf_lngamma_sgn_e :: Double -> Ptr Double -> Ptr Double -> Int - --- | wrapper for int gsl_sf_gamma_e(double x,gsl_sf_result* result); --- --- -gamma_e :: Double -> (Double,Double) -gamma_e x = createSFR "gamma_e" $ gsl_sf_gamma_e x -foreign import ccall "gamma.h gsl_sf_gamma_e" gsl_sf_gamma_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_gamma(double x); --- --- -gamma :: Double -> Double -gamma = gsl_sf_gamma -foreign import ccall "gamma.h gsl_sf_gamma" gsl_sf_gamma :: Double -> Double - --- | wrapper for int gsl_sf_gammastar_e(double x,gsl_sf_result* result); --- --- -gammastar_e :: Double -> (Double,Double) -gammastar_e x = createSFR "gammastar_e" $ gsl_sf_gammastar_e x -foreign import ccall "gamma.h gsl_sf_gammastar_e" gsl_sf_gammastar_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_gammastar(double x); --- --- -gammastar :: Double -> Double -gammastar = gsl_sf_gammastar -foreign import ccall "gamma.h gsl_sf_gammastar" gsl_sf_gammastar :: Double -> Double - --- | wrapper for int gsl_sf_gammainv_e(double x,gsl_sf_result* result); --- --- -gammainv_e :: Double -> (Double,Double) -gammainv_e x = createSFR "gammainv_e" $ gsl_sf_gammainv_e x -foreign import ccall "gamma.h gsl_sf_gammainv_e" gsl_sf_gammainv_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_gammainv(double x); --- --- -gammainv :: Double -> Double -gammainv = gsl_sf_gammainv -foreign import ccall "gamma.h gsl_sf_gammainv" gsl_sf_gammainv :: Double -> Double - --- | wrapper for int gsl_sf_lngamma_complex_e(double zr,double zi,gsl_sf_result* lnr,gsl_sf_result* arg); --- --- -lngamma_complex_e :: Double -> Double -> Ptr Double -> (Double,Double) -lngamma_complex_e zr zi lnr = createSFR "lngamma_complex_e" $ gsl_sf_lngamma_complex_e zr zi lnr -foreign import ccall "gamma.h gsl_sf_lngamma_complex_e" gsl_sf_lngamma_complex_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) - --- | wrapper for int gsl_sf_taylorcoeff_e(int n,double x,gsl_sf_result* result); --- --- -taylorcoeff_e :: Int -> Double -> (Double,Double) -taylorcoeff_e n x = createSFR "taylorcoeff_e" $ gsl_sf_taylorcoeff_e n x -foreign import ccall "gamma.h gsl_sf_taylorcoeff_e" gsl_sf_taylorcoeff_e :: Int -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_taylorcoeff(int n,double x); --- --- -taylorcoeff :: Int -> Double -> Double -taylorcoeff = gsl_sf_taylorcoeff -foreign import ccall "gamma.h gsl_sf_taylorcoeff" gsl_sf_taylorcoeff :: Int -> Double -> Double - --- | wrapper for int gsl_sf_fact_e(int n,gsl_sf_result* result); --- --- -fact_e :: Int -> (Double,Double) -fact_e n = createSFR "fact_e" $ gsl_sf_fact_e n -foreign import ccall "gamma.h gsl_sf_fact_e" gsl_sf_fact_e :: Int -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_fact(int n); --- --- -fact :: Int -> Double -fact = gsl_sf_fact -foreign import ccall "gamma.h gsl_sf_fact" gsl_sf_fact :: Int -> Double - --- | wrapper for int gsl_sf_doublefact_e(int n,gsl_sf_result* result); --- --- -doublefact_e :: Int -> (Double,Double) -doublefact_e n = createSFR "doublefact_e" $ gsl_sf_doublefact_e n -foreign import ccall "gamma.h gsl_sf_doublefact_e" gsl_sf_doublefact_e :: Int -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_doublefact(int n); --- --- -doublefact :: Int -> Double -doublefact = gsl_sf_doublefact -foreign import ccall "gamma.h gsl_sf_doublefact" gsl_sf_doublefact :: Int -> Double - --- | wrapper for int gsl_sf_lnfact_e(int n,gsl_sf_result* result); --- --- -lnfact_e :: Int -> (Double,Double) -lnfact_e n = createSFR "lnfact_e" $ gsl_sf_lnfact_e n -foreign import ccall "gamma.h gsl_sf_lnfact_e" gsl_sf_lnfact_e :: Int -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_lnfact(int n); --- --- -lnfact :: Int -> Double -lnfact = gsl_sf_lnfact -foreign import ccall "gamma.h gsl_sf_lnfact" gsl_sf_lnfact :: Int -> Double - --- | wrapper for int gsl_sf_lndoublefact_e(int n,gsl_sf_result* result); --- --- -lndoublefact_e :: Int -> (Double,Double) -lndoublefact_e n = createSFR "lndoublefact_e" $ gsl_sf_lndoublefact_e n -foreign import ccall "gamma.h gsl_sf_lndoublefact_e" gsl_sf_lndoublefact_e :: Int -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_lndoublefact(int n); --- --- -lndoublefact :: Int -> Double -lndoublefact = gsl_sf_lndoublefact -foreign import ccall "gamma.h gsl_sf_lndoublefact" gsl_sf_lndoublefact :: Int -> Double - --- | wrapper for int gsl_sf_lnchoose_e(int n,int m,gsl_sf_result* result); --- --- -lnchoose_e :: Int -> Int -> (Double,Double) -lnchoose_e n m = createSFR "lnchoose_e" $ gsl_sf_lnchoose_e n m -foreign import ccall "gamma.h gsl_sf_lnchoose_e" gsl_sf_lnchoose_e :: Int -> Int -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_lnchoose(int n,int m); --- --- -lnchoose :: Int -> Int -> Double -lnchoose = gsl_sf_lnchoose -foreign import ccall "gamma.h gsl_sf_lnchoose" gsl_sf_lnchoose :: Int -> Int -> Double - --- | wrapper for int gsl_sf_choose_e(int n,int m,gsl_sf_result* result); --- --- -choose_e :: Int -> Int -> (Double,Double) -choose_e n m = createSFR "choose_e" $ gsl_sf_choose_e n m -foreign import ccall "gamma.h gsl_sf_choose_e" gsl_sf_choose_e :: Int -> Int -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_choose(int n,int m); --- --- -choose :: Int -> Int -> Double -choose = gsl_sf_choose -foreign import ccall "gamma.h gsl_sf_choose" gsl_sf_choose :: Int -> Int -> Double - --- | wrapper for int gsl_sf_lnpoch_e(double a,double x,gsl_sf_result* result); --- --- -lnpoch_e :: Double -> Double -> (Double,Double) -lnpoch_e a x = createSFR "lnpoch_e" $ gsl_sf_lnpoch_e a x -foreign import ccall "gamma.h gsl_sf_lnpoch_e" gsl_sf_lnpoch_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_lnpoch(double a,double x); --- --- -lnpoch :: Double -> Double -> Double -lnpoch = gsl_sf_lnpoch -foreign import ccall "gamma.h gsl_sf_lnpoch" gsl_sf_lnpoch :: Double -> Double -> Double - --- | wrapper for int gsl_sf_lnpoch_sgn_e(double a,double x,gsl_sf_result* result,double* sgn); --- --- -lnpoch_sgn_e :: Double -> Double -> Ptr Double -> Ptr Double -> Int -lnpoch_sgn_e = gsl_sf_lnpoch_sgn_e -foreign import ccall "gamma.h gsl_sf_lnpoch_sgn_e" gsl_sf_lnpoch_sgn_e :: Double -> Double -> Ptr Double -> Ptr Double -> Int - --- | wrapper for int gsl_sf_poch_e(double a,double x,gsl_sf_result* result); --- --- -poch_e :: Double -> Double -> (Double,Double) -poch_e a x = createSFR "poch_e" $ gsl_sf_poch_e a x -foreign import ccall "gamma.h gsl_sf_poch_e" gsl_sf_poch_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_poch(double a,double x); --- --- -poch :: Double -> Double -> Double -poch = gsl_sf_poch -foreign import ccall "gamma.h gsl_sf_poch" gsl_sf_poch :: Double -> Double -> Double - --- | wrapper for int gsl_sf_pochrel_e(double a,double x,gsl_sf_result* result); --- --- -pochrel_e :: Double -> Double -> (Double,Double) -pochrel_e a x = createSFR "pochrel_e" $ gsl_sf_pochrel_e a x -foreign import ccall "gamma.h gsl_sf_pochrel_e" gsl_sf_pochrel_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_pochrel(double a,double x); --- --- -pochrel :: Double -> Double -> Double -pochrel = gsl_sf_pochrel -foreign import ccall "gamma.h gsl_sf_pochrel" gsl_sf_pochrel :: Double -> Double -> Double - --- | wrapper for int gsl_sf_gamma_inc_Q_e(double a,double x,gsl_sf_result* result); --- --- -gamma_inc_Q_e :: Double -> Double -> (Double,Double) -gamma_inc_Q_e a x = createSFR "gamma_inc_Q_e" $ gsl_sf_gamma_inc_Q_e a x -foreign import ccall "gamma.h gsl_sf_gamma_inc_Q_e" gsl_sf_gamma_inc_Q_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_gamma_inc_Q(double a,double x); --- --- -gamma_inc_Q :: Double -> Double -> Double -gamma_inc_Q = gsl_sf_gamma_inc_Q -foreign import ccall "gamma.h gsl_sf_gamma_inc_Q" gsl_sf_gamma_inc_Q :: Double -> Double -> Double - --- | wrapper for int gsl_sf_gamma_inc_P_e(double a,double x,gsl_sf_result* result); --- --- -gamma_inc_P_e :: Double -> Double -> (Double,Double) -gamma_inc_P_e a x = createSFR "gamma_inc_P_e" $ gsl_sf_gamma_inc_P_e a x -foreign import ccall "gamma.h gsl_sf_gamma_inc_P_e" gsl_sf_gamma_inc_P_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_gamma_inc_P(double a,double x); --- --- -gamma_inc_P :: Double -> Double -> Double -gamma_inc_P = gsl_sf_gamma_inc_P -foreign import ccall "gamma.h gsl_sf_gamma_inc_P" gsl_sf_gamma_inc_P :: Double -> Double -> Double - --- | wrapper for int gsl_sf_gamma_inc_e(double a,double x,gsl_sf_result* result); --- --- -gamma_inc_e :: Double -> Double -> (Double,Double) -gamma_inc_e a x = createSFR "gamma_inc_e" $ gsl_sf_gamma_inc_e a x -foreign import ccall "gamma.h gsl_sf_gamma_inc_e" gsl_sf_gamma_inc_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_gamma_inc(double a,double x); --- --- -gamma_inc :: Double -> Double -> Double -gamma_inc = gsl_sf_gamma_inc -foreign import ccall "gamma.h gsl_sf_gamma_inc" gsl_sf_gamma_inc :: Double -> Double -> Double - --- | wrapper for int gsl_sf_lnbeta_e(double a,double b,gsl_sf_result* result); --- --- -lnbeta_e :: Double -> Double -> (Double,Double) -lnbeta_e a b = createSFR "lnbeta_e" $ gsl_sf_lnbeta_e a b -foreign import ccall "gamma.h gsl_sf_lnbeta_e" gsl_sf_lnbeta_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_lnbeta(double a,double b); --- --- -lnbeta :: Double -> Double -> Double -lnbeta = gsl_sf_lnbeta -foreign import ccall "gamma.h gsl_sf_lnbeta" gsl_sf_lnbeta :: Double -> Double -> Double - --- | wrapper for int gsl_sf_beta_e(double a,double b,gsl_sf_result* result); --- --- -beta_e :: Double -> Double -> (Double,Double) -beta_e a b = createSFR "beta_e" $ gsl_sf_beta_e a b -foreign import ccall "gamma.h gsl_sf_beta_e" gsl_sf_beta_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_beta(double a,double b); --- --- -beta :: Double -> Double -> Double -beta = gsl_sf_beta -foreign import ccall "gamma.h gsl_sf_beta" gsl_sf_beta :: Double -> Double -> Double - --- | wrapper for int gsl_sf_beta_inc_e(double a,double b,double x,gsl_sf_result* result); --- --- -beta_inc_e :: Double -> Double -> Double -> (Double,Double) -beta_inc_e a b x = createSFR "beta_inc_e" $ gsl_sf_beta_inc_e a b x -foreign import ccall "gamma.h gsl_sf_beta_inc_e" gsl_sf_beta_inc_e :: Double -> Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_beta_inc(double a,double b,double x); --- --- -beta_inc :: Double -> Double -> Double -> Double -beta_inc = gsl_sf_beta_inc -foreign import ccall "gamma.h gsl_sf_beta_inc" gsl_sf_beta_inc :: Double -> Double -> Double -> Double diff --git a/lib/GSL/Special/Gegenbauer.hs b/lib/GSL/Special/Gegenbauer.hs deleted file mode 100644 index 9667042..0000000 --- a/lib/GSL/Special/Gegenbauer.hs +++ /dev/null @@ -1,92 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Gegenbauer -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Gegenbauer( - gegenpoly_1_e -, gegenpoly_2_e -, gegenpoly_3_e -, gegenpoly_1 -, gegenpoly_2 -, gegenpoly_3 -, gegenpoly_n_e -, gegenpoly_n -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_gegenpoly_1_e(double lambda,double x,gsl_sf_result* result); --- --- -gegenpoly_1_e :: Double -> Double -> (Double,Double) -gegenpoly_1_e lambda x = createSFR "gegenpoly_1_e" $ gsl_sf_gegenpoly_1_e lambda x -foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_1_e" gsl_sf_gegenpoly_1_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for int gsl_sf_gegenpoly_2_e(double lambda,double x,gsl_sf_result* result); --- --- -gegenpoly_2_e :: Double -> Double -> (Double,Double) -gegenpoly_2_e lambda x = createSFR "gegenpoly_2_e" $ gsl_sf_gegenpoly_2_e lambda x -foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_2_e" gsl_sf_gegenpoly_2_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for int gsl_sf_gegenpoly_3_e(double lambda,double x,gsl_sf_result* result); --- --- -gegenpoly_3_e :: Double -> Double -> (Double,Double) -gegenpoly_3_e lambda x = createSFR "gegenpoly_3_e" $ gsl_sf_gegenpoly_3_e lambda x -foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_3_e" gsl_sf_gegenpoly_3_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_gegenpoly_1(double lambda,double x); --- --- -gegenpoly_1 :: Double -> Double -> Double -gegenpoly_1 = gsl_sf_gegenpoly_1 -foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_1" gsl_sf_gegenpoly_1 :: Double -> Double -> Double - --- | wrapper for double gsl_sf_gegenpoly_2(double lambda,double x); --- --- -gegenpoly_2 :: Double -> Double -> Double -gegenpoly_2 = gsl_sf_gegenpoly_2 -foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_2" gsl_sf_gegenpoly_2 :: Double -> Double -> Double - --- | wrapper for double gsl_sf_gegenpoly_3(double lambda,double x); --- --- -gegenpoly_3 :: Double -> Double -> Double -gegenpoly_3 = gsl_sf_gegenpoly_3 -foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_3" gsl_sf_gegenpoly_3 :: Double -> Double -> Double - --- | wrapper for int gsl_sf_gegenpoly_n_e(int n,double lambda,double x,gsl_sf_result* result); --- --- -gegenpoly_n_e :: Int -> Double -> Double -> (Double,Double) -gegenpoly_n_e n lambda x = createSFR "gegenpoly_n_e" $ gsl_sf_gegenpoly_n_e n lambda x -foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_n_e" gsl_sf_gegenpoly_n_e :: Int -> Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_gegenpoly_n(int n,double lambda,double x); --- --- -gegenpoly_n :: Int -> Double -> Double -> Double -gegenpoly_n = gsl_sf_gegenpoly_n -foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_n" gsl_sf_gegenpoly_n :: Int -> Double -> Double -> Double - --- | wrapper for int gsl_sf_gegenpoly_array(int nmax,double lambda,double x,double* result_array); --- --- -gegenpoly_array :: Int -> Double -> Double -> Ptr Double -> Int -gegenpoly_array = gsl_sf_gegenpoly_array -foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_array" gsl_sf_gegenpoly_array :: Int -> Double -> Double -> Ptr Double -> Int diff --git a/lib/GSL/Special/Hyperg.hs b/lib/GSL/Special/Hyperg.hs deleted file mode 100644 index f9551eb..0000000 --- a/lib/GSL/Special/Hyperg.hs +++ /dev/null @@ -1,197 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Hyperg -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Hyperg( - hyperg_0F1_e -, hyperg_0F1 -, hyperg_1F1_int_e -, hyperg_1F1_int -, hyperg_1F1_e -, hyperg_1F1 -, hyperg_U_int_e -, hyperg_U_int -, hyperg_U_int_e10_e -, hyperg_U_e -, hyperg_U -, hyperg_U_e10_e -, hyperg_2F1_e -, hyperg_2F1 -, hyperg_2F1_conj_e -, hyperg_2F1_conj -, hyperg_2F1_renorm_e -, hyperg_2F1_renorm -, hyperg_2F1_conj_renorm_e -, hyperg_2F1_conj_renorm -, hyperg_2F0_e -, hyperg_2F0 -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_hyperg_0F1_e(double c,double x,gsl_sf_result* result); --- --- -hyperg_0F1_e :: Double -> Double -> (Double,Double) -hyperg_0F1_e c x = createSFR "hyperg_0F1_e" $ gsl_sf_hyperg_0F1_e c x -foreign import ccall "hyperg.h gsl_sf_hyperg_0F1_e" gsl_sf_hyperg_0F1_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_hyperg_0F1(double c,double x); --- --- -hyperg_0F1 :: Double -> Double -> Double -hyperg_0F1 = gsl_sf_hyperg_0F1 -foreign import ccall "hyperg.h gsl_sf_hyperg_0F1" gsl_sf_hyperg_0F1 :: Double -> Double -> Double - --- | wrapper for int gsl_sf_hyperg_1F1_int_e(int m,int n,double x,gsl_sf_result* result); --- --- -hyperg_1F1_int_e :: Int -> Int -> Double -> (Double,Double) -hyperg_1F1_int_e m n x = createSFR "hyperg_1F1_int_e" $ gsl_sf_hyperg_1F1_int_e m n x -foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_int_e" gsl_sf_hyperg_1F1_int_e :: Int -> Int -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_hyperg_1F1_int(int m,int n,double x); --- --- -hyperg_1F1_int :: Int -> Int -> Double -> Double -hyperg_1F1_int = gsl_sf_hyperg_1F1_int -foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_int" gsl_sf_hyperg_1F1_int :: Int -> Int -> Double -> Double - --- | wrapper for int gsl_sf_hyperg_1F1_e(double a,double b,double x,gsl_sf_result* result); --- --- -hyperg_1F1_e :: Double -> Double -> Double -> (Double,Double) -hyperg_1F1_e a b x = createSFR "hyperg_1F1_e" $ gsl_sf_hyperg_1F1_e a b x -foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_e" gsl_sf_hyperg_1F1_e :: Double -> Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_hyperg_1F1(double a,double b,double x); --- --- -hyperg_1F1 :: Double -> Double -> Double -> Double -hyperg_1F1 = gsl_sf_hyperg_1F1 -foreign import ccall "hyperg.h gsl_sf_hyperg_1F1" gsl_sf_hyperg_1F1 :: Double -> Double -> Double -> Double - --- | wrapper for int gsl_sf_hyperg_U_int_e(int m,int n,double x,gsl_sf_result* result); --- --- -hyperg_U_int_e :: Int -> Int -> Double -> (Double,Double) -hyperg_U_int_e m n x = createSFR "hyperg_U_int_e" $ gsl_sf_hyperg_U_int_e m n x -foreign import ccall "hyperg.h gsl_sf_hyperg_U_int_e" gsl_sf_hyperg_U_int_e :: Int -> Int -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_hyperg_U_int(int m,int n,double x); --- --- -hyperg_U_int :: Int -> Int -> Double -> Double -hyperg_U_int = gsl_sf_hyperg_U_int -foreign import ccall "hyperg.h gsl_sf_hyperg_U_int" gsl_sf_hyperg_U_int :: Int -> Int -> Double -> Double - --- | wrapper for int gsl_sf_hyperg_U_int_e10_e(int m,int n,double x,gsl_sf_result_e10* result); --- --- -hyperg_U_int_e10_e :: Int -> Int -> Double -> (Double,Int,Double) -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 -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) - --- | wrapper for int gsl_sf_hyperg_U_e(double a,double b,double x,gsl_sf_result* result); --- --- -hyperg_U_e :: Double -> Double -> Double -> (Double,Double) -hyperg_U_e a b x = createSFR "hyperg_U_e" $ gsl_sf_hyperg_U_e a b x -foreign import ccall "hyperg.h gsl_sf_hyperg_U_e" gsl_sf_hyperg_U_e :: Double -> Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_hyperg_U(double a,double b,double x); --- --- -hyperg_U :: Double -> Double -> Double -> Double -hyperg_U = gsl_sf_hyperg_U -foreign import ccall "hyperg.h gsl_sf_hyperg_U" gsl_sf_hyperg_U :: Double -> Double -> Double -> Double - --- | wrapper for int gsl_sf_hyperg_U_e10_e(double a,double b,double x,gsl_sf_result_e10* result); --- --- -hyperg_U_e10_e :: Double -> Double -> Double -> (Double,Int,Double) -hyperg_U_e10_e a b x = createSFR_E10 "hyperg_U_e10_e" $ gsl_sf_hyperg_U_e10_e a b x -foreign import ccall "hyperg.h gsl_sf_hyperg_U_e10_e" gsl_sf_hyperg_U_e10_e :: Double -> Double -> Double -> Ptr () -> IO(Int) - --- | wrapper for int gsl_sf_hyperg_2F1_e(double a,double b,double c,double x,gsl_sf_result* result); --- --- -hyperg_2F1_e :: Double -> Double -> Double -> Double -> (Double,Double) -hyperg_2F1_e a b c x = createSFR "hyperg_2F1_e" $ gsl_sf_hyperg_2F1_e a b c x -foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_e" gsl_sf_hyperg_2F1_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_hyperg_2F1(double a,double b,double c,double x); --- --- -hyperg_2F1 :: Double -> Double -> Double -> Double -> Double -hyperg_2F1 = gsl_sf_hyperg_2F1 -foreign import ccall "hyperg.h gsl_sf_hyperg_2F1" gsl_sf_hyperg_2F1 :: Double -> Double -> Double -> Double -> Double - --- | wrapper for int gsl_sf_hyperg_2F1_conj_e(double aR,double aI,double c,double x,gsl_sf_result* result); --- --- -hyperg_2F1_conj_e :: Double -> Double -> Double -> Double -> (Double,Double) -hyperg_2F1_conj_e aR aI c x = createSFR "hyperg_2F1_conj_e" $ gsl_sf_hyperg_2F1_conj_e aR aI c x -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) - --- | wrapper for double gsl_sf_hyperg_2F1_conj(double aR,double aI,double c,double x); --- --- -hyperg_2F1_conj :: Double -> Double -> Double -> Double -> Double -hyperg_2F1_conj = gsl_sf_hyperg_2F1_conj -foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_conj" gsl_sf_hyperg_2F1_conj :: Double -> Double -> Double -> Double -> Double - --- | wrapper for int gsl_sf_hyperg_2F1_renorm_e(double a,double b,double c,double x,gsl_sf_result* result); --- --- -hyperg_2F1_renorm_e :: Double -> Double -> Double -> Double -> (Double,Double) -hyperg_2F1_renorm_e a b c x = createSFR "hyperg_2F1_renorm_e" $ gsl_sf_hyperg_2F1_renorm_e a b c x -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) - --- | wrapper for double gsl_sf_hyperg_2F1_renorm(double a,double b,double c,double x); --- --- -hyperg_2F1_renorm :: Double -> Double -> Double -> Double -> Double -hyperg_2F1_renorm = gsl_sf_hyperg_2F1_renorm -foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_renorm" gsl_sf_hyperg_2F1_renorm :: Double -> Double -> Double -> Double -> Double - --- | wrapper for int gsl_sf_hyperg_2F1_conj_renorm_e(double aR,double aI,double c,double x,gsl_sf_result* result); --- --- -hyperg_2F1_conj_renorm_e :: Double -> Double -> Double -> Double -> (Double,Double) -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 -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) - --- | wrapper for double gsl_sf_hyperg_2F1_conj_renorm(double aR,double aI,double c,double x); --- --- -hyperg_2F1_conj_renorm :: Double -> Double -> Double -> Double -> Double -hyperg_2F1_conj_renorm = gsl_sf_hyperg_2F1_conj_renorm -foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_conj_renorm" gsl_sf_hyperg_2F1_conj_renorm :: Double -> Double -> Double -> Double -> Double - --- | wrapper for int gsl_sf_hyperg_2F0_e(double a,double b,double x,gsl_sf_result* result); --- --- -hyperg_2F0_e :: Double -> Double -> Double -> (Double,Double) -hyperg_2F0_e a b x = createSFR "hyperg_2F0_e" $ gsl_sf_hyperg_2F0_e a b x -foreign import ccall "hyperg.h gsl_sf_hyperg_2F0_e" gsl_sf_hyperg_2F0_e :: Double -> Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_hyperg_2F0(double a,double b,double x); --- --- -hyperg_2F0 :: Double -> Double -> Double -> Double -hyperg_2F0 = gsl_sf_hyperg_2F0 -foreign import ccall "hyperg.h gsl_sf_hyperg_2F0" gsl_sf_hyperg_2F0 :: Double -> Double -> Double -> Double diff --git a/lib/GSL/Special/Internal.hs b/lib/GSL/Special/Internal.hs deleted file mode 100644 index 8d81c72..0000000 --- a/lib/GSL/Special/Internal.hs +++ /dev/null @@ -1,68 +0,0 @@ -{-# OPTIONS #-} ------------------------------------------------------------------------------ -{- | -Module : GSL.Special.Internal -Copyright : (c) Alberto Ruiz 2007 -License : GPL-style - -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Support for Special functions. - - --} ------------------------------------------------------------------------------ - -module GSL.Special.Internal ( - createSFR, - createSFR_E10, - Precision(..), - Gsl_mode_t, - Size_t, - precCode -) -where - -import Foreign -import Data.Packed.Internal(check,(//)) - - -data Precision = PrecDouble | PrecSingle | PrecApprox - -precCode :: Precision -> Int -precCode PrecDouble = 0 -precCode PrecSingle = 1 -precCode PrecApprox = 2 - -type Gsl_mode_t = Int - -type Size_t = Int - ----------------------------------------------------------------- --- | access to a sf_result -createSFR :: Storable a => String -> (Ptr a -> IO Int) -> (a, a) -createSFR s f = unsafePerformIO $ do - p <- mallocArray 2 - f p // check s [] - [val,err] <- peekArray 2 p - free p - return (val,err) - - ---------------------------------------------------------------------- --- the sf_result_e10 contains two doubles and the exponent - --- | acces to sf_result_e10 -createSFR_E10 :: (Storable t2, Storable t3, Storable t1) => String -> (Ptr a -> IO Int) -> (t1, t2, t3) -createSFR_E10 s f = unsafePerformIO $ do - let sd = sizeOf (0::Double) - let si = sizeOf (0::Int) - p <- mallocBytes (2*sd + si) - f p // check s [] - val <- peekByteOff p 0 - err <- peekByteOff p sd - expo <- peekByteOff p (2*sd) - free p - return (val,expo,err) diff --git a/lib/GSL/Special/Laguerre.hs b/lib/GSL/Special/Laguerre.hs deleted file mode 100644 index f5ab85e..0000000 --- a/lib/GSL/Special/Laguerre.hs +++ /dev/null @@ -1,85 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Laguerre -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Laguerre( - laguerre_1_e -, laguerre_2_e -, laguerre_3_e -, laguerre_1 -, laguerre_2 -, laguerre_3 -, laguerre_n_e -, laguerre_n -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_laguerre_1_e(double a,double x,gsl_sf_result* result); --- --- -laguerre_1_e :: Double -> Double -> (Double,Double) -laguerre_1_e a x = createSFR "laguerre_1_e" $ gsl_sf_laguerre_1_e a x -foreign import ccall "laguerre.h gsl_sf_laguerre_1_e" gsl_sf_laguerre_1_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for int gsl_sf_laguerre_2_e(double a,double x,gsl_sf_result* result); --- --- -laguerre_2_e :: Double -> Double -> (Double,Double) -laguerre_2_e a x = createSFR "laguerre_2_e" $ gsl_sf_laguerre_2_e a x -foreign import ccall "laguerre.h gsl_sf_laguerre_2_e" gsl_sf_laguerre_2_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for int gsl_sf_laguerre_3_e(double a,double x,gsl_sf_result* result); --- --- -laguerre_3_e :: Double -> Double -> (Double,Double) -laguerre_3_e a x = createSFR "laguerre_3_e" $ gsl_sf_laguerre_3_e a x -foreign import ccall "laguerre.h gsl_sf_laguerre_3_e" gsl_sf_laguerre_3_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_laguerre_1(double a,double x); --- --- -laguerre_1 :: Double -> Double -> Double -laguerre_1 = gsl_sf_laguerre_1 -foreign import ccall "laguerre.h gsl_sf_laguerre_1" gsl_sf_laguerre_1 :: Double -> Double -> Double - --- | wrapper for double gsl_sf_laguerre_2(double a,double x); --- --- -laguerre_2 :: Double -> Double -> Double -laguerre_2 = gsl_sf_laguerre_2 -foreign import ccall "laguerre.h gsl_sf_laguerre_2" gsl_sf_laguerre_2 :: Double -> Double -> Double - --- | wrapper for double gsl_sf_laguerre_3(double a,double x); --- --- -laguerre_3 :: Double -> Double -> Double -laguerre_3 = gsl_sf_laguerre_3 -foreign import ccall "laguerre.h gsl_sf_laguerre_3" gsl_sf_laguerre_3 :: Double -> Double -> Double - --- | wrapper for int gsl_sf_laguerre_n_e(int n,double a,double x,gsl_sf_result* result); --- --- -laguerre_n_e :: Int -> Double -> Double -> (Double,Double) -laguerre_n_e n a x = createSFR "laguerre_n_e" $ gsl_sf_laguerre_n_e n a x -foreign import ccall "laguerre.h gsl_sf_laguerre_n_e" gsl_sf_laguerre_n_e :: Int -> Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_laguerre_n(int n,double a,double x); --- --- -laguerre_n :: Int -> Double -> Double -> Double -laguerre_n = gsl_sf_laguerre_n -foreign import ccall "laguerre.h gsl_sf_laguerre_n" gsl_sf_laguerre_n :: Int -> Double -> Double -> Double diff --git a/lib/GSL/Special/Lambert.hs b/lib/GSL/Special/Lambert.hs deleted file mode 100644 index 5e8fed9..0000000 --- a/lib/GSL/Special/Lambert.hs +++ /dev/null @@ -1,53 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Lambert -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Lambert( - lambert_W0_e -, lambert_W0 -, lambert_Wm1_e -, lambert_Wm1 -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_lambert_W0_e(double x,gsl_sf_result* result); --- --- -lambert_W0_e :: Double -> (Double,Double) -lambert_W0_e x = createSFR "lambert_W0_e" $ gsl_sf_lambert_W0_e x -foreign import ccall "lambert.h gsl_sf_lambert_W0_e" gsl_sf_lambert_W0_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_lambert_W0(double x); --- --- -lambert_W0 :: Double -> Double -lambert_W0 = gsl_sf_lambert_W0 -foreign import ccall "lambert.h gsl_sf_lambert_W0" gsl_sf_lambert_W0 :: Double -> Double - --- | wrapper for int gsl_sf_lambert_Wm1_e(double x,gsl_sf_result* result); --- --- -lambert_Wm1_e :: Double -> (Double,Double) -lambert_Wm1_e x = createSFR "lambert_Wm1_e" $ gsl_sf_lambert_Wm1_e x -foreign import ccall "lambert.h gsl_sf_lambert_Wm1_e" gsl_sf_lambert_Wm1_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_lambert_Wm1(double x); --- --- -lambert_Wm1 :: Double -> Double -lambert_Wm1 = gsl_sf_lambert_Wm1 -foreign import ccall "lambert.h gsl_sf_lambert_Wm1" gsl_sf_lambert_Wm1 :: Double -> Double diff --git a/lib/GSL/Special/Legendre.hs b/lib/GSL/Special/Legendre.hs deleted file mode 100644 index 70315e9..0000000 --- a/lib/GSL/Special/Legendre.hs +++ /dev/null @@ -1,278 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Legendre -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Legendre( - legendre_Pl_e -, legendre_Pl -, legendre_P1_e -, legendre_P2_e -, legendre_P3_e -, legendre_P1 -, legendre_P2 -, legendre_P3 -, legendre_Q0_e -, legendre_Q0 -, legendre_Q1_e -, legendre_Q1 -, legendre_Ql_e -, legendre_Ql -, legendre_Plm_e -, legendre_Plm -, legendre_sphPlm_e -, legendre_sphPlm -, legendre_array_size -, conicalP_half_e -, conicalP_half -, conicalP_mhalf_e -, conicalP_mhalf -, conicalP_0_e -, conicalP_0 -, conicalP_1_e -, conicalP_1 -, conicalP_sph_reg_e -, conicalP_sph_reg -, conicalP_cyl_reg_e -, conicalP_cyl_reg -, legendre_H3d_0_e -, legendre_H3d_0 -, legendre_H3d_1_e -, legendre_H3d_1 -, legendre_H3d_e -, legendre_H3d -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_legendre_Pl_e(int l,double x,gsl_sf_result* result); -legendre_Pl_e :: Int -> Double -> (Double,Double) -legendre_Pl_e l x = createSFR "legendre_Pl_e" $ gsl_sf_legendre_Pl_e l x -foreign import ccall "legendre.h gsl_sf_legendre_Pl_e" gsl_sf_legendre_Pl_e :: Int -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_legendre_Pl(int l,double x); -legendre_Pl :: Int -> Double -> Double -legendre_Pl = gsl_sf_legendre_Pl -foreign import ccall "legendre.h gsl_sf_legendre_Pl" gsl_sf_legendre_Pl :: Int -> Double -> Double - --- | wrapper for int gsl_sf_legendre_Pl_array(int lmax,double x,double* result_array); -legendre_Pl_array :: Int -> Double -> Ptr Double -> Int -legendre_Pl_array = gsl_sf_legendre_Pl_array -foreign import ccall "legendre.h gsl_sf_legendre_Pl_array" gsl_sf_legendre_Pl_array :: Int -> Double -> Ptr Double -> Int - --- | wrapper for int gsl_sf_legendre_Pl_deriv_array(int lmax,double x,double* result_array,double* result_deriv_array); -legendre_Pl_deriv_array :: Int -> Double -> Ptr Double -> Ptr Double -> Int -legendre_Pl_deriv_array = gsl_sf_legendre_Pl_deriv_array -foreign import ccall "legendre.h gsl_sf_legendre_Pl_deriv_array" gsl_sf_legendre_Pl_deriv_array :: Int -> Double -> Ptr Double -> Ptr Double -> Int - --- | wrapper for int gsl_sf_legendre_P1_e(double x,gsl_sf_result* result); -legendre_P1_e :: Double -> (Double,Double) -legendre_P1_e x = createSFR "legendre_P1_e" $ gsl_sf_legendre_P1_e x -foreign import ccall "legendre.h gsl_sf_legendre_P1_e" gsl_sf_legendre_P1_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for int gsl_sf_legendre_P2_e(double x,gsl_sf_result* result); -legendre_P2_e :: Double -> (Double,Double) -legendre_P2_e x = createSFR "legendre_P2_e" $ gsl_sf_legendre_P2_e x -foreign import ccall "legendre.h gsl_sf_legendre_P2_e" gsl_sf_legendre_P2_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for int gsl_sf_legendre_P3_e(double x,gsl_sf_result* result); -legendre_P3_e :: Double -> (Double,Double) -legendre_P3_e x = createSFR "legendre_P3_e" $ gsl_sf_legendre_P3_e x -foreign import ccall "legendre.h gsl_sf_legendre_P3_e" gsl_sf_legendre_P3_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_legendre_P1(double x); -legendre_P1 :: Double -> Double -legendre_P1 = gsl_sf_legendre_P1 -foreign import ccall "legendre.h gsl_sf_legendre_P1" gsl_sf_legendre_P1 :: Double -> Double - --- | wrapper for double gsl_sf_legendre_P2(double x); -legendre_P2 :: Double -> Double -legendre_P2 = gsl_sf_legendre_P2 -foreign import ccall "legendre.h gsl_sf_legendre_P2" gsl_sf_legendre_P2 :: Double -> Double - --- | wrapper for double gsl_sf_legendre_P3(double x); -legendre_P3 :: Double -> Double -legendre_P3 = gsl_sf_legendre_P3 -foreign import ccall "legendre.h gsl_sf_legendre_P3" gsl_sf_legendre_P3 :: Double -> Double - --- | wrapper for int gsl_sf_legendre_Q0_e(double x,gsl_sf_result* result); -legendre_Q0_e :: Double -> (Double,Double) -legendre_Q0_e x = createSFR "legendre_Q0_e" $ gsl_sf_legendre_Q0_e x -foreign import ccall "legendre.h gsl_sf_legendre_Q0_e" gsl_sf_legendre_Q0_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_legendre_Q0(double x); -legendre_Q0 :: Double -> Double -legendre_Q0 = gsl_sf_legendre_Q0 -foreign import ccall "legendre.h gsl_sf_legendre_Q0" gsl_sf_legendre_Q0 :: Double -> Double - --- | wrapper for int gsl_sf_legendre_Q1_e(double x,gsl_sf_result* result); -legendre_Q1_e :: Double -> (Double,Double) -legendre_Q1_e x = createSFR "legendre_Q1_e" $ gsl_sf_legendre_Q1_e x -foreign import ccall "legendre.h gsl_sf_legendre_Q1_e" gsl_sf_legendre_Q1_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_legendre_Q1(double x); -legendre_Q1 :: Double -> Double -legendre_Q1 = gsl_sf_legendre_Q1 -foreign import ccall "legendre.h gsl_sf_legendre_Q1" gsl_sf_legendre_Q1 :: Double -> Double - --- | wrapper for int gsl_sf_legendre_Ql_e(int l,double x,gsl_sf_result* result); -legendre_Ql_e :: Int -> Double -> (Double,Double) -legendre_Ql_e l x = createSFR "legendre_Ql_e" $ gsl_sf_legendre_Ql_e l x -foreign import ccall "legendre.h gsl_sf_legendre_Ql_e" gsl_sf_legendre_Ql_e :: Int -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_legendre_Ql(int l,double x); -legendre_Ql :: Int -> Double -> Double -legendre_Ql = gsl_sf_legendre_Ql -foreign import ccall "legendre.h gsl_sf_legendre_Ql" gsl_sf_legendre_Ql :: Int -> Double -> Double - --- | wrapper for int gsl_sf_legendre_Plm_e(int l,int m,double x,gsl_sf_result* result); -legendre_Plm_e :: Int -> Int -> Double -> (Double,Double) -legendre_Plm_e l m x = createSFR "legendre_Plm_e" $ gsl_sf_legendre_Plm_e l m x -foreign import ccall "legendre.h gsl_sf_legendre_Plm_e" gsl_sf_legendre_Plm_e :: Int -> Int -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_legendre_Plm(int l,int m,double x); -legendre_Plm :: Int -> Int -> Double -> Double -legendre_Plm = gsl_sf_legendre_Plm -foreign import ccall "legendre.h gsl_sf_legendre_Plm" gsl_sf_legendre_Plm :: Int -> Int -> Double -> Double - --- | wrapper for int gsl_sf_legendre_Plm_array(int lmax,int m,double x,double* result_array); -legendre_Plm_array :: Int -> Int -> Double -> Ptr Double -> Int -legendre_Plm_array = gsl_sf_legendre_Plm_array -foreign import ccall "legendre.h gsl_sf_legendre_Plm_array" gsl_sf_legendre_Plm_array :: Int -> Int -> Double -> Ptr Double -> Int - --- | wrapper for int gsl_sf_legendre_Plm_deriv_array(int lmax,int m,double x,double* result_array,double* result_deriv_array); -legendre_Plm_deriv_array :: Int -> Int -> Double -> Ptr Double -> Ptr Double -> Int -legendre_Plm_deriv_array = gsl_sf_legendre_Plm_deriv_array -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 - --- | wrapper for int gsl_sf_legendre_sphPlm_e(int l,int m,double x,gsl_sf_result* result); -legendre_sphPlm_e :: Int -> Int -> Double -> (Double,Double) -legendre_sphPlm_e l m x = createSFR "legendre_sphPlm_e" $ gsl_sf_legendre_sphPlm_e l m x -foreign import ccall "legendre.h gsl_sf_legendre_sphPlm_e" gsl_sf_legendre_sphPlm_e :: Int -> Int -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_legendre_sphPlm(int l,int m,double x); -legendre_sphPlm :: Int -> Int -> Double -> Double -legendre_sphPlm = gsl_sf_legendre_sphPlm -foreign import ccall "legendre.h gsl_sf_legendre_sphPlm" gsl_sf_legendre_sphPlm :: Int -> Int -> Double -> Double - --- | wrapper for int gsl_sf_legendre_sphPlm_array(int lmax,int m,double x,double* result_array); -legendre_sphPlm_array :: Int -> Int -> Double -> Ptr Double -> Int -legendre_sphPlm_array = gsl_sf_legendre_sphPlm_array -foreign import ccall "legendre.h gsl_sf_legendre_sphPlm_array" gsl_sf_legendre_sphPlm_array :: Int -> Int -> Double -> Ptr Double -> Int - --- | wrapper for int gsl_sf_legendre_sphPlm_deriv_array(int lmax,int m,double x,double* result_array,double* result_deriv_array); -legendre_sphPlm_deriv_array :: Int -> Int -> Double -> Ptr Double -> Ptr Double -> Int -legendre_sphPlm_deriv_array = gsl_sf_legendre_sphPlm_deriv_array -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 - --- | wrapper for int gsl_sf_legendre_array_size(int lmax,int m); -legendre_array_size :: Int -> Int -> Int -legendre_array_size = gsl_sf_legendre_array_size -foreign import ccall "legendre.h gsl_sf_legendre_array_size" gsl_sf_legendre_array_size :: Int -> Int -> Int - --- | wrapper for int gsl_sf_conicalP_half_e(double lambda,double x,gsl_sf_result* result); -conicalP_half_e :: Double -> Double -> (Double,Double) -conicalP_half_e lambda x = createSFR "conicalP_half_e" $ gsl_sf_conicalP_half_e lambda x -foreign import ccall "legendre.h gsl_sf_conicalP_half_e" gsl_sf_conicalP_half_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_conicalP_half(double lambda,double x); -conicalP_half :: Double -> Double -> Double -conicalP_half = gsl_sf_conicalP_half -foreign import ccall "legendre.h gsl_sf_conicalP_half" gsl_sf_conicalP_half :: Double -> Double -> Double - --- | wrapper for int gsl_sf_conicalP_mhalf_e(double lambda,double x,gsl_sf_result* result); -conicalP_mhalf_e :: Double -> Double -> (Double,Double) -conicalP_mhalf_e lambda x = createSFR "conicalP_mhalf_e" $ gsl_sf_conicalP_mhalf_e lambda x -foreign import ccall "legendre.h gsl_sf_conicalP_mhalf_e" gsl_sf_conicalP_mhalf_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_conicalP_mhalf(double lambda,double x); -conicalP_mhalf :: Double -> Double -> Double -conicalP_mhalf = gsl_sf_conicalP_mhalf -foreign import ccall "legendre.h gsl_sf_conicalP_mhalf" gsl_sf_conicalP_mhalf :: Double -> Double -> Double - --- | wrapper for int gsl_sf_conicalP_0_e(double lambda,double x,gsl_sf_result* result); -conicalP_0_e :: Double -> Double -> (Double,Double) -conicalP_0_e lambda x = createSFR "conicalP_0_e" $ gsl_sf_conicalP_0_e lambda x -foreign import ccall "legendre.h gsl_sf_conicalP_0_e" gsl_sf_conicalP_0_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_conicalP_0(double lambda,double x); -conicalP_0 :: Double -> Double -> Double -conicalP_0 = gsl_sf_conicalP_0 -foreign import ccall "legendre.h gsl_sf_conicalP_0" gsl_sf_conicalP_0 :: Double -> Double -> Double - --- | wrapper for int gsl_sf_conicalP_1_e(double lambda,double x,gsl_sf_result* result); -conicalP_1_e :: Double -> Double -> (Double,Double) -conicalP_1_e lambda x = createSFR "conicalP_1_e" $ gsl_sf_conicalP_1_e lambda x -foreign import ccall "legendre.h gsl_sf_conicalP_1_e" gsl_sf_conicalP_1_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_conicalP_1(double lambda,double x); -conicalP_1 :: Double -> Double -> Double -conicalP_1 = gsl_sf_conicalP_1 -foreign import ccall "legendre.h gsl_sf_conicalP_1" gsl_sf_conicalP_1 :: Double -> Double -> Double - --- | wrapper for int gsl_sf_conicalP_sph_reg_e(int l,double lambda,double x,gsl_sf_result* result); -conicalP_sph_reg_e :: Int -> Double -> Double -> (Double,Double) -conicalP_sph_reg_e l lambda x = createSFR "conicalP_sph_reg_e" $ gsl_sf_conicalP_sph_reg_e l lambda x -foreign import ccall "legendre.h gsl_sf_conicalP_sph_reg_e" gsl_sf_conicalP_sph_reg_e :: Int -> Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_conicalP_sph_reg(int l,double lambda,double x); -conicalP_sph_reg :: Int -> Double -> Double -> Double -conicalP_sph_reg = gsl_sf_conicalP_sph_reg -foreign import ccall "legendre.h gsl_sf_conicalP_sph_reg" gsl_sf_conicalP_sph_reg :: Int -> Double -> Double -> Double - --- | wrapper for int gsl_sf_conicalP_cyl_reg_e(int m,double lambda,double x,gsl_sf_result* result); -conicalP_cyl_reg_e :: Int -> Double -> Double -> (Double,Double) -conicalP_cyl_reg_e m lambda x = createSFR "conicalP_cyl_reg_e" $ gsl_sf_conicalP_cyl_reg_e m lambda x -foreign import ccall "legendre.h gsl_sf_conicalP_cyl_reg_e" gsl_sf_conicalP_cyl_reg_e :: Int -> Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_conicalP_cyl_reg(int m,double lambda,double x); -conicalP_cyl_reg :: Int -> Double -> Double -> Double -conicalP_cyl_reg = gsl_sf_conicalP_cyl_reg -foreign import ccall "legendre.h gsl_sf_conicalP_cyl_reg" gsl_sf_conicalP_cyl_reg :: Int -> Double -> Double -> Double - --- | wrapper for int gsl_sf_legendre_H3d_0_e(double lambda,double eta,gsl_sf_result* result); -legendre_H3d_0_e :: Double -> Double -> (Double,Double) -legendre_H3d_0_e lambda eta = createSFR "legendre_H3d_0_e" $ gsl_sf_legendre_H3d_0_e lambda eta -foreign import ccall "legendre.h gsl_sf_legendre_H3d_0_e" gsl_sf_legendre_H3d_0_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_legendre_H3d_0(double lambda,double eta); -legendre_H3d_0 :: Double -> Double -> Double -legendre_H3d_0 = gsl_sf_legendre_H3d_0 -foreign import ccall "legendre.h gsl_sf_legendre_H3d_0" gsl_sf_legendre_H3d_0 :: Double -> Double -> Double - --- | wrapper for int gsl_sf_legendre_H3d_1_e(double lambda,double eta,gsl_sf_result* result); -legendre_H3d_1_e :: Double -> Double -> (Double,Double) -legendre_H3d_1_e lambda eta = createSFR "legendre_H3d_1_e" $ gsl_sf_legendre_H3d_1_e lambda eta -foreign import ccall "legendre.h gsl_sf_legendre_H3d_1_e" gsl_sf_legendre_H3d_1_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_legendre_H3d_1(double lambda,double eta); -legendre_H3d_1 :: Double -> Double -> Double -legendre_H3d_1 = gsl_sf_legendre_H3d_1 -foreign import ccall "legendre.h gsl_sf_legendre_H3d_1" gsl_sf_legendre_H3d_1 :: Double -> Double -> Double - --- | wrapper for int gsl_sf_legendre_H3d_e(int l,double lambda,double eta,gsl_sf_result* result); -legendre_H3d_e :: Int -> Double -> Double -> (Double,Double) -legendre_H3d_e l lambda eta = createSFR "legendre_H3d_e" $ gsl_sf_legendre_H3d_e l lambda eta -foreign import ccall "legendre.h gsl_sf_legendre_H3d_e" gsl_sf_legendre_H3d_e :: Int -> Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_legendre_H3d(int l,double lambda,double eta); -legendre_H3d :: Int -> Double -> Double -> Double -legendre_H3d = gsl_sf_legendre_H3d -foreign import ccall "legendre.h gsl_sf_legendre_H3d" gsl_sf_legendre_H3d :: Int -> Double -> Double -> Double - --- | wrapper for int gsl_sf_legendre_H3d_array(int lmax,double lambda,double eta,double* result_array); -legendre_H3d_array :: Int -> Double -> Double -> Ptr Double -> Int -legendre_H3d_array = gsl_sf_legendre_H3d_array -foreign import ccall "legendre.h gsl_sf_legendre_H3d_array" gsl_sf_legendre_H3d_array :: Int -> Double -> Double -> Ptr Double -> Int diff --git a/lib/GSL/Special/Log.hs b/lib/GSL/Special/Log.hs deleted file mode 100644 index 0d62e99..0000000 --- a/lib/GSL/Special/Log.hs +++ /dev/null @@ -1,74 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Log -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Log( - log_e -, GSL.Special.Log.log -, log_abs_e -, log_abs -, log_1plusx_e -, log_1plusx -, log_1plusx_mx_e -, log_1plusx_mx -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_log_e(double x,gsl_sf_result* result); -log_e :: Double -> (Double,Double) -log_e x = createSFR "log_e" $ gsl_sf_log_e x -foreign import ccall "log.h gsl_sf_log_e" gsl_sf_log_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_log(double x); -log :: Double -> Double -log = gsl_sf_log -foreign import ccall "log.h gsl_sf_log" gsl_sf_log :: Double -> Double - --- | wrapper for int gsl_sf_log_abs_e(double x,gsl_sf_result* result); -log_abs_e :: Double -> (Double,Double) -log_abs_e x = createSFR "log_abs_e" $ gsl_sf_log_abs_e x -foreign import ccall "log.h gsl_sf_log_abs_e" gsl_sf_log_abs_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_log_abs(double x); -log_abs :: Double -> Double -log_abs = gsl_sf_log_abs -foreign import ccall "log.h gsl_sf_log_abs" gsl_sf_log_abs :: Double -> Double - --- | wrapper for int gsl_sf_complex_log_e(double zr,double zi,gsl_sf_result* lnr,gsl_sf_result* theta); -complex_log_e :: Double -> Double -> Ptr Double -> (Double,Double) -complex_log_e zr zi lnr = createSFR "complex_log_e" $ gsl_sf_complex_log_e zr zi lnr -foreign import ccall "log.h gsl_sf_complex_log_e" gsl_sf_complex_log_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) - --- | wrapper for int gsl_sf_log_1plusx_e(double x,gsl_sf_result* result); -log_1plusx_e :: Double -> (Double,Double) -log_1plusx_e x = createSFR "log_1plusx_e" $ gsl_sf_log_1plusx_e x -foreign import ccall "log.h gsl_sf_log_1plusx_e" gsl_sf_log_1plusx_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_log_1plusx(double x); -log_1plusx :: Double -> Double -log_1plusx = gsl_sf_log_1plusx -foreign import ccall "log.h gsl_sf_log_1plusx" gsl_sf_log_1plusx :: Double -> Double - --- | wrapper for int gsl_sf_log_1plusx_mx_e(double x,gsl_sf_result* result); -log_1plusx_mx_e :: Double -> (Double,Double) -log_1plusx_mx_e x = createSFR "log_1plusx_mx_e" $ gsl_sf_log_1plusx_mx_e x -foreign import ccall "log.h gsl_sf_log_1plusx_mx_e" gsl_sf_log_1plusx_mx_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_log_1plusx_mx(double x); -log_1plusx_mx :: Double -> Double -log_1plusx_mx = gsl_sf_log_1plusx_mx -foreign import ccall "log.h gsl_sf_log_1plusx_mx" gsl_sf_log_1plusx_mx :: Double -> Double diff --git a/lib/GSL/Special/Pow_int.hs b/lib/GSL/Special/Pow_int.hs deleted file mode 100644 index 4142c5b..0000000 --- a/lib/GSL/Special/Pow_int.hs +++ /dev/null @@ -1,37 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Pow_int -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Pow_int( - pow_int_e -, pow_int -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_pow_int_e(double x,int n,gsl_sf_result* result); --- --- -pow_int_e :: Double -> Int -> (Double,Double) -pow_int_e x n = createSFR "pow_int_e" $ gsl_sf_pow_int_e x n -foreign import ccall "pow_int.h gsl_sf_pow_int_e" gsl_sf_pow_int_e :: Double -> Int -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_pow_int(double x,int n); --- --- -pow_int :: Double -> Int -> Double -pow_int = gsl_sf_pow_int -foreign import ccall "pow_int.h gsl_sf_pow_int" gsl_sf_pow_int :: Double -> Int -> Double diff --git a/lib/GSL/Special/Psi.hs b/lib/GSL/Special/Psi.hs deleted file mode 100644 index bee934b..0000000 --- a/lib/GSL/Special/Psi.hs +++ /dev/null @@ -1,117 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Psi -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Psi( - psi_int_e -, psi_int -, psi_e -, psi -, psi_1piy_e -, psi_1piy -, psi_1_int_e -, psi_1_int -, psi_1_e -, psi_1 -, psi_n_e -, psi_n -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_psi_int_e(int n,gsl_sf_result* result); --- --- -psi_int_e :: Int -> (Double,Double) -psi_int_e n = createSFR "psi_int_e" $ gsl_sf_psi_int_e n -foreign import ccall "psi.h gsl_sf_psi_int_e" gsl_sf_psi_int_e :: Int -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_psi_int(int n); --- --- -psi_int :: Int -> Double -psi_int = gsl_sf_psi_int -foreign import ccall "psi.h gsl_sf_psi_int" gsl_sf_psi_int :: Int -> Double - --- | wrapper for int gsl_sf_psi_e(double x,gsl_sf_result* result); --- --- -psi_e :: Double -> (Double,Double) -psi_e x = createSFR "psi_e" $ gsl_sf_psi_e x -foreign import ccall "psi.h gsl_sf_psi_e" gsl_sf_psi_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_psi(double x); --- --- -psi :: Double -> Double -psi = gsl_sf_psi -foreign import ccall "psi.h gsl_sf_psi" gsl_sf_psi :: Double -> Double - --- | wrapper for int gsl_sf_psi_1piy_e(double y,gsl_sf_result* result); --- --- -psi_1piy_e :: Double -> (Double,Double) -psi_1piy_e y = createSFR "psi_1piy_e" $ gsl_sf_psi_1piy_e y -foreign import ccall "psi.h gsl_sf_psi_1piy_e" gsl_sf_psi_1piy_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_psi_1piy(double y); --- --- -psi_1piy :: Double -> Double -psi_1piy = gsl_sf_psi_1piy -foreign import ccall "psi.h gsl_sf_psi_1piy" gsl_sf_psi_1piy :: Double -> Double - --- | wrapper for int gsl_sf_psi_1_int_e(int n,gsl_sf_result* result); --- --- -psi_1_int_e :: Int -> (Double,Double) -psi_1_int_e n = createSFR "psi_1_int_e" $ gsl_sf_psi_1_int_e n -foreign import ccall "psi.h gsl_sf_psi_1_int_e" gsl_sf_psi_1_int_e :: Int -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_psi_1_int(int n); --- --- -psi_1_int :: Int -> Double -psi_1_int = gsl_sf_psi_1_int -foreign import ccall "psi.h gsl_sf_psi_1_int" gsl_sf_psi_1_int :: Int -> Double - --- | wrapper for int gsl_sf_psi_1_e(double x,gsl_sf_result* result); --- --- -psi_1_e :: Double -> (Double,Double) -psi_1_e x = createSFR "psi_1_e" $ gsl_sf_psi_1_e x -foreign import ccall "psi.h gsl_sf_psi_1_e" gsl_sf_psi_1_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_psi_1(double x); --- --- -psi_1 :: Double -> Double -psi_1 = gsl_sf_psi_1 -foreign import ccall "psi.h gsl_sf_psi_1" gsl_sf_psi_1 :: Double -> Double - --- | wrapper for int gsl_sf_psi_n_e(int n,double x,gsl_sf_result* result); --- --- -psi_n_e :: Int -> Double -> (Double,Double) -psi_n_e n x = createSFR "psi_n_e" $ gsl_sf_psi_n_e n x -foreign import ccall "psi.h gsl_sf_psi_n_e" gsl_sf_psi_n_e :: Int -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_psi_n(int n,double x); --- --- -psi_n :: Int -> Double -> Double -psi_n = gsl_sf_psi_n -foreign import ccall "psi.h gsl_sf_psi_n" gsl_sf_psi_n :: Int -> Double -> Double diff --git a/lib/GSL/Special/Synchrotron.hs b/lib/GSL/Special/Synchrotron.hs deleted file mode 100644 index 2ed484b..0000000 --- a/lib/GSL/Special/Synchrotron.hs +++ /dev/null @@ -1,53 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Synchrotron -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Synchrotron( - synchrotron_1_e -, synchrotron_1 -, synchrotron_2_e -, synchrotron_2 -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_synchrotron_1_e(double x,gsl_sf_result* result); --- --- -synchrotron_1_e :: Double -> (Double,Double) -synchrotron_1_e x = createSFR "synchrotron_1_e" $ gsl_sf_synchrotron_1_e x -foreign import ccall "synchrotron.h gsl_sf_synchrotron_1_e" gsl_sf_synchrotron_1_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_synchrotron_1(double x); --- --- -synchrotron_1 :: Double -> Double -synchrotron_1 = gsl_sf_synchrotron_1 -foreign import ccall "synchrotron.h gsl_sf_synchrotron_1" gsl_sf_synchrotron_1 :: Double -> Double - --- | wrapper for int gsl_sf_synchrotron_2_e(double x,gsl_sf_result* result); --- --- -synchrotron_2_e :: Double -> (Double,Double) -synchrotron_2_e x = createSFR "synchrotron_2_e" $ gsl_sf_synchrotron_2_e x -foreign import ccall "synchrotron.h gsl_sf_synchrotron_2_e" gsl_sf_synchrotron_2_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_synchrotron_2(double x); --- --- -synchrotron_2 :: Double -> Double -synchrotron_2 = gsl_sf_synchrotron_2 -foreign import ccall "synchrotron.h gsl_sf_synchrotron_2" gsl_sf_synchrotron_2 :: Double -> Double diff --git a/lib/GSL/Special/Trig.hs b/lib/GSL/Special/Trig.hs deleted file mode 100644 index 4d37a05..0000000 --- a/lib/GSL/Special/Trig.hs +++ /dev/null @@ -1,164 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Trig -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Trig( - sin_e -, GSL.Special.Trig.sin -, cos_e -, GSL.Special.Trig.cos -, hypot_e -, hypot -, sinc_e -, sinc -, lnsinh_e -, lnsinh -, lncosh_e -, lncosh -, sin_err_e -, cos_err_e -, angle_restrict_symm -, angle_restrict_pos -, angle_restrict_symm_err_e -, angle_restrict_pos_err_e -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_sin_e(double x,gsl_sf_result* result); -sin_e :: Double -> (Double,Double) -sin_e x = createSFR "sin_e" $ gsl_sf_sin_e x -foreign import ccall "trig.h gsl_sf_sin_e" gsl_sf_sin_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_sin(double x); -sin :: Double -> Double -sin = gsl_sf_sin -foreign import ccall "trig.h gsl_sf_sin" gsl_sf_sin :: Double -> Double - --- | wrapper for int gsl_sf_cos_e(double x,gsl_sf_result* result); -cos_e :: Double -> (Double,Double) -cos_e x = createSFR "cos_e" $ gsl_sf_cos_e x -foreign import ccall "trig.h gsl_sf_cos_e" gsl_sf_cos_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_cos(double x); -cos :: Double -> Double -cos = gsl_sf_cos -foreign import ccall "trig.h gsl_sf_cos" gsl_sf_cos :: Double -> Double - --- | wrapper for int gsl_sf_hypot_e(double x,double y,gsl_sf_result* result); -hypot_e :: Double -> Double -> (Double,Double) -hypot_e x y = createSFR "hypot_e" $ gsl_sf_hypot_e x y -foreign import ccall "trig.h gsl_sf_hypot_e" gsl_sf_hypot_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_hypot(double x,double y); -hypot :: Double -> Double -> Double -hypot = gsl_sf_hypot -foreign import ccall "trig.h gsl_sf_hypot" gsl_sf_hypot :: Double -> Double -> Double - --- | wrapper for int gsl_sf_complex_sin_e(double zr,double zi,gsl_sf_result* szr,gsl_sf_result* szi); -complex_sin_e :: Double -> Double -> Ptr Double -> (Double,Double) -complex_sin_e zr zi szr = createSFR "complex_sin_e" $ gsl_sf_complex_sin_e zr zi szr -foreign import ccall "trig.h gsl_sf_complex_sin_e" gsl_sf_complex_sin_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) - --- | wrapper for int gsl_sf_complex_cos_e(double zr,double zi,gsl_sf_result* czr,gsl_sf_result* czi); -complex_cos_e :: Double -> Double -> Ptr Double -> (Double,Double) -complex_cos_e zr zi czr = createSFR "complex_cos_e" $ gsl_sf_complex_cos_e zr zi czr -foreign import ccall "trig.h gsl_sf_complex_cos_e" gsl_sf_complex_cos_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) - --- | wrapper for int gsl_sf_complex_logsin_e(double zr,double zi,gsl_sf_result* lszr,gsl_sf_result* lszi); -complex_logsin_e :: Double -> Double -> Ptr Double -> (Double,Double) -complex_logsin_e zr zi lszr = createSFR "complex_logsin_e" $ gsl_sf_complex_logsin_e zr zi lszr -foreign import ccall "trig.h gsl_sf_complex_logsin_e" gsl_sf_complex_logsin_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) - --- | wrapper for int gsl_sf_sinc_e(double x,gsl_sf_result* result); -sinc_e :: Double -> (Double,Double) -sinc_e x = createSFR "sinc_e" $ gsl_sf_sinc_e x -foreign import ccall "trig.h gsl_sf_sinc_e" gsl_sf_sinc_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_sinc(double x); -sinc :: Double -> Double -sinc = gsl_sf_sinc -foreign import ccall "trig.h gsl_sf_sinc" gsl_sf_sinc :: Double -> Double - --- | wrapper for int gsl_sf_lnsinh_e(double x,gsl_sf_result* result); -lnsinh_e :: Double -> (Double,Double) -lnsinh_e x = createSFR "lnsinh_e" $ gsl_sf_lnsinh_e x -foreign import ccall "trig.h gsl_sf_lnsinh_e" gsl_sf_lnsinh_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_lnsinh(double x); -lnsinh :: Double -> Double -lnsinh = gsl_sf_lnsinh -foreign import ccall "trig.h gsl_sf_lnsinh" gsl_sf_lnsinh :: Double -> Double - --- | wrapper for int gsl_sf_lncosh_e(double x,gsl_sf_result* result); -lncosh_e :: Double -> (Double,Double) -lncosh_e x = createSFR "lncosh_e" $ gsl_sf_lncosh_e x -foreign import ccall "trig.h gsl_sf_lncosh_e" gsl_sf_lncosh_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_lncosh(double x); -lncosh :: Double -> Double -lncosh = gsl_sf_lncosh -foreign import ccall "trig.h gsl_sf_lncosh" gsl_sf_lncosh :: Double -> Double - --- | wrapper for int gsl_sf_polar_to_rect(double r,double theta,gsl_sf_result* x,gsl_sf_result* y); -polar_to_rect :: Double -> Double -> Ptr Double -> (Double,Double) -polar_to_rect r theta x = createSFR "polar_to_rect" $ gsl_sf_polar_to_rect r theta x -foreign import ccall "trig.h gsl_sf_polar_to_rect" gsl_sf_polar_to_rect :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) - --- | wrapper for int gsl_sf_rect_to_polar(double x,double y,gsl_sf_result* r,gsl_sf_result* theta); -rect_to_polar :: Double -> Double -> Ptr Double -> (Double,Double) -rect_to_polar x y r = createSFR "rect_to_polar" $ gsl_sf_rect_to_polar x y r -foreign import ccall "trig.h gsl_sf_rect_to_polar" gsl_sf_rect_to_polar :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) - --- | wrapper for int gsl_sf_sin_err_e(double x,double dx,gsl_sf_result* result); -sin_err_e :: Double -> Double -> (Double,Double) -sin_err_e x dx = createSFR "sin_err_e" $ gsl_sf_sin_err_e x dx -foreign import ccall "trig.h gsl_sf_sin_err_e" gsl_sf_sin_err_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for int gsl_sf_cos_err_e(double x,double dx,gsl_sf_result* result); -cos_err_e :: Double -> Double -> (Double,Double) -cos_err_e x dx = createSFR "cos_err_e" $ gsl_sf_cos_err_e x dx -foreign import ccall "trig.h gsl_sf_cos_err_e" gsl_sf_cos_err_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for int gsl_sf_angle_restrict_symm_e(double* theta); -angle_restrict_symm_e :: Ptr Double -> Int -angle_restrict_symm_e = gsl_sf_angle_restrict_symm_e -foreign import ccall "trig.h gsl_sf_angle_restrict_symm_e" gsl_sf_angle_restrict_symm_e :: Ptr Double -> Int - --- | wrapper for double gsl_sf_angle_restrict_symm(double theta); -angle_restrict_symm :: Double -> Double -angle_restrict_symm = gsl_sf_angle_restrict_symm -foreign import ccall "trig.h gsl_sf_angle_restrict_symm" gsl_sf_angle_restrict_symm :: Double -> Double - --- | wrapper for int gsl_sf_angle_restrict_pos_e(double* theta); -angle_restrict_pos_e :: Ptr Double -> Int -angle_restrict_pos_e = gsl_sf_angle_restrict_pos_e -foreign import ccall "trig.h gsl_sf_angle_restrict_pos_e" gsl_sf_angle_restrict_pos_e :: Ptr Double -> Int - --- | wrapper for double gsl_sf_angle_restrict_pos(double theta); -angle_restrict_pos :: Double -> Double -angle_restrict_pos = gsl_sf_angle_restrict_pos -foreign import ccall "trig.h gsl_sf_angle_restrict_pos" gsl_sf_angle_restrict_pos :: Double -> Double - --- | wrapper for int gsl_sf_angle_restrict_symm_err_e(double theta,gsl_sf_result* result); -angle_restrict_symm_err_e :: Double -> (Double,Double) -angle_restrict_symm_err_e theta = createSFR "angle_restrict_symm_err_e" $ gsl_sf_angle_restrict_symm_err_e theta -foreign import ccall "trig.h gsl_sf_angle_restrict_symm_err_e" gsl_sf_angle_restrict_symm_err_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for int gsl_sf_angle_restrict_pos_err_e(double theta,gsl_sf_result* result); -angle_restrict_pos_err_e :: Double -> (Double,Double) -angle_restrict_pos_err_e theta = createSFR "angle_restrict_pos_err_e" $ gsl_sf_angle_restrict_pos_err_e theta -foreign import ccall "trig.h gsl_sf_angle_restrict_pos_err_e" gsl_sf_angle_restrict_pos_err_e :: Double -> Ptr Double -> IO(Int) diff --git a/lib/GSL/Special/Zeta.hs b/lib/GSL/Special/Zeta.hs deleted file mode 100644 index 01cfdac..0000000 --- a/lib/GSL/Special/Zeta.hs +++ /dev/null @@ -1,133 +0,0 @@ ------------------------------------------------------------- -{- | -Module : GSL.Special.Zeta -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Wrappers for selected functions described at: - - - --} ------------------------------------------------------------- - -module GSL.Special.Zeta( - zeta_int_e -, zeta_int -, zeta_e -, zeta -, zetam1_e -, zetam1 -, zetam1_int_e -, zetam1_int -, hzeta_e -, hzeta -, eta_int_e -, eta_int -, eta_e -, eta -) where - -import Foreign(Ptr) -import GSL.Special.Internal - --- | wrapper for int gsl_sf_zeta_int_e(int n,gsl_sf_result* result); --- --- -zeta_int_e :: Int -> (Double,Double) -zeta_int_e n = createSFR "zeta_int_e" $ gsl_sf_zeta_int_e n -foreign import ccall "zeta.h gsl_sf_zeta_int_e" gsl_sf_zeta_int_e :: Int -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_zeta_int(int n); --- --- -zeta_int :: Int -> Double -zeta_int = gsl_sf_zeta_int -foreign import ccall "zeta.h gsl_sf_zeta_int" gsl_sf_zeta_int :: Int -> Double - --- | wrapper for int gsl_sf_zeta_e(double s,gsl_sf_result* result); --- --- -zeta_e :: Double -> (Double,Double) -zeta_e s = createSFR "zeta_e" $ gsl_sf_zeta_e s -foreign import ccall "zeta.h gsl_sf_zeta_e" gsl_sf_zeta_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_zeta(double s); --- --- -zeta :: Double -> Double -zeta = gsl_sf_zeta -foreign import ccall "zeta.h gsl_sf_zeta" gsl_sf_zeta :: Double -> Double - --- | wrapper for int gsl_sf_zetam1_e(double s,gsl_sf_result* result); --- --- -zetam1_e :: Double -> (Double,Double) -zetam1_e s = createSFR "zetam1_e" $ gsl_sf_zetam1_e s -foreign import ccall "zeta.h gsl_sf_zetam1_e" gsl_sf_zetam1_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_zetam1(double s); --- --- -zetam1 :: Double -> Double -zetam1 = gsl_sf_zetam1 -foreign import ccall "zeta.h gsl_sf_zetam1" gsl_sf_zetam1 :: Double -> Double - --- | wrapper for int gsl_sf_zetam1_int_e(int s,gsl_sf_result* result); --- --- -zetam1_int_e :: Int -> (Double,Double) -zetam1_int_e s = createSFR "zetam1_int_e" $ gsl_sf_zetam1_int_e s -foreign import ccall "zeta.h gsl_sf_zetam1_int_e" gsl_sf_zetam1_int_e :: Int -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_zetam1_int(int s); --- --- -zetam1_int :: Int -> Double -zetam1_int = gsl_sf_zetam1_int -foreign import ccall "zeta.h gsl_sf_zetam1_int" gsl_sf_zetam1_int :: Int -> Double - --- | wrapper for int gsl_sf_hzeta_e(double s,double q,gsl_sf_result* result); --- --- -hzeta_e :: Double -> Double -> (Double,Double) -hzeta_e s q = createSFR "hzeta_e" $ gsl_sf_hzeta_e s q -foreign import ccall "zeta.h gsl_sf_hzeta_e" gsl_sf_hzeta_e :: Double -> Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_hzeta(double s,double q); --- --- -hzeta :: Double -> Double -> Double -hzeta = gsl_sf_hzeta -foreign import ccall "zeta.h gsl_sf_hzeta" gsl_sf_hzeta :: Double -> Double -> Double - --- | wrapper for int gsl_sf_eta_int_e(int n,gsl_sf_result* result); --- --- -eta_int_e :: Int -> (Double,Double) -eta_int_e n = createSFR "eta_int_e" $ gsl_sf_eta_int_e n -foreign import ccall "zeta.h gsl_sf_eta_int_e" gsl_sf_eta_int_e :: Int -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_eta_int(int n); --- --- -eta_int :: Int -> Double -eta_int = gsl_sf_eta_int -foreign import ccall "zeta.h gsl_sf_eta_int" gsl_sf_eta_int :: Int -> Double - --- | wrapper for int gsl_sf_eta_e(double s,gsl_sf_result* result); --- --- -eta_e :: Double -> (Double,Double) -eta_e s = createSFR "eta_e" $ gsl_sf_eta_e s -foreign import ccall "zeta.h gsl_sf_eta_e" gsl_sf_eta_e :: Double -> Ptr Double -> IO(Int) - --- | wrapper for double gsl_sf_eta(double s); --- --- -eta :: Double -> Double -eta = gsl_sf_eta -foreign import ccall "zeta.h gsl_sf_eta" gsl_sf_eta :: Double -> Double diff --git a/lib/GSL/Special/airy.h b/lib/GSL/Special/airy.h deleted file mode 100644 index e34e012..0000000 --- a/lib/GSL/Special/airy.h +++ /dev/null @@ -1,24 +0,0 @@ -int gsl_sf_airy_Ai_e(double x,int mode,double* result); -double gsl_sf_airy_Ai(double x,int mode); -int gsl_sf_airy_Bi_e(double x,int mode,double* result); -double gsl_sf_airy_Bi(double x,int mode); -int gsl_sf_airy_Ai_scaled_e(double x,int mode,double* result); -double gsl_sf_airy_Ai_scaled(double x,int mode); -int gsl_sf_airy_Bi_scaled_e(double x,int mode,double* result); -double gsl_sf_airy_Bi_scaled(double x,int mode); -int gsl_sf_airy_Ai_deriv_e(double x,int mode,double* result); -double gsl_sf_airy_Ai_deriv(double x,int mode); -int gsl_sf_airy_Bi_deriv_e(double x,int mode,double* result); -double gsl_sf_airy_Bi_deriv(double x,int mode); -int gsl_sf_airy_Ai_deriv_scaled_e(double x,int mode,double* result); -double gsl_sf_airy_Ai_deriv_scaled(double x,int mode); -int gsl_sf_airy_Bi_deriv_scaled_e(double x,int mode,double* result); -double gsl_sf_airy_Bi_deriv_scaled(double x,int mode); -int gsl_sf_airy_zero_Ai_e(int s,double* result); -double gsl_sf_airy_zero_Ai(int s); -int gsl_sf_airy_zero_Bi_e(int s,double* result); -double gsl_sf_airy_zero_Bi(int s); -int gsl_sf_airy_zero_Ai_deriv_e(int s,double* result); -double gsl_sf_airy_zero_Ai_deriv(int s); -int gsl_sf_airy_zero_Bi_deriv_e(int s,double* result); -double gsl_sf_airy_zero_Bi_deriv(int s); diff --git a/lib/GSL/Special/auto.hs b/lib/GSL/Special/auto.hs deleted file mode 100644 index 0ef7d0a..0000000 --- a/lib/GSL/Special/auto.hs +++ /dev/null @@ -1,233 +0,0 @@ --- automatic generation of wrappers for simple GSL special functions - -import Text.ParserCombinators.Parsec -import System -import Data.List(intersperse, isPrefixOf) -import Data.Char(toUpper,isUpper,toLower) - -data Type = Normal Ident | Pointer Ident deriving (Eq, Show) - -type Ident = String - -data Header = Header Type Ident [(Type,Ident)] deriving Show - -headers f = case parse parseHeaders "" f of - Right l -> l - Left s -> error (show s) - - -rep (c,r) [] = [] -rep (c,r) f@(x:xs) - | c `isPrefixOf` f = r ++ rep (c,r) (drop (length c) f) - | otherwise = x:(rep (c,r) xs) - - -fixlong [] = [] -fixlong "\\" = [] -fixlong ('\\':'\n':xs) = xs -fixlong (x:xs) = x : fixlong xs - - -safe (Header _ _ args) = all ok args - || all ok (init args) && kn (last args) - where ok ((Normal s),_) | s `elem` ["double","float","int","gsl_mode_t"] = True - ok _ = False - kn ((Pointer "gsl_sf_result"),_) = True - kn ((Pointer "gsl_sf_result_e10"),_) = True - kn _ = False - - - -fixC s = rep ("gsl_mode_t","int") $ rep ("gsl_sf_result","double") $ rep ("gsl_sf_result_e10","double") $ s - -main = do - args <- getArgs - let name = args!!0 - headerfile = - case args of - [n] -> "/usr/include/gsl/gsl_sf_"++n++".h" - [_,f] -> f - file <- readFile headerfile - - putStrLn headerfile - --mapM_ print (headers $ fixlong file) - let parsed = (headers $ fixlong file) - writeFile (name ++".h") (fixC $ unlines $ map showC parsed) - - --putStrLn "" - --mapM (\(Header _ n _) -> putStrLn (drop 7 n ++",")) parsed - --putStrLn "" - --mapM_ (putStrLn.showFull (name ++".h")) parsed - let exports = rep (")",") where") $ rep ("(\n","(\n ") $ rep (",\n",", ") $ unlines $ ["("]++intersperse "," (map (\(Header _ n _) -> hName n) (filter safe parsed))++[")"] - let defs = unlines $ map (showFull (name ++".h")) parsed - let imports = "\nimport Foreign(Ptr)\nimport GSL.Special.Internal\n" - let mod = modhead name ++ "module GSL.Special."++ upperFirst name++exports++imports++defs - writeFile (upperFirst name ++ ".hs") mod - - -google name = "" - -modhead name = replicate 60 '-' ++ "\n" - ++"{- |\n" - ++"Module : GSL.Special."++upperFirst name++"\n" - ++"Copyright : (c) Alberto Ruiz 2006\n" - ++"License : GPL-style\n" - ++"Maintainer : Alberto Ruiz (aruiz at um dot es)\n" - ++"Stability : provisional\n" - ++"Portability : uses ffi\n" - ++"\nWrappers for selected functions described at:\n\n" - ++ google ( "gsl_sf_"++name++".h") - ++"\n\n-}\n" - ++ replicate 60 '-' ++ "\n\n" - -upperFirst (x:xs) = toUpper x : xs - -comment = do - string "/*" - closecomment - spaces - return "comment" - -closecomment = try (string "*/") - <|> (do anyChar - closecomment) - -ident = do - spaces - id <- many1 (noneOf "()[]* \n\t,;") - spaces - return id - -comment' = between (char '(') (char ')') (many $ noneOf ")") - - -define = do - string "#" - closedefine - spaces - return "define" - -closedefine = try (string "\n") - <|> (do anyChar - closedefine) - -marks = do - try (string "__BEGIN_DECLS" >> spaces >> return "begin") - <|> - try (string "__END_DECLS" >> spaces >> return "end") - - - -irrelevant = - try comment - <|> - try define - <|> - marks - - -parseHeaders = many parseHeader - -parseHeader = do - spaces - many irrelevant - spaces - (res,name) <- typ - spaces - args <- between (char '(') (char ')') (sepBy typ (char ',')) - spaces - char ';' - spaces - many irrelevant - return $ Header res name args - -typ = try t1 <|> t2 - -symbol s = spaces >> string s >> spaces - -t1 = do - t <- try (symbol "const" >> symbol "unsigned" >> ident) -- aaagh - <|> - try (symbol "const" >> ident) - <|> - try (symbol "unsigned" >> ident) - <|> ident - n <- ident - return (Normal t,n) - -t2 = do - t <- ident - spaces - char '*' - spaces - n <- ident - return (Pointer t,n) - -pure (Header _ _ args) | fst (last args) == Pointer "gsl_sf_result" = False - | fst (last args) == Pointer "gsl_sf_result_e10" = False - | otherwise = True - -showC (Header t n args) = showCt t ++ " " ++ n ++ "(" ++ (concat $ intersperse "," $ map showCa args) ++ ");" - -showCt (Normal s) = s -showCt (Pointer s) = s ++ "*" - -showCa (t, a) = showCt t ++" "++ a - -showH hc h@(Header t n args) = "foreign import ccall \""++hc++" "++n++"\" "++n++" :: "++ (concat$intersperse" -> "$map showHa args) ++" -> " ++ t' - where t' | pure h = showHt t - | otherwise = "IO("++showHt t++")" - -showHt (Normal (s:ss)) = toUpper s : ss -showHt (Pointer "gsl_sf_result") = "Ptr Double" -showHt (Pointer "gsl_sf_result_e10") = "Ptr ()" -showHt (Pointer (s:ss)) = "Ptr "++toUpper s : ss - -showHa (t,a) = showHt t - -showFull hc h@(Header t n args) = "\n-- | wrapper for "++showC h - ++"\n--\n-- "++google n ++"\n" - ++ boiler h ++"\n" - ++showH hc h - -fixmd1 = rep ("Gsl_mode_t","Precision") -fixmd2 = rep ("mode"," (precCode mode)") - -boiler h@(Header t n args) | fst (last args) == Pointer "gsl_sf_result" = boilerResult h - | fst (last args) == Pointer "gsl_sf_result_e10" = boilerResultE10 h - | any isMode args = boilerMode h - | otherwise = boilerBasic h - -isMode (Normal "gsl_mode_t",_) = True -isMode _ = False - -hName n = f $ drop 7 n - where f (s:ss) = toLower s : ss - - -boilerResult h@(Header t n args) = - hName n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$ map showHa (init args)) ++" -> " ++ "(Double,Double)\n" ++ - hName n ++ " "++ initArgs args ++ - " = createSFR \""++ hName n ++"\" $ " ++ n ++ " "++ (fixmd2 $ initArgs args) - -boilerResultE10 h@(Header t n args) = - hName n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$ map showHa (init args)) ++" -> " ++ "(Double,Int,Double)\n" ++ - hName n ++ " "++ initArgs args ++ - " = createSFR_E10 \""++ hName n ++"\" $ " ++ n ++ " "++ (fixmd2 $ initArgs args) - -boilerBasic h@(Header t n args) = - hName n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$map showHa args) ++" -> " ++showHt t ++ "\n" ++ - hName n ++ " = " ++fixmd2 n - -boilerMode h@(Header t n args) = - hName n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$ map showHa args) ++" -> " ++ showHt t++"\n" ++ - hName n ++ " "++ allArgs args ++ - " = " ++ n ++ " "++ (fixmd2 $ allArgs args) - -cVar (v:vs) | isUpper v = toLower v : v : vs - | otherwise = v:vs - -allArgs args = unwords (map (cVar.snd) args) -initArgs args = unwords (map (cVar.snd) (init args)) \ No newline at end of file diff --git a/lib/GSL/Special/autoall.sh b/lib/GSL/Special/autoall.sh deleted file mode 100644 index cb45957..0000000 --- a/lib/GSL/Special/autoall.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -#Airy.hs -# include Precision (..) in the export list -#Exp.hs -# remove extern inline definition, qualify name -#Coupling -# remove deprecated INCORRECT -#Trig.hs -# qualify names -#Legendre.hs -# remove extern inline -#Log.hs -# remove extern inline, qualify name - -#runhaskell auto airy -runhaskell auto bessel -runhaskell auto clausen -runhaskell auto coulomb -#runhaskell auto coupling -runhaskell auto dawson -runhaskell auto debye -runhaskell auto dilog -runhaskell auto elementary -runhaskell auto ellint -runhaskell auto erf -#runhaskell auto exp -runhaskell auto expint -runhaskell auto fermi_dirac -runhaskell auto gamma -runhaskell auto gegenbauer -runhaskell auto hyperg -runhaskell auto laguerre -runhaskell auto lambert -#runhaskell auto legendre -#runhaskell auto log -runhaskell auto pow_int -runhaskell auto psi -runhaskell auto synchrotron -#runhaskell auto trig -runhaskell auto zeta \ No newline at end of file diff --git a/lib/GSL/Special/bessel.h b/lib/GSL/Special/bessel.h deleted file mode 100644 index 5a2445d..0000000 --- a/lib/GSL/Special/bessel.h +++ /dev/null @@ -1,100 +0,0 @@ -int gsl_sf_bessel_J0_e(double x,double* result); -double gsl_sf_bessel_J0(double x); -int gsl_sf_bessel_J1_e(double x,double* result); -double gsl_sf_bessel_J1(double x); -int gsl_sf_bessel_Jn_e(int n,double x,double* result); -double gsl_sf_bessel_Jn(int n,double x); -int gsl_sf_bessel_Jn_array(int nmin,int nmax,double x,double* result_array); -int gsl_sf_bessel_Y0_e(double x,double* result); -double gsl_sf_bessel_Y0(double x); -int gsl_sf_bessel_Y1_e(double x,double* result); -double gsl_sf_bessel_Y1(double x); -int gsl_sf_bessel_Yn_e(int n,double x,double* result); -double gsl_sf_bessel_Yn(int n,double x); -int gsl_sf_bessel_Yn_array(int nmin,int nmax,double x,double* result_array); -int gsl_sf_bessel_I0_e(double x,double* result); -double gsl_sf_bessel_I0(double x); -int gsl_sf_bessel_I1_e(double x,double* result); -double gsl_sf_bessel_I1(double x); -int gsl_sf_bessel_In_e(int n,double x,double* result); -double gsl_sf_bessel_In(int n,double x); -int gsl_sf_bessel_In_array(int nmin,int nmax,double x,double* result_array); -int gsl_sf_bessel_I0_scaled_e(double x,double* result); -double gsl_sf_bessel_I0_scaled(double x); -int gsl_sf_bessel_I1_scaled_e(double x,double* result); -double gsl_sf_bessel_I1_scaled(double x); -int gsl_sf_bessel_In_scaled_e(int n,double x,double* result); -double gsl_sf_bessel_In_scaled(int n,double x); -int gsl_sf_bessel_In_scaled_array(int nmin,int nmax,double x,double* result_array); -int gsl_sf_bessel_K0_e(double x,double* result); -double gsl_sf_bessel_K0(double x); -int gsl_sf_bessel_K1_e(double x,double* result); -double gsl_sf_bessel_K1(double x); -int gsl_sf_bessel_Kn_e(int n,double x,double* result); -double gsl_sf_bessel_Kn(int n,double x); -int gsl_sf_bessel_Kn_array(int nmin,int nmax,double x,double* result_array); -int gsl_sf_bessel_K0_scaled_e(double x,double* result); -double gsl_sf_bessel_K0_scaled(double x); -int gsl_sf_bessel_K1_scaled_e(double x,double* result); -double gsl_sf_bessel_K1_scaled(double x); -int gsl_sf_bessel_Kn_scaled_e(int n,double x,double* result); -double gsl_sf_bessel_Kn_scaled(int n,double x); -int gsl_sf_bessel_Kn_scaled_array(int nmin,int nmax,double x,double* result_array); -int gsl_sf_bessel_j0_e(double x,double* result); -double gsl_sf_bessel_j0(double x); -int gsl_sf_bessel_j1_e(double x,double* result); -double gsl_sf_bessel_j1(double x); -int gsl_sf_bessel_j2_e(double x,double* result); -double gsl_sf_bessel_j2(double x); -int gsl_sf_bessel_jl_e(int l,double x,double* result); -double gsl_sf_bessel_jl(int l,double x); -int gsl_sf_bessel_jl_array(int lmax,double x,double* result_array); -int gsl_sf_bessel_jl_steed_array(int lmax,double x,double* jl_x_array); -int gsl_sf_bessel_y0_e(double x,double* result); -double gsl_sf_bessel_y0(double x); -int gsl_sf_bessel_y1_e(double x,double* result); -double gsl_sf_bessel_y1(double x); -int gsl_sf_bessel_y2_e(double x,double* result); -double gsl_sf_bessel_y2(double x); -int gsl_sf_bessel_yl_e(int l,double x,double* result); -double gsl_sf_bessel_yl(int l,double x); -int gsl_sf_bessel_yl_array(int lmax,double x,double* result_array); -int gsl_sf_bessel_i0_scaled_e(double x,double* result); -double gsl_sf_bessel_i0_scaled(double x); -int gsl_sf_bessel_i1_scaled_e(double x,double* result); -double gsl_sf_bessel_i1_scaled(double x); -int gsl_sf_bessel_i2_scaled_e(double x,double* result); -double gsl_sf_bessel_i2_scaled(double x); -int gsl_sf_bessel_il_scaled_e(int l,double x,double* result); -double gsl_sf_bessel_il_scaled(int l,double x); -int gsl_sf_bessel_il_scaled_array(int lmax,double x,double* result_array); -int gsl_sf_bessel_k0_scaled_e(double x,double* result); -double gsl_sf_bessel_k0_scaled(double x); -int gsl_sf_bessel_k1_scaled_e(double x,double* result); -double gsl_sf_bessel_k1_scaled(double x); -int gsl_sf_bessel_k2_scaled_e(double x,double* result); -double gsl_sf_bessel_k2_scaled(double x); -int gsl_sf_bessel_kl_scaled_e(int l,double x,double* result); -double gsl_sf_bessel_kl_scaled(int l,double x); -int gsl_sf_bessel_kl_scaled_array(int lmax,double x,double* result_array); -int gsl_sf_bessel_Jnu_e(double nu,double x,double* result); -double gsl_sf_bessel_Jnu(double nu,double x); -int gsl_sf_bessel_Ynu_e(double nu,double x,double* result); -double gsl_sf_bessel_Ynu(double nu,double x); -int gsl_sf_bessel_sequence_Jnu_e(double nu,int mode,size_t size,double* v); -int gsl_sf_bessel_Inu_scaled_e(double nu,double x,double* result); -double gsl_sf_bessel_Inu_scaled(double nu,double x); -int gsl_sf_bessel_Inu_e(double nu,double x,double* result); -double gsl_sf_bessel_Inu(double nu,double x); -int gsl_sf_bessel_Knu_scaled_e(double nu,double x,double* result); -double gsl_sf_bessel_Knu_scaled(double nu,double x); -int gsl_sf_bessel_Knu_e(double nu,double x,double* result); -double gsl_sf_bessel_Knu(double nu,double x); -int gsl_sf_bessel_lnKnu_e(double nu,double x,double* result); -double gsl_sf_bessel_lnKnu(double nu,double x); -int gsl_sf_bessel_zero_J0_e(int s,double* result); -double gsl_sf_bessel_zero_J0(int s); -int gsl_sf_bessel_zero_J1_e(int s,double* result); -double gsl_sf_bessel_zero_J1(int s); -int gsl_sf_bessel_zero_Jnu_e(double nu,int s,double* result); -double gsl_sf_bessel_zero_Jnu(double nu,int s); diff --git a/lib/GSL/Special/clausen.h b/lib/GSL/Special/clausen.h deleted file mode 100644 index 9f0225b..0000000 --- a/lib/GSL/Special/clausen.h +++ /dev/null @@ -1,2 +0,0 @@ -int gsl_sf_clausen_e(double x,double* result); -double gsl_sf_clausen(double x); diff --git a/lib/GSL/Special/coulomb.h b/lib/GSL/Special/coulomb.h deleted file mode 100644 index 2551081..0000000 --- a/lib/GSL/Special/coulomb.h +++ /dev/null @@ -1,11 +0,0 @@ -int gsl_sf_hydrogenicR_1_e(double Z,double r,double* result); -double gsl_sf_hydrogenicR_1(double Z,double r); -int gsl_sf_hydrogenicR_e(int n,int l,double Z,double r,double* result); -double gsl_sf_hydrogenicR(int n,int l,double Z,double r); -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); -int gsl_sf_coulomb_wave_F_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent); -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); -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); -int gsl_sf_coulomb_wave_sphF_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent); -int gsl_sf_coulomb_CL_e(double L,double eta,double* result); -int gsl_sf_coulomb_CL_array(double Lmin,int kmax,double eta,double* cl); diff --git a/lib/GSL/Special/coupling.h b/lib/GSL/Special/coupling.h deleted file mode 100644 index 17de964..0000000 --- a/lib/GSL/Special/coupling.h +++ /dev/null @@ -1,10 +0,0 @@ -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); -double gsl_sf_coupling_3j(int two_ja,int two_jb,int two_jc,int two_ma,int two_mb,int two_mc); -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); -double gsl_sf_coupling_6j(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf); -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); -double gsl_sf_coupling_RacahW(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf); -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); -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); -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); -double gsl_sf_coupling_6j_INCORRECT(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf); diff --git a/lib/GSL/Special/dawson.h b/lib/GSL/Special/dawson.h deleted file mode 100644 index 5f878b5..0000000 --- a/lib/GSL/Special/dawson.h +++ /dev/null @@ -1,2 +0,0 @@ -int gsl_sf_dawson_e(double x,double* result); -double gsl_sf_dawson(double x); diff --git a/lib/GSL/Special/debye.h b/lib/GSL/Special/debye.h deleted file mode 100644 index 2424b63..0000000 --- a/lib/GSL/Special/debye.h +++ /dev/null @@ -1,8 +0,0 @@ -int gsl_sf_debye_1_e(double x,double* result); -double gsl_sf_debye_1(double x); -int gsl_sf_debye_2_e(double x,double* result); -double gsl_sf_debye_2(double x); -int gsl_sf_debye_3_e(double x,double* result); -double gsl_sf_debye_3(double x); -int gsl_sf_debye_4_e(double x,double* result); -double gsl_sf_debye_4(double x); diff --git a/lib/GSL/Special/dilog.h b/lib/GSL/Special/dilog.h deleted file mode 100644 index ce1599e..0000000 --- a/lib/GSL/Special/dilog.h +++ /dev/null @@ -1,5 +0,0 @@ -int gsl_sf_dilog_e(double x,double* result); -double gsl_sf_dilog(double x); -int gsl_sf_complex_dilog_xy_e(double x,double y,double* result_re,double* result_im); -int gsl_sf_complex_dilog_e(double r,double theta,double* result_re,double* result_im); -int gsl_sf_complex_spence_xy_e(double x,double y,double* real_sp,double* imag_sp); diff --git a/lib/GSL/Special/elementary.h b/lib/GSL/Special/elementary.h deleted file mode 100644 index bf5adf8..0000000 --- a/lib/GSL/Special/elementary.h +++ /dev/null @@ -1,3 +0,0 @@ -int gsl_sf_multiply_e(double x,double y,double* result); -double gsl_sf_multiply(double x,double y); -int gsl_sf_multiply_err_e(double x,double dx,double y,double dy,double* result); diff --git a/lib/GSL/Special/ellint.h b/lib/GSL/Special/ellint.h deleted file mode 100644 index 5329c6c..0000000 --- a/lib/GSL/Special/ellint.h +++ /dev/null @@ -1,20 +0,0 @@ -int gsl_sf_ellint_Kcomp_e(double k,int mode,double* result); -double gsl_sf_ellint_Kcomp(double k,int mode); -int gsl_sf_ellint_Ecomp_e(double k,int mode,double* result); -double gsl_sf_ellint_Ecomp(double k,int mode); -int gsl_sf_ellint_F_e(double phi,double k,int mode,double* result); -double gsl_sf_ellint_F(double phi,double k,int mode); -int gsl_sf_ellint_E_e(double phi,double k,int mode,double* result); -double gsl_sf_ellint_E(double phi,double k,int mode); -int gsl_sf_ellint_P_e(double phi,double k,double n,int mode,double* result); -double gsl_sf_ellint_P(double phi,double k,double n,int mode); -int gsl_sf_ellint_D_e(double phi,double k,double n,int mode,double* result); -double gsl_sf_ellint_D(double phi,double k,double n,int mode); -int gsl_sf_ellint_RC_e(double x,double y,int mode,double* result); -double gsl_sf_ellint_RC(double x,double y,int mode); -int gsl_sf_ellint_RD_e(double x,double y,double z,int mode,double* result); -double gsl_sf_ellint_RD(double x,double y,double z,int mode); -int gsl_sf_ellint_RF_e(double x,double y,double z,int mode,double* result); -double gsl_sf_ellint_RF(double x,double y,double z,int mode); -int gsl_sf_ellint_RJ_e(double x,double y,double z,double p,int mode,double* result); -double gsl_sf_ellint_RJ(double x,double y,double z,double p,int mode); diff --git a/lib/GSL/Special/erf.h b/lib/GSL/Special/erf.h deleted file mode 100644 index 17369cf..0000000 --- a/lib/GSL/Special/erf.h +++ /dev/null @@ -1,12 +0,0 @@ -int gsl_sf_erfc_e(double x,double* result); -double gsl_sf_erfc(double x); -int gsl_sf_log_erfc_e(double x,double* result); -double gsl_sf_log_erfc(double x); -int gsl_sf_erf_e(double x,double* result); -double gsl_sf_erf(double x); -int gsl_sf_erf_Z_e(double x,double* result); -int gsl_sf_erf_Q_e(double x,double* result); -double gsl_sf_erf_Z(double x); -double gsl_sf_erf_Q(double x); -int gsl_sf_hazard_e(double x,double* result); -double gsl_sf_hazard(double x); diff --git a/lib/GSL/Special/exp.h b/lib/GSL/Special/exp.h deleted file mode 100644 index 20062f0..0000000 --- a/lib/GSL/Special/exp.h +++ /dev/null @@ -1,18 +0,0 @@ -int gsl_sf_exp_e(double x,double* result); -double gsl_sf_exp(double x); -int gsl_sf_exp_e10_e(double x,double* result); -int gsl_sf_exp_mult_e(double x,double y,double* result); -double gsl_sf_exp_mult(double x,double y); -int gsl_sf_exp_mult_e10_e(double x,double y,double* result); -int gsl_sf_expm1_e(double x,double* result); -double gsl_sf_expm1(double x); -int gsl_sf_exprel_e(double x,double* result); -double gsl_sf_exprel(double x); -int gsl_sf_exprel_2_e(double x,double* result); -double gsl_sf_exprel_2(double x); -int gsl_sf_exprel_n_e(int n,double x,double* result); -double gsl_sf_exprel_n(int n,double x); -int gsl_sf_exp_err_e(double x,double dx,double* result); -int gsl_sf_exp_err_e10_e(double x,double dx,double* result); -int gsl_sf_exp_mult_err_e(double x,double dx,double y,double dy,double* result); -int gsl_sf_exp_mult_err_e10_e(double x,double dx,double y,double dy,double* result); diff --git a/lib/GSL/Special/expint.h b/lib/GSL/Special/expint.h deleted file mode 100644 index 1dd469f..0000000 --- a/lib/GSL/Special/expint.h +++ /dev/null @@ -1,24 +0,0 @@ -int gsl_sf_expint_E1_e(double x,double* result); -double gsl_sf_expint_E1(double x); -int gsl_sf_expint_E2_e(double x,double* result); -double gsl_sf_expint_E2(double x); -int gsl_sf_expint_E1_scaled_e(double x,double* result); -double gsl_sf_expint_E1_scaled(double x); -int gsl_sf_expint_E2_scaled_e(double x,double* result); -double gsl_sf_expint_E2_scaled(double x); -int gsl_sf_expint_Ei_e(double x,double* result); -double gsl_sf_expint_Ei(double x); -int gsl_sf_expint_Ei_scaled_e(double x,double* result); -double gsl_sf_expint_Ei_scaled(double x); -int gsl_sf_Shi_e(double x,double* result); -double gsl_sf_Shi(double x); -int gsl_sf_Chi_e(double x,double* result); -double gsl_sf_Chi(double x); -int gsl_sf_expint_3_e(double x,double* result); -double gsl_sf_expint_3(double x); -int gsl_sf_Si_e(double x,double* result); -double gsl_sf_Si(double x); -int gsl_sf_Ci_e(double x,double* result); -double gsl_sf_Ci(double x); -int gsl_sf_atanint_e(double x,double* result); -double gsl_sf_atanint(double x); diff --git a/lib/GSL/Special/fermi_dirac.h b/lib/GSL/Special/fermi_dirac.h deleted file mode 100644 index 7a4c757..0000000 --- a/lib/GSL/Special/fermi_dirac.h +++ /dev/null @@ -1,18 +0,0 @@ -int gsl_sf_fermi_dirac_m1_e(double x,double* result); -double gsl_sf_fermi_dirac_m1(double x); -int gsl_sf_fermi_dirac_0_e(double x,double* result); -double gsl_sf_fermi_dirac_0(double x); -int gsl_sf_fermi_dirac_1_e(double x,double* result); -double gsl_sf_fermi_dirac_1(double x); -int gsl_sf_fermi_dirac_2_e(double x,double* result); -double gsl_sf_fermi_dirac_2(double x); -int gsl_sf_fermi_dirac_int_e(int j,double x,double* result); -double gsl_sf_fermi_dirac_int(int j,double x); -int gsl_sf_fermi_dirac_mhalf_e(double x,double* result); -double gsl_sf_fermi_dirac_mhalf(double x); -int gsl_sf_fermi_dirac_half_e(double x,double* result); -double gsl_sf_fermi_dirac_half(double x); -int gsl_sf_fermi_dirac_3half_e(double x,double* result); -double gsl_sf_fermi_dirac_3half(double x); -int gsl_sf_fermi_dirac_inc_0_e(double x,double b,double* result); -double gsl_sf_fermi_dirac_inc_0(double x,double b); diff --git a/lib/GSL/Special/gamma.h b/lib/GSL/Special/gamma.h deleted file mode 100644 index c5cc417..0000000 --- a/lib/GSL/Special/gamma.h +++ /dev/null @@ -1,43 +0,0 @@ -int gsl_sf_lngamma_e(double x,double* result); -double gsl_sf_lngamma(double x); -int gsl_sf_lngamma_sgn_e(double x,double* result_lg,double* sgn); -int gsl_sf_gamma_e(double x,double* result); -double gsl_sf_gamma(double x); -int gsl_sf_gammastar_e(double x,double* result); -double gsl_sf_gammastar(double x); -int gsl_sf_gammainv_e(double x,double* result); -double gsl_sf_gammainv(double x); -int gsl_sf_lngamma_complex_e(double zr,double zi,double* lnr,double* arg); -int gsl_sf_taylorcoeff_e(int n,double x,double* result); -double gsl_sf_taylorcoeff(int n,double x); -int gsl_sf_fact_e(int n,double* result); -double gsl_sf_fact(int n); -int gsl_sf_doublefact_e(int n,double* result); -double gsl_sf_doublefact(int n); -int gsl_sf_lnfact_e(int n,double* result); -double gsl_sf_lnfact(int n); -int gsl_sf_lndoublefact_e(int n,double* result); -double gsl_sf_lndoublefact(int n); -int gsl_sf_lnchoose_e(int n,int m,double* result); -double gsl_sf_lnchoose(int n,int m); -int gsl_sf_choose_e(int n,int m,double* result); -double gsl_sf_choose(int n,int m); -int gsl_sf_lnpoch_e(double a,double x,double* result); -double gsl_sf_lnpoch(double a,double x); -int gsl_sf_lnpoch_sgn_e(double a,double x,double* result,double* sgn); -int gsl_sf_poch_e(double a,double x,double* result); -double gsl_sf_poch(double a,double x); -int gsl_sf_pochrel_e(double a,double x,double* result); -double gsl_sf_pochrel(double a,double x); -int gsl_sf_gamma_inc_Q_e(double a,double x,double* result); -double gsl_sf_gamma_inc_Q(double a,double x); -int gsl_sf_gamma_inc_P_e(double a,double x,double* result); -double gsl_sf_gamma_inc_P(double a,double x); -int gsl_sf_gamma_inc_e(double a,double x,double* result); -double gsl_sf_gamma_inc(double a,double x); -int gsl_sf_lnbeta_e(double a,double b,double* result); -double gsl_sf_lnbeta(double a,double b); -int gsl_sf_beta_e(double a,double b,double* result); -double gsl_sf_beta(double a,double b); -int gsl_sf_beta_inc_e(double a,double b,double x,double* result); -double gsl_sf_beta_inc(double a,double b,double x); diff --git a/lib/GSL/Special/gegenbauer.h b/lib/GSL/Special/gegenbauer.h deleted file mode 100644 index 228cbd3..0000000 --- a/lib/GSL/Special/gegenbauer.h +++ /dev/null @@ -1,9 +0,0 @@ -int gsl_sf_gegenpoly_1_e(double lambda,double x,double* result); -int gsl_sf_gegenpoly_2_e(double lambda,double x,double* result); -int gsl_sf_gegenpoly_3_e(double lambda,double x,double* result); -double gsl_sf_gegenpoly_1(double lambda,double x); -double gsl_sf_gegenpoly_2(double lambda,double x); -double gsl_sf_gegenpoly_3(double lambda,double x); -int gsl_sf_gegenpoly_n_e(int n,double lambda,double x,double* result); -double gsl_sf_gegenpoly_n(int n,double lambda,double x); -int gsl_sf_gegenpoly_array(int nmax,double lambda,double x,double* result_array); diff --git a/lib/GSL/Special/gsl_sf_exp.h b/lib/GSL/Special/gsl_sf_exp.h deleted file mode 100644 index b1f0d89..0000000 --- a/lib/GSL/Special/gsl_sf_exp.h +++ /dev/null @@ -1,146 +0,0 @@ -/* specfunc/gsl_sf_exp.h - * - * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -/* Author: G. Jungman */ - -#ifndef __GSL_SF_EXP_H__ -#define __GSL_SF_EXP_H__ - -#include -#include - -#undef __BEGIN_DECLS -#undef __END_DECLS -#ifdef __cplusplus -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS } -#else -# define __BEGIN_DECLS /* empty */ -# define __END_DECLS /* empty */ -#endif - -__BEGIN_DECLS - -/* Provide an exp() function with GSL semantics, - * i.e. with proper error checking, etc. - * - * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW - */ -int gsl_sf_exp_e(const double x, gsl_sf_result * result); -double gsl_sf_exp(const double x); - - -/* Exp(x) - * - * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW - */ -int gsl_sf_exp_e10_e(const double x, gsl_sf_result_e10 * result); - - -/* Exponentiate and multiply by a given factor: y * Exp(x) - * - * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW - */ -int gsl_sf_exp_mult_e(const double x, const double y, gsl_sf_result * result); -double gsl_sf_exp_mult(const double x, const double y); - - -/* Exponentiate and multiply by a given factor: y * Exp(x) - * - * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW - */ -int gsl_sf_exp_mult_e10_e(const double x, const double y, gsl_sf_result_e10 * result); - - -/* exp(x)-1 - * - * exceptions: GSL_EOVRFLW - */ -int gsl_sf_expm1_e(const double x, gsl_sf_result * result); -double gsl_sf_expm1(const double x); - - -/* (exp(x)-1)/x = 1 + x/2 + x^2/(2*3) + x^3/(2*3*4) + ... - * - * exceptions: GSL_EOVRFLW - */ -int gsl_sf_exprel_e(const double x, gsl_sf_result * result); -double gsl_sf_exprel(const double x); - - -/* 2(exp(x)-1-x)/x^2 = 1 + x/3 + x^2/(3*4) + x^3/(3*4*5) + ... - * - * exceptions: GSL_EOVRFLW - */ -int gsl_sf_exprel_2_e(double x, gsl_sf_result * result); -double gsl_sf_exprel_2(const double x); - - -/* Similarly for the N-th generalization of - * the above. The so-called N-relative exponential - * - * exprel_N(x) = N!/x^N (exp(x) - Sum[x^k/k!, {k,0,N-1}]) - * = 1 + x/(N+1) + x^2/((N+1)(N+2)) + ... - * = 1F1(1,1+N,x) - */ -int gsl_sf_exprel_n_e(const int n, const double x, gsl_sf_result * result); -double gsl_sf_exprel_n(const int n, const double x); - - -/* Exponentiate a quantity with an associated error. - */ -int gsl_sf_exp_err_e(const double x, const double dx, gsl_sf_result * result); - -/* Exponentiate a quantity with an associated error. - */ -int gsl_sf_exp_err_e10_e(const double x, const double dx, gsl_sf_result_e10 * result); - - -/* Exponentiate and multiply by a given factor: y * Exp(x), - * for quantities with associated errors. - * - * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW - */ -int gsl_sf_exp_mult_err_e(const double x, const double dx, const double y, const double dy, gsl_sf_result * result); - - -/* Exponentiate and multiply by a given factor: y * Exp(x), - * for quantities with associated errors. - * - * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW - */ -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); - -__END_DECLS - - -#ifdef HAVE_INLINE -#include -#include - -__BEGIN_DECLS - - - -__END_DECLS - -#endif /* HAVE_INLINE */ - - -#endif /* __GSL_SF_EXP_H__ */ diff --git a/lib/GSL/Special/gsl_sf_log.h b/lib/GSL/Special/gsl_sf_log.h deleted file mode 100644 index 5225d05..0000000 --- a/lib/GSL/Special/gsl_sf_log.h +++ /dev/null @@ -1,90 +0,0 @@ -/* specfunc/gsl_sf_log.h - * - * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -/* Author: G. Jungman */ - -#ifndef __GSL_SF_LOG_H__ -#define __GSL_SF_LOG_H__ - -#include - -#undef __BEGIN_DECLS -#undef __END_DECLS -#ifdef __cplusplus -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS } -#else -# define __BEGIN_DECLS /* empty */ -# define __END_DECLS /* empty */ -#endif - -__BEGIN_DECLS - - -/* Provide a logarithm function with GSL semantics. - * - * exceptions: GSL_EDOM - */ -int gsl_sf_log_e(const double x, gsl_sf_result * result); -double gsl_sf_log(const double x); - - -/* Log(|x|) - * - * exceptions: GSL_EDOM - */ -int gsl_sf_log_abs_e(const double x, gsl_sf_result * result); -double gsl_sf_log_abs(const double x); - - -/* Complex Logarithm - * exp(lnr + I theta) = zr + I zi - * Returns argument in [-pi,pi]. - * - * exceptions: GSL_EDOM - */ -int gsl_sf_complex_log_e(const double zr, const double zi, gsl_sf_result * lnr, gsl_sf_result * theta); - - -/* Log(1 + x) - * - * exceptions: GSL_EDOM - */ -int gsl_sf_log_1plusx_e(const double x, gsl_sf_result * result); -double gsl_sf_log_1plusx(const double x); - - -/* Log(1 + x) - x - * - * exceptions: GSL_EDOM - */ -int gsl_sf_log_1plusx_mx_e(const double x, gsl_sf_result * result); -double gsl_sf_log_1plusx_mx(const double x); - - -#ifdef HAVE_INLINE -#include -#include - -#endif /* HAVE_INLINE */ - - -__END_DECLS - -#endif /* __GSL_SF_LOG_H__ */ diff --git a/lib/GSL/Special/hyperg.h b/lib/GSL/Special/hyperg.h deleted file mode 100644 index aa59106..0000000 --- a/lib/GSL/Special/hyperg.h +++ /dev/null @@ -1,22 +0,0 @@ -int gsl_sf_hyperg_0F1_e(double c,double x,double* result); -double gsl_sf_hyperg_0F1(double c,double x); -int gsl_sf_hyperg_1F1_int_e(int m,int n,double x,double* result); -double gsl_sf_hyperg_1F1_int(int m,int n,double x); -int gsl_sf_hyperg_1F1_e(double a,double b,double x,double* result); -double gsl_sf_hyperg_1F1(double a,double b,double x); -int gsl_sf_hyperg_U_int_e(int m,int n,double x,double* result); -double gsl_sf_hyperg_U_int(int m,int n,double x); -int gsl_sf_hyperg_U_int_e10_e(int m,int n,double x,double* result); -int gsl_sf_hyperg_U_e(double a,double b,double x,double* result); -double gsl_sf_hyperg_U(double a,double b,double x); -int gsl_sf_hyperg_U_e10_e(double a,double b,double x,double* result); -int gsl_sf_hyperg_2F1_e(double a,double b,double c,double x,double* result); -double gsl_sf_hyperg_2F1(double a,double b,double c,double x); -int gsl_sf_hyperg_2F1_conj_e(double aR,double aI,double c,double x,double* result); -double gsl_sf_hyperg_2F1_conj(double aR,double aI,double c,double x); -int gsl_sf_hyperg_2F1_renorm_e(double a,double b,double c,double x,double* result); -double gsl_sf_hyperg_2F1_renorm(double a,double b,double c,double x); -int gsl_sf_hyperg_2F1_conj_renorm_e(double aR,double aI,double c,double x,double* result); -double gsl_sf_hyperg_2F1_conj_renorm(double aR,double aI,double c,double x); -int gsl_sf_hyperg_2F0_e(double a,double b,double x,double* result); -double gsl_sf_hyperg_2F0(double a,double b,double x); diff --git a/lib/GSL/Special/laguerre.h b/lib/GSL/Special/laguerre.h deleted file mode 100644 index 6275a05..0000000 --- a/lib/GSL/Special/laguerre.h +++ /dev/null @@ -1,8 +0,0 @@ -int gsl_sf_laguerre_1_e(double a,double x,double* result); -int gsl_sf_laguerre_2_e(double a,double x,double* result); -int gsl_sf_laguerre_3_e(double a,double x,double* result); -double gsl_sf_laguerre_1(double a,double x); -double gsl_sf_laguerre_2(double a,double x); -double gsl_sf_laguerre_3(double a,double x); -int gsl_sf_laguerre_n_e(int n,double a,double x,double* result); -double gsl_sf_laguerre_n(int n,double a,double x); diff --git a/lib/GSL/Special/lambert.h b/lib/GSL/Special/lambert.h deleted file mode 100644 index df90d11..0000000 --- a/lib/GSL/Special/lambert.h +++ /dev/null @@ -1,4 +0,0 @@ -int gsl_sf_lambert_W0_e(double x,double* result); -double gsl_sf_lambert_W0(double x); -int gsl_sf_lambert_Wm1_e(double x,double* result); -double gsl_sf_lambert_Wm1(double x); diff --git a/lib/GSL/Special/legendre.h b/lib/GSL/Special/legendre.h deleted file mode 100644 index aebe84f..0000000 --- a/lib/GSL/Special/legendre.h +++ /dev/null @@ -1,44 +0,0 @@ -int gsl_sf_legendre_Pl_e(int l,double x,double* result); -double gsl_sf_legendre_Pl(int l,double x); -int gsl_sf_legendre_Pl_array(int lmax,double x,double* result_array); -int gsl_sf_legendre_Pl_deriv_array(int lmax,double x,double* result_array,double* result_deriv_array); -int gsl_sf_legendre_P1_e(double x,double* result); -int gsl_sf_legendre_P2_e(double x,double* result); -int gsl_sf_legendre_P3_e(double x,double* result); -double gsl_sf_legendre_P1(double x); -double gsl_sf_legendre_P2(double x); -double gsl_sf_legendre_P3(double x); -int gsl_sf_legendre_Q0_e(double x,double* result); -double gsl_sf_legendre_Q0(double x); -int gsl_sf_legendre_Q1_e(double x,double* result); -double gsl_sf_legendre_Q1(double x); -int gsl_sf_legendre_Ql_e(int l,double x,double* result); -double gsl_sf_legendre_Ql(int l,double x); -int gsl_sf_legendre_Plm_e(int l,int m,double x,double* result); -double gsl_sf_legendre_Plm(int l,int m,double x); -int gsl_sf_legendre_Plm_array(int lmax,int m,double x,double* result_array); -int gsl_sf_legendre_Plm_deriv_array(int lmax,int m,double x,double* result_array,double* result_deriv_array); -int gsl_sf_legendre_sphPlm_e(int l,int m,double x,double* result); -double gsl_sf_legendre_sphPlm(int l,int m,double x); -int gsl_sf_legendre_sphPlm_array(int lmax,int m,double x,double* result_array); -int gsl_sf_legendre_sphPlm_deriv_array(int lmax,int m,double x,double* result_array,double* result_deriv_array); -int gsl_sf_legendre_array_size(int lmax,int m); -int gsl_sf_conicalP_half_e(double lambda,double x,double* result); -double gsl_sf_conicalP_half(double lambda,double x); -int gsl_sf_conicalP_mhalf_e(double lambda,double x,double* result); -double gsl_sf_conicalP_mhalf(double lambda,double x); -int gsl_sf_conicalP_0_e(double lambda,double x,double* result); -double gsl_sf_conicalP_0(double lambda,double x); -int gsl_sf_conicalP_1_e(double lambda,double x,double* result); -double gsl_sf_conicalP_1(double lambda,double x); -int gsl_sf_conicalP_sph_reg_e(int l,double lambda,double x,double* result); -double gsl_sf_conicalP_sph_reg(int l,double lambda,double x); -int gsl_sf_conicalP_cyl_reg_e(int m,double lambda,double x,double* result); -double gsl_sf_conicalP_cyl_reg(int m,double lambda,double x); -int gsl_sf_legendre_H3d_0_e(double lambda,double eta,double* result); -double gsl_sf_legendre_H3d_0(double lambda,double eta); -int gsl_sf_legendre_H3d_1_e(double lambda,double eta,double* result); -double gsl_sf_legendre_H3d_1(double lambda,double eta); -int gsl_sf_legendre_H3d_e(int l,double lambda,double eta,double* result); -double gsl_sf_legendre_H3d(int l,double lambda,double eta); -int gsl_sf_legendre_H3d_array(int lmax,double lambda,double eta,double* result_array); diff --git a/lib/GSL/Special/log.h b/lib/GSL/Special/log.h deleted file mode 100644 index 5713845..0000000 --- a/lib/GSL/Special/log.h +++ /dev/null @@ -1,9 +0,0 @@ -int gsl_sf_log_e(double x,double* result); -double gsl_sf_log(double x); -int gsl_sf_log_abs_e(double x,double* result); -double gsl_sf_log_abs(double x); -int gsl_sf_complex_log_e(double zr,double zi,double* lnr,double* theta); -int gsl_sf_log_1plusx_e(double x,double* result); -double gsl_sf_log_1plusx(double x); -int gsl_sf_log_1plusx_mx_e(double x,double* result); -double gsl_sf_log_1plusx_mx(double x); diff --git a/lib/GSL/Special/pow_int.h b/lib/GSL/Special/pow_int.h deleted file mode 100644 index aba8bc9..0000000 --- a/lib/GSL/Special/pow_int.h +++ /dev/null @@ -1,2 +0,0 @@ -int gsl_sf_pow_int_e(double x,int n,double* result); -double gsl_sf_pow_int(double x,int n); diff --git a/lib/GSL/Special/psi.h b/lib/GSL/Special/psi.h deleted file mode 100644 index 589eb34..0000000 --- a/lib/GSL/Special/psi.h +++ /dev/null @@ -1,12 +0,0 @@ -int gsl_sf_psi_int_e(int n,double* result); -double gsl_sf_psi_int(int n); -int gsl_sf_psi_e(double x,double* result); -double gsl_sf_psi(double x); -int gsl_sf_psi_1piy_e(double y,double* result); -double gsl_sf_psi_1piy(double y); -int gsl_sf_psi_1_int_e(int n,double* result); -double gsl_sf_psi_1_int(int n); -int gsl_sf_psi_1_e(double x,double* result); -double gsl_sf_psi_1(double x); -int gsl_sf_psi_n_e(int n,double x,double* result); -double gsl_sf_psi_n(int n,double x); diff --git a/lib/GSL/Special/synchrotron.h b/lib/GSL/Special/synchrotron.h deleted file mode 100644 index 786401c..0000000 --- a/lib/GSL/Special/synchrotron.h +++ /dev/null @@ -1,4 +0,0 @@ -int gsl_sf_synchrotron_1_e(double x,double* result); -double gsl_sf_synchrotron_1(double x); -int gsl_sf_synchrotron_2_e(double x,double* result); -double gsl_sf_synchrotron_2(double x); diff --git a/lib/GSL/Special/trig.h b/lib/GSL/Special/trig.h deleted file mode 100644 index 50677f2..0000000 --- a/lib/GSL/Special/trig.h +++ /dev/null @@ -1,25 +0,0 @@ -int gsl_sf_sin_e(double x,double* result); -double gsl_sf_sin(double x); -int gsl_sf_cos_e(double x,double* result); -double gsl_sf_cos(double x); -int gsl_sf_hypot_e(double x,double y,double* result); -double gsl_sf_hypot(double x,double y); -int gsl_sf_complex_sin_e(double zr,double zi,double* szr,double* szi); -int gsl_sf_complex_cos_e(double zr,double zi,double* czr,double* czi); -int gsl_sf_complex_logsin_e(double zr,double zi,double* lszr,double* lszi); -int gsl_sf_sinc_e(double x,double* result); -double gsl_sf_sinc(double x); -int gsl_sf_lnsinh_e(double x,double* result); -double gsl_sf_lnsinh(double x); -int gsl_sf_lncosh_e(double x,double* result); -double gsl_sf_lncosh(double x); -int gsl_sf_polar_to_rect(double r,double theta,double* x,double* y); -int gsl_sf_rect_to_polar(double x,double y,double* r,double* theta); -int gsl_sf_sin_err_e(double x,double dx,double* result); -int gsl_sf_cos_err_e(double x,double dx,double* result); -int gsl_sf_angle_restrict_symm_e(double* theta); -double gsl_sf_angle_restrict_symm(double theta); -int gsl_sf_angle_restrict_pos_e(double* theta); -double gsl_sf_angle_restrict_pos(double theta); -int gsl_sf_angle_restrict_symm_err_e(double theta,double* result); -int gsl_sf_angle_restrict_pos_err_e(double theta,double* result); diff --git a/lib/GSL/Special/zeta.h b/lib/GSL/Special/zeta.h deleted file mode 100644 index b961ece..0000000 --- a/lib/GSL/Special/zeta.h +++ /dev/null @@ -1,14 +0,0 @@ -int gsl_sf_zeta_int_e(int n,double* result); -double gsl_sf_zeta_int(int n); -int gsl_sf_zeta_e(double s,double* result); -double gsl_sf_zeta(double s); -int gsl_sf_zetam1_e(double s,double* result); -double gsl_sf_zetam1(double s); -int gsl_sf_zetam1_int_e(int s,double* result); -double gsl_sf_zetam1_int(int s); -int gsl_sf_hzeta_e(double s,double q,double* result); -double gsl_sf_hzeta(double s,double q); -int gsl_sf_eta_int_e(int n,double* result); -double gsl_sf_eta_int(int n); -int gsl_sf_eta_e(double s,double* result); -double gsl_sf_eta(double s); diff --git a/lib/GSL/Vector.hs b/lib/GSL/Vector.hs deleted file mode 100644 index b405ff8..0000000 --- a/lib/GSL/Vector.hs +++ /dev/null @@ -1,144 +0,0 @@ -{-# OPTIONS_GHC -fglasgow-exts #-} ------------------------------------------------------------------------------ --- | --- Module : GSL.Vector --- Copyright : (c) Alberto Ruiz 2007 --- License : GPL-style --- --- Maintainer : Alberto Ruiz --- Stability : provisional --- Portability : portable (uses FFI) --- --- Vector operations --- ------------------------------------------------------------------------------ - -module GSL.Vector ( - FunCodeS(..), toScalarR, - FunCodeV(..), vectorMapR, vectorMapC, - FunCodeSV(..), vectorMapValR, vectorMapValC, - FunCodeVV(..), vectorZipR, vectorZipC -) where - -import Data.Packed.Internal.Common -import Data.Packed.Internal.Vector - -import Complex -import Foreign - -data FunCodeV = Sin - | Cos - | Tan - | Abs - | ASin - | ACos - | ATan - | Sinh - | Cosh - | Tanh - | ASinh - | ACosh - | ATanh - | Exp - | Log - | Sign - | Sqrt - deriving Enum - -data FunCodeSV = Scale - | Recip - | AddConstant - | Negate - | PowSV - | PowVS - deriving Enum - -data FunCodeVV = Add - | Sub - | Mul - | Div - | Pow - | ATan2 - deriving Enum - -data FunCodeS = Norm2 - | AbsSum - | MaxIdx - | Max - | MinIdx - | Min - deriving Enum - ------------------------------------------------------------------- - -toScalarAux fun code v = unsafePerformIO $ do - r <- createVector 1 - fun (fromEnum code) // vec v // vec r // check "toScalarAux" [v] - return (r `at` 0) - -vectorMapAux fun code v = unsafePerformIO $ do - r <- createVector (dim v) - fun (fromEnum code) // vec v // vec r // check "vectorMapAux" [v] - return r - -vectorMapValAux fun code val v = unsafePerformIO $ do - r <- createVector (dim v) - pval <- newArray [val] - fun (fromEnum code) pval // vec v // vec r // check "vectorMapValAux" [v] - free pval - return r - -vectorZipAux fun code u v = unsafePerformIO $ do - r <- createVector (dim u) - fun (fromEnum code) // vec u // vec v // vec r // check "vectorZipAux" [u,v] - return r - ---------------------------------------------------------------------- - --- | obtains different functions of a vector: norm1, norm2, max, min, posmax, posmin, etc. -toScalarR :: FunCodeS -> Vector Double -> Double -toScalarR oper = toScalarAux c_toScalarR (fromEnum oper) - -foreign import ccall safe "gsl-aux.h toScalarR" c_toScalarR :: Int -> TVV - ------------------------------------------------------------------- - --- | map of real vectors with given function -vectorMapR :: FunCodeV -> Vector Double -> Vector Double -vectorMapR = vectorMapAux c_vectorMapR - -foreign import ccall safe "gsl-aux.h mapR" c_vectorMapR :: Int -> TVV - --- | map of complex vectors with given function -vectorMapC :: FunCodeV -> Vector (Complex Double) -> Vector (Complex Double) -vectorMapC oper = vectorMapAux c_vectorMapC (fromEnum oper) - -foreign import ccall safe "gsl-aux.h mapC" c_vectorMapC :: Int -> TCVCV - -------------------------------------------------------------------- - --- | map of real vectors with given function -vectorMapValR :: FunCodeSV -> Double -> Vector Double -> Vector Double -vectorMapValR oper = vectorMapValAux c_vectorMapValR (fromEnum oper) - -foreign import ccall safe "gsl-aux.h mapValR" c_vectorMapValR :: Int -> Ptr Double -> TVV - --- | map of complex vectors with given function -vectorMapValC :: FunCodeSV -> Complex Double -> Vector (Complex Double) -> Vector (Complex Double) -vectorMapValC = vectorMapValAux c_vectorMapValC - -foreign import ccall safe "gsl-aux.h mapValC" c_vectorMapValC :: Int -> Ptr (Complex Double) -> TCVCV - -------------------------------------------------------------------- - --- | elementwise operation on real vectors -vectorZipR :: FunCodeVV -> Vector Double -> Vector Double -> Vector Double -vectorZipR = vectorZipAux c_vectorZipR - -foreign import ccall safe "gsl-aux.h zipR" c_vectorZipR :: Int -> TVVV - --- | elementwise operation on complex vectors -vectorZipC :: FunCodeVV -> Vector (Complex Double) -> Vector (Complex Double) -> Vector (Complex Double) -vectorZipC = vectorZipAux c_vectorZipC - -foreign import ccall safe "gsl-aux.h zipC" c_vectorZipC :: Int -> TCVCVCV diff --git a/lib/GSL/gsl-aux.c b/lib/GSL/gsl-aux.c deleted file mode 100644 index c602d5e..0000000 --- a/lib/GSL/gsl-aux.c +++ /dev/null @@ -1,743 +0,0 @@ -#include "gsl-aux.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define MACRO(B) do {B} while (0) -#define ERROR(CODE) MACRO(return CODE;) -#define REQUIRES(COND, CODE) MACRO(if(!(COND)) {ERROR(CODE);}) -#define OK return 0; - -#define MIN(A,B) ((A)<(B)?(A):(B)) -#define MAX(A,B) ((A)>(B)?(A):(B)) - -#ifdef DBG -#define DEBUGMSG(M) printf("*** calling aux C function: %s\n",M); -#else -#define DEBUGMSG(M) -#endif - -#define CHECK(RES,CODE) MACRO(if(RES) return CODE;) - -#ifdef DBG -#define DEBUGMAT(MSG,X) printf(MSG" = \n"); gsl_matrix_fprintf(stdout,X,"%f"); printf("\n"); -#else -#define DEBUGMAT(MSG,X) -#endif - -#ifdef DBG -#define DEBUGVEC(MSG,X) printf(MSG" = \n"); gsl_vector_fprintf(stdout,X,"%f"); printf("\n"); -#else -#define DEBUGVEC(MSG,X) -#endif - -#define DVVIEW(A) gsl_vector_view A = gsl_vector_view_array(A##p,A##n) -#define DMVIEW(A) gsl_matrix_view A = gsl_matrix_view_array(A##p,A##r,A##c) -#define CVVIEW(A) gsl_vector_complex_view A = gsl_vector_complex_view_array((double*)A##p,A##n) -#define CMVIEW(A) gsl_matrix_complex_view A = gsl_matrix_complex_view_array((double*)A##p,A##r,A##c) -#define KDVVIEW(A) gsl_vector_const_view A = gsl_vector_const_view_array(A##p,A##n) -#define KDMVIEW(A) gsl_matrix_const_view A = gsl_matrix_const_view_array(A##p,A##r,A##c) -#define KCVVIEW(A) gsl_vector_complex_const_view A = gsl_vector_complex_const_view_array((double*)A##p,A##n) -#define KCMVIEW(A) gsl_matrix_complex_const_view A = gsl_matrix_complex_const_view_array((double*)A##p,A##r,A##c) - -#define V(a) (&a.vector) -#define M(a) (&a.matrix) - -#define GCVEC(A) int A##n, gsl_complex*A##p -#define KGCVEC(A) int A##n, const gsl_complex*A##p - -#define BAD_SIZE 2000 -#define BAD_CODE 2001 -#define MEM 2002 -#define BAD_FILE 2003 - - -void no_abort_on_error() { - gsl_set_error_handler_off(); -} - - -int toScalarR(int code, KRVEC(x), RVEC(r)) { - REQUIRES(rn==1,BAD_SIZE); - DEBUGMSG("toScalarR"); - KDVVIEW(x); - double res; - switch(code) { - case 0: { res = gsl_blas_dnrm2(V(x)); break; } - case 1: { res = gsl_blas_dasum(V(x)); break; } - case 2: { res = gsl_vector_max_index(V(x)); break; } - case 3: { res = gsl_vector_max(V(x)); break; } - case 4: { res = gsl_vector_min_index(V(x)); break; } - case 5: { res = gsl_vector_min(V(x)); break; } - default: ERROR(BAD_CODE); - } - rp[0] = res; - OK -} - - -inline double sign(double x) { - if(x>0) { - return +1.0; - } else if (x<0) { - return -1.0; - } else { - return 0.0; - } -} - - -#define OP(C,F) case C: { for(k=0;k1,BAD_SIZE); - gsl_poly_complex_workspace * w = gsl_poly_complex_workspace_alloc (an); - int res = gsl_poly_complex_solve ((double*)ap, an, w, (double*)zp); - CHECK(res,res); - gsl_poly_complex_workspace_free (w); - OK; -} - -int matrix_fscanf(char*filename, RMAT(a)) { - DEBUGMSG("gsl_matrix_fscanf"); - //printf(filename); printf("\n"); - DMVIEW(a); - FILE * f = fopen(filename,"r"); - CHECK(!f,BAD_FILE); - int res = gsl_matrix_fscanf(f, M(a)); - CHECK(res,res); - fclose (f); - OK -} - -//--------------------------------------------------------------- - -typedef double Trawfun(int, double*); - -double only_f_aux_min(const gsl_vector*x, void *pars) { - Trawfun * f = (Trawfun*) pars; - double* p = (double*)calloc(x->size,sizeof(double)); - int k; - for(k=0;ksize;k++) { - p[k] = gsl_vector_get(x,k); - } - double res = f(x->size,p); - free(p); - return res; -} - -// this version returns info about intermediate steps -int minimize(double f(int, double*), double tolsize, int maxit, - KRVEC(xi), KRVEC(sz), RMAT(sol)) { - REQUIRES(xin==szn && solr == maxit && solc == 3+xin,BAD_SIZE); - DEBUGMSG("minimizeList (nmsimplex)"); - gsl_multimin_function my_func; - // extract function from pars - my_func.f = only_f_aux_min; - my_func.n = xin; - my_func.params = f; - size_t iter = 0; - int status; - double size; - const gsl_multimin_fminimizer_type *T; - gsl_multimin_fminimizer *s = NULL; - // Initial vertex size vector - KDVVIEW(sz); - // Starting point - KDVVIEW(xi); - // Minimizer nmsimplex, without derivatives - T = gsl_multimin_fminimizer_nmsimplex; - s = gsl_multimin_fminimizer_alloc (T, my_func.n); - gsl_multimin_fminimizer_set (s, &my_func, V(xi), V(sz)); - do { - status = gsl_multimin_fminimizer_iterate (s); - size = gsl_multimin_fminimizer_size (s); - - solp[iter*solc+0] = iter; - solp[iter*solc+1] = s->fval; - solp[iter*solc+2] = size; - - int k; - for(k=0;kx,k); - } - status = gsl_multimin_test_size (size, tolsize); - iter++; - } while (status == GSL_CONTINUE && iter < maxit); - int i,j; - for (i=iter; isize,sizeof(double)); - int k; - for(k=0;ksize;k++) { - p[k] = gsl_vector_get(x,k); - } - double res = fdf->f(x->size,p); - free(p); - return res; -} - - -void df_aux_min(const gsl_vector * x, void * pars, gsl_vector * g) { - Tfdf * fdf = ((Tfdf*) pars); - double* p = (double*)calloc(x->size,sizeof(double)); - double* q = (double*)calloc(x->size,sizeof(double)); - int k; - for(k=0;ksize;k++) { - p[k] = gsl_vector_get(x,k); - } - - fdf->df(x->size,p,q); - - for(k=0;ksize;k++) { - gsl_vector_set(g,k,q[k]); - } - free(p); - free(q); -} - -void fdf_aux_min(const gsl_vector * x, void * pars, double * f, gsl_vector * g) { - *f = f_aux_min(x,pars); - df_aux_min(x,pars,g); -} - -// conjugate gradient -int minimizeWithDeriv(double f(int, double*), void df(int, double*, double*), - double initstep, double minimpar, double tolgrad, int maxit, - KRVEC(xi), RMAT(sol)) { - REQUIRES(solr == maxit && solc == 2+xin,BAD_SIZE); - DEBUGMSG("minimizeWithDeriv (conjugate_fr)"); - gsl_multimin_function_fdf my_func; - // extract function from pars - my_func.f = f_aux_min; - my_func.df = df_aux_min; - my_func.fdf = fdf_aux_min; - my_func.n = xin; - Tfdf stfdf; - stfdf.f = f; - stfdf.df = df; - my_func.params = &stfdf; - size_t iter = 0; - int status; - const gsl_multimin_fdfminimizer_type *T; - gsl_multimin_fdfminimizer *s = NULL; - // Starting point - KDVVIEW(xi); - // conjugate gradient fr - T = gsl_multimin_fdfminimizer_conjugate_fr; - s = gsl_multimin_fdfminimizer_alloc (T, my_func.n); - gsl_multimin_fdfminimizer_set (s, &my_func, V(xi), initstep, minimpar); - do { - status = gsl_multimin_fdfminimizer_iterate (s); - solp[iter*solc+0] = iter; - solp[iter*solc+1] = s->f; - int k; - for(k=0;kx,k); - } - status = gsl_multimin_test_gradient (s->gradient, tolgrad); - iter++; - } while (status == GSL_CONTINUE && iter < maxit); - int i,j; - for (i=iter; i - -#define RVEC(A) int A##n, double*A##p -#define RMAT(A) int A##r, int A##c, double* A##p -#define KRVEC(A) int A##n, const double*A##p -#define KRMAT(A) int A##r, int A##c, const double* A##p - -#define CVEC(A) int A##n, gsl_complex*A##p -#define CMAT(A) int A##r, int A##c, gsl_complex* A##p -#define KCVEC(A) int A##n, const gsl_complex*A##p -#define KCMAT(A) int A##r, int A##c, const gsl_complex* A##p - -void no_abort_on_error(); - -int toScalarR(int code, KRVEC(x), RVEC(r)); -/* norm2, absdif, maximum, posmax, etc. */ - -int mapR(int code, KRVEC(x), RVEC(r)); -int mapC(int code, KCVEC(x), CVEC(r)); -/* sin cos tan etc. */ - -int mapValR(int code, double*, KRVEC(x), RVEC(r)); -int mapValC(int code, gsl_complex*, KCVEC(x), CVEC(r)); - -int zipR(int code, KRVEC(a), KRVEC(b), RVEC(r)); -int zipC(int code, KCVEC(a), KCVEC(b), CVEC(r)); - - -int luSolveR(KRMAT(a),KRMAT(b),RMAT(r)); -int luSolveC(KCMAT(a),KCMAT(b),CMAT(r)); -int luRaux(KRMAT(a),RVEC(b)); -int luCaux(KCMAT(a),CVEC(b)); - -int svd(KRMAT(x),RMAT(u), RVEC(s),RMAT(v)); - -int eigensystemR(KRMAT(x),RVEC(l),RMAT(v)); -int eigensystemC(KCMAT(x),RVEC(l),CMAT(v)); - -int QR(KRMAT(x),RMAT(q),RMAT(r)); - -int cholR(KRMAT(x),RMAT(l)); - -int cholC(KCMAT(x),CMAT(l)); - -int fft(int code, KCVEC(a), CVEC(b)); - -int integrate_qng(double f(double, void*), double a, double b, double prec, - double *result, double*error); - -int integrate_qags(double f(double,void*), double a, double b, double prec, int w, - double *result, double* error); - -int polySolve(KRVEC(a), CVEC(z)); - -int minimize(double f(int, double*), double tolsize, int maxit, - KRVEC(xi), KRVEC(sz), RMAT(sol)); - -int minimizeWithDeriv(double f(int, double*), void df(int, double*, double*), - double initstep, double minimpar, double tolgrad, int maxit, - KRVEC(xi), RMAT(sol)); - -int deriv(int code, double f(double, void*), double x, double h, double * result, double * abserr); diff --git a/lib/Graphics/Plot.hs b/lib/Graphics/Plot.hs index 9f719ab..71ad0fc 100644 --- a/lib/Graphics/Plot.hs +++ b/lib/Graphics/Plot.hs @@ -14,7 +14,7 @@ module Graphics.Plot( - gnuplotX, mplot, + mplot, plot, parametricPlot, @@ -22,12 +22,14 @@ module Graphics.Plot( matrixToPGM, imshow, + gnuplotX + ) where import Data.Packed.Vector import Data.Packed.Matrix -import LinearAlgebra.Linear(outer) -import GSL.Vector(FunCodeS(Max,Min),toScalarR) +import Numeric.LinearAlgebra.Linear(outer) +import Numeric.GSL.Vector(FunCodeS(Max,Min),toScalarR) import Data.List(intersperse) import System import Data.IORef diff --git a/lib/LinearAlgebra.hs b/lib/LinearAlgebra.hs deleted file mode 100644 index d6ef647..0000000 --- a/lib/LinearAlgebra.hs +++ /dev/null @@ -1,27 +0,0 @@ ------------------------------------------------------------------------------ -{- | -Module : LinearAlgebra -Copyright : (c) Alberto Ruiz 2006-7 -License : GPL-style - -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Basic matrix computations implemented by BLAS, LAPACK and GSL. - --} ------------------------------------------------------------------------------ -module LinearAlgebra ( - module Data.Packed, - module LinearAlgebra.Linear, - module LinearAlgebra.Algorithms, - module LinearAlgebra.Instances, - module LinearAlgebra.Interface -) where - -import Data.Packed -import LinearAlgebra.Linear -import LinearAlgebra.Algorithms -import LinearAlgebra.Instances -import LinearAlgebra.Interface diff --git a/lib/LinearAlgebra/Algorithms.hs b/lib/LinearAlgebra/Algorithms.hs deleted file mode 100644 index 682b17f..0000000 --- a/lib/LinearAlgebra/Algorithms.hs +++ /dev/null @@ -1,259 +0,0 @@ -{-# OPTIONS_GHC -fglasgow-exts #-} ------------------------------------------------------------------------------ -{- | -Module : LinearAlgebra.Algorithms -Copyright : (c) Alberto Ruiz 2006-7 -License : GPL-style - -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -A generic interface for a number of essential functions. Using it some higher level algorithms -and testing properties can be written for both real and complex matrices. - -In any case, the specific functions for particular base types can also be explicitly -imported from the LAPACK and GSL.Matrix modules. - --} ------------------------------------------------------------------------------ - -module LinearAlgebra.Algorithms ( --- * Linear Systems - linearSolve, - inv, pinv, - pinvTol, det, --- * Matrix factorizations --- ** Singular value decomposition - svd, - full, economy, --- ** Eigensystems - eig, eigSH, --- ** Other - LinearAlgebra.Algorithms.qr, chol, --- * Nullspace - nullspacePrec, - nullVector, --- * Misc - eps, i, - ctrans, - Normed(..), NormType(..), - GenMat(linearSolveSVD,lu,eigSH') -) where - - -import Data.Packed.Internal hiding (fromComplex, toComplex, comp, conj) -import Data.Packed -import GSL.Matrix(luR,luC,qr) -import GSL.Vector -import LinearAlgebra.LAPACK as LAPACK -import Complex -import LinearAlgebra.Linear - --- | Auxiliary typeclass used to define generic computations for both real and complex matrices. -class (Linear Matrix t) => GenMat t where - svd :: Matrix t -> (Matrix t, Vector Double, Matrix t) - lu :: Matrix t -> (Matrix t, Matrix t, [Int], t) - linearSolve :: Matrix t -> Matrix t -> Matrix t - linearSolveSVD :: Matrix t -> Matrix t -> Matrix t - eig :: Matrix t -> (Vector (Complex Double), Matrix (Complex Double)) - eigSH' :: Matrix t -> (Vector Double, Matrix t) - cholSH :: Matrix t -> Matrix t - -- | conjugate transpose - ctrans :: Matrix t -> Matrix t - -instance GenMat Double where - svd = svdR - lu = luR - linearSolve = linearSolveR - linearSolveSVD = linearSolveSVDR Nothing - ctrans = trans - eig = eigR - eigSH' = eigS - cholSH = cholS - -instance GenMat (Complex Double) where - svd = svdC - lu = luC - linearSolve = linearSolveC - linearSolveSVD = linearSolveSVDC Nothing - ctrans = conjTrans - eig = eigC - eigSH' = eigH - cholSH = cholH - --- | eigensystem of complex hermitian or real symmetric matrix -eigSH :: GenMat t => Matrix t -> (Vector Double, Matrix t) -eigSH m | m `equal` ctrans m = eigSH' m - | otherwise = error "eigSH requires complex hermitian or real symmetric matrix" - --- | Cholesky factorization of a positive definite hermitian or symmetric matrix -chol :: GenMat t => Matrix t -> Matrix t -chol m | m `equal` ctrans m = cholSH m - | otherwise = error "chol requires positive definite complex hermitian or real symmetric matrix" - -qr :: Matrix Double -> (Matrix Double, Matrix Double) -qr = GSL.Matrix.qr - -square m = rows m == cols m - -det :: GenMat t => Matrix t -> t -det m | square m = s * (product $ toList $ takeDiag $ u) - | otherwise = error "det of nonsquare matrix" - where (_,u,_,s) = lu m - -inv :: GenMat t => Matrix t -> Matrix t -inv m | square m = m `linearSolve` ident (rows m) - | otherwise = error "inv of nonsquare matrix" - -pinv :: GenMat t => Matrix t -> Matrix t -pinv m = linearSolveSVD m (ident (rows m)) - -full :: Field t - => (Matrix t -> (Matrix t, Vector Double, Matrix t)) -> Matrix t -> (Matrix t, Matrix Double, Matrix t) -full svd m = (u, d ,v) where - (u,s,v) = svd m - d = diagRect s r c - r = rows m - c = cols m - -economy :: Field t - => (Matrix t -> (Matrix t, Vector Double, Matrix t)) -> Matrix t -> (Matrix t, Vector Double, Matrix t) -economy svd m = (u', subVector 0 d s, v') where - (u,s,v) = svd m - sl@(g:_) = toList (complex s) - s' = fromList . filter rec $ sl - rec x = magnitude x > magnitude g*tol - t = 1 - tol = (fromIntegral (max (rows m) (cols m)) * magnitude g * t * eps) - r = rows m - c = cols m - d = dim s' - u' = takeColumns d u - v' = takeColumns d v - - --- | The machine precision of a Double: @eps == 2.22044604925031e-16@ (the value used by GNU-Octave). -eps :: Double -eps = 2.22044604925031e-16 - --- | The imaginary unit: @i == 0.0 :+ 1.0@ -i :: Complex Double -i = 0:+1 - - --- | matrix product -mXm :: (Num t, GenMat t) => Matrix t -> Matrix t -> Matrix t -mXm = multiply - --- | matrix - vector product -mXv :: (Num t, GenMat t) => Matrix t -> Vector t -> Vector t -mXv m v = flatten $ m `mXm` (asColumn v) - --- | vector - matrix product -vXm :: (Num t, GenMat t) => Vector t -> Matrix t -> Vector t -vXm v m = flatten $ (asRow v) `mXm` m - - ---------------------------------------------------------------------------- - -norm2 :: Vector Double -> Double -norm2 = toScalarR Norm2 - -norm1 :: Vector Double -> Double -norm1 = toScalarR AbsSum - -data NormType = Infinity | PNorm1 | PNorm2 -- PNorm Int - -pnormRV PNorm2 = norm2 -pnormRV PNorm1 = norm1 -pnormRV Infinity = vectorMax . vectorMapR Abs ---pnormRV _ = error "pnormRV not yet defined" - -pnormCV PNorm2 = norm2 . asReal -pnormCV PNorm1 = norm1 . liftVector magnitude -pnormCV Infinity = vectorMax . liftVector magnitude ---pnormCV _ = error "pnormCV not yet defined" - -pnormRM PNorm2 m = head (toList s) where (_,s,_) = svdR m -pnormRM PNorm1 m = vectorMax $ constant 1 (rows m) `vXm` liftMatrix (vectorMapR Abs) m -pnormRM Infinity m = vectorMax $ liftMatrix (vectorMapR Abs) m `mXv` constant 1 (cols m) ---pnormRM _ _ = error "p norm not yet defined" - -pnormCM PNorm2 m = head (toList s) where (_,s,_) = svdC m -pnormCM PNorm1 m = vectorMax $ constant 1 (rows m) `vXm` liftMatrix (liftVector magnitude) m -pnormCM Infinity m = vectorMax $ liftMatrix (liftVector magnitude) m `mXv` constant 1 (cols m) ---pnormCM _ _ = error "p norm not yet defined" - --- -- | computes the p-norm of a matrix or vector (with the same definitions as GNU-octave). pnorm 0 denotes \\inf-norm. See also 'norm'. ---pnorm :: (Container t, GenMat a) => Int -> t a -> Double ---pnorm = pnormG - -class Normed t where - pnorm :: NormType -> t -> Double - norm :: t -> Double - norm = pnorm PNorm2 - -instance Normed (Vector Double) where - pnorm = pnormRV - -instance Normed (Vector (Complex Double)) where - pnorm = pnormCV - -instance Normed (Matrix Double) where - pnorm = pnormRM - -instance Normed (Matrix (Complex Double)) where - pnorm = pnormCM - ------------------------------------------------------------------------ - --- | The nullspace of a matrix from its SVD decomposition. -nullspacePrec :: GenMat t - => Double -- ^ relative tolerance in 'eps' units - -> Matrix t -- ^ input matrix - -> [Vector t] -- ^ list of unitary vectors spanning the nullspace -nullspacePrec t m = ns where - (_,s,v) = svd m - sl@(g:_) = toList s - tol = (fromIntegral (max (rows m) (cols m)) * g * t * eps) - rank = length (filter (> g*tol) sl) --- ns = drop rank (toColumns v) - ns = drop rank $ toRows $ ctrans v - --- | The nullspace of a matrix, assumed to be one-dimensional, with default tolerance (shortcut for @last . nullspacePrec 1@). -nullVector :: GenMat t => Matrix t -> Vector t -nullVector = last . nullspacePrec 1 - ------------------------------------------------------------------------- - -{- Pseudoinverse of a real matrix with the desired tolerance, expressed as a -multiplicative factor of the default tolerance used by GNU-Octave (see 'pinv'). - -@\> let m = 'fromLists' [[1,0, 0] - ,[0,1, 0] - ,[0,0,1e-10]] -\ -\> 'pinv' m -1. 0. 0. -0. 1. 0. -0. 0. 10000000000. -\ -\> pinvTol 1E8 m -1. 0. 0. -0. 1. 0. -0. 0. 1.@ - --} ---pinvTol :: Double -> Matrix Double -> Matrix Double -pinvTol t m = v' `mXm` diag s' `mXm` trans u' where - (u,s,v) = svdR m - sl@(g:_) = toList s - s' = fromList . map rec $ sl - rec x = if x < g*tol then 1 else 1/x - tol = (fromIntegral (max (rows m) (cols m)) * g * t * eps) - r = rows m - c = cols m - d = dim s - u' = takeColumns d u - v' = takeColumns d v diff --git a/lib/LinearAlgebra/Instances.hs b/lib/LinearAlgebra/Instances.hs deleted file mode 100644 index 3dbe5a7..0000000 --- a/lib/LinearAlgebra/Instances.hs +++ /dev/null @@ -1,140 +0,0 @@ -{-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances #-} ------------------------------------------------------------------------------ -{- | -Module : LinearAlgebra.Instances -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style - -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : portable - -Numeric instances for Vector and Matrix. - -In the context of the standard numeric operators, one-component vectors and matrices automatically expand to match the dimensions of the other operand. - --} ------------------------------------------------------------------------------ - -module LinearAlgebra.Instances( -) where - -import LinearAlgebra.Linear -import GSL.Vector -import Data.Packed.Matrix -import Data.Packed.Vector -import Complex - -adaptScalar f1 f2 f3 x y - | dim x == 1 = f1 (x@>0) y - | dim y == 1 = f3 x (y@>0) - | otherwise = f2 x y - -liftMatrix2' :: (Field t, Field a, Field b) => (Vector a -> Vector b -> Vector t) -> Matrix a -> Matrix b -> Matrix t -liftMatrix2' f m1 m2 | compat' m1 m2 = reshape (max (cols m1) (cols m2)) (f (flatten m1) (flatten m2)) - | otherwise = error "nonconformant matrices in liftMatrix2'" - -compat' :: Matrix a -> Matrix b -> Bool -compat' m1 m2 = rows m1 == 1 && cols m1 == 1 - || rows m2 == 1 && cols m2 == 1 - || rows m1 == rows m2 && cols m1 == cols m2 - -instance (Eq a, Field a) => Eq (Vector a) where - a == b = dim a == dim b && toList a == toList b - -instance (Linear Vector a) => Num (Vector a) where - (+) = adaptScalar addConstant add (flip addConstant) - negate = scale (-1) - (*) = adaptScalar scale mul (flip scale) - signum = liftVector signum - abs = liftVector abs - fromInteger = fromList . return . fromInteger - -instance (Eq a, Field a) => Eq (Matrix a) where - a == b = cols a == cols b && flatten a == flatten b - -instance (Linear Vector a) => Num (Matrix a) where - (+) = liftMatrix2' (+) - (-) = liftMatrix2' (-) - negate = liftMatrix negate - (*) = liftMatrix2' (*) - signum = liftMatrix signum - abs = liftMatrix abs - fromInteger = (1><1) . return . fromInteger - ---------------------------------------------------- - -instance (Linear Vector a) => Fractional (Vector a) where - fromRational n = fromList [fromRational n] - (/) = adaptScalar f divide g where - r `f` v = scaleRecip r v - v `g` r = scale (recip r) v - -------------------------------------------------------- - -instance (Linear Vector a, Fractional (Vector a)) => Fractional (Matrix a) where - fromRational n = (1><1) [fromRational n] - (/) = liftMatrix2' (/) - ---------------------------------------------------------- - -instance Floating (Vector Double) where - sin = vectorMapR Sin - cos = vectorMapR Cos - tan = vectorMapR Tan - asin = vectorMapR ASin - acos = vectorMapR ACos - atan = vectorMapR ATan - sinh = vectorMapR Sinh - cosh = vectorMapR Cosh - tanh = vectorMapR Tanh - asinh = vectorMapR ASinh - acosh = vectorMapR ACosh - atanh = vectorMapR ATanh - exp = vectorMapR Exp - log = vectorMapR Log - sqrt = vectorMapR Sqrt - (**) = adaptScalar (vectorMapValR PowSV) (vectorZipR Pow) (flip (vectorMapValR PowVS)) - pi = fromList [pi] - -------------------------------------------------------------- - -instance Floating (Vector (Complex Double)) where - sin = vectorMapC Sin - cos = vectorMapC Cos - tan = vectorMapC Tan - asin = vectorMapC ASin - acos = vectorMapC ACos - atan = vectorMapC ATan - sinh = vectorMapC Sinh - cosh = vectorMapC Cosh - tanh = vectorMapC Tanh - asinh = vectorMapC ASinh - acosh = vectorMapC ACosh - atanh = vectorMapC ATanh - exp = vectorMapC Exp - log = vectorMapC Log - sqrt = vectorMapC Sqrt - (**) = adaptScalar (vectorMapValC PowSV) (vectorZipC Pow) (flip (vectorMapValC PowVS)) - pi = fromList [pi] - ------------------------------------------------------------ - -instance (Linear Vector a, Floating (Vector a)) => Floating (Matrix a) where - sin = liftMatrix sin - cos = liftMatrix cos - tan = liftMatrix tan - asin = liftMatrix asin - acos = liftMatrix acos - atan = liftMatrix atan - sinh = liftMatrix sinh - cosh = liftMatrix cosh - tanh = liftMatrix tanh - asinh = liftMatrix asinh - acosh = liftMatrix acosh - atanh = liftMatrix atanh - exp = liftMatrix exp - log = liftMatrix log - (**) = liftMatrix2' (**) - sqrt = liftMatrix sqrt - pi = (1><1) [pi] diff --git a/lib/LinearAlgebra/Interface.hs b/lib/LinearAlgebra/Interface.hs deleted file mode 100644 index 0c65a8b..0000000 --- a/lib/LinearAlgebra/Interface.hs +++ /dev/null @@ -1,106 +0,0 @@ -{-# OPTIONS_GHC -fglasgow-exts #-} ------------------------------------------------------------------------------ -{- | -Module : LinearAlgebra.Interface -Copyright : (c) Alberto Ruiz 2006 -License : GPL-style - -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : portable - -Operators for frequent operations. - --} ------------------------------------------------------------------------------ - -module LinearAlgebra.Interface( - (<>),(<.>), - (<\>), - (.*),(*/), - (<|>),(<->), -) where - -import LinearAlgebra.Linear -import Data.Packed.Vector -import Data.Packed.Matrix -import LinearAlgebra.Algorithms - -class Mul a b c | a b -> c where - infixl 7 <> - -- | matrix product - (<>) :: Field t => a t -> b t -> c t - -instance Mul Matrix Matrix Matrix where - (<>) = multiply - -instance Mul Matrix Vector Vector where - (<>) m v = flatten $ m <> (asColumn v) - -instance Mul Vector Matrix Vector where - (<>) v m = flatten $ (asRow v) <> m - ---------------------------------------------------- - --- | @u \<.\> v = dot u v@ -(<.>) :: (Field t) => Vector t -> Vector t -> t -infixl 7 <.> -(<.>) = dot - ----------------------------------------------------- - --- | @x .* a = scale x a@ -(.*) :: (Linear c a) => a -> c a -> c a -infixl 7 .* -a .* x = scale a x - ----------------------------------------------------- - --- | @a *\/ x = scale (recip x) a@ -(*/) :: (Linear c a) => c a -> a -> c a -infixl 7 */ -v */ x = scale (recip x) v - --- | least squares solution of a linear system, similar to the \\ operator of Matlab\/Octave (based on linearSolveSVD). -(<\>) :: (GenMat a) => Matrix a -> Vector a -> Vector a -infixl 7 <\> -m <\> v = flatten (linearSolveSVD m (reshape 1 v)) - ------------------------------------------------- - -class Joinable a b where - joinH :: Field t => a t -> b t -> Matrix t - joinV :: Field t => a t -> b t -> Matrix t - -instance Joinable Matrix Matrix where - joinH m1 m2 = fromBlocks [[m1,m2]] - joinV m1 m2 = fromBlocks [[m1],[m2]] - -instance Joinable Matrix Vector where - joinH m v = joinH m (asColumn v) - joinV m v = joinV m (asRow v) - -instance Joinable Vector Matrix where - joinH v m = joinH (asColumn v) m - joinV v m = joinV (asRow v) m - -infixl 4 <|> -infixl 3 <-> - -{- | Horizontal concatenation of matrices and vectors: - -@> (ident 3 \<-\> 3 * ident 3) \<|\> fromList [1..6.0] -(6><4) - [ 1.0, 0.0, 0.0, 1.0 - , 0.0, 1.0, 0.0, 2.0 - , 0.0, 0.0, 1.0, 3.0 - , 3.0, 0.0, 0.0, 4.0 - , 0.0, 3.0, 0.0, 5.0 - , 0.0, 0.0, 3.0, 6.0 ]@ --} -(<|>) :: (Field t, Joinable a b) => a t -> b t -> Matrix t -a <|> b = joinH a b - --- | Vertical concatenation of matrices and vectors. -(<->) :: (Field t, Joinable a b) => a t -> b t -> Matrix t -a <-> b = joinV a b diff --git a/lib/LinearAlgebra/LAPACK.hs b/lib/LinearAlgebra/LAPACK.hs deleted file mode 100644 index c6908e3..0000000 --- a/lib/LinearAlgebra/LAPACK.hs +++ /dev/null @@ -1,335 +0,0 @@ -{-# OPTIONS_GHC -fglasgow-exts #-} ------------------------------------------------------------------------------ --- | --- Module : LinearAlgebra.LAPACK --- Copyright : (c) Alberto Ruiz 2006-7 --- License : GPL-style --- --- Maintainer : Alberto Ruiz (aruiz at um dot es) --- Stability : provisional --- Portability : portable (uses FFI) --- --- Wrappers for a few LAPACK functions (). --- ------------------------------------------------------------------------------ - -module LinearAlgebra.LAPACK ( - svdR, svdRdd, svdC, - eigC, eigR, eigS, eigH, eigS', eigH', - linearSolveR, linearSolveC, - linearSolveLSR, linearSolveLSC, - linearSolveSVDR, linearSolveSVDC, - cholS, cholH, - qrR, qrC -) where - -import Data.Packed.Internal -import Data.Packed.Internal.Vector -import Data.Packed.Internal.Matrix -import Data.Packed.Vector -import Data.Packed.Matrix -import GSL.Vector(vectorMapValR, FunCodeSV(Scale)) -import Complex -import Foreign - ------------------------------------------------------------------------------ -foreign import ccall "LAPACK/lapack-aux.h svd_l_R" dgesvd :: TMMVM - --- | Wrapper for LAPACK's /dgesvd/, which computes the full svd decomposition of a real matrix. --- --- @(u,s,v)=full svdR m@ so that @m=u \<\> s \<\> 'trans' v@. -svdR :: Matrix Double -> (Matrix Double, Vector Double, Matrix Double) -svdR x = unsafePerformIO $ do - u <- createMatrix ColumnMajor r r - s <- createVector (min r c) - v <- createMatrix ColumnMajor c c - dgesvd // mat fdat x // mat dat u // vec s // mat dat v // check "svdR" [fdat x] - return (u,s,trans v) - where r = rows x - c = cols x ------------------------------------------------------------------------------ -foreign import ccall "LAPACK/lapack-aux.h svd_l_Rdd" dgesdd :: TMMVM - --- | Wrapper for LAPACK's /dgesvd/, which computes the full svd decomposition of a real matrix. --- --- @(u,s,v)=full svdRdd m@ so that @m=u \<\> s \<\> 'trans' v@. -svdRdd :: Matrix Double -> (Matrix Double, Vector Double, Matrix Double) -svdRdd x = unsafePerformIO $ do - u <- createMatrix ColumnMajor r r - s <- createVector (min r c) - v <- createMatrix ColumnMajor c c - dgesdd // mat fdat x // mat dat u // vec s // mat dat v // check "svdRdd" [fdat x] - return (u,s,trans v) - where r = rows x - c = cols x - ------------------------------------------------------------------------------ -foreign import ccall "LAPACK/lapack-aux.h svd_l_C" zgesvd :: TCMCMVCM - --- | Wrapper for LAPACK's /zgesvd/, which computes the full svd decomposition of a complex matrix. --- --- @(u,s,v)=full svdC m@ so that @m=u \<\> comp s \<\> 'trans' v@. -svdC :: Matrix (Complex Double) -> (Matrix (Complex Double), Vector Double, Matrix (Complex Double)) -svdC x = unsafePerformIO $ do - u <- createMatrix ColumnMajor r r - s <- createVector (min r c) - v <- createMatrix ColumnMajor c c - zgesvd // mat fdat x // mat dat u // vec s // mat dat v // check "svdC" [fdat x] - return (u,s,trans v) - where r = rows x - c = cols x - - ------------------------------------------------------------------------------ -foreign import ccall "LAPACK/lapack-aux.h eig_l_C" zgeev :: TCMCMCVCM - --- | Wrapper for LAPACK's /zgeev/, which computes the eigenvalues and right eigenvectors of a general complex matrix: --- --- if @(l,v)=eigC m@ then @m \<\> v = v \<\> diag l@. --- --- The eigenvectors are the columns of v. --- The eigenvalues are not sorted. -eigC :: Matrix (Complex Double) -> (Vector (Complex Double), Matrix (Complex Double)) -eigC m - | r == 1 = (fromList [cdat m `at` 0], singleton 1) - | otherwise = unsafePerformIO $ do - l <- createVector r - v <- createMatrix ColumnMajor r r - dummy <- createMatrix ColumnMajor 1 1 - zgeev // mat fdat m // mat dat dummy // vec l // mat dat v // check "eigC" [fdat m] - return (l,v) - where r = rows m - ------------------------------------------------------------------------------ -foreign import ccall "LAPACK/lapack-aux.h eig_l_R" dgeev :: TMMCVM - --- | Wrapper for LAPACK's /dgeev/, which computes the eigenvalues and right eigenvectors of a general real matrix: --- --- if @(l,v)=eigR m@ then @m \<\> v = v \<\> diag l@. --- --- The eigenvectors are the columns of v. --- The eigenvalues are not sorted. -eigR :: Matrix Double -> (Vector (Complex Double), Matrix (Complex Double)) -eigR m = (s', v'') - where (s,v) = eigRaux m - s' = toComplex (subVector 0 r (asReal s), subVector r r (asReal s)) - v' = toRows $ trans v - v'' = fromColumns $ fixeig (toList s') v' - r = rows m - -eigRaux :: Matrix Double -> (Vector (Complex Double), Matrix Double) -eigRaux m - | r == 1 = (fromList [(cdat m `at` 0):+0], singleton 1) - | otherwise = unsafePerformIO $ do - l <- createVector r - v <- createMatrix ColumnMajor r r - dummy <- createMatrix ColumnMajor 1 1 - dgeev // mat fdat m // mat dat dummy // vec l // mat dat v // check "eigR" [fdat m] - return (l,v) - where r = rows m - -fixeig [] _ = [] -fixeig [r] [v] = [comp v] -fixeig ((r1:+i1):(r2:+i2):r) (v1:v2:vs) - | r1 == r2 && i1 == (-i2) = toComplex (v1,v2) : toComplex (v1,scale (-1) v2) : fixeig r vs - | otherwise = comp v1 : fixeig ((r2:+i2):r) (v2:vs) - where scale = vectorMapValR Scale - ------------------------------------------------------------------------------ -foreign import ccall "LAPACK/lapack-aux.h eig_l_S" dsyev :: TMVM - --- | Wrapper for LAPACK's /dsyev/, which computes the eigenvalues and right eigenvectors of a symmetric real matrix: --- --- if @(l,v)=eigSl m@ then @m \<\> v = v \<\> diag l@. --- --- The eigenvectors are the columns of v. --- The eigenvalues are sorted in descending order (use eigS' for ascending order). -eigS :: Matrix Double -> (Vector Double, Matrix Double) -eigS m = (s', fliprl v) - where (s,v) = eigS' m - s' = fromList . reverse . toList $ s - -eigS' m - | r == 1 = (fromList [cdat m `at` 0], singleton 1) - | otherwise = unsafePerformIO $ do - l <- createVector r - v <- createMatrix ColumnMajor r r - dsyev // mat fdat m // vec l // mat dat v // check "eigS" [fdat m] - return (l,v) - where r = rows m - ------------------------------------------------------------------------------ -foreign import ccall "LAPACK/lapack-aux.h eig_l_H" zheev :: TCMVCM - --- | Wrapper for LAPACK's /zheev/, which computes the eigenvalues and right eigenvectors of a hermitian complex matrix: --- --- if @(l,v)=eigH m@ then @m \<\> s v = v \<\> diag l@. --- --- The eigenvectors are the columns of v. --- The eigenvalues are sorted in descending order (use eigH' for ascending order). -eigH :: Matrix (Complex Double) -> (Vector Double, Matrix (Complex Double)) -eigH m = (s', fliprl v) - where (s,v) = eigH' m - s' = fromList . reverse . toList $ s - -eigH' m - | r == 1 = (fromList [realPart (cdat m `at` 0)], singleton 1) - | otherwise = unsafePerformIO $ do - l <- createVector r - v <- createMatrix ColumnMajor r r - zheev // mat fdat m // vec l // mat dat v // check "eigH" [fdat m] - return (l,v) - where r = rows m - ------------------------------------------------------------------------------ -foreign import ccall "LAPACK/lapack-aux.h linearSolveR_l" dgesv :: TMMM - --- | Wrapper for LAPACK's /dgesv/, which solves a general real linear system (for several right-hand sides) internally using the lu decomposition. -linearSolveR :: Matrix Double -> Matrix Double -> Matrix Double -linearSolveR a b - | n1==n2 && n1==r = unsafePerformIO $ do - s <- createMatrix ColumnMajor r c - dgesv // mat fdat a // mat fdat b // mat dat s // check "linearSolveR" [fdat a, fdat b] - return s - | otherwise = error "linearSolveR of nonsquare matrix" - where n1 = rows a - n2 = cols a - r = rows b - c = cols b - ------------------------------------------------------------------------------ -foreign import ccall "LAPACK/lapack-aux.h linearSolveC_l" zgesv :: TCMCMCM - --- | Wrapper for LAPACK's /zgesv/, which solves a general complex linear system (for several right-hand sides) internally using the lu decomposition. -linearSolveC :: Matrix (Complex Double) -> Matrix (Complex Double) -> Matrix (Complex Double) -linearSolveC a b - | n1==n2 && n1==r = unsafePerformIO $ do - s <- createMatrix ColumnMajor r c - zgesv // mat fdat a // mat fdat b // mat dat s // check "linearSolveC" [fdat a, fdat b] - return s - | otherwise = error "linearSolveC of nonsquare matrix" - where n1 = rows a - n2 = cols a - r = rows b - c = cols b - ------------------------------------------------------------------------------------ -foreign import ccall "LAPACK/lapack-aux.h linearSolveLSR_l" dgels :: TMMM - --- | 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'. -linearSolveLSR :: Matrix Double -> Matrix Double -> Matrix Double -linearSolveLSR a b = subMatrix (0,0) (cols a, cols b) $ linearSolveLSR_l a b - -linearSolveLSR_l a b = unsafePerformIO $ do - r <- createMatrix ColumnMajor (max m n) nrhs - dgels // mat fdat a // mat fdat b // mat dat r // check "linearSolveLSR" [fdat a, fdat b] - return r - where m = rows a - n = cols a - nrhs = cols b - ------------------------------------------------------------------------------------ -foreign import ccall "LAPACK/lapack-aux.h linearSolveLSC_l" zgels :: TCMCMCM - --- | 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'. -linearSolveLSC :: Matrix (Complex Double) -> Matrix (Complex Double) -> Matrix (Complex Double) -linearSolveLSC a b = subMatrix (0,0) (cols a, cols b) $ linearSolveLSC_l a b - -linearSolveLSC_l a b = unsafePerformIO $ do - r <- createMatrix ColumnMajor (max m n) nrhs - zgels // mat fdat a // mat fdat b // mat dat r // check "linearSolveLSC" [fdat a, fdat b] - return r - where m = rows a - n = cols a - nrhs = cols b - ------------------------------------------------------------------------------------ -foreign import ccall "LAPACK/lapack-aux.h linearSolveSVDR_l" dgelss :: Double -> TMMM - --- | 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. -linearSolveSVDR :: Maybe Double -- ^ rcond - -> Matrix Double -- ^ coefficient matrix - -> Matrix Double -- ^ right hand sides (as columns) - -> Matrix Double -- ^ solution vectors (as columns) -linearSolveSVDR (Just rcond) a b = subMatrix (0,0) (cols a, cols b) $ linearSolveSVDR_l rcond a b -linearSolveSVDR Nothing a b = linearSolveSVDR (Just (-1)) a b - -linearSolveSVDR_l rcond a b = unsafePerformIO $ do - r <- createMatrix ColumnMajor (max m n) nrhs - dgelss rcond // mat fdat a // mat fdat b // mat dat r // check "linearSolveSVDR" [fdat a, fdat b] - return r - where m = rows a - n = cols a - nrhs = cols b - ------------------------------------------------------------------------------------ -foreign import ccall "LAPACK/lapack-aux.h linearSolveSVDC_l" zgelss :: Double -> TCMCMCM - --- | 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. -linearSolveSVDC :: Maybe Double -- ^ rcond - -> Matrix (Complex Double) -- ^ coefficient matrix - -> Matrix (Complex Double) -- ^ right hand sides (as columns) - -> Matrix (Complex Double) -- ^ solution vectors (as columns) -linearSolveSVDC (Just rcond) a b = subMatrix (0,0) (cols a, cols b) $ linearSolveSVDC_l rcond a b -linearSolveSVDC Nothing a b = linearSolveSVDC (Just (-1)) a b - -linearSolveSVDC_l rcond a b = unsafePerformIO $ do - r <- createMatrix ColumnMajor (max m n) nrhs - zgelss rcond // mat fdat a // mat fdat b // mat dat r // check "linearSolveSVDC" [fdat a, fdat b] - return r - where m = rows a - n = cols a - nrhs = cols b - ------------------------------------------------------------------------------------ -foreign import ccall "LAPACK/lapack-aux.h chol_l_H" zpotrf :: TCMCM - --- | Wrapper for LAPACK's /zpotrf/,which computes the Cholesky factorization of a --- complex Hermitian positive definite matrix. -cholH :: Matrix (Complex Double) -> Matrix (Complex Double) -cholH a = unsafePerformIO $ do - r <- createMatrix ColumnMajor n n - zpotrf // mat fdat a // mat dat r // check "cholH" [fdat a] - return r - where n = rows a - ------------------------------------------------------------------------------------ -foreign import ccall "LAPACK/lapack-aux.h chol_l_S" dpotrf :: TMM - --- | Wrapper for LAPACK's /dpotrf/,which computes the Cholesky factorization of a --- real symmetric positive definite matrix. -cholS :: Matrix Double -> Matrix Double -cholS a = unsafePerformIO $ do - r <- createMatrix ColumnMajor n n - dpotrf // mat fdat a // mat dat r // check "cholS" [fdat a] - return r - where n = rows a - ------------------------------------------------------------------------------------ -foreign import ccall "LAPACK/lapack-aux.h qr_l_R" dgeqr2 :: TMVM - --- | Wrapper for LAPACK's /dgeqr2/,which computes a QR factorization of a real matrix. -qrR :: Matrix Double -> (Matrix Double, Vector Double) -qrR a = unsafePerformIO $ do - r <- createMatrix ColumnMajor m n - tau <- createVector mn - dgeqr2 // mat fdat a // vec tau // mat dat r // check "qrR" [fdat a] - return (r,tau) - where m = rows a - n = cols a - mn = min m n - ------------------------------------------------------------------------------------ -foreign import ccall "LAPACK/lapack-aux.h qr_l_C" zgeqr2 :: TCMCVCM - --- | Wrapper for LAPACK's /zgeqr2/,which computes a QR factorization of a complex matrix. -qrC :: Matrix (Complex Double) -> (Matrix (Complex Double), Vector (Complex Double)) -qrC a = unsafePerformIO $ do - r <- createMatrix ColumnMajor m n - tau <- createVector mn - zgeqr2 // mat fdat a // vec tau // mat dat r // check "qrC" [fdat a] - return (r,tau) - where m = rows a - n = cols a - mn = min m n - diff --git a/lib/LinearAlgebra/LAPACK/clapack.h b/lib/LinearAlgebra/LAPACK/clapack.h deleted file mode 100644 index cad9a4c..0000000 --- a/lib/LinearAlgebra/LAPACK/clapack.h +++ /dev/null @@ -1,5079 +0,0 @@ -#ifndef __CLAPACK_H -#define __CLAPACK_H - -/* Subroutine */ int cbdsqr_(char *uplo, integer *n, integer *ncvt, integer * - nru, integer *ncc, real *d__, real *e, complex *vt, integer *ldvt, - complex *u, integer *ldu, complex *c__, integer *ldc, real *rwork, - integer *info); - -/* Subroutine */ int cgbbrd_(char *vect, integer *m, integer *n, integer *ncc, - integer *kl, integer *ku, complex *ab, integer *ldab, real *d__, - real *e, complex *q, integer *ldq, complex *pt, integer *ldpt, - complex *c__, integer *ldc, complex *work, real *rwork, integer *info); - -/* Subroutine */ int cgbcon_(char *norm, integer *n, integer *kl, integer *ku, - complex *ab, integer *ldab, integer *ipiv, real *anorm, real *rcond, - complex *work, real *rwork, integer *info); - -/* Subroutine */ int cgbequ_(integer *m, integer *n, integer *kl, integer *ku, - complex *ab, integer *ldab, real *r__, real *c__, real *rowcnd, real - *colcnd, real *amax, integer *info); - -/* Subroutine */ int cgbrfs_(char *trans, integer *n, integer *kl, integer * - ku, integer *nrhs, complex *ab, integer *ldab, complex *afb, integer * - ldafb, integer *ipiv, complex *b, integer *ldb, complex *x, integer * - ldx, real *ferr, real *berr, complex *work, real *rwork, integer * - info); - -/* Subroutine */ int cgbsv_(integer *n, integer *kl, integer *ku, integer * - nrhs, complex *ab, integer *ldab, integer *ipiv, complex *b, integer * - ldb, integer *info); - -/* Subroutine */ int cgbsvx_(char *fact, char *trans, integer *n, integer *kl, - integer *ku, integer *nrhs, complex *ab, integer *ldab, complex *afb, - integer *ldafb, integer *ipiv, char *equed, real *r__, real *c__, - complex *b, integer *ldb, complex *x, integer *ldx, real *rcond, real - *ferr, real *berr, complex *work, real *rwork, integer *info); - -/* Subroutine */ int cgbtf2_(integer *m, integer *n, integer *kl, integer *ku, - complex *ab, integer *ldab, integer *ipiv, integer *info); - -/* Subroutine */ int cgbtrf_(integer *m, integer *n, integer *kl, integer *ku, - complex *ab, integer *ldab, integer *ipiv, integer *info); - -/* Subroutine */ int cgbtrs_(char *trans, integer *n, integer *kl, integer * - ku, integer *nrhs, complex *ab, integer *ldab, integer *ipiv, complex - *b, integer *ldb, integer *info); - -/* Subroutine */ int cgebak_(char *job, char *side, integer *n, integer *ilo, - integer *ihi, real *scale, integer *m, complex *v, integer *ldv, - integer *info); - -/* Subroutine */ int cgebal_(char *job, integer *n, complex *a, integer *lda, - integer *ilo, integer *ihi, real *scale, integer *info); - -/* Subroutine */ int cgebd2_(integer *m, integer *n, complex *a, integer *lda, - real *d__, real *e, complex *tauq, complex *taup, complex *work, - integer *info); - -/* Subroutine */ int cgebrd_(integer *m, integer *n, complex *a, integer *lda, - real *d__, real *e, complex *tauq, complex *taup, complex *work, - integer *lwork, integer *info); - -/* Subroutine */ int cgecon_(char *norm, integer *n, complex *a, integer *lda, - real *anorm, real *rcond, complex *work, real *rwork, integer *info); - -/* Subroutine */ int cgeequ_(integer *m, integer *n, complex *a, integer *lda, - real *r__, real *c__, real *rowcnd, real *colcnd, real *amax, - integer *info); - -/* Subroutine */ int cgees_(char *jobvs, char *sort, L_fp select, integer *n, - complex *a, integer *lda, integer *sdim, complex *w, complex *vs, - integer *ldvs, complex *work, integer *lwork, real *rwork, logical * - bwork, integer *info); - -/* Subroutine */ int cgeesx_(char *jobvs, char *sort, L_fp select, char * - sense, integer *n, complex *a, integer *lda, integer *sdim, complex * - w, complex *vs, integer *ldvs, real *rconde, real *rcondv, complex * - work, integer *lwork, real *rwork, logical *bwork, integer *info); - -/* Subroutine */ int cgeev_(char *jobvl, char *jobvr, integer *n, complex *a, - integer *lda, complex *w, complex *vl, integer *ldvl, complex *vr, - integer *ldvr, complex *work, integer *lwork, real *rwork, integer * - info); - -/* Subroutine */ int cgeevx_(char *balanc, char *jobvl, char *jobvr, char * - sense, integer *n, complex *a, integer *lda, complex *w, complex *vl, - integer *ldvl, complex *vr, integer *ldvr, integer *ilo, integer *ihi, - real *scale, real *abnrm, real *rconde, real *rcondv, complex *work, - integer *lwork, real *rwork, integer *info); - -/* Subroutine */ int cgegs_(char *jobvsl, char *jobvsr, integer *n, complex * - a, integer *lda, complex *b, integer *ldb, complex *alpha, complex * - beta, complex *vsl, integer *ldvsl, complex *vsr, integer *ldvsr, - complex *work, integer *lwork, real *rwork, integer *info); - -/* Subroutine */ int cgegv_(char *jobvl, char *jobvr, integer *n, complex *a, - integer *lda, complex *b, integer *ldb, complex *alpha, complex *beta, - complex *vl, integer *ldvl, complex *vr, integer *ldvr, complex * - work, integer *lwork, real *rwork, integer *info); - -/* Subroutine */ int cgehd2_(integer *n, integer *ilo, integer *ihi, complex * - a, integer *lda, complex *tau, complex *work, integer *info); - -/* Subroutine */ int cgehrd_(integer *n, integer *ilo, integer *ihi, complex * - a, integer *lda, complex *tau, complex *work, integer *lwork, integer - *info); - -/* Subroutine */ int cgelq2_(integer *m, integer *n, complex *a, integer *lda, - complex *tau, complex *work, integer *info); - -/* Subroutine */ int cgelqf_(integer *m, integer *n, complex *a, integer *lda, - complex *tau, complex *work, integer *lwork, integer *info); - -/* Subroutine */ int cgels_(char *trans, integer *m, integer *n, integer * - nrhs, complex *a, integer *lda, complex *b, integer *ldb, complex * - work, integer *lwork, integer *info); - -/* Subroutine */ int cgelsx_(integer *m, integer *n, integer *nrhs, complex * - a, integer *lda, complex *b, integer *ldb, integer *jpvt, real *rcond, - integer *rank, complex *work, real *rwork, integer *info); - -/* Subroutine */ int cgelsy_(integer *m, integer *n, integer *nrhs, complex * - a, integer *lda, complex *b, integer *ldb, integer *jpvt, real *rcond, - integer *rank, complex *work, integer *lwork, real *rwork, integer * - info); - -/* Subroutine */ int cgeql2_(integer *m, integer *n, complex *a, integer *lda, - complex *tau, complex *work, integer *info); - -/* Subroutine */ int cgeqlf_(integer *m, integer *n, complex *a, integer *lda, - complex *tau, complex *work, integer *lwork, integer *info); - -/* Subroutine */ int cgeqp3_(integer *m, integer *n, complex *a, integer *lda, - integer *jpvt, complex *tau, complex *work, integer *lwork, real * - rwork, integer *info); - -/* Subroutine */ int cgeqpf_(integer *m, integer *n, complex *a, integer *lda, - integer *jpvt, complex *tau, complex *work, real *rwork, integer * - info); - -/* Subroutine */ int cgeqr2_(integer *m, integer *n, complex *a, integer *lda, - complex *tau, complex *work, integer *info); - -/* Subroutine */ int cgeqrf_(integer *m, integer *n, complex *a, integer *lda, - complex *tau, complex *work, integer *lwork, integer *info); - -/* Subroutine */ int cgerfs_(char *trans, integer *n, integer *nrhs, complex * - a, integer *lda, complex *af, integer *ldaf, integer *ipiv, complex * - b, integer *ldb, complex *x, integer *ldx, real *ferr, real *berr, - complex *work, real *rwork, integer *info); - -/* Subroutine */ int cgerq2_(integer *m, integer *n, complex *a, integer *lda, - complex *tau, complex *work, integer *info); - -/* Subroutine */ int cgerqf_(integer *m, integer *n, complex *a, integer *lda, - complex *tau, complex *work, integer *lwork, integer *info); - -/* Subroutine */ int cgesc2_(integer *n, complex *a, integer *lda, complex * - rhs, integer *ipiv, integer *jpiv, real *scale); - -/* Subroutine */ int cgesv_(integer *n, integer *nrhs, complex *a, integer * - lda, integer *ipiv, complex *b, integer *ldb, integer *info); - -/* Subroutine */ int cgesvx_(char *fact, char *trans, integer *n, integer * - nrhs, complex *a, integer *lda, complex *af, integer *ldaf, integer * - ipiv, char *equed, real *r__, real *c__, complex *b, integer *ldb, - complex *x, integer *ldx, real *rcond, real *ferr, real *berr, - complex *work, real *rwork, integer *info); - -/* Subroutine */ int cgetc2_(integer *n, complex *a, integer *lda, integer * - ipiv, integer *jpiv, integer *info); - -/* Subroutine */ int cgetf2_(integer *m, integer *n, complex *a, integer *lda, - integer *ipiv, integer *info); - -/* Subroutine */ int cgetrf_(integer *m, integer *n, complex *a, integer *lda, - integer *ipiv, integer *info); - -/* Subroutine */ int cgetri_(integer *n, complex *a, integer *lda, integer * - ipiv, complex *work, integer *lwork, integer *info); - -/* Subroutine */ int cgetrs_(char *trans, integer *n, integer *nrhs, complex * - a, integer *lda, integer *ipiv, complex *b, integer *ldb, integer * - info); - -/* Subroutine */ int cggbak_(char *job, char *side, integer *n, integer *ilo, - integer *ihi, real *lscale, real *rscale, integer *m, complex *v, - integer *ldv, integer *info); - -/* Subroutine */ int cggbal_(char *job, integer *n, complex *a, integer *lda, - complex *b, integer *ldb, integer *ilo, integer *ihi, real *lscale, - real *rscale, real *work, integer *info); - -/* Subroutine */ int cgges_(char *jobvsl, char *jobvsr, char *sort, L_fp - selctg, integer *n, complex *a, integer *lda, complex *b, integer * - ldb, integer *sdim, complex *alpha, complex *beta, complex *vsl, - integer *ldvsl, complex *vsr, integer *ldvsr, complex *work, integer * - lwork, real *rwork, logical *bwork, integer *info); - -/* Subroutine */ int cggesx_(char *jobvsl, char *jobvsr, char *sort, L_fp - selctg, char *sense, integer *n, complex *a, integer *lda, complex *b, - integer *ldb, integer *sdim, complex *alpha, complex *beta, complex * - vsl, integer *ldvsl, complex *vsr, integer *ldvsr, real *rconde, real - *rcondv, complex *work, integer *lwork, real *rwork, integer *iwork, - integer *liwork, logical *bwork, integer *info); - -/* Subroutine */ int cggev_(char *jobvl, char *jobvr, integer *n, complex *a, - integer *lda, complex *b, integer *ldb, complex *alpha, complex *beta, - complex *vl, integer *ldvl, complex *vr, integer *ldvr, complex * - work, integer *lwork, real *rwork, integer *info); - -/* Subroutine */ int cggevx_(char *balanc, char *jobvl, char *jobvr, char * - sense, integer *n, complex *a, integer *lda, complex *b, integer *ldb, - complex *alpha, complex *beta, complex *vl, integer *ldvl, complex * - vr, integer *ldvr, integer *ilo, integer *ihi, real *lscale, real * - rscale, real *abnrm, real *bbnrm, real *rconde, real *rcondv, complex - *work, integer *lwork, real *rwork, integer *iwork, logical *bwork, - integer *info); - -/* Subroutine */ int cggglm_(integer *n, integer *m, integer *p, complex *a, - integer *lda, complex *b, integer *ldb, complex *d__, complex *x, - complex *y, complex *work, integer *lwork, integer *info); - -/* Subroutine */ int cgghrd_(char *compq, char *compz, integer *n, integer * - ilo, integer *ihi, complex *a, integer *lda, complex *b, integer *ldb, - complex *q, integer *ldq, complex *z__, integer *ldz, integer *info); - -/* Subroutine */ int cgglse_(integer *m, integer *n, integer *p, complex *a, - integer *lda, complex *b, integer *ldb, complex *c__, complex *d__, - complex *x, complex *work, integer *lwork, integer *info); - -/* Subroutine */ int cggqrf_(integer *n, integer *m, integer *p, complex *a, - integer *lda, complex *taua, complex *b, integer *ldb, complex *taub, - complex *work, integer *lwork, integer *info); - -/* Subroutine */ int cggrqf_(integer *m, integer *p, integer *n, complex *a, - integer *lda, complex *taua, complex *b, integer *ldb, complex *taub, - complex *work, integer *lwork, integer *info); - -/* Subroutine */ int cggsvd_(char *jobu, char *jobv, char *jobq, integer *m, - integer *n, integer *p, integer *k, integer *l, complex *a, integer * - lda, complex *b, integer *ldb, real *alpha, real *beta, complex *u, - integer *ldu, complex *v, integer *ldv, complex *q, integer *ldq, - complex *work, real *rwork, integer *iwork, integer *info); - -/* Subroutine */ int cggsvp_(char *jobu, char *jobv, char *jobq, integer *m, - integer *p, integer *n, complex *a, integer *lda, complex *b, integer - *ldb, real *tola, real *tolb, integer *k, integer *l, complex *u, - integer *ldu, complex *v, integer *ldv, complex *q, integer *ldq, - integer *iwork, real *rwork, complex *tau, complex *work, integer * - info); - -/* Subroutine */ int cgtcon_(char *norm, integer *n, complex *dl, complex * - d__, complex *du, complex *du2, integer *ipiv, real *anorm, real * - rcond, complex *work, integer *info); - -/* Subroutine */ int cgtrfs_(char *trans, integer *n, integer *nrhs, complex * - dl, complex *d__, complex *du, complex *dlf, complex *df, complex * - duf, complex *du2, integer *ipiv, complex *b, integer *ldb, complex * - x, integer *ldx, real *ferr, real *berr, complex *work, real *rwork, - integer *info); - -/* Subroutine */ int cgtsv_(integer *n, integer *nrhs, complex *dl, complex * - d__, complex *du, complex *b, integer *ldb, integer *info); - -/* Subroutine */ int cgtsvx_(char *fact, char *trans, integer *n, integer * - nrhs, complex *dl, complex *d__, complex *du, complex *dlf, complex * - df, complex *duf, complex *du2, integer *ipiv, complex *b, integer * - ldb, complex *x, integer *ldx, real *rcond, real *ferr, real *berr, - complex *work, real *rwork, integer *info); - -/* Subroutine */ int cgttrf_(integer *n, complex *dl, complex *d__, complex * - du, complex *du2, integer *ipiv, integer *info); - -/* Subroutine */ int cgttrs_(char *trans, integer *n, integer *nrhs, complex * - dl, complex *d__, complex *du, complex *du2, integer *ipiv, complex * - b, integer *ldb, integer *info); - -/* Subroutine */ int cgtts2_(integer *itrans, integer *n, integer *nrhs, - complex *dl, complex *d__, complex *du, complex *du2, integer *ipiv, - complex *b, integer *ldb); - -/* Subroutine */ int chbev_(char *jobz, char *uplo, integer *n, integer *kd, - complex *ab, integer *ldab, real *w, complex *z__, integer *ldz, - complex *work, real *rwork, integer *info); - -/* Subroutine */ int chbevd_(char *jobz, char *uplo, integer *n, integer *kd, - complex *ab, integer *ldab, real *w, complex *z__, integer *ldz, - complex *work, integer *lwork, real *rwork, integer *lrwork, integer * - iwork, integer *liwork, integer *info); - -/* Subroutine */ int chbevx_(char *jobz, char *range, char *uplo, integer *n, - integer *kd, complex *ab, integer *ldab, complex *q, integer *ldq, - real *vl, real *vu, integer *il, integer *iu, real *abstol, integer * - m, real *w, complex *z__, integer *ldz, complex *work, real *rwork, - integer *iwork, integer *ifail, integer *info); - -/* Subroutine */ int chbgst_(char *vect, char *uplo, integer *n, integer *ka, - integer *kb, complex *ab, integer *ldab, complex *bb, integer *ldbb, - complex *x, integer *ldx, complex *work, real *rwork, integer *info); - -/* Subroutine */ int chbgv_(char *jobz, char *uplo, integer *n, integer *ka, - integer *kb, complex *ab, integer *ldab, complex *bb, integer *ldbb, - real *w, complex *z__, integer *ldz, complex *work, real *rwork, - integer *info); - -/* Subroutine */ int chbgvx_(char *jobz, char *range, char *uplo, integer *n, - integer *ka, integer *kb, complex *ab, integer *ldab, complex *bb, - integer *ldbb, complex *q, integer *ldq, real *vl, real *vu, integer * - il, integer *iu, real *abstol, integer *m, real *w, complex *z__, - integer *ldz, complex *work, real *rwork, integer *iwork, integer * - ifail, integer *info); - -/* Subroutine */ int chbtrd_(char *vect, char *uplo, integer *n, integer *kd, - complex *ab, integer *ldab, real *d__, real *e, complex *q, integer * - ldq, complex *work, integer *info); - -/* Subroutine */ int checon_(char *uplo, integer *n, complex *a, integer *lda, - integer *ipiv, real *anorm, real *rcond, complex *work, integer * - info); - -/* Subroutine */ int cheev_(char *jobz, char *uplo, integer *n, complex *a, - integer *lda, real *w, complex *work, integer *lwork, real *rwork, - integer *info); - -/* Subroutine */ int cheevd_(char *jobz, char *uplo, integer *n, complex *a, - integer *lda, real *w, complex *work, integer *lwork, real *rwork, - integer *lrwork, integer *iwork, integer *liwork, integer *info); - -/* Subroutine */ int cheevr_(char *jobz, char *range, char *uplo, integer *n, - complex *a, integer *lda, real *vl, real *vu, integer *il, integer * - iu, real *abstol, integer *m, real *w, complex *z__, integer *ldz, - integer *isuppz, complex *work, integer *lwork, real *rwork, integer * - lrwork, integer *iwork, integer *liwork, integer *info); - -/* Subroutine */ int cheevx_(char *jobz, char *range, char *uplo, integer *n, - complex *a, integer *lda, real *vl, real *vu, integer *il, integer * - iu, real *abstol, integer *m, real *w, complex *z__, integer *ldz, - complex *work, integer *lwork, real *rwork, integer *iwork, integer * - ifail, integer *info); - -/* Subroutine */ int chegs2_(integer *itype, char *uplo, integer *n, complex * - a, integer *lda, complex *b, integer *ldb, integer *info); - -/* Subroutine */ int chegst_(integer *itype, char *uplo, integer *n, complex * - a, integer *lda, complex *b, integer *ldb, integer *info); - -/* Subroutine */ int chegv_(integer *itype, char *jobz, char *uplo, integer * - n, complex *a, integer *lda, complex *b, integer *ldb, real *w, - complex *work, integer *lwork, real *rwork, integer *info); - -/* Subroutine */ int chegvd_(integer *itype, char *jobz, char *uplo, integer * - n, complex *a, integer *lda, complex *b, integer *ldb, real *w, - complex *work, integer *lwork, real *rwork, integer *lrwork, integer * - iwork, integer *liwork, integer *info); - -/* Subroutine */ int chegvx_(integer *itype, char *jobz, char *range, char * - uplo, integer *n, complex *a, integer *lda, complex *b, integer *ldb, - real *vl, real *vu, integer *il, integer *iu, real *abstol, integer * - m, real *w, complex *z__, integer *ldz, complex *work, integer *lwork, - real *rwork, integer *iwork, integer *ifail, integer *info); - -/* Subroutine */ int cherfs_(char *uplo, integer *n, integer *nrhs, complex * - a, integer *lda, complex *af, integer *ldaf, integer *ipiv, complex * - b, integer *ldb, complex *x, integer *ldx, real *ferr, real *berr, - complex *work, real *rwork, integer *info); - -/* Subroutine */ int chesv_(char *uplo, integer *n, integer *nrhs, complex *a, - integer *lda, integer *ipiv, complex *b, integer *ldb, complex *work, - integer *lwork, integer *info); - -/* Subroutine */ int chesvx_(char *fact, char *uplo, integer *n, integer * - nrhs, complex *a, integer *lda, complex *af, integer *ldaf, integer * - ipiv, complex *b, integer *ldb, complex *x, integer *ldx, real *rcond, - real *ferr, real *berr, complex *work, integer *lwork, real *rwork, - integer *info); - -/* Subroutine */ int chetf2_(char *uplo, integer *n, complex *a, integer *lda, - integer *ipiv, integer *info); - -/* Subroutine */ int chetrd_(char *uplo, integer *n, complex *a, integer *lda, - real *d__, real *e, complex *tau, complex *work, integer *lwork, - integer *info); - -/* Subroutine */ int chetrf_(char *uplo, integer *n, complex *a, integer *lda, - integer *ipiv, complex *work, integer *lwork, integer *info); - -/* Subroutine */ int chetri_(char *uplo, integer *n, complex *a, integer *lda, - integer *ipiv, complex *work, integer *info); - -/* Subroutine */ int chetrs_(char *uplo, integer *n, integer *nrhs, complex * - a, integer *lda, integer *ipiv, complex *b, integer *ldb, integer * - info); - -/* Subroutine */ int chgeqz_(char *job, char *compq, char *compz, integer *n, - integer *ilo, integer *ihi, complex *a, integer *lda, complex *b, - integer *ldb, complex *alpha, complex *beta, complex *q, integer *ldq, - complex *z__, integer *ldz, complex *work, integer *lwork, real * - rwork, integer *info); - -/* Subroutine */ int chpcon_(char *uplo, integer *n, complex *ap, integer * - ipiv, real *anorm, real *rcond, complex *work, integer *info); - -/* Subroutine */ int chpev_(char *jobz, char *uplo, integer *n, complex *ap, - real *w, complex *z__, integer *ldz, complex *work, real *rwork, - integer *info); - -/* Subroutine */ int chpevd_(char *jobz, char *uplo, integer *n, complex *ap, - real *w, complex *z__, integer *ldz, complex *work, integer *lwork, - real *rwork, integer *lrwork, integer *iwork, integer *liwork, - integer *info); - -/* Subroutine */ int chpevx_(char *jobz, char *range, char *uplo, integer *n, - complex *ap, real *vl, real *vu, integer *il, integer *iu, real * - abstol, integer *m, real *w, complex *z__, integer *ldz, complex * - work, real *rwork, integer *iwork, integer *ifail, integer *info); - -/* Subroutine */ int chpgst_(integer *itype, char *uplo, integer *n, complex * - ap, complex *bp, integer *info); - -/* Subroutine */ int chpgv_(integer *itype, char *jobz, char *uplo, integer * - n, complex *ap, complex *bp, real *w, complex *z__, integer *ldz, - complex *work, real *rwork, integer *info); - -/* Subroutine */ int chpgvd_(integer *itype, char *jobz, char *uplo, integer * - n, complex *ap, complex *bp, real *w, complex *z__, integer *ldz, - complex *work, integer *lwork, real *rwork, integer *lrwork, integer * - iwork, integer *liwork, integer *info); - -/* Subroutine */ int chpgvx_(integer *itype, char *jobz, char *range, char * - uplo, integer *n, complex *ap, complex *bp, real *vl, real *vu, - integer *il, integer *iu, real *abstol, integer *m, real *w, complex * - z__, integer *ldz, complex *work, real *rwork, integer *iwork, - integer *ifail, integer *info); - -/* Subroutine */ int chprfs_(char *uplo, integer *n, integer *nrhs, complex * - ap, complex *afp, integer *ipiv, complex *b, integer *ldb, complex *x, - integer *ldx, real *ferr, real *berr, complex *work, real *rwork, - integer *info); - -/* Subroutine */ int chpsv_(char *uplo, integer *n, integer *nrhs, complex * - ap, integer *ipiv, complex *b, integer *ldb, integer *info); - -/* Subroutine */ int chpsvx_(char *fact, char *uplo, integer *n, integer * - nrhs, complex *ap, complex *afp, integer *ipiv, complex *b, integer * - ldb, complex *x, integer *ldx, real *rcond, real *ferr, real *berr, - complex *work, real *rwork, integer *info); - -/* Subroutine */ int chptrd_(char *uplo, integer *n, complex *ap, real *d__, - real *e, complex *tau, integer *info); - -/* Subroutine */ int chptrf_(char *uplo, integer *n, complex *ap, integer * - ipiv, integer *info); - -/* Subroutine */ int chptri_(char *uplo, integer *n, complex *ap, integer * - ipiv, complex *work, integer *info); - -/* Subroutine */ int chptrs_(char *uplo, integer *n, integer *nrhs, complex * - ap, integer *ipiv, complex *b, integer *ldb, integer *info); - -/* Subroutine */ int chsein_(char *side, char *eigsrc, char *initv, logical * - select, integer *n, complex *h__, integer *ldh, complex *w, complex * - vl, integer *ldvl, complex *vr, integer *ldvr, integer *mm, integer * - m, complex *work, real *rwork, integer *ifaill, integer *ifailr, - integer *info); - -/* Subroutine */ int chseqr_(char *job, char *compz, integer *n, integer *ilo, - integer *ihi, complex *h__, integer *ldh, complex *w, complex *z__, - integer *ldz, complex *work, integer *lwork, integer *info); - -/* Subroutine */ int clabrd_(integer *m, integer *n, integer *nb, complex *a, - integer *lda, real *d__, real *e, complex *tauq, complex *taup, - complex *x, integer *ldx, complex *y, integer *ldy); - -/* Subroutine */ int clacgv_(integer *n, complex *x, integer *incx); - -/* Subroutine */ int clacon_(integer *n, complex *v, complex *x, real *est, - integer *kase); - -/* Subroutine */ int clacp2_(char *uplo, integer *m, integer *n, real *a, - integer *lda, complex *b, integer *ldb); - -/* Subroutine */ int clacpy_(char *uplo, integer *m, integer *n, complex *a, - integer *lda, complex *b, integer *ldb); - -/* Subroutine */ int clacrm_(integer *m, integer *n, complex *a, integer *lda, - real *b, integer *ldb, complex *c__, integer *ldc, real *rwork); - -/* Subroutine */ int clacrt_(integer *n, complex *cx, integer *incx, complex * - cy, integer *incy, complex *c__, complex *s); - -/* Subroutine */ int claed0_(integer *qsiz, integer *n, real *d__, real *e, - complex *q, integer *ldq, complex *qstore, integer *ldqs, real *rwork, - integer *iwork, integer *info); - -/* Subroutine */ int claed7_(integer *n, integer *cutpnt, integer *qsiz, - integer *tlvls, integer *curlvl, integer *curpbm, real *d__, complex * - q, integer *ldq, real *rho, integer *indxq, real *qstore, integer * - qptr, integer *prmptr, integer *perm, integer *givptr, integer * - givcol, real *givnum, complex *work, real *rwork, integer *iwork, - integer *info); - -/* Subroutine */ int claed8_(integer *k, integer *n, integer *qsiz, complex * - q, integer *ldq, real *d__, real *rho, integer *cutpnt, real *z__, - real *dlamda, complex *q2, integer *ldq2, real *w, integer *indxp, - integer *indx, integer *indxq, integer *perm, integer *givptr, - integer *givcol, real *givnum, integer *info); - -/* Subroutine */ int claein_(logical *rightv, logical *noinit, integer *n, - complex *h__, integer *ldh, complex *w, complex *v, complex *b, - integer *ldb, real *rwork, real *eps3, real *smlnum, integer *info); - -/* Subroutine */ int claesy_(complex *a, complex *b, complex *c__, complex * - rt1, complex *rt2, complex *evscal, complex *cs1, complex *sn1); - -/* Subroutine */ int claev2_(complex *a, complex *b, complex *c__, real *rt1, - real *rt2, real *cs1, complex *sn1); - -/* Subroutine */ int clags2_(logical *upper, real *a1, complex *a2, real *a3, - real *b1, complex *b2, real *b3, real *csu, complex *snu, real *csv, - complex *snv, real *csq, complex *snq); - -/* Subroutine */ int clagtm_(char *trans, integer *n, integer *nrhs, real * - alpha, complex *dl, complex *d__, complex *du, complex *x, integer * - ldx, real *beta, complex *b, integer *ldb); - -/* Subroutine */ int clahef_(char *uplo, integer *n, integer *nb, integer *kb, - complex *a, integer *lda, integer *ipiv, complex *w, integer *ldw, - integer *info); - -/* Subroutine */ int clahqr_(logical *wantt, logical *wantz, integer *n, - integer *ilo, integer *ihi, complex *h__, integer *ldh, complex *w, - integer *iloz, integer *ihiz, complex *z__, integer *ldz, integer * - info); - -/* Subroutine */ int clahrd_(integer *n, integer *k, integer *nb, complex *a, - integer *lda, complex *tau, complex *t, integer *ldt, complex *y, - integer *ldy); - -/* Subroutine */ int claic1_(integer *job, integer *j, complex *x, real *sest, - complex *w, complex *gamma, real *sestpr, complex *s, complex *c__); - -/* Subroutine */ int clals0_(integer *icompq, integer *nl, integer *nr, - integer *sqre, integer *nrhs, complex *b, integer *ldb, complex *bx, - integer *ldbx, integer *perm, integer *givptr, integer *givcol, - integer *ldgcol, real *givnum, integer *ldgnum, real *poles, real * - difl, real *difr, real *z__, integer *k, real *c__, real *s, real * - rwork, integer *info); - -/* Subroutine */ int clalsa_(integer *icompq, integer *smlsiz, integer *n, - integer *nrhs, complex *b, integer *ldb, complex *bx, integer *ldbx, - real *u, integer *ldu, real *vt, integer *k, real *difl, real *difr, - real *z__, real *poles, integer *givptr, integer *givcol, integer * - ldgcol, integer *perm, real *givnum, real *c__, real *s, real *rwork, - integer *iwork, integer *info); - -/* Subroutine */ int clapll_(integer *n, complex *x, integer *incx, complex * - y, integer *incy, real *ssmin); - -/* Subroutine */ int clapmt_(logical *forwrd, integer *m, integer *n, complex - *x, integer *ldx, integer *k); - -/* Subroutine */ int claqgb_(integer *m, integer *n, integer *kl, integer *ku, - complex *ab, integer *ldab, real *r__, real *c__, real *rowcnd, real - *colcnd, real *amax, char *equed); - -/* Subroutine */ int claqge_(integer *m, integer *n, complex *a, integer *lda, - real *r__, real *c__, real *rowcnd, real *colcnd, real *amax, char * - equed); - -/* Subroutine */ int claqhb_(char *uplo, integer *n, integer *kd, complex *ab, - integer *ldab, real *s, real *scond, real *amax, char *equed); - -/* Subroutine */ int claqhe_(char *uplo, integer *n, complex *a, integer *lda, - real *s, real *scond, real *amax, char *equed); - -/* Subroutine */ int claqhp_(char *uplo, integer *n, complex *ap, real *s, - real *scond, real *amax, char *equed); - -/* Subroutine */ int claqp2_(integer *m, integer *n, integer *offset, complex - *a, integer *lda, integer *jpvt, complex *tau, real *vn1, real *vn2, - complex *work); - -/* Subroutine */ int claqps_(integer *m, integer *n, integer *offset, integer - *nb, integer *kb, complex *a, integer *lda, integer *jpvt, complex * - tau, real *vn1, real *vn2, complex *auxv, complex *f, integer *ldf); - -/* Subroutine */ int claqsb_(char *uplo, integer *n, integer *kd, complex *ab, - integer *ldab, real *s, real *scond, real *amax, char *equed); - -/* Subroutine */ int claqsp_(char *uplo, integer *n, complex *ap, real *s, - real *scond, real *amax, char *equed); - -/* Subroutine */ int claqsy_(char *uplo, integer *n, complex *a, integer *lda, - real *s, real *scond, real *amax, char *equed); - -/* Subroutine */ int clar1v_(integer *n, integer *b1, integer *bn, real * - sigma, real *d__, real *l, real *ld, real *lld, real *gersch, complex - *z__, real *ztz, real *mingma, integer *r__, integer *isuppz, real * - work); - -/* Subroutine */ int clar2v_(integer *n, complex *x, complex *y, complex *z__, - integer *incx, real *c__, complex *s, integer *incc); - -/* Subroutine */ int clarcm_(integer *m, integer *n, real *a, integer *lda, - complex *b, integer *ldb, complex *c__, integer *ldc, real *rwork); - -/* Subroutine */ int clarf_(char *side, integer *m, integer *n, complex *v, - integer *incv, complex *tau, complex *c__, integer *ldc, complex * - work); - -/* Subroutine */ int clarfb_(char *side, char *trans, char *direct, char * - storev, integer *m, integer *n, integer *k, complex *v, integer *ldv, - complex *t, integer *ldt, complex *c__, integer *ldc, complex *work, - integer *ldwork); - -/* Subroutine */ int clarfg_(integer *n, complex *alpha, complex *x, integer * - incx, complex *tau); - -/* Subroutine */ int clarft_(char *direct, char *storev, integer *n, integer * - k, complex *v, integer *ldv, complex *tau, complex *t, integer *ldt); - -/* Subroutine */ int clarfx_(char *side, integer *m, integer *n, complex *v, - complex *tau, complex *c__, integer *ldc, complex *work); - -/* Subroutine */ int clargv_(integer *n, complex *x, integer *incx, complex * - y, integer *incy, real *c__, integer *incc); - -/* Subroutine */ int clarnv_(integer *idist, integer *iseed, integer *n, - complex *x); - -/* Subroutine */ int clarrv_(integer *n, real *d__, real *l, integer *isplit, - integer *m, real *w, integer *iblock, real *gersch, real *tol, - complex *z__, integer *ldz, integer *isuppz, real *work, integer * - iwork, integer *info); - -/* Subroutine */ int clartg_(complex *f, complex *g, real *cs, complex *sn, - complex *r__); - -/* Subroutine */ int clartv_(integer *n, complex *x, integer *incx, complex * - y, integer *incy, real *c__, complex *s, integer *incc); - -/* Subroutine */ int clarz_(char *side, integer *m, integer *n, integer *l, - complex *v, integer *incv, complex *tau, complex *c__, integer *ldc, - complex *work); - -/* Subroutine */ int clarzb_(char *side, char *trans, char *direct, char * - storev, integer *m, integer *n, integer *k, integer *l, complex *v, - integer *ldv, complex *t, integer *ldt, complex *c__, integer *ldc, - complex *work, integer *ldwork); - -/* Subroutine */ int clarzt_(char *direct, char *storev, integer *n, integer * - k, complex *v, integer *ldv, complex *tau, complex *t, integer *ldt); - -/* Subroutine */ int clascl_(char *type__, integer *kl, integer *ku, real * - cfrom, real *cto, integer *m, integer *n, complex *a, integer *lda, - integer *info); - -/* Subroutine */ int claset_(char *uplo, integer *m, integer *n, complex * - alpha, complex *beta, complex *a, integer *lda); - -/* Subroutine */ int clasr_(char *side, char *pivot, char *direct, integer *m, - integer *n, real *c__, real *s, complex *a, integer *lda); - -/* Subroutine */ int classq_(integer *n, complex *x, integer *incx, real * - scale, real *sumsq); - -/* Subroutine */ int claswp_(integer *n, complex *a, integer *lda, integer * - k1, integer *k2, integer *ipiv, integer *incx); - -/* Subroutine */ int clasyf_(char *uplo, integer *n, integer *nb, integer *kb, - complex *a, integer *lda, integer *ipiv, complex *w, integer *ldw, - integer *info); - -/* Subroutine */ int clatbs_(char *uplo, char *trans, char *diag, char * - normin, integer *n, integer *kd, complex *ab, integer *ldab, complex * - x, real *scale, real *cnorm, integer *info); - -/* Subroutine */ int clatdf_(integer *ijob, integer *n, complex *z__, integer - *ldz, complex *rhs, real *rdsum, real *rdscal, integer *ipiv, integer - *jpiv); - -/* Subroutine */ int clatps_(char *uplo, char *trans, char *diag, char * - normin, integer *n, complex *ap, complex *x, real *scale, real *cnorm, - integer *info); - -/* Subroutine */ int clatrd_(char *uplo, integer *n, integer *nb, complex *a, - integer *lda, real *e, complex *tau, complex *w, integer *ldw); - -/* Subroutine */ int clatrs_(char *uplo, char *trans, char *diag, char * - normin, integer *n, complex *a, integer *lda, complex *x, real *scale, - real *cnorm, integer *info); - -/* Subroutine */ int clatrz_(integer *m, integer *n, integer *l, complex *a, - integer *lda, complex *tau, complex *work); - -/* Subroutine */ int clatzm_(char *side, integer *m, integer *n, complex *v, - integer *incv, complex *tau, complex *c1, complex *c2, integer *ldc, - complex *work); - -/* Subroutine */ int clauu2_(char *uplo, integer *n, complex *a, integer *lda, - integer *info); - -/* Subroutine */ int clauum_(char *uplo, integer *n, complex *a, integer *lda, - integer *info); - -/* Subroutine */ int cpbcon_(char *uplo, integer *n, integer *kd, complex *ab, - integer *ldab, real *anorm, real *rcond, complex *work, real *rwork, - integer *info); - -/* Subroutine */ int cpbequ_(char *uplo, integer *n, integer *kd, complex *ab, - integer *ldab, real *s, real *scond, real *amax, integer *info); - -/* Subroutine */ int cpbrfs_(char *uplo, integer *n, integer *kd, integer * - nrhs, complex *ab, integer *ldab, complex *afb, integer *ldafb, - complex *b, integer *ldb, complex *x, integer *ldx, real *ferr, real * - berr, complex *work, real *rwork, integer *info); - -/* Subroutine */ int cpbstf_(char *uplo, integer *n, integer *kd, complex *ab, - integer *ldab, integer *info); - -/* Subroutine */ int cpbsv_(char *uplo, integer *n, integer *kd, integer * - nrhs, complex *ab, integer *ldab, complex *b, integer *ldb, integer * - info); - -/* Subroutine */ int cpbsvx_(char *fact, char *uplo, integer *n, integer *kd, - integer *nrhs, complex *ab, integer *ldab, complex *afb, integer * - ldafb, char *equed, real *s, complex *b, integer *ldb, complex *x, - integer *ldx, real *rcond, real *ferr, real *berr, complex *work, - real *rwork, integer *info); - -/* Subroutine */ int cpbtf2_(char *uplo, integer *n, integer *kd, complex *ab, - integer *ldab, integer *info); - -/* Subroutine */ int cpbtrf_(char *uplo, integer *n, integer *kd, complex *ab, - integer *ldab, integer *info); - -/* Subroutine */ int cpbtrs_(char *uplo, integer *n, integer *kd, integer * - nrhs, complex *ab, integer *ldab, complex *b, integer *ldb, integer * - info); - -/* Subroutine */ int cpocon_(char *uplo, integer *n, complex *a, integer *lda, - real *anorm, real *rcond, complex *work, real *rwork, integer *info); - -/* Subroutine */ int cpoequ_(integer *n, complex *a, integer *lda, real *s, - real *scond, real *amax, integer *info); - -/* Subroutine */ int cporfs_(char *uplo, integer *n, integer *nrhs, complex * - a, integer *lda, complex *af, integer *ldaf, complex *b, integer *ldb, - complex *x, integer *ldx, real *ferr, real *berr, complex *work, - real *rwork, integer *info); - -/* Subroutine */ int cposv_(char *uplo, integer *n, integer *nrhs, complex *a, - integer *lda, complex *b, integer *ldb, integer *info); - -/* Subroutine */ int cposvx_(char *fact, char *uplo, integer *n, integer * - nrhs, complex *a, integer *lda, complex *af, integer *ldaf, char * - equed, real *s, complex *b, integer *ldb, complex *x, integer *ldx, - real *rcond, real *ferr, real *berr, complex *work, real *rwork, - integer *info); - -/* Subroutine */ int cpotf2_(char *uplo, integer *n, complex *a, integer *lda, - integer *info); - -/* Subroutine */ int cpotrf_(char *uplo, integer *n, complex *a, integer *lda, - integer *info); - -/* Subroutine */ int cpotri_(char *uplo, integer *n, complex *a, integer *lda, - integer *info); - -/* Subroutine */ int cpotrs_(char *uplo, integer *n, integer *nrhs, complex * - a, integer *lda, complex *b, integer *ldb, integer *info); - -/* Subroutine */ int cppcon_(char *uplo, integer *n, complex *ap, real *anorm, - real *rcond, complex *work, real *rwork, integer *info); - -/* Subroutine */ int cppequ_(char *uplo, integer *n, complex *ap, real *s, - real *scond, real *amax, integer *info); - -/* Subroutine */ int cpprfs_(char *uplo, integer *n, integer *nrhs, complex * - ap, complex *afp, complex *b, integer *ldb, complex *x, integer *ldx, - real *ferr, real *berr, complex *work, real *rwork, integer *info); - -/* Subroutine */ int cppsv_(char *uplo, integer *n, integer *nrhs, complex * - ap, complex *b, integer *ldb, integer *info); - -/* Subroutine */ int cppsvx_(char *fact, char *uplo, integer *n, integer * - nrhs, complex *ap, complex *afp, char *equed, real *s, complex *b, - integer *ldb, complex *x, integer *ldx, real *rcond, real *ferr, real - *berr, complex *work, real *rwork, integer *info); - -/* Subroutine */ int cpptrf_(char *uplo, integer *n, complex *ap, integer * - info); - -/* Subroutine */ int cpptri_(char *uplo, integer *n, complex *ap, integer * - info); - -/* Subroutine */ int cpptrs_(char *uplo, integer *n, integer *nrhs, complex * - ap, complex *b, integer *ldb, integer *info); - -/* Subroutine */ int cptcon_(integer *n, real *d__, complex *e, real *anorm, - real *rcond, real *rwork, integer *info); - -/* Subroutine */ int cptrfs_(char *uplo, integer *n, integer *nrhs, real *d__, - complex *e, real *df, complex *ef, complex *b, integer *ldb, complex - *x, integer *ldx, real *ferr, real *berr, complex *work, real *rwork, - integer *info); - -/* Subroutine */ int cptsv_(integer *n, integer *nrhs, real *d__, complex *e, - complex *b, integer *ldb, integer *info); - -/* Subroutine */ int cptsvx_(char *fact, integer *n, integer *nrhs, real *d__, - complex *e, real *df, complex *ef, complex *b, integer *ldb, complex - *x, integer *ldx, real *rcond, real *ferr, real *berr, complex *work, - real *rwork, integer *info); - -/* Subroutine */ int cpttrf_(integer *n, real *d__, complex *e, integer *info); - -/* Subroutine */ int cpttrs_(char *uplo, integer *n, integer *nrhs, real *d__, - complex *e, complex *b, integer *ldb, integer *info); - -/* Subroutine */ int cptts2_(integer *iuplo, integer *n, integer *nrhs, real * - d__, complex *e, complex *b, integer *ldb); - -/* Subroutine */ int crot_(integer *n, complex *cx, integer *incx, complex * - cy, integer *incy, real *c__, complex *s); - -/* Subroutine */ int cspcon_(char *uplo, integer *n, complex *ap, integer * - ipiv, real *anorm, real *rcond, complex *work, integer *info); - -/* Subroutine */ int cspmv_(char *uplo, integer *n, complex *alpha, complex * - ap, complex *x, integer *incx, complex *beta, complex *y, integer * - incy); - -/* Subroutine */ int cspr_(char *uplo, integer *n, complex *alpha, complex *x, - integer *incx, complex *ap); - -/* Subroutine */ int csprfs_(char *uplo, integer *n, integer *nrhs, complex * - ap, complex *afp, integer *ipiv, complex *b, integer *ldb, complex *x, - integer *ldx, real *ferr, real *berr, complex *work, real *rwork, - integer *info); - -/* Subroutine */ int cspsv_(char *uplo, integer *n, integer *nrhs, complex * - ap, integer *ipiv, complex *b, integer *ldb, integer *info); - -/* Subroutine */ int cspsvx_(char *fact, char *uplo, integer *n, integer * - nrhs, complex *ap, complex *afp, integer *ipiv, complex *b, integer * - ldb, complex *x, integer *ldx, real *rcond, real *ferr, real *berr, - complex *work, real *rwork, integer *info); - -/* Subroutine */ int csptrf_(char *uplo, integer *n, complex *ap, integer * - ipiv, integer *info); - -/* Subroutine */ int csptri_(char *uplo, integer *n, complex *ap, integer * - ipiv, complex *work, integer *info); - -/* Subroutine */ int csptrs_(char *uplo, integer *n, integer *nrhs, complex * - ap, integer *ipiv, complex *b, integer *ldb, integer *info); - -/* Subroutine */ int csrot_(integer *n, complex *cx, integer *incx, complex * - cy, integer *incy, real *c__, real *s); - -/* Subroutine */ int csrscl_(integer *n, real *sa, complex *sx, integer *incx); - -/* Subroutine */ int cstedc_(char *compz, integer *n, real *d__, real *e, - complex *z__, integer *ldz, complex *work, integer *lwork, real * - rwork, integer *lrwork, integer *iwork, integer *liwork, integer * - info); - -/* Subroutine */ int cstein_(integer *n, real *d__, real *e, integer *m, real - *w, integer *iblock, integer *isplit, complex *z__, integer *ldz, - real *work, integer *iwork, integer *ifail, integer *info); - -/* Subroutine */ int csteqr_(char *compz, integer *n, real *d__, real *e, - complex *z__, integer *ldz, real *work, integer *info); - -/* Subroutine */ int csycon_(char *uplo, integer *n, complex *a, integer *lda, - integer *ipiv, real *anorm, real *rcond, complex *work, integer * - info); - -/* Subroutine */ int csymv_(char *uplo, integer *n, complex *alpha, complex * - a, integer *lda, complex *x, integer *incx, complex *beta, complex *y, - integer *incy); - -/* Subroutine */ int csyr_(char *uplo, integer *n, complex *alpha, complex *x, - integer *incx, complex *a, integer *lda); - -/* Subroutine */ int csyrfs_(char *uplo, integer *n, integer *nrhs, complex * - a, integer *lda, complex *af, integer *ldaf, integer *ipiv, complex * - b, integer *ldb, complex *x, integer *ldx, real *ferr, real *berr, - complex *work, real *rwork, integer *info); - -/* Subroutine */ int csysv_(char *uplo, integer *n, integer *nrhs, complex *a, - integer *lda, integer *ipiv, complex *b, integer *ldb, complex *work, - integer *lwork, integer *info); - -/* Subroutine */ int csysvx_(char *fact, char *uplo, integer *n, integer * - nrhs, complex *a, integer *lda, complex *af, integer *ldaf, integer * - ipiv, complex *b, integer *ldb, complex *x, integer *ldx, real *rcond, - real *ferr, real *berr, complex *work, integer *lwork, real *rwork, - integer *info); - -/* Subroutine */ int csytf2_(char *uplo, integer *n, complex *a, integer *lda, - integer *ipiv, integer *info); - -/* Subroutine */ int csytrf_(char *uplo, integer *n, complex *a, integer *lda, - integer *ipiv, complex *work, integer *lwork, integer *info); - -/* Subroutine */ int csytri_(char *uplo, integer *n, complex *a, integer *lda, - integer *ipiv, complex *work, integer *info); - -/* Subroutine */ int csytrs_(char *uplo, integer *n, integer *nrhs, complex * - a, integer *lda, integer *ipiv, complex *b, integer *ldb, integer * - info); - -/* Subroutine */ int ctbcon_(char *norm, char *uplo, char *diag, integer *n, - integer *kd, complex *ab, integer *ldab, real *rcond, complex *work, - real *rwork, integer *info); - -/* Subroutine */ int ctbrfs_(char *uplo, char *trans, char *diag, integer *n, - integer *kd, integer *nrhs, complex *ab, integer *ldab, complex *b, - integer *ldb, complex *x, integer *ldx, real *ferr, real *berr, - complex *work, real *rwork, integer *info); - -/* Subroutine */ int ctbtrs_(char *uplo, char *trans, char *diag, integer *n, - integer *kd, integer *nrhs, complex *ab, integer *ldab, complex *b, - integer *ldb, integer *info); - -/* Subroutine */ int ctgevc_(char *side, char *howmny, logical *select, - integer *n, complex *a, integer *lda, complex *b, integer *ldb, - complex *vl, integer *ldvl, complex *vr, integer *ldvr, integer *mm, - integer *m, complex *work, real *rwork, integer *info); - -/* Subroutine */ int ctgex2_(logical *wantq, logical *wantz, integer *n, - complex *a, integer *lda, complex *b, integer *ldb, complex *q, - integer *ldq, complex *z__, integer *ldz, integer *j1, integer *info); - -/* Subroutine */ int ctgexc_(logical *wantq, logical *wantz, integer *n, - complex *a, integer *lda, complex *b, integer *ldb, complex *q, - integer *ldq, complex *z__, integer *ldz, integer *ifst, integer * - ilst, integer *info); - -/* Subroutine */ int ctgsen_(integer *ijob, logical *wantq, logical *wantz, - logical *select, integer *n, complex *a, integer *lda, complex *b, - integer *ldb, complex *alpha, complex *beta, complex *q, integer *ldq, - complex *z__, integer *ldz, integer *m, real *pl, real *pr, real * - dif, complex *work, integer *lwork, integer *iwork, integer *liwork, - integer *info); - -/* Subroutine */ int ctgsja_(char *jobu, char *jobv, char *jobq, integer *m, - integer *p, integer *n, integer *k, integer *l, complex *a, integer * - lda, complex *b, integer *ldb, real *tola, real *tolb, real *alpha, - real *beta, complex *u, integer *ldu, complex *v, integer *ldv, - complex *q, integer *ldq, complex *work, integer *ncycle, integer * - info); - -/* Subroutine */ int ctgsna_(char *job, char *howmny, logical *select, - integer *n, complex *a, integer *lda, complex *b, integer *ldb, - complex *vl, integer *ldvl, complex *vr, integer *ldvr, real *s, real - *dif, integer *mm, integer *m, complex *work, integer *lwork, integer - *iwork, integer *info); - -/* Subroutine */ int ctgsy2_(char *trans, integer *ijob, integer *m, integer * - n, complex *a, integer *lda, complex *b, integer *ldb, complex *c__, - integer *ldc, complex *d__, integer *ldd, complex *e, integer *lde, - complex *f, integer *ldf, real *scale, real *rdsum, real *rdscal, - integer *info); - -/* Subroutine */ int ctgsyl_(char *trans, integer *ijob, integer *m, integer * - n, complex *a, integer *lda, complex *b, integer *ldb, complex *c__, - integer *ldc, complex *d__, integer *ldd, complex *e, integer *lde, - complex *f, integer *ldf, real *scale, real *dif, complex *work, - integer *lwork, integer *iwork, integer *info); - -/* Subroutine */ int ctpcon_(char *norm, char *uplo, char *diag, integer *n, - complex *ap, real *rcond, complex *work, real *rwork, integer *info); - -/* Subroutine */ int ctprfs_(char *uplo, char *trans, char *diag, integer *n, - integer *nrhs, complex *ap, complex *b, integer *ldb, complex *x, - integer *ldx, real *ferr, real *berr, complex *work, real *rwork, - integer *info); - -/* Subroutine */ int ctptri_(char *uplo, char *diag, integer *n, complex *ap, - integer *info); - -/* Subroutine */ int ctptrs_(char *uplo, char *trans, char *diag, integer *n, - integer *nrhs, complex *ap, complex *b, integer *ldb, integer *info); - -/* Subroutine */ int ctrcon_(char *norm, char *uplo, char *diag, integer *n, - complex *a, integer *lda, real *rcond, complex *work, real *rwork, - integer *info); - -/* Subroutine */ int ctrevc_(char *side, char *howmny, logical *select, - integer *n, complex *t, integer *ldt, complex *vl, integer *ldvl, - complex *vr, integer *ldvr, integer *mm, integer *m, complex *work, - real *rwork, integer *info); - -/* Subroutine */ int ctrexc_(char *compq, integer *n, complex *t, integer * - ldt, complex *q, integer *ldq, integer *ifst, integer *ilst, integer * - info); - -/* Subroutine */ int ctrrfs_(char *uplo, char *trans, char *diag, integer *n, - integer *nrhs, complex *a, integer *lda, complex *b, integer *ldb, - complex *x, integer *ldx, real *ferr, real *berr, complex *work, real - *rwork, integer *info); - -/* Subroutine */ int ctrsen_(char *job, char *compq, logical *select, integer - *n, complex *t, integer *ldt, complex *q, integer *ldq, complex *w, - integer *m, real *s, real *sep, complex *work, integer *lwork, - integer *info); - -/* Subroutine */ int ctrsna_(char *job, char *howmny, logical *select, - integer *n, complex *t, integer *ldt, complex *vl, integer *ldvl, - complex *vr, integer *ldvr, real *s, real *sep, integer *mm, integer * - m, complex *work, integer *ldwork, real *rwork, integer *info); - -/* Subroutine */ int ctrsyl_(char *trana, char *tranb, integer *isgn, integer - *m, integer *n, complex *a, integer *lda, complex *b, integer *ldb, - complex *c__, integer *ldc, real *scale, integer *info); - -/* Subroutine */ int ctrti2_(char *uplo, char *diag, integer *n, complex *a, - integer *lda, integer *info); - -/* Subroutine */ int ctrtri_(char *uplo, char *diag, integer *n, complex *a, - integer *lda, integer *info); - -/* Subroutine */ int ctrtrs_(char *uplo, char *trans, char *diag, integer *n, - integer *nrhs, complex *a, integer *lda, complex *b, integer *ldb, - integer *info); - -/* Subroutine */ int ctzrqf_(integer *m, integer *n, complex *a, integer *lda, - complex *tau, integer *info); - -/* Subroutine */ int ctzrzf_(integer *m, integer *n, complex *a, integer *lda, - complex *tau, complex *work, integer *lwork, integer *info); - -/* Subroutine */ int cung2l_(integer *m, integer *n, integer *k, complex *a, - integer *lda, complex *tau, complex *work, integer *info); - -/* Subroutine */ int cung2r_(integer *m, integer *n, integer *k, complex *a, - integer *lda, complex *tau, complex *work, integer *info); - -/* Subroutine */ int cungbr_(char *vect, integer *m, integer *n, integer *k, - complex *a, integer *lda, complex *tau, complex *work, integer *lwork, - integer *info); - -/* Subroutine */ int cunghr_(integer *n, integer *ilo, integer *ihi, complex * - a, integer *lda, complex *tau, complex *work, integer *lwork, integer - *info); - -/* Subroutine */ int cungl2_(integer *m, integer *n, integer *k, complex *a, - integer *lda, complex *tau, complex *work, integer *info); - -/* Subroutine */ int cunglq_(integer *m, integer *n, integer *k, complex *a, - integer *lda, complex *tau, complex *work, integer *lwork, integer * - info); - -/* Subroutine */ int cungql_(integer *m, integer *n, integer *k, complex *a, - integer *lda, complex *tau, complex *work, integer *lwork, integer * - info); - -/* Subroutine */ int cungqr_(integer *m, integer *n, integer *k, complex *a, - integer *lda, complex *tau, complex *work, integer *lwork, integer * - info); - -/* Subroutine */ int cungr2_(integer *m, integer *n, integer *k, complex *a, - integer *lda, complex *tau, complex *work, integer *info); - -/* Subroutine */ int cungrq_(integer *m, integer *n, integer *k, complex *a, - integer *lda, complex *tau, complex *work, integer *lwork, integer * - info); - -/* Subroutine */ int cungtr_(char *uplo, integer *n, complex *a, integer *lda, - complex *tau, complex *work, integer *lwork, integer *info); - -/* Subroutine */ int cunm2l_(char *side, char *trans, integer *m, integer *n, - integer *k, complex *a, integer *lda, complex *tau, complex *c__, - integer *ldc, complex *work, integer *info); - -/* Subroutine */ int cunm2r_(char *side, char *trans, integer *m, integer *n, - integer *k, complex *a, integer *lda, complex *tau, complex *c__, - integer *ldc, complex *work, integer *info); - -/* Subroutine */ int cunmbr_(char *vect, char *side, char *trans, integer *m, - integer *n, integer *k, complex *a, integer *lda, complex *tau, - complex *c__, integer *ldc, complex *work, integer *lwork, integer * - info); - -/* Subroutine */ int cunmhr_(char *side, char *trans, integer *m, integer *n, - integer *ilo, integer *ihi, complex *a, integer *lda, complex *tau, - complex *c__, integer *ldc, complex *work, integer *lwork, integer * - info); - -/* Subroutine */ int cunml2_(char *side, char *trans, integer *m, integer *n, - integer *k, complex *a, integer *lda, complex *tau, complex *c__, - integer *ldc, complex *work, integer *info); - -/* Subroutine */ int cunmlq_(char *side, char *trans, integer *m, integer *n, - integer *k, complex *a, integer *lda, complex *tau, complex *c__, - integer *ldc, complex *work, integer *lwork, integer *info); - -/* Subroutine */ int cunmql_(char *side, char *trans, integer *m, integer *n, - integer *k, complex *a, integer *lda, complex *tau, complex *c__, - integer *ldc, complex *work, integer *lwork, integer *info); - -/* Subroutine */ int cunmqr_(char *side, char *trans, integer *m, integer *n, - integer *k, complex *a, integer *lda, complex *tau, complex *c__, - integer *ldc, complex *work, integer *lwork, integer *info); - -/* Subroutine */ int cunmr2_(char *side, char *trans, integer *m, integer *n, - integer *k, complex *a, integer *lda, complex *tau, complex *c__, - integer *ldc, complex *work, integer *info); - -/* Subroutine */ int cunmr3_(char *side, char *trans, integer *m, integer *n, - integer *k, integer *l, complex *a, integer *lda, complex *tau, - complex *c__, integer *ldc, complex *work, integer *info); - -/* Subroutine */ int cunmrq_(char *side, char *trans, integer *m, integer *n, - integer *k, complex *a, integer *lda, complex *tau, complex *c__, - integer *ldc, complex *work, integer *lwork, integer *info); - -/* Subroutine */ int cunmrz_(char *side, char *trans, integer *m, integer *n, - integer *k, integer *l, complex *a, integer *lda, complex *tau, - complex *c__, integer *ldc, complex *work, integer *lwork, integer * - info); - -/* Subroutine */ int cunmtr_(char *side, char *uplo, char *trans, integer *m, - integer *n, complex *a, integer *lda, complex *tau, complex *c__, - integer *ldc, complex *work, integer *lwork, integer *info); - -/* Subroutine */ int cupgtr_(char *uplo, integer *n, complex *ap, complex * - tau, complex *q, integer *ldq, complex *work, integer *info); - -/* Subroutine */ int cupmtr_(char *side, char *uplo, char *trans, integer *m, - integer *n, complex *ap, complex *tau, complex *c__, integer *ldc, - complex *work, integer *info); - -/* Subroutine */ int dbdsdc_(char *uplo, char *compq, integer *n, doublereal * - d__, doublereal *e, doublereal *u, integer *ldu, doublereal *vt, - integer *ldvt, doublereal *q, integer *iq, doublereal *work, integer * - iwork, integer *info); - -/* Subroutine */ int dbdsqr_(char *uplo, integer *n, integer *ncvt, integer * - nru, integer *ncc, doublereal *d__, doublereal *e, doublereal *vt, - integer *ldvt, doublereal *u, integer *ldu, doublereal *c__, integer * - ldc, doublereal *work, integer *info); - -/* Subroutine */ int ddisna_(char *job, integer *m, integer *n, doublereal * - d__, doublereal *sep, integer *info); - -/* Subroutine */ int dgbbrd_(char *vect, integer *m, integer *n, integer *ncc, - integer *kl, integer *ku, doublereal *ab, integer *ldab, doublereal * - d__, doublereal *e, doublereal *q, integer *ldq, doublereal *pt, - integer *ldpt, doublereal *c__, integer *ldc, doublereal *work, - integer *info); - -/* Subroutine */ int dgbcon_(char *norm, integer *n, integer *kl, integer *ku, - doublereal *ab, integer *ldab, integer *ipiv, doublereal *anorm, - doublereal *rcond, doublereal *work, integer *iwork, integer *info); - -/* Subroutine */ int dgbequ_(integer *m, integer *n, integer *kl, integer *ku, - doublereal *ab, integer *ldab, doublereal *r__, doublereal *c__, - doublereal *rowcnd, doublereal *colcnd, doublereal *amax, integer * - info); - -/* Subroutine */ int dgbrfs_(char *trans, integer *n, integer *kl, integer * - ku, integer *nrhs, doublereal *ab, integer *ldab, doublereal *afb, - integer *ldafb, integer *ipiv, doublereal *b, integer *ldb, - doublereal *x, integer *ldx, doublereal *ferr, doublereal *berr, - doublereal *work, integer *iwork, integer *info); - -/* Subroutine */ int dgbsv_(integer *n, integer *kl, integer *ku, integer * - nrhs, doublereal *ab, integer *ldab, integer *ipiv, doublereal *b, - integer *ldb, integer *info); - -/* Subroutine */ int dgbsvx_(char *fact, char *trans, integer *n, integer *kl, - integer *ku, integer *nrhs, doublereal *ab, integer *ldab, - doublereal *afb, integer *ldafb, integer *ipiv, char *equed, - doublereal *r__, doublereal *c__, doublereal *b, integer *ldb, - doublereal *x, integer *ldx, doublereal *rcond, doublereal *ferr, - doublereal *berr, doublereal *work, integer *iwork, integer *info); - -/* Subroutine */ int dgbtf2_(integer *m, integer *n, integer *kl, integer *ku, - doublereal *ab, integer *ldab, integer *ipiv, integer *info); - -/* Subroutine */ int dgbtrf_(integer *m, integer *n, integer *kl, integer *ku, - doublereal *ab, integer *ldab, integer *ipiv, integer *info); - -/* Subroutine */ int dgbtrs_(char *trans, integer *n, integer *kl, integer * - ku, integer *nrhs, doublereal *ab, integer *ldab, integer *ipiv, - doublereal *b, integer *ldb, integer *info); - -/* Subroutine */ int dgebak_(char *job, char *side, integer *n, integer *ilo, - integer *ihi, doublereal *scale, integer *m, doublereal *v, integer * - ldv, integer *info); - -/* Subroutine */ int dgebal_(char *job, integer *n, doublereal *a, integer * - lda, integer *ilo, integer *ihi, doublereal *scale, integer *info); - -/* Subroutine */ int dgebd2_(integer *m, integer *n, doublereal *a, integer * - lda, doublereal *d__, doublereal *e, doublereal *tauq, doublereal * - taup, doublereal *work, integer *info); - -/* Subroutine */ int dgebrd_(integer *m, integer *n, doublereal *a, integer * - lda, doublereal *d__, doublereal *e, doublereal *tauq, doublereal * - taup, doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dgecon_(char *norm, integer *n, doublereal *a, integer * - lda, doublereal *anorm, doublereal *rcond, doublereal *work, integer * - iwork, integer *info); - -/* Subroutine */ int dgeequ_(integer *m, integer *n, doublereal *a, integer * - lda, doublereal *r__, doublereal *c__, doublereal *rowcnd, doublereal - *colcnd, doublereal *amax, integer *info); - -/* Subroutine */ int dgees_(char *jobvs, char *sort, L_fp select, integer *n, - doublereal *a, integer *lda, integer *sdim, doublereal *wr, - doublereal *wi, doublereal *vs, integer *ldvs, doublereal *work, - integer *lwork, logical *bwork, integer *info); - -/* Subroutine */ int dgeesx_(char *jobvs, char *sort, L_fp select, char * - sense, integer *n, doublereal *a, integer *lda, integer *sdim, - doublereal *wr, doublereal *wi, doublereal *vs, integer *ldvs, - doublereal *rconde, doublereal *rcondv, doublereal *work, integer * - lwork, integer *iwork, integer *liwork, logical *bwork, integer *info); - -/* Subroutine */ int dgeev_(char *jobvl, char *jobvr, integer *n, doublereal * - a, integer *lda, doublereal *wr, doublereal *wi, doublereal *vl, - integer *ldvl, doublereal *vr, integer *ldvr, doublereal *work, - integer *lwork, integer *info); - -/* Subroutine */ int dgeevx_(char *balanc, char *jobvl, char *jobvr, char * - sense, integer *n, doublereal *a, integer *lda, doublereal *wr, - doublereal *wi, doublereal *vl, integer *ldvl, doublereal *vr, - integer *ldvr, integer *ilo, integer *ihi, doublereal *scale, - doublereal *abnrm, doublereal *rconde, doublereal *rcondv, doublereal - *work, integer *lwork, integer *iwork, integer *info); - -/* Subroutine */ int dgegs_(char *jobvsl, char *jobvsr, integer *n, - doublereal *a, integer *lda, doublereal *b, integer *ldb, doublereal * - alphar, doublereal *alphai, doublereal *beta, doublereal *vsl, - integer *ldvsl, doublereal *vsr, integer *ldvsr, doublereal *work, - integer *lwork, integer *info); - -/* Subroutine */ int dgegv_(char *jobvl, char *jobvr, integer *n, doublereal * - a, integer *lda, doublereal *b, integer *ldb, doublereal *alphar, - doublereal *alphai, doublereal *beta, doublereal *vl, integer *ldvl, - doublereal *vr, integer *ldvr, doublereal *work, integer *lwork, - integer *info); - -/* Subroutine */ int dgehd2_(integer *n, integer *ilo, integer *ihi, - doublereal *a, integer *lda, doublereal *tau, doublereal *work, - integer *info); - -/* Subroutine */ int dgehrd_(integer *n, integer *ilo, integer *ihi, - doublereal *a, integer *lda, doublereal *tau, doublereal *work, - integer *lwork, integer *info); - -/* Subroutine */ int dgelq2_(integer *m, integer *n, doublereal *a, integer * - lda, doublereal *tau, doublereal *work, integer *info); - -/* Subroutine */ int dgelqf_(integer *m, integer *n, doublereal *a, integer * - lda, doublereal *tau, doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dgels_(char *trans, integer *m, integer *n, integer * - nrhs, doublereal *a, integer *lda, doublereal *b, integer *ldb, - doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dgelsd_(integer *m, integer *n, integer *nrhs, - doublereal *a, integer *lda, doublereal *b, integer *ldb, doublereal * - s, doublereal *rcond, integer *rank, doublereal *work, integer *lwork, - integer *iwork, integer *info); - -/* Subroutine */ int dgelss_(integer *m, integer *n, integer *nrhs, - doublereal *a, integer *lda, doublereal *b, integer *ldb, doublereal * - s, doublereal *rcond, integer *rank, doublereal *work, integer *lwork, - integer *info); - -/* Subroutine */ int dgelsx_(integer *m, integer *n, integer *nrhs, - doublereal *a, integer *lda, doublereal *b, integer *ldb, integer * - jpvt, doublereal *rcond, integer *rank, doublereal *work, integer * - info); - -/* Subroutine */ int dgelsy_(integer *m, integer *n, integer *nrhs, - doublereal *a, integer *lda, doublereal *b, integer *ldb, integer * - jpvt, doublereal *rcond, integer *rank, doublereal *work, integer * - lwork, integer *info); - -/* Subroutine */ int dgeql2_(integer *m, integer *n, doublereal *a, integer * - lda, doublereal *tau, doublereal *work, integer *info); - -/* Subroutine */ int dgeqlf_(integer *m, integer *n, doublereal *a, integer * - lda, doublereal *tau, doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dgeqp3_(integer *m, integer *n, doublereal *a, integer * - lda, integer *jpvt, doublereal *tau, doublereal *work, integer *lwork, - integer *info); - -/* Subroutine */ int dgeqpf_(integer *m, integer *n, doublereal *a, integer * - lda, integer *jpvt, doublereal *tau, doublereal *work, integer *info); - -/* Subroutine */ int dgeqr2_(integer *m, integer *n, doublereal *a, integer * - lda, doublereal *tau, doublereal *work, integer *info); - -/* Subroutine */ int dgeqrf_(integer *m, integer *n, doublereal *a, integer * - lda, doublereal *tau, doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dgerfs_(char *trans, integer *n, integer *nrhs, - doublereal *a, integer *lda, doublereal *af, integer *ldaf, integer * - ipiv, doublereal *b, integer *ldb, doublereal *x, integer *ldx, - doublereal *ferr, doublereal *berr, doublereal *work, integer *iwork, - integer *info); - -/* Subroutine */ int dgerq2_(integer *m, integer *n, doublereal *a, integer * - lda, doublereal *tau, doublereal *work, integer *info); - -/* Subroutine */ int dgerqf_(integer *m, integer *n, doublereal *a, integer * - lda, doublereal *tau, doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dgesc2_(integer *n, doublereal *a, integer *lda, - doublereal *rhs, integer *ipiv, integer *jpiv, doublereal *scale); - -/* Subroutine */ int dgesdd_(char *jobz, integer *m, integer *n, doublereal * - a, integer *lda, doublereal *s, doublereal *u, integer *ldu, - doublereal *vt, integer *ldvt, doublereal *work, integer *lwork, - integer *iwork, integer *info); - -/* Subroutine */ int dgesv_(integer *n, integer *nrhs, doublereal *a, integer - *lda, integer *ipiv, doublereal *b, integer *ldb, integer *info); - -/* Subroutine */ int dgesvd_(char *jobu, char *jobvt, integer *m, integer *n, - doublereal *a, integer *lda, doublereal *s, doublereal *u, integer * - ldu, doublereal *vt, integer *ldvt, doublereal *work, integer *lwork, - integer *info); - -/* Subroutine */ int dgesvx_(char *fact, char *trans, integer *n, integer * - nrhs, doublereal *a, integer *lda, doublereal *af, integer *ldaf, - integer *ipiv, char *equed, doublereal *r__, doublereal *c__, - doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * - rcond, doublereal *ferr, doublereal *berr, doublereal *work, integer * - iwork, integer *info); - -/* Subroutine */ int dgetc2_(integer *n, doublereal *a, integer *lda, integer - *ipiv, integer *jpiv, integer *info); - -/* Subroutine */ int dgetf2_(integer *m, integer *n, doublereal *a, integer * - lda, integer *ipiv, integer *info); - -/* Subroutine */ int dgetrf_(integer *m, integer *n, doublereal *a, integer * - lda, integer *ipiv, integer *info); - -/* Subroutine */ int dgetri_(integer *n, doublereal *a, integer *lda, integer - *ipiv, doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dgetrs_(char *trans, integer *n, integer *nrhs, - doublereal *a, integer *lda, integer *ipiv, doublereal *b, integer * - ldb, integer *info); - -/* Subroutine */ int dggbak_(char *job, char *side, integer *n, integer *ilo, - integer *ihi, doublereal *lscale, doublereal *rscale, integer *m, - doublereal *v, integer *ldv, integer *info); - -/* Subroutine */ int dggbal_(char *job, integer *n, doublereal *a, integer * - lda, doublereal *b, integer *ldb, integer *ilo, integer *ihi, - doublereal *lscale, doublereal *rscale, doublereal *work, integer * - info); - -/* Subroutine */ int dgges_(char *jobvsl, char *jobvsr, char *sort, L_fp - delctg, integer *n, doublereal *a, integer *lda, doublereal *b, - integer *ldb, integer *sdim, doublereal *alphar, doublereal *alphai, - doublereal *beta, doublereal *vsl, integer *ldvsl, doublereal *vsr, - integer *ldvsr, doublereal *work, integer *lwork, logical *bwork, - integer *info); - -/* Subroutine */ int dggesx_(char *jobvsl, char *jobvsr, char *sort, L_fp - delctg, char *sense, integer *n, doublereal *a, integer *lda, - doublereal *b, integer *ldb, integer *sdim, doublereal *alphar, - doublereal *alphai, doublereal *beta, doublereal *vsl, integer *ldvsl, - doublereal *vsr, integer *ldvsr, doublereal *rconde, doublereal * - rcondv, doublereal *work, integer *lwork, integer *iwork, integer * - liwork, logical *bwork, integer *info); - -/* Subroutine */ int dggev_(char *jobvl, char *jobvr, integer *n, doublereal * - a, integer *lda, doublereal *b, integer *ldb, doublereal *alphar, - doublereal *alphai, doublereal *beta, doublereal *vl, integer *ldvl, - doublereal *vr, integer *ldvr, doublereal *work, integer *lwork, - integer *info); - -/* Subroutine */ int dggevx_(char *balanc, char *jobvl, char *jobvr, char * - sense, integer *n, doublereal *a, integer *lda, doublereal *b, - integer *ldb, doublereal *alphar, doublereal *alphai, doublereal * - beta, doublereal *vl, integer *ldvl, doublereal *vr, integer *ldvr, - integer *ilo, integer *ihi, doublereal *lscale, doublereal *rscale, - doublereal *abnrm, doublereal *bbnrm, doublereal *rconde, doublereal * - rcondv, doublereal *work, integer *lwork, integer *iwork, logical * - bwork, integer *info); - -/* Subroutine */ int dggglm_(integer *n, integer *m, integer *p, doublereal * - a, integer *lda, doublereal *b, integer *ldb, doublereal *d__, - doublereal *x, doublereal *y, doublereal *work, integer *lwork, - integer *info); - -/* Subroutine */ int dgghrd_(char *compq, char *compz, integer *n, integer * - ilo, integer *ihi, doublereal *a, integer *lda, doublereal *b, - integer *ldb, doublereal *q, integer *ldq, doublereal *z__, integer * - ldz, integer *info); - -/* Subroutine */ int dgglse_(integer *m, integer *n, integer *p, doublereal * - a, integer *lda, doublereal *b, integer *ldb, doublereal *c__, - doublereal *d__, doublereal *x, doublereal *work, integer *lwork, - integer *info); - -/* Subroutine */ int dggqrf_(integer *n, integer *m, integer *p, doublereal * - a, integer *lda, doublereal *taua, doublereal *b, integer *ldb, - doublereal *taub, doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dggrqf_(integer *m, integer *p, integer *n, doublereal * - a, integer *lda, doublereal *taua, doublereal *b, integer *ldb, - doublereal *taub, doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dggsvd_(char *jobu, char *jobv, char *jobq, integer *m, - integer *n, integer *p, integer *k, integer *l, doublereal *a, - integer *lda, doublereal *b, integer *ldb, doublereal *alpha, - doublereal *beta, doublereal *u, integer *ldu, doublereal *v, integer - *ldv, doublereal *q, integer *ldq, doublereal *work, integer *iwork, - integer *info); - -/* Subroutine */ int dggsvp_(char *jobu, char *jobv, char *jobq, integer *m, - integer *p, integer *n, doublereal *a, integer *lda, doublereal *b, - integer *ldb, doublereal *tola, doublereal *tolb, integer *k, integer - *l, doublereal *u, integer *ldu, doublereal *v, integer *ldv, - doublereal *q, integer *ldq, integer *iwork, doublereal *tau, - doublereal *work, integer *info); - -/* Subroutine */ int dgtcon_(char *norm, integer *n, doublereal *dl, - doublereal *d__, doublereal *du, doublereal *du2, integer *ipiv, - doublereal *anorm, doublereal *rcond, doublereal *work, integer * - iwork, integer *info); - -/* Subroutine */ int dgtrfs_(char *trans, integer *n, integer *nrhs, - doublereal *dl, doublereal *d__, doublereal *du, doublereal *dlf, - doublereal *df, doublereal *duf, doublereal *du2, integer *ipiv, - doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * - ferr, doublereal *berr, doublereal *work, integer *iwork, integer * - info); - -/* Subroutine */ int dgtsv_(integer *n, integer *nrhs, doublereal *dl, - doublereal *d__, doublereal *du, doublereal *b, integer *ldb, integer - *info); - -/* Subroutine */ int dgtsvx_(char *fact, char *trans, integer *n, integer * - nrhs, doublereal *dl, doublereal *d__, doublereal *du, doublereal * - dlf, doublereal *df, doublereal *duf, doublereal *du2, integer *ipiv, - doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * - rcond, doublereal *ferr, doublereal *berr, doublereal *work, integer * - iwork, integer *info); - -/* Subroutine */ int dgttrf_(integer *n, doublereal *dl, doublereal *d__, - doublereal *du, doublereal *du2, integer *ipiv, integer *info); - -/* Subroutine */ int dgttrs_(char *trans, integer *n, integer *nrhs, - doublereal *dl, doublereal *d__, doublereal *du, doublereal *du2, - integer *ipiv, doublereal *b, integer *ldb, integer *info); - -/* Subroutine */ int dgtts2_(integer *itrans, integer *n, integer *nrhs, - doublereal *dl, doublereal *d__, doublereal *du, doublereal *du2, - integer *ipiv, doublereal *b, integer *ldb); - -/* Subroutine */ int dhgeqz_(char *job, char *compq, char *compz, integer *n, - integer *ilo, integer *ihi, doublereal *a, integer *lda, doublereal * - b, integer *ldb, doublereal *alphar, doublereal *alphai, doublereal * - beta, doublereal *q, integer *ldq, doublereal *z__, integer *ldz, - doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dhsein_(char *side, char *eigsrc, char *initv, logical * - select, integer *n, doublereal *h__, integer *ldh, doublereal *wr, - doublereal *wi, doublereal *vl, integer *ldvl, doublereal *vr, - integer *ldvr, integer *mm, integer *m, doublereal *work, integer * - ifaill, integer *ifailr, integer *info); - -/* Subroutine */ int dhseqr_(char *job, char *compz, integer *n, integer *ilo, - integer *ihi, doublereal *h__, integer *ldh, doublereal *wr, - doublereal *wi, doublereal *z__, integer *ldz, doublereal *work, - integer *lwork, integer *info); - -/* Subroutine */ int dlabad_(doublereal *small, doublereal *large); - -/* Subroutine */ int dlabrd_(integer *m, integer *n, integer *nb, doublereal * - a, integer *lda, doublereal *d__, doublereal *e, doublereal *tauq, - doublereal *taup, doublereal *x, integer *ldx, doublereal *y, integer - *ldy); - -/* Subroutine */ int dlacon_(integer *n, doublereal *v, doublereal *x, - integer *isgn, doublereal *est, integer *kase); - -/* Subroutine */ int dlacpy_(char *uplo, integer *m, integer *n, doublereal * - a, integer *lda, doublereal *b, integer *ldb); - -/* Subroutine */ int dladiv_(doublereal *a, doublereal *b, doublereal *c__, - doublereal *d__, doublereal *p, doublereal *q); - -/* Subroutine */ int dlae2_(doublereal *a, doublereal *b, doublereal *c__, - doublereal *rt1, doublereal *rt2); - -/* Subroutine */ int dlaebz_(integer *ijob, integer *nitmax, integer *n, - integer *mmax, integer *minp, integer *nbmin, doublereal *abstol, - doublereal *reltol, doublereal *pivmin, doublereal *d__, doublereal * - e, doublereal *e2, integer *nval, doublereal *ab, doublereal *c__, - integer *mout, integer *nab, doublereal *work, integer *iwork, - integer *info); - -/* Subroutine */ int dlaed0_(integer *icompq, integer *qsiz, integer *n, - doublereal *d__, doublereal *e, doublereal *q, integer *ldq, - doublereal *qstore, integer *ldqs, doublereal *work, integer *iwork, - integer *info); - -/* Subroutine */ int dlaed1_(integer *n, doublereal *d__, doublereal *q, - integer *ldq, integer *indxq, doublereal *rho, integer *cutpnt, - doublereal *work, integer *iwork, integer *info); - -/* Subroutine */ int dlaed2_(integer *k, integer *n, integer *n1, doublereal * - d__, doublereal *q, integer *ldq, integer *indxq, doublereal *rho, - doublereal *z__, doublereal *dlamda, doublereal *w, doublereal *q2, - integer *indx, integer *indxc, integer *indxp, integer *coltyp, - integer *info); - -/* Subroutine */ int dlaed3_(integer *k, integer *n, integer *n1, doublereal * - d__, doublereal *q, integer *ldq, doublereal *rho, doublereal *dlamda, - doublereal *q2, integer *indx, integer *ctot, doublereal *w, - doublereal *s, integer *info); - -/* Subroutine */ int dlaed4_(integer *n, integer *i__, doublereal *d__, - doublereal *z__, doublereal *delta, doublereal *rho, doublereal *dlam, - integer *info); - -/* Subroutine */ int dlaed5_(integer *i__, doublereal *d__, doublereal *z__, - doublereal *delta, doublereal *rho, doublereal *dlam); - -/* Subroutine */ int dlaed6_(integer *kniter, logical *orgati, doublereal * - rho, doublereal *d__, doublereal *z__, doublereal *finit, doublereal * - tau, integer *info); - -/* Subroutine */ int dlaed7_(integer *icompq, integer *n, integer *qsiz, - integer *tlvls, integer *curlvl, integer *curpbm, doublereal *d__, - doublereal *q, integer *ldq, integer *indxq, doublereal *rho, integer - *cutpnt, doublereal *qstore, integer *qptr, integer *prmptr, integer * - perm, integer *givptr, integer *givcol, doublereal *givnum, - doublereal *work, integer *iwork, integer *info); - -/* Subroutine */ int dlaed8_(integer *icompq, integer *k, integer *n, integer - *qsiz, doublereal *d__, doublereal *q, integer *ldq, integer *indxq, - doublereal *rho, integer *cutpnt, doublereal *z__, doublereal *dlamda, - doublereal *q2, integer *ldq2, doublereal *w, integer *perm, integer - *givptr, integer *givcol, doublereal *givnum, integer *indxp, integer - *indx, integer *info); - -/* Subroutine */ int dlaed9_(integer *k, integer *kstart, integer *kstop, - integer *n, doublereal *d__, doublereal *q, integer *ldq, doublereal * - rho, doublereal *dlamda, doublereal *w, doublereal *s, integer *lds, - integer *info); - -/* Subroutine */ int dlaeda_(integer *n, integer *tlvls, integer *curlvl, - integer *curpbm, integer *prmptr, integer *perm, integer *givptr, - integer *givcol, doublereal *givnum, doublereal *q, integer *qptr, - doublereal *z__, doublereal *ztemp, integer *info); - -/* Subroutine */ int dlaein_(logical *rightv, logical *noinit, integer *n, - doublereal *h__, integer *ldh, doublereal *wr, doublereal *wi, - doublereal *vr, doublereal *vi, doublereal *b, integer *ldb, - doublereal *work, doublereal *eps3, doublereal *smlnum, doublereal * - bignum, integer *info); - -/* Subroutine */ int dlaev2_(doublereal *a, doublereal *b, doublereal *c__, - doublereal *rt1, doublereal *rt2, doublereal *cs1, doublereal *sn1); - -/* Subroutine */ int dlaexc_(logical *wantq, integer *n, doublereal *t, - integer *ldt, doublereal *q, integer *ldq, integer *j1, integer *n1, - integer *n2, doublereal *work, integer *info); - -/* Subroutine */ int dlag2_(doublereal *a, integer *lda, doublereal *b, - integer *ldb, doublereal *safmin, doublereal *scale1, doublereal * - scale2, doublereal *wr1, doublereal *wr2, doublereal *wi); - -/* Subroutine */ int dlags2_(logical *upper, doublereal *a1, doublereal *a2, - doublereal *a3, doublereal *b1, doublereal *b2, doublereal *b3, - doublereal *csu, doublereal *snu, doublereal *csv, doublereal *snv, - doublereal *csq, doublereal *snq); - -/* Subroutine */ int dlagtf_(integer *n, doublereal *a, doublereal *lambda, - doublereal *b, doublereal *c__, doublereal *tol, doublereal *d__, - integer *in, integer *info); - -/* Subroutine */ int dlagtm_(char *trans, integer *n, integer *nrhs, - doublereal *alpha, doublereal *dl, doublereal *d__, doublereal *du, - doublereal *x, integer *ldx, doublereal *beta, doublereal *b, integer - *ldb); - -/* Subroutine */ int dlagts_(integer *job, integer *n, doublereal *a, - doublereal *b, doublereal *c__, doublereal *d__, integer *in, - doublereal *y, doublereal *tol, integer *info); - -/* Subroutine */ int dlagv2_(doublereal *a, integer *lda, doublereal *b, - integer *ldb, doublereal *alphar, doublereal *alphai, doublereal * - beta, doublereal *csl, doublereal *snl, doublereal *csr, doublereal * - snr); - -/* Subroutine */ int dlahqr_(logical *wantt, logical *wantz, integer *n, - integer *ilo, integer *ihi, doublereal *h__, integer *ldh, doublereal - *wr, doublereal *wi, integer *iloz, integer *ihiz, doublereal *z__, - integer *ldz, integer *info); - -/* Subroutine */ int dlahrd_(integer *n, integer *k, integer *nb, doublereal * - a, integer *lda, doublereal *tau, doublereal *t, integer *ldt, - doublereal *y, integer *ldy); - -/* Subroutine */ int dlaic1_(integer *job, integer *j, doublereal *x, - doublereal *sest, doublereal *w, doublereal *gamma, doublereal * - sestpr, doublereal *s, doublereal *c__); - -/* Subroutine */ int dlaln2_(logical *ltrans, integer *na, integer *nw, - doublereal *smin, doublereal *ca, doublereal *a, integer *lda, - doublereal *d1, doublereal *d2, doublereal *b, integer *ldb, - doublereal *wr, doublereal *wi, doublereal *x, integer *ldx, - doublereal *scale, doublereal *xnorm, integer *info); - -/* Subroutine */ int dlals0_(integer *icompq, integer *nl, integer *nr, - integer *sqre, integer *nrhs, doublereal *b, integer *ldb, doublereal - *bx, integer *ldbx, integer *perm, integer *givptr, integer *givcol, - integer *ldgcol, doublereal *givnum, integer *ldgnum, doublereal * - poles, doublereal *difl, doublereal *difr, doublereal *z__, integer * - k, doublereal *c__, doublereal *s, doublereal *work, integer *info); - -/* Subroutine */ int dlalsa_(integer *icompq, integer *smlsiz, integer *n, - integer *nrhs, doublereal *b, integer *ldb, doublereal *bx, integer * - ldbx, doublereal *u, integer *ldu, doublereal *vt, integer *k, - doublereal *difl, doublereal *difr, doublereal *z__, doublereal * - poles, integer *givptr, integer *givcol, integer *ldgcol, integer * - perm, doublereal *givnum, doublereal *c__, doublereal *s, doublereal * - work, integer *iwork, integer *info); - -/* Subroutine */ int dlalsd_(char *uplo, integer *smlsiz, integer *n, integer - *nrhs, doublereal *d__, doublereal *e, doublereal *b, integer *ldb, - doublereal *rcond, integer *rank, doublereal *work, integer *iwork, - integer *info); - -/* Subroutine */ int dlamc1_(integer *beta, integer *t, logical *rnd, logical - *ieee1); - -/* Subroutine */ int dlamc2_(integer *beta, integer *t, logical *rnd, - doublereal *eps, integer *emin, doublereal *rmin, integer *emax, - doublereal *rmax); - -/* Subroutine */ int dlamc4_(integer *emin, doublereal *start, integer *base); - -/* Subroutine */ int dlamc5_(integer *beta, integer *p, integer *emin, - logical *ieee, integer *emax, doublereal *rmax); - -/* Subroutine */ int dlamrg_(integer *n1, integer *n2, doublereal *a, integer - *dtrd1, integer *dtrd2, integer *index); - -/* Subroutine */ int dlanv2_(doublereal *a, doublereal *b, doublereal *c__, - doublereal *d__, doublereal *rt1r, doublereal *rt1i, doublereal *rt2r, - doublereal *rt2i, doublereal *cs, doublereal *sn); - -/* Subroutine */ int dlapll_(integer *n, doublereal *x, integer *incx, - doublereal *y, integer *incy, doublereal *ssmin); - -/* Subroutine */ int dlapmt_(logical *forwrd, integer *m, integer *n, - doublereal *x, integer *ldx, integer *k); - -/* Subroutine */ int dlaqgb_(integer *m, integer *n, integer *kl, integer *ku, - doublereal *ab, integer *ldab, doublereal *r__, doublereal *c__, - doublereal *rowcnd, doublereal *colcnd, doublereal *amax, char *equed); - -/* Subroutine */ int dlaqge_(integer *m, integer *n, doublereal *a, integer * - lda, doublereal *r__, doublereal *c__, doublereal *rowcnd, doublereal - *colcnd, doublereal *amax, char *equed); - -/* Subroutine */ int dlaqp2_(integer *m, integer *n, integer *offset, - doublereal *a, integer *lda, integer *jpvt, doublereal *tau, - doublereal *vn1, doublereal *vn2, doublereal *work); - -/* Subroutine */ int dlaqps_(integer *m, integer *n, integer *offset, integer - *nb, integer *kb, doublereal *a, integer *lda, integer *jpvt, - doublereal *tau, doublereal *vn1, doublereal *vn2, doublereal *auxv, - doublereal *f, integer *ldf); - -/* Subroutine */ int dlaqsb_(char *uplo, integer *n, integer *kd, doublereal * - ab, integer *ldab, doublereal *s, doublereal *scond, doublereal *amax, - char *equed); - -/* Subroutine */ int dlaqsp_(char *uplo, integer *n, doublereal *ap, - doublereal *s, doublereal *scond, doublereal *amax, char *equed); - -/* Subroutine */ int dlaqsy_(char *uplo, integer *n, doublereal *a, integer * - lda, doublereal *s, doublereal *scond, doublereal *amax, char *equed); - -/* Subroutine */ int dlaqtr_(logical *ltran, logical *lreal, integer *n, - doublereal *t, integer *ldt, doublereal *b, doublereal *w, doublereal - *scale, doublereal *x, doublereal *work, integer *info); - -/* Subroutine */ int dlar1v_(integer *n, integer *b1, integer *bn, doublereal - *sigma, doublereal *d__, doublereal *l, doublereal *ld, doublereal * - lld, doublereal *gersch, doublereal *z__, doublereal *ztz, doublereal - *mingma, integer *r__, integer *isuppz, doublereal *work); - -/* Subroutine */ int dlar2v_(integer *n, doublereal *x, doublereal *y, - doublereal *z__, integer *incx, doublereal *c__, doublereal *s, - integer *incc); - -/* Subroutine */ int dlarf_(char *side, integer *m, integer *n, doublereal *v, - integer *incv, doublereal *tau, doublereal *c__, integer *ldc, - doublereal *work); - -/* Subroutine */ int dlarfb_(char *side, char *trans, char *direct, char * - storev, integer *m, integer *n, integer *k, doublereal *v, integer * - ldv, doublereal *t, integer *ldt, doublereal *c__, integer *ldc, - doublereal *work, integer *ldwork); - -/* Subroutine */ int dlarfg_(integer *n, doublereal *alpha, doublereal *x, - integer *incx, doublereal *tau); - -/* Subroutine */ int dlarft_(char *direct, char *storev, integer *n, integer * - k, doublereal *v, integer *ldv, doublereal *tau, doublereal *t, - integer *ldt); - -/* Subroutine */ int dlarfx_(char *side, integer *m, integer *n, doublereal * - v, doublereal *tau, doublereal *c__, integer *ldc, doublereal *work); - -/* Subroutine */ int dlargv_(integer *n, doublereal *x, integer *incx, - doublereal *y, integer *incy, doublereal *c__, integer *incc); - -/* Subroutine */ int dlarnv_(integer *idist, integer *iseed, integer *n, - doublereal *x); - -/* Subroutine */ int dlarrb_(integer *n, doublereal *d__, doublereal *l, - doublereal *ld, doublereal *lld, integer *ifirst, integer *ilast, - doublereal *sigma, doublereal *reltol, doublereal *w, doublereal * - wgap, doublereal *werr, doublereal *work, integer *iwork, integer * - info); - -/* Subroutine */ int dlarre_(integer *n, doublereal *d__, doublereal *e, - doublereal *tol, integer *nsplit, integer *isplit, integer *m, - doublereal *w, doublereal *woff, doublereal *gersch, doublereal *work, - integer *info); - -/* Subroutine */ int dlarrf_(integer *n, doublereal *d__, doublereal *l, - doublereal *ld, doublereal *lld, integer *ifirst, integer *ilast, - doublereal *w, doublereal *dplus, doublereal *lplus, doublereal *work, - integer *iwork, integer *info); - -/* Subroutine */ int dlarrv_(integer *n, doublereal *d__, doublereal *l, - integer *isplit, integer *m, doublereal *w, integer *iblock, - doublereal *gersch, doublereal *tol, doublereal *z__, integer *ldz, - integer *isuppz, doublereal *work, integer *iwork, integer *info); - -/* Subroutine */ int dlartg_(doublereal *f, doublereal *g, doublereal *cs, - doublereal *sn, doublereal *r__); - -/* Subroutine */ int dlartv_(integer *n, doublereal *x, integer *incx, - doublereal *y, integer *incy, doublereal *c__, doublereal *s, integer - *incc); - -/* Subroutine */ int dlaruv_(integer *iseed, integer *n, doublereal *x); - -/* Subroutine */ int dlarz_(char *side, integer *m, integer *n, integer *l, - doublereal *v, integer *incv, doublereal *tau, doublereal *c__, - integer *ldc, doublereal *work); - -/* Subroutine */ int dlarzb_(char *side, char *trans, char *direct, char * - storev, integer *m, integer *n, integer *k, integer *l, doublereal *v, - integer *ldv, doublereal *t, integer *ldt, doublereal *c__, integer * - ldc, doublereal *work, integer *ldwork); - -/* Subroutine */ int dlarzt_(char *direct, char *storev, integer *n, integer * - k, doublereal *v, integer *ldv, doublereal *tau, doublereal *t, - integer *ldt); - -/* Subroutine */ int dlas2_(doublereal *f, doublereal *g, doublereal *h__, - doublereal *ssmin, doublereal *ssmax); - -/* Subroutine */ int dlascl_(char *type__, integer *kl, integer *ku, - doublereal *cfrom, doublereal *cto, integer *m, integer *n, - doublereal *a, integer *lda, integer *info); - -/* Subroutine */ int dlasd0_(integer *n, integer *sqre, doublereal *d__, - doublereal *e, doublereal *u, integer *ldu, doublereal *vt, integer * - ldvt, integer *smlsiz, integer *iwork, doublereal *work, integer * - info); - -/* Subroutine */ int dlasd1_(integer *nl, integer *nr, integer *sqre, - doublereal *d__, doublereal *alpha, doublereal *beta, doublereal *u, - integer *ldu, doublereal *vt, integer *ldvt, integer *idxq, integer * - iwork, doublereal *work, integer *info); - -/* Subroutine */ int dlasd2_(integer *nl, integer *nr, integer *sqre, integer - *k, doublereal *d__, doublereal *z__, doublereal *alpha, doublereal * - beta, doublereal *u, integer *ldu, doublereal *vt, integer *ldvt, - doublereal *dsigma, doublereal *u2, integer *ldu2, doublereal *vt2, - integer *ldvt2, integer *idxp, integer *idx, integer *idxc, integer * - idxq, integer *coltyp, integer *info); - -/* Subroutine */ int dlasd3_(integer *nl, integer *nr, integer *sqre, integer - *k, doublereal *d__, doublereal *q, integer *ldq, doublereal *dsigma, - doublereal *u, integer *ldu, doublereal *u2, integer *ldu2, - doublereal *vt, integer *ldvt, doublereal *vt2, integer *ldvt2, - integer *idxc, integer *ctot, doublereal *z__, integer *info); - -/* Subroutine */ int dlasd4_(integer *n, integer *i__, doublereal *d__, - doublereal *z__, doublereal *delta, doublereal *rho, doublereal * - sigma, doublereal *work, integer *info); - -/* Subroutine */ int dlasd5_(integer *i__, doublereal *d__, doublereal *z__, - doublereal *delta, doublereal *rho, doublereal *dsigma, doublereal * - work); - -/* Subroutine */ int dlasd6_(integer *icompq, integer *nl, integer *nr, - integer *sqre, doublereal *d__, doublereal *vf, doublereal *vl, - doublereal *alpha, doublereal *beta, integer *idxq, integer *perm, - integer *givptr, integer *givcol, integer *ldgcol, doublereal *givnum, - integer *ldgnum, doublereal *poles, doublereal *difl, doublereal * - difr, doublereal *z__, integer *k, doublereal *c__, doublereal *s, - doublereal *work, integer *iwork, integer *info); - -/* Subroutine */ int dlasd7_(integer *icompq, integer *nl, integer *nr, - integer *sqre, integer *k, doublereal *d__, doublereal *z__, - doublereal *zw, doublereal *vf, doublereal *vfw, doublereal *vl, - doublereal *vlw, doublereal *alpha, doublereal *beta, doublereal * - dsigma, integer *idx, integer *idxp, integer *idxq, integer *perm, - integer *givptr, integer *givcol, integer *ldgcol, doublereal *givnum, - integer *ldgnum, doublereal *c__, doublereal *s, integer *info); - -/* Subroutine */ int dlasd8_(integer *icompq, integer *k, doublereal *d__, - doublereal *z__, doublereal *vf, doublereal *vl, doublereal *difl, - doublereal *difr, integer *lddifr, doublereal *dsigma, doublereal * - work, integer *info); - -/* Subroutine */ int dlasd9_(integer *icompq, integer *ldu, integer *k, - doublereal *d__, doublereal *z__, doublereal *vf, doublereal *vl, - doublereal *difl, doublereal *difr, doublereal *dsigma, doublereal * - work, integer *info); - -/* Subroutine */ int dlasda_(integer *icompq, integer *smlsiz, integer *n, - integer *sqre, doublereal *d__, doublereal *e, doublereal *u, integer - *ldu, doublereal *vt, integer *k, doublereal *difl, doublereal *difr, - doublereal *z__, doublereal *poles, integer *givptr, integer *givcol, - integer *ldgcol, integer *perm, doublereal *givnum, doublereal *c__, - doublereal *s, doublereal *work, integer *iwork, integer *info); - -/* Subroutine */ int dlasdq_(char *uplo, integer *sqre, integer *n, integer * - ncvt, integer *nru, integer *ncc, doublereal *d__, doublereal *e, - doublereal *vt, integer *ldvt, doublereal *u, integer *ldu, - doublereal *c__, integer *ldc, doublereal *work, integer *info); - -/* Subroutine */ int dlasdt_(integer *n, integer *lvl, integer *nd, integer * - inode, integer *ndiml, integer *ndimr, integer *msub); - -/* Subroutine */ int dlaset_(char *uplo, integer *m, integer *n, doublereal * - alpha, doublereal *beta, doublereal *a, integer *lda); - -/* Subroutine */ int dlasq1_(integer *n, doublereal *d__, doublereal *e, - doublereal *work, integer *info); - -/* Subroutine */ int dlasq2_(integer *n, doublereal *z__, integer *info); - -/* Subroutine */ int dlasq3_(integer *i0, integer *n0, doublereal *z__, - integer *pp, doublereal *dmin__, doublereal *sigma, doublereal *desig, - doublereal *qmax, integer *nfail, integer *iter, integer *ndiv, - logical *ieee); - -/* Subroutine */ int dlasq4_(integer *i0, integer *n0, doublereal *z__, - integer *pp, integer *n0in, doublereal *dmin__, doublereal *dmin1, - doublereal *dmin2, doublereal *dn, doublereal *dn1, doublereal *dn2, - doublereal *tau, integer *ttype); - -/* Subroutine */ int dlasq5_(integer *i0, integer *n0, doublereal *z__, - integer *pp, doublereal *tau, doublereal *dmin__, doublereal *dmin1, - doublereal *dmin2, doublereal *dn, doublereal *dnm1, doublereal *dnm2, - logical *ieee); - -/* Subroutine */ int dlasq6_(integer *i0, integer *n0, doublereal *z__, - integer *pp, doublereal *dmin__, doublereal *dmin1, doublereal *dmin2, - doublereal *dn, doublereal *dnm1, doublereal *dnm2); - -/* Subroutine */ int dlasr_(char *side, char *pivot, char *direct, integer *m, - integer *n, doublereal *c__, doublereal *s, doublereal *a, integer * - lda); - -/* Subroutine */ int dlasrt_(char *id, integer *n, doublereal *d__, integer * - info); - -/* Subroutine */ int dlassq_(integer *n, doublereal *x, integer *incx, - doublereal *scale, doublereal *sumsq); - -/* Subroutine */ int dlasv2_(doublereal *f, doublereal *g, doublereal *h__, - doublereal *ssmin, doublereal *ssmax, doublereal *snr, doublereal * - csr, doublereal *snl, doublereal *csl); - -/* Subroutine */ int dlaswp_(integer *n, doublereal *a, integer *lda, integer - *k1, integer *k2, integer *ipiv, integer *incx); - -/* Subroutine */ int dlasy2_(logical *ltranl, logical *ltranr, integer *isgn, - integer *n1, integer *n2, doublereal *tl, integer *ldtl, doublereal * - tr, integer *ldtr, doublereal *b, integer *ldb, doublereal *scale, - doublereal *x, integer *ldx, doublereal *xnorm, integer *info); - -/* Subroutine */ int dlasyf_(char *uplo, integer *n, integer *nb, integer *kb, - doublereal *a, integer *lda, integer *ipiv, doublereal *w, integer * - ldw, integer *info); - -/* Subroutine */ int dlatbs_(char *uplo, char *trans, char *diag, char * - normin, integer *n, integer *kd, doublereal *ab, integer *ldab, - doublereal *x, doublereal *scale, doublereal *cnorm, integer *info); - -/* Subroutine */ int dlatdf_(integer *ijob, integer *n, doublereal *z__, - integer *ldz, doublereal *rhs, doublereal *rdsum, doublereal *rdscal, - integer *ipiv, integer *jpiv); - -/* Subroutine */ int dlatps_(char *uplo, char *trans, char *diag, char * - normin, integer *n, doublereal *ap, doublereal *x, doublereal *scale, - doublereal *cnorm, integer *info); - -/* Subroutine */ int dlatrd_(char *uplo, integer *n, integer *nb, doublereal * - a, integer *lda, doublereal *e, doublereal *tau, doublereal *w, - integer *ldw); - -/* Subroutine */ int dlatrs_(char *uplo, char *trans, char *diag, char * - normin, integer *n, doublereal *a, integer *lda, doublereal *x, - doublereal *scale, doublereal *cnorm, integer *info); - -/* Subroutine */ int dlatrz_(integer *m, integer *n, integer *l, doublereal * - a, integer *lda, doublereal *tau, doublereal *work); - -/* Subroutine */ int dlatzm_(char *side, integer *m, integer *n, doublereal * - v, integer *incv, doublereal *tau, doublereal *c1, doublereal *c2, - integer *ldc, doublereal *work); - -/* Subroutine */ int dlauu2_(char *uplo, integer *n, doublereal *a, integer * - lda, integer *info); - -/* Subroutine */ int dlauum_(char *uplo, integer *n, doublereal *a, integer * - lda, integer *info); - -/* Subroutine */ int dopgtr_(char *uplo, integer *n, doublereal *ap, - doublereal *tau, doublereal *q, integer *ldq, doublereal *work, - integer *info); - -/* Subroutine */ int dopmtr_(char *side, char *uplo, char *trans, integer *m, - integer *n, doublereal *ap, doublereal *tau, doublereal *c__, integer - *ldc, doublereal *work, integer *info); - -/* Subroutine */ int dorg2l_(integer *m, integer *n, integer *k, doublereal * - a, integer *lda, doublereal *tau, doublereal *work, integer *info); - -/* Subroutine */ int dorg2r_(integer *m, integer *n, integer *k, doublereal * - a, integer *lda, doublereal *tau, doublereal *work, integer *info); - -/* Subroutine */ int dorgbr_(char *vect, integer *m, integer *n, integer *k, - doublereal *a, integer *lda, doublereal *tau, doublereal *work, - integer *lwork, integer *info); - -/* Subroutine */ int dorghr_(integer *n, integer *ilo, integer *ihi, - doublereal *a, integer *lda, doublereal *tau, doublereal *work, - integer *lwork, integer *info); - -/* Subroutine */ int dorgl2_(integer *m, integer *n, integer *k, doublereal * - a, integer *lda, doublereal *tau, doublereal *work, integer *info); - -/* Subroutine */ int dorglq_(integer *m, integer *n, integer *k, doublereal * - a, integer *lda, doublereal *tau, doublereal *work, integer *lwork, - integer *info); - -/* Subroutine */ int dorgql_(integer *m, integer *n, integer *k, doublereal * - a, integer *lda, doublereal *tau, doublereal *work, integer *lwork, - integer *info); - -/* Subroutine */ int dorgqr_(integer *m, integer *n, integer *k, doublereal * - a, integer *lda, doublereal *tau, doublereal *work, integer *lwork, - integer *info); - -/* Subroutine */ int dorgr2_(integer *m, integer *n, integer *k, doublereal * - a, integer *lda, doublereal *tau, doublereal *work, integer *info); - -/* Subroutine */ int dorgrq_(integer *m, integer *n, integer *k, doublereal * - a, integer *lda, doublereal *tau, doublereal *work, integer *lwork, - integer *info); - -/* Subroutine */ int dorgtr_(char *uplo, integer *n, doublereal *a, integer * - lda, doublereal *tau, doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dorm2l_(char *side, char *trans, integer *m, integer *n, - integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * - c__, integer *ldc, doublereal *work, integer *info); - -/* Subroutine */ int dorm2r_(char *side, char *trans, integer *m, integer *n, - integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * - c__, integer *ldc, doublereal *work, integer *info); - -/* Subroutine */ int dormbr_(char *vect, char *side, char *trans, integer *m, - integer *n, integer *k, doublereal *a, integer *lda, doublereal *tau, - doublereal *c__, integer *ldc, doublereal *work, integer *lwork, - integer *info); - -/* Subroutine */ int dormhr_(char *side, char *trans, integer *m, integer *n, - integer *ilo, integer *ihi, doublereal *a, integer *lda, doublereal * - tau, doublereal *c__, integer *ldc, doublereal *work, integer *lwork, - integer *info); - -/* Subroutine */ int dorml2_(char *side, char *trans, integer *m, integer *n, - integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * - c__, integer *ldc, doublereal *work, integer *info); - -/* Subroutine */ int dormlq_(char *side, char *trans, integer *m, integer *n, - integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * - c__, integer *ldc, doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dormql_(char *side, char *trans, integer *m, integer *n, - integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * - c__, integer *ldc, doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dormqr_(char *side, char *trans, integer *m, integer *n, - integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * - c__, integer *ldc, doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dormr2_(char *side, char *trans, integer *m, integer *n, - integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * - c__, integer *ldc, doublereal *work, integer *info); - -/* Subroutine */ int dormr3_(char *side, char *trans, integer *m, integer *n, - integer *k, integer *l, doublereal *a, integer *lda, doublereal *tau, - doublereal *c__, integer *ldc, doublereal *work, integer *info); - -/* Subroutine */ int dormrq_(char *side, char *trans, integer *m, integer *n, - integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * - c__, integer *ldc, doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dormrz_(char *side, char *trans, integer *m, integer *n, - integer *k, integer *l, doublereal *a, integer *lda, doublereal *tau, - doublereal *c__, integer *ldc, doublereal *work, integer *lwork, - integer *info); - -/* Subroutine */ int dormtr_(char *side, char *uplo, char *trans, integer *m, - integer *n, doublereal *a, integer *lda, doublereal *tau, doublereal * - c__, integer *ldc, doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dpbcon_(char *uplo, integer *n, integer *kd, doublereal * - ab, integer *ldab, doublereal *anorm, doublereal *rcond, doublereal * - work, integer *iwork, integer *info); - -/* Subroutine */ int dpbequ_(char *uplo, integer *n, integer *kd, doublereal * - ab, integer *ldab, doublereal *s, doublereal *scond, doublereal *amax, - integer *info); - -/* Subroutine */ int dpbrfs_(char *uplo, integer *n, integer *kd, integer * - nrhs, doublereal *ab, integer *ldab, doublereal *afb, integer *ldafb, - doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * - ferr, doublereal *berr, doublereal *work, integer *iwork, integer * - info); - -/* Subroutine */ int dpbstf_(char *uplo, integer *n, integer *kd, doublereal * - ab, integer *ldab, integer *info); - -/* Subroutine */ int dpbsv_(char *uplo, integer *n, integer *kd, integer * - nrhs, doublereal *ab, integer *ldab, doublereal *b, integer *ldb, - integer *info); - -/* Subroutine */ int dpbsvx_(char *fact, char *uplo, integer *n, integer *kd, - integer *nrhs, doublereal *ab, integer *ldab, doublereal *afb, - integer *ldafb, char *equed, doublereal *s, doublereal *b, integer * - ldb, doublereal *x, integer *ldx, doublereal *rcond, doublereal *ferr, - doublereal *berr, doublereal *work, integer *iwork, integer *info); - -/* Subroutine */ int dpbtf2_(char *uplo, integer *n, integer *kd, doublereal * - ab, integer *ldab, integer *info); - -/* Subroutine */ int dpbtrf_(char *uplo, integer *n, integer *kd, doublereal * - ab, integer *ldab, integer *info); - -/* Subroutine */ int dpbtrs_(char *uplo, integer *n, integer *kd, integer * - nrhs, doublereal *ab, integer *ldab, doublereal *b, integer *ldb, - integer *info); - -/* Subroutine */ int dpocon_(char *uplo, integer *n, doublereal *a, integer * - lda, doublereal *anorm, doublereal *rcond, doublereal *work, integer * - iwork, integer *info); - -/* Subroutine */ int dpoequ_(integer *n, doublereal *a, integer *lda, - doublereal *s, doublereal *scond, doublereal *amax, integer *info); - -/* Subroutine */ int dporfs_(char *uplo, integer *n, integer *nrhs, - doublereal *a, integer *lda, doublereal *af, integer *ldaf, - doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * - ferr, doublereal *berr, doublereal *work, integer *iwork, integer * - info); - -/* Subroutine */ int dposv_(char *uplo, integer *n, integer *nrhs, doublereal - *a, integer *lda, doublereal *b, integer *ldb, integer *info); - -/* Subroutine */ int dposvx_(char *fact, char *uplo, integer *n, integer * - nrhs, doublereal *a, integer *lda, doublereal *af, integer *ldaf, - char *equed, doublereal *s, doublereal *b, integer *ldb, doublereal * - x, integer *ldx, doublereal *rcond, doublereal *ferr, doublereal * - berr, doublereal *work, integer *iwork, integer *info); - -/* Subroutine */ int dpotf2_(char *uplo, integer *n, doublereal *a, integer * - lda, integer *info); - -/* Subroutine */ int dpotrf_(char *uplo, integer *n, doublereal *a, integer * - lda, integer *info); - -/* Subroutine */ int dpotri_(char *uplo, integer *n, doublereal *a, integer * - lda, integer *info); - -/* Subroutine */ int dpotrs_(char *uplo, integer *n, integer *nrhs, - doublereal *a, integer *lda, doublereal *b, integer *ldb, integer * - info); - -/* Subroutine */ int dppcon_(char *uplo, integer *n, doublereal *ap, - doublereal *anorm, doublereal *rcond, doublereal *work, integer * - iwork, integer *info); - -/* Subroutine */ int dppequ_(char *uplo, integer *n, doublereal *ap, - doublereal *s, doublereal *scond, doublereal *amax, integer *info); - -/* Subroutine */ int dpprfs_(char *uplo, integer *n, integer *nrhs, - doublereal *ap, doublereal *afp, doublereal *b, integer *ldb, - doublereal *x, integer *ldx, doublereal *ferr, doublereal *berr, - doublereal *work, integer *iwork, integer *info); - -/* Subroutine */ int dppsv_(char *uplo, integer *n, integer *nrhs, doublereal - *ap, doublereal *b, integer *ldb, integer *info); - -/* Subroutine */ int dppsvx_(char *fact, char *uplo, integer *n, integer * - nrhs, doublereal *ap, doublereal *afp, char *equed, doublereal *s, - doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * - rcond, doublereal *ferr, doublereal *berr, doublereal *work, integer * - iwork, integer *info); - -/* Subroutine */ int dpptrf_(char *uplo, integer *n, doublereal *ap, integer * - info); - -/* Subroutine */ int dpptri_(char *uplo, integer *n, doublereal *ap, integer * - info); - -/* Subroutine */ int dpptrs_(char *uplo, integer *n, integer *nrhs, - doublereal *ap, doublereal *b, integer *ldb, integer *info); - -/* Subroutine */ int dptcon_(integer *n, doublereal *d__, doublereal *e, - doublereal *anorm, doublereal *rcond, doublereal *work, integer *info); - -/* Subroutine */ int dpteqr_(char *compz, integer *n, doublereal *d__, - doublereal *e, doublereal *z__, integer *ldz, doublereal *work, - integer *info); - -/* Subroutine */ int dptrfs_(integer *n, integer *nrhs, doublereal *d__, - doublereal *e, doublereal *df, doublereal *ef, doublereal *b, integer - *ldb, doublereal *x, integer *ldx, doublereal *ferr, doublereal *berr, - doublereal *work, integer *info); - -/* Subroutine */ int dptsv_(integer *n, integer *nrhs, doublereal *d__, - doublereal *e, doublereal *b, integer *ldb, integer *info); - -/* Subroutine */ int dptsvx_(char *fact, integer *n, integer *nrhs, - doublereal *d__, doublereal *e, doublereal *df, doublereal *ef, - doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * - rcond, doublereal *ferr, doublereal *berr, doublereal *work, integer * - info); - -/* Subroutine */ int dpttrf_(integer *n, doublereal *d__, doublereal *e, - integer *info); - -/* Subroutine */ int dpttrs_(integer *n, integer *nrhs, doublereal *d__, - doublereal *e, doublereal *b, integer *ldb, integer *info); - -/* Subroutine */ int dptts2_(integer *n, integer *nrhs, doublereal *d__, - doublereal *e, doublereal *b, integer *ldb); - -/* Subroutine */ int drscl_(integer *n, doublereal *sa, doublereal *sx, - integer *incx); - -/* Subroutine */ int dsbev_(char *jobz, char *uplo, integer *n, integer *kd, - doublereal *ab, integer *ldab, doublereal *w, doublereal *z__, - integer *ldz, doublereal *work, integer *info); - -/* Subroutine */ int dsbevd_(char *jobz, char *uplo, integer *n, integer *kd, - doublereal *ab, integer *ldab, doublereal *w, doublereal *z__, - integer *ldz, doublereal *work, integer *lwork, integer *iwork, - integer *liwork, integer *info); - -/* Subroutine */ int dsbevx_(char *jobz, char *range, char *uplo, integer *n, - integer *kd, doublereal *ab, integer *ldab, doublereal *q, integer * - ldq, doublereal *vl, doublereal *vu, integer *il, integer *iu, - doublereal *abstol, integer *m, doublereal *w, doublereal *z__, - integer *ldz, doublereal *work, integer *iwork, integer *ifail, - integer *info); - -/* Subroutine */ int dsbgst_(char *vect, char *uplo, integer *n, integer *ka, - integer *kb, doublereal *ab, integer *ldab, doublereal *bb, integer * - ldbb, doublereal *x, integer *ldx, doublereal *work, integer *info); - -/* Subroutine */ int dsbgv_(char *jobz, char *uplo, integer *n, integer *ka, - integer *kb, doublereal *ab, integer *ldab, doublereal *bb, integer * - ldbb, doublereal *w, doublereal *z__, integer *ldz, doublereal *work, - integer *info); - -/* Subroutine */ int dsbgvd_(char *jobz, char *uplo, integer *n, integer *ka, - integer *kb, doublereal *ab, integer *ldab, doublereal *bb, integer * - ldbb, doublereal *w, doublereal *z__, integer *ldz, doublereal *work, - integer *lwork, integer *iwork, integer *liwork, integer *info); - -/* Subroutine */ int dsbgvx_(char *jobz, char *range, char *uplo, integer *n, - integer *ka, integer *kb, doublereal *ab, integer *ldab, doublereal * - bb, integer *ldbb, doublereal *q, integer *ldq, doublereal *vl, - doublereal *vu, integer *il, integer *iu, doublereal *abstol, integer - *m, doublereal *w, doublereal *z__, integer *ldz, doublereal *work, - integer *iwork, integer *ifail, integer *info); - -/* Subroutine */ int dsbtrd_(char *vect, char *uplo, integer *n, integer *kd, - doublereal *ab, integer *ldab, doublereal *d__, doublereal *e, - doublereal *q, integer *ldq, doublereal *work, integer *info); - -/* Subroutine */ int dspcon_(char *uplo, integer *n, doublereal *ap, integer * - ipiv, doublereal *anorm, doublereal *rcond, doublereal *work, integer - *iwork, integer *info); - -/* Subroutine */ int dspev_(char *jobz, char *uplo, integer *n, doublereal * - ap, doublereal *w, doublereal *z__, integer *ldz, doublereal *work, - integer *info); - -/* Subroutine */ int dspevd_(char *jobz, char *uplo, integer *n, doublereal * - ap, doublereal *w, doublereal *z__, integer *ldz, doublereal *work, - integer *lwork, integer *iwork, integer *liwork, integer *info); - -/* Subroutine */ int dspevx_(char *jobz, char *range, char *uplo, integer *n, - doublereal *ap, doublereal *vl, doublereal *vu, integer *il, integer * - iu, doublereal *abstol, integer *m, doublereal *w, doublereal *z__, - integer *ldz, doublereal *work, integer *iwork, integer *ifail, - integer *info); - -/* Subroutine */ int dspgst_(integer *itype, char *uplo, integer *n, - doublereal *ap, doublereal *bp, integer *info); - -/* Subroutine */ int dspgv_(integer *itype, char *jobz, char *uplo, integer * - n, doublereal *ap, doublereal *bp, doublereal *w, doublereal *z__, - integer *ldz, doublereal *work, integer *info); - -/* Subroutine */ int dspgvd_(integer *itype, char *jobz, char *uplo, integer * - n, doublereal *ap, doublereal *bp, doublereal *w, doublereal *z__, - integer *ldz, doublereal *work, integer *lwork, integer *iwork, - integer *liwork, integer *info); - -/* Subroutine */ int dspgvx_(integer *itype, char *jobz, char *range, char * - uplo, integer *n, doublereal *ap, doublereal *bp, doublereal *vl, - doublereal *vu, integer *il, integer *iu, doublereal *abstol, integer - *m, doublereal *w, doublereal *z__, integer *ldz, doublereal *work, - integer *iwork, integer *ifail, integer *info); - -/* Subroutine */ int dsprfs_(char *uplo, integer *n, integer *nrhs, - doublereal *ap, doublereal *afp, integer *ipiv, doublereal *b, - integer *ldb, doublereal *x, integer *ldx, doublereal *ferr, - doublereal *berr, doublereal *work, integer *iwork, integer *info); - -/* Subroutine */ int dspsv_(char *uplo, integer *n, integer *nrhs, doublereal - *ap, integer *ipiv, doublereal *b, integer *ldb, integer *info); - -/* Subroutine */ int dspsvx_(char *fact, char *uplo, integer *n, integer * - nrhs, doublereal *ap, doublereal *afp, integer *ipiv, doublereal *b, - integer *ldb, doublereal *x, integer *ldx, doublereal *rcond, - doublereal *ferr, doublereal *berr, doublereal *work, integer *iwork, - integer *info); - -/* Subroutine */ int dsptrd_(char *uplo, integer *n, doublereal *ap, - doublereal *d__, doublereal *e, doublereal *tau, integer *info); - -/* Subroutine */ int dsptrf_(char *uplo, integer *n, doublereal *ap, integer * - ipiv, integer *info); - -/* Subroutine */ int dsptri_(char *uplo, integer *n, doublereal *ap, integer * - ipiv, doublereal *work, integer *info); - -/* Subroutine */ int dsptrs_(char *uplo, integer *n, integer *nrhs, - doublereal *ap, integer *ipiv, doublereal *b, integer *ldb, integer * - info); - -/* Subroutine */ int dstebz_(char *range, char *order, integer *n, doublereal - *vl, doublereal *vu, integer *il, integer *iu, doublereal *abstol, - doublereal *d__, doublereal *e, integer *m, integer *nsplit, - doublereal *w, integer *iblock, integer *isplit, doublereal *work, - integer *iwork, integer *info); - -/* Subroutine */ int dstedc_(char *compz, integer *n, doublereal *d__, - doublereal *e, doublereal *z__, integer *ldz, doublereal *work, - integer *lwork, integer *iwork, integer *liwork, integer *info); - -/* Subroutine */ int dstegr_(char *jobz, char *range, integer *n, doublereal * - d__, doublereal *e, doublereal *vl, doublereal *vu, integer *il, - integer *iu, doublereal *abstol, integer *m, doublereal *w, - doublereal *z__, integer *ldz, integer *isuppz, doublereal *work, - integer *lwork, integer *iwork, integer *liwork, integer *info); - -/* Subroutine */ int dstein_(integer *n, doublereal *d__, doublereal *e, - integer *m, doublereal *w, integer *iblock, integer *isplit, - doublereal *z__, integer *ldz, doublereal *work, integer *iwork, - integer *ifail, integer *info); - -/* Subroutine */ int dsteqr_(char *compz, integer *n, doublereal *d__, - doublereal *e, doublereal *z__, integer *ldz, doublereal *work, - integer *info); - -/* Subroutine */ int dsterf_(integer *n, doublereal *d__, doublereal *e, - integer *info); - -/* Subroutine */ int dstev_(char *jobz, integer *n, doublereal *d__, - doublereal *e, doublereal *z__, integer *ldz, doublereal *work, - integer *info); - -/* Subroutine */ int dstevd_(char *jobz, integer *n, doublereal *d__, - doublereal *e, doublereal *z__, integer *ldz, doublereal *work, - integer *lwork, integer *iwork, integer *liwork, integer *info); - -/* Subroutine */ int dstevr_(char *jobz, char *range, integer *n, doublereal * - d__, doublereal *e, doublereal *vl, doublereal *vu, integer *il, - integer *iu, doublereal *abstol, integer *m, doublereal *w, - doublereal *z__, integer *ldz, integer *isuppz, doublereal *work, - integer *lwork, integer *iwork, integer *liwork, integer *info); - -/* Subroutine */ int dstevx_(char *jobz, char *range, integer *n, doublereal * - d__, doublereal *e, doublereal *vl, doublereal *vu, integer *il, - integer *iu, doublereal *abstol, integer *m, doublereal *w, - doublereal *z__, integer *ldz, doublereal *work, integer *iwork, - integer *ifail, integer *info); - -/* Subroutine */ int dsycon_(char *uplo, integer *n, doublereal *a, integer * - lda, integer *ipiv, doublereal *anorm, doublereal *rcond, doublereal * - work, integer *iwork, integer *info); - -/* Subroutine */ int dsyev_(char *jobz, char *uplo, integer *n, doublereal *a, - integer *lda, doublereal *w, doublereal *work, integer *lwork, - integer *info); - -/* Subroutine */ int dsyevd_(char *jobz, char *uplo, integer *n, doublereal * - a, integer *lda, doublereal *w, doublereal *work, integer *lwork, - integer *iwork, integer *liwork, integer *info); - -/* Subroutine */ int dsyevr_(char *jobz, char *range, char *uplo, integer *n, - doublereal *a, integer *lda, doublereal *vl, doublereal *vu, integer * - il, integer *iu, doublereal *abstol, integer *m, doublereal *w, - doublereal *z__, integer *ldz, integer *isuppz, doublereal *work, - integer *lwork, integer *iwork, integer *liwork, integer *info); - -/* Subroutine */ int dsyevx_(char *jobz, char *range, char *uplo, integer *n, - doublereal *a, integer *lda, doublereal *vl, doublereal *vu, integer * - il, integer *iu, doublereal *abstol, integer *m, doublereal *w, - doublereal *z__, integer *ldz, doublereal *work, integer *lwork, - integer *iwork, integer *ifail, integer *info); - -/* Subroutine */ int dsygs2_(integer *itype, char *uplo, integer *n, - doublereal *a, integer *lda, doublereal *b, integer *ldb, integer * - info); - -/* Subroutine */ int dsygst_(integer *itype, char *uplo, integer *n, - doublereal *a, integer *lda, doublereal *b, integer *ldb, integer * - info); - -/* Subroutine */ int dsygv_(integer *itype, char *jobz, char *uplo, integer * - n, doublereal *a, integer *lda, doublereal *b, integer *ldb, - doublereal *w, doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dsygvd_(integer *itype, char *jobz, char *uplo, integer * - n, doublereal *a, integer *lda, doublereal *b, integer *ldb, - doublereal *w, doublereal *work, integer *lwork, integer *iwork, - integer *liwork, integer *info); - -/* Subroutine */ int dsygvx_(integer *itype, char *jobz, char *range, char * - uplo, integer *n, doublereal *a, integer *lda, doublereal *b, integer - *ldb, doublereal *vl, doublereal *vu, integer *il, integer *iu, - doublereal *abstol, integer *m, doublereal *w, doublereal *z__, - integer *ldz, doublereal *work, integer *lwork, integer *iwork, - integer *ifail, integer *info); - -/* Subroutine */ int dsyrfs_(char *uplo, integer *n, integer *nrhs, - doublereal *a, integer *lda, doublereal *af, integer *ldaf, integer * - ipiv, doublereal *b, integer *ldb, doublereal *x, integer *ldx, - doublereal *ferr, doublereal *berr, doublereal *work, integer *iwork, - integer *info); - -/* Subroutine */ int dsysv_(char *uplo, integer *n, integer *nrhs, doublereal - *a, integer *lda, integer *ipiv, doublereal *b, integer *ldb, - doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dsysvx_(char *fact, char *uplo, integer *n, integer * - nrhs, doublereal *a, integer *lda, doublereal *af, integer *ldaf, - integer *ipiv, doublereal *b, integer *ldb, doublereal *x, integer * - ldx, doublereal *rcond, doublereal *ferr, doublereal *berr, - doublereal *work, integer *lwork, integer *iwork, integer *info); - -/* Subroutine */ int dsytd2_(char *uplo, integer *n, doublereal *a, integer * - lda, doublereal *d__, doublereal *e, doublereal *tau, integer *info); - -/* Subroutine */ int dsytf2_(char *uplo, integer *n, doublereal *a, integer * - lda, integer *ipiv, integer *info); - -/* Subroutine */ int dsytrd_(char *uplo, integer *n, doublereal *a, integer * - lda, doublereal *d__, doublereal *e, doublereal *tau, doublereal * - work, integer *lwork, integer *info); - -/* Subroutine */ int dsytrf_(char *uplo, integer *n, doublereal *a, integer * - lda, integer *ipiv, doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dsytri_(char *uplo, integer *n, doublereal *a, integer * - lda, integer *ipiv, doublereal *work, integer *info); - -/* Subroutine */ int dsytrs_(char *uplo, integer *n, integer *nrhs, - doublereal *a, integer *lda, integer *ipiv, doublereal *b, integer * - ldb, integer *info); - -/* Subroutine */ int dtbcon_(char *norm, char *uplo, char *diag, integer *n, - integer *kd, doublereal *ab, integer *ldab, doublereal *rcond, - doublereal *work, integer *iwork, integer *info); - -/* Subroutine */ int dtbrfs_(char *uplo, char *trans, char *diag, integer *n, - integer *kd, integer *nrhs, doublereal *ab, integer *ldab, doublereal - *b, integer *ldb, doublereal *x, integer *ldx, doublereal *ferr, - doublereal *berr, doublereal *work, integer *iwork, integer *info); - -/* Subroutine */ int dtbtrs_(char *uplo, char *trans, char *diag, integer *n, - integer *kd, integer *nrhs, doublereal *ab, integer *ldab, doublereal - *b, integer *ldb, integer *info); - -/* Subroutine */ int dtgevc_(char *side, char *howmny, logical *select, - integer *n, doublereal *a, integer *lda, doublereal *b, integer *ldb, - doublereal *vl, integer *ldvl, doublereal *vr, integer *ldvr, integer - *mm, integer *m, doublereal *work, integer *info); - -/* Subroutine */ int dtgex2_(logical *wantq, logical *wantz, integer *n, - doublereal *a, integer *lda, doublereal *b, integer *ldb, doublereal * - q, integer *ldq, doublereal *z__, integer *ldz, integer *j1, integer * - n1, integer *n2, doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dtgexc_(logical *wantq, logical *wantz, integer *n, - doublereal *a, integer *lda, doublereal *b, integer *ldb, doublereal * - q, integer *ldq, doublereal *z__, integer *ldz, integer *ifst, - integer *ilst, doublereal *work, integer *lwork, integer *info); - -/* Subroutine */ int dtgsen_(integer *ijob, logical *wantq, logical *wantz, - logical *select, integer *n, doublereal *a, integer *lda, doublereal * - b, integer *ldb, doublereal *alphar, doublereal *alphai, doublereal * - beta, doublereal *q, integer *ldq, doublereal *z__, integer *ldz, - integer *m, doublereal *pl, doublereal *pr, doublereal *dif, - doublereal *work, integer *lwork, integer *iwork, integer *liwork, - integer *info); - -/* Subroutine */ int dtgsja_(char *jobu, char *jobv, char *jobq, integer *m, - integer *p, integer *n, integer *k, integer *l, doublereal *a, - integer *lda, doublereal *b, integer *ldb, doublereal *tola, - doublereal *tolb, doublereal *alpha, doublereal *beta, doublereal *u, - integer *ldu, doublereal *v, integer *ldv, doublereal *q, integer * - ldq, doublereal *work, integer *ncycle, integer *info); - -/* Subroutine */ int dtgsna_(char *job, char *howmny, logical *select, - integer *n, doublereal *a, integer *lda, doublereal *b, integer *ldb, - doublereal *vl, integer *ldvl, doublereal *vr, integer *ldvr, - doublereal *s, doublereal *dif, integer *mm, integer *m, doublereal * - work, integer *lwork, integer *iwork, integer *info); - -/* Subroutine */ int dtgsy2_(char *trans, integer *ijob, integer *m, integer * - n, doublereal *a, integer *lda, doublereal *b, integer *ldb, - doublereal *c__, integer *ldc, doublereal *d__, integer *ldd, - doublereal *e, integer *lde, doublereal *f, integer *ldf, doublereal * - scale, doublereal *rdsum, doublereal *rdscal, integer *iwork, integer - *pq, integer *info); - -/* Subroutine */ int dtgsyl_(char *trans, integer *ijob, integer *m, integer * - n, doublereal *a, integer *lda, doublereal *b, integer *ldb, - doublereal *c__, integer *ldc, doublereal *d__, integer *ldd, - doublereal *e, integer *lde, doublereal *f, integer *ldf, doublereal * - scale, doublereal *dif, doublereal *work, integer *lwork, integer * - iwork, integer *info); - -/* Subroutine */ int dtpcon_(char *norm, char *uplo, char *diag, integer *n, - doublereal *ap, doublereal *rcond, doublereal *work, integer *iwork, - integer *info); - -/* Subroutine */ int dtprfs_(char *uplo, char *trans, char *diag, integer *n, - integer *nrhs, doublereal *ap, doublereal *b, integer *ldb, - doublereal *x, integer *ldx, doublereal *ferr, doublereal *berr, - doublereal *work, integer *iwork, integer *info); - -/* Subroutine */ int dtptri_(char *uplo, char *diag, integer *n, doublereal * - ap, integer *info); - -/* Subroutine */ int dtptrs_(char *uplo, char *trans, char *diag, integer *n, - integer *nrhs, doublereal *ap, doublereal *b, integer *ldb, integer * - info); - -/* Subroutine */ int dtrcon_(char *norm, char *uplo, char *diag, integer *n, - doublereal *a, integer *lda, doublereal *rcond, doublereal *work, - integer *iwork, integer *info); - -/* Subroutine */ int dtrevc_(char *side, char *howmny, logical *select, - integer *n, doublereal *t, integer *ldt, doublereal *vl, integer * - ldvl, doublereal *vr, integer *ldvr, integer *mm, integer *m, - doublereal *work, integer *info); - -/* Subroutine */ int dtrexc_(char *compq, integer *n, doublereal *t, integer * - ldt, doublereal *q, integer *ldq, integer *ifst, integer *ilst, - doublereal *work, integer *info); - -/* Subroutine */ int dtrrfs_(char *uplo, char *trans, char *diag, integer *n, - integer *nrhs, doublereal *a, integer *lda, doublereal *b, integer * - ldb, doublereal *x, integer *ldx, doublereal *ferr, doublereal *berr, - doublereal *work, integer *iwork, integer *info); - -/* Subroutine */ int dtrsen_(char *job, char *compq, logical *select, integer - *n, doublereal *t, integer *ldt, doublereal *q, integer *ldq, - doublereal *wr, doublereal *wi, integer *m, doublereal *s, doublereal - *sep, doublereal *work, integer *lwork, integer *iwork, integer * - liwork, integer *info); - -/* Subroutine */ int dtrsna_(char *job, char *howmny, logical *select, - integer *n, doublereal *t, integer *ldt, doublereal *vl, integer * - ldvl, doublereal *vr, integer *ldvr, doublereal *s, doublereal *sep, - integer *mm, integer *m, doublereal *work, integer *ldwork, integer * - iwork, integer *info); - -/* Subroutine */ int dtrsyl_(char *trana, char *tranb, integer *isgn, integer - *m, integer *n, doublereal *a, integer *lda, doublereal *b, integer * - ldb, doublereal *c__, integer *ldc, doublereal *scale, integer *info); - -/* Subroutine */ int dtrti2_(char *uplo, char *diag, integer *n, doublereal * - a, integer *lda, integer *info); - -/* Subroutine */ int dtrtri_(char *uplo, char *diag, integer *n, doublereal * - a, integer *lda, integer *info); - -/* Subroutine */ int dtrtrs_(char *uplo, char *trans, char *diag, integer *n, - integer *nrhs, doublereal *a, integer *lda, doublereal *b, integer * - ldb, integer *info); - -/* Subroutine */ int dtzrqf_(integer *m, integer *n, doublereal *a, integer * - lda, doublereal *tau, integer *info); - -/* Subroutine */ int dtzrzf_(integer *m, integer *n, doublereal *a, integer * - lda, doublereal *tau, doublereal *work, integer *lwork, integer *info); - -integer icmax1_(integer *n, complex *cx, integer *incx); - -integer ieeeck_(integer *ispec, real *zero, real *one); - -integer ilaenv_(integer *ispec, char *name__, char *opts, integer *n1, - integer *n2, integer *n3, integer *n4, ftnlen name_len, ftnlen - opts_len); - -integer izmax1_(integer *n, doublecomplex *cx, integer *incx); - -/* Subroutine */ int sbdsdc_(char *uplo, char *compq, integer *n, real *d__, - real *e, real *u, integer *ldu, real *vt, integer *ldvt, real *q, - integer *iq, real *work, integer *iwork, integer *info); - -/* Subroutine */ int sbdsqr_(char *uplo, integer *n, integer *ncvt, integer * - nru, integer *ncc, real *d__, real *e, real *vt, integer *ldvt, real * - u, integer *ldu, real *c__, integer *ldc, real *work, integer *info); - -/* Subroutine */ int sdisna_(char *job, integer *m, integer *n, real *d__, - real *sep, integer *info); - -/* Subroutine */ int sgbbrd_(char *vect, integer *m, integer *n, integer *ncc, - integer *kl, integer *ku, real *ab, integer *ldab, real *d__, real * - e, real *q, integer *ldq, real *pt, integer *ldpt, real *c__, integer - *ldc, real *work, integer *info); - -/* Subroutine */ int sgbcon_(char *norm, integer *n, integer *kl, integer *ku, - real *ab, integer *ldab, integer *ipiv, real *anorm, real *rcond, - real *work, integer *iwork, integer *info); - -/* Subroutine */ int sgbequ_(integer *m, integer *n, integer *kl, integer *ku, - real *ab, integer *ldab, real *r__, real *c__, real *rowcnd, real * - colcnd, real *amax, integer *info); - -/* Subroutine */ int sgbrfs_(char *trans, integer *n, integer *kl, integer * - ku, integer *nrhs, real *ab, integer *ldab, real *afb, integer *ldafb, - integer *ipiv, real *b, integer *ldb, real *x, integer *ldx, real * - ferr, real *berr, real *work, integer *iwork, integer *info); - -/* Subroutine */ int sgbsv_(integer *n, integer *kl, integer *ku, integer * - nrhs, real *ab, integer *ldab, integer *ipiv, real *b, integer *ldb, - integer *info); - -/* Subroutine */ int sgbsvx_(char *fact, char *trans, integer *n, integer *kl, - integer *ku, integer *nrhs, real *ab, integer *ldab, real *afb, - integer *ldafb, integer *ipiv, char *equed, real *r__, real *c__, - real *b, integer *ldb, real *x, integer *ldx, real *rcond, real *ferr, - real *berr, real *work, integer *iwork, integer *info); - -/* Subroutine */ int sgbtf2_(integer *m, integer *n, integer *kl, integer *ku, - real *ab, integer *ldab, integer *ipiv, integer *info); - -/* Subroutine */ int sgbtrf_(integer *m, integer *n, integer *kl, integer *ku, - real *ab, integer *ldab, integer *ipiv, integer *info); - -/* Subroutine */ int sgbtrs_(char *trans, integer *n, integer *kl, integer * - ku, integer *nrhs, real *ab, integer *ldab, integer *ipiv, real *b, - integer *ldb, integer *info); - -/* Subroutine */ int sgebak_(char *job, char *side, integer *n, integer *ilo, - integer *ihi, real *scale, integer *m, real *v, integer *ldv, integer - *info); - -/* Subroutine */ int sgebal_(char *job, integer *n, real *a, integer *lda, - integer *ilo, integer *ihi, real *scale, integer *info); - -/* Subroutine */ int sgebd2_(integer *m, integer *n, real *a, integer *lda, - real *d__, real *e, real *tauq, real *taup, real *work, integer *info); - -/* Subroutine */ int sgebrd_(integer *m, integer *n, real *a, integer *lda, - real *d__, real *e, real *tauq, real *taup, real *work, integer * - lwork, integer *info); - -/* Subroutine */ int sgecon_(char *norm, integer *n, real *a, integer *lda, - real *anorm, real *rcond, real *work, integer *iwork, integer *info); - -/* Subroutine */ int sgeequ_(integer *m, integer *n, real *a, integer *lda, - real *r__, real *c__, real *rowcnd, real *colcnd, real *amax, integer - *info); - -/* Subroutine */ int sgees_(char *jobvs, char *sort, L_fp select, integer *n, - real *a, integer *lda, integer *sdim, real *wr, real *wi, real *vs, - integer *ldvs, real *work, integer *lwork, logical *bwork, integer * - info); - -/* Subroutine */ int sgeesx_(char *jobvs, char *sort, L_fp select, char * - sense, integer *n, real *a, integer *lda, integer *sdim, real *wr, - real *wi, real *vs, integer *ldvs, real *rconde, real *rcondv, real * - work, integer *lwork, integer *iwork, integer *liwork, logical *bwork, - integer *info); - -/* Subroutine */ int sgeev_(char *jobvl, char *jobvr, integer *n, real *a, - integer *lda, real *wr, real *wi, real *vl, integer *ldvl, real *vr, - integer *ldvr, real *work, integer *lwork, integer *info); - -/* Subroutine */ int sgeevx_(char *balanc, char *jobvl, char *jobvr, char * - sense, integer *n, real *a, integer *lda, real *wr, real *wi, real * - vl, integer *ldvl, real *vr, integer *ldvr, integer *ilo, integer * - ihi, real *scale, real *abnrm, real *rconde, real *rcondv, real *work, - integer *lwork, integer *iwork, integer *info); - -/* Subroutine */ int sgegs_(char *jobvsl, char *jobvsr, integer *n, real *a, - integer *lda, real *b, integer *ldb, real *alphar, real *alphai, real - *beta, real *vsl, integer *ldvsl, real *vsr, integer *ldvsr, real * - work, integer *lwork, integer *info); - -/* Subroutine */ int sgegv_(char *jobvl, char *jobvr, integer *n, real *a, - integer *lda, real *b, integer *ldb, real *alphar, real *alphai, real - *beta, real *vl, integer *ldvl, real *vr, integer *ldvr, real *work, - integer *lwork, integer *info); - -/* Subroutine */ int sgehd2_(integer *n, integer *ilo, integer *ihi, real *a, - integer *lda, real *tau, real *work, integer *info); - -/* Subroutine */ int sgehrd_(integer *n, integer *ilo, integer *ihi, real *a, - integer *lda, real *tau, real *work, integer *lwork, integer *info); - -/* Subroutine */ int sgelq2_(integer *m, integer *n, real *a, integer *lda, - real *tau, real *work, integer *info); - -/* Subroutine */ int sgelqf_(integer *m, integer *n, real *a, integer *lda, - real *tau, real *work, integer *lwork, integer *info); - -/* Subroutine */ int sgels_(char *trans, integer *m, integer *n, integer * - nrhs, real *a, integer *lda, real *b, integer *ldb, real *work, - integer *lwork, integer *info); - -/* Subroutine */ int sgelsd_(integer *m, integer *n, integer *nrhs, real *a, - integer *lda, real *b, integer *ldb, real *s, real *rcond, integer * - rank, real *work, integer *lwork, integer *iwork, integer *info); - -/* Subroutine */ int sgelss_(integer *m, integer *n, integer *nrhs, real *a, - integer *lda, real *b, integer *ldb, real *s, real *rcond, integer * - rank, real *work, integer *lwork, integer *info); - -/* Subroutine */ int sgelsx_(integer *m, integer *n, integer *nrhs, real *a, - integer *lda, real *b, integer *ldb, integer *jpvt, real *rcond, - integer *rank, real *work, integer *info); - -/* Subroutine */ int sgelsy_(integer *m, integer *n, integer *nrhs, real *a, - integer *lda, real *b, integer *ldb, integer *jpvt, real *rcond, - integer *rank, real *work, integer *lwork, integer *info); - -/* Subroutine */ int sgeql2_(integer *m, integer *n, real *a, integer *lda, - real *tau, real *work, integer *info); - -/* Subroutine */ int sgeqlf_(integer *m, integer *n, real *a, integer *lda, - real *tau, real *work, integer *lwork, integer *info); - -/* Subroutine */ int sgeqp3_(integer *m, integer *n, real *a, integer *lda, - integer *jpvt, real *tau, real *work, integer *lwork, integer *info); - -/* Subroutine */ int sgeqpf_(integer *m, integer *n, real *a, integer *lda, - integer *jpvt, real *tau, real *work, integer *info); - -/* Subroutine */ int sgeqr2_(integer *m, integer *n, real *a, integer *lda, - real *tau, real *work, integer *info); - -/* Subroutine */ int sgeqrf_(integer *m, integer *n, real *a, integer *lda, - real *tau, real *work, integer *lwork, integer *info); - -/* Subroutine */ int sgerfs_(char *trans, integer *n, integer *nrhs, real *a, - integer *lda, real *af, integer *ldaf, integer *ipiv, real *b, - integer *ldb, real *x, integer *ldx, real *ferr, real *berr, real * - work, integer *iwork, integer *info); - -/* Subroutine */ int sgerq2_(integer *m, integer *n, real *a, integer *lda, - real *tau, real *work, integer *info); - -/* Subroutine */ int sgerqf_(integer *m, integer *n, real *a, integer *lda, - real *tau, real *work, integer *lwork, integer *info); - -/* Subroutine */ int sgesc2_(integer *n, real *a, integer *lda, real *rhs, - integer *ipiv, integer *jpiv, real *scale); - -/* Subroutine */ int sgesdd_(char *jobz, integer *m, integer *n, real *a, - integer *lda, real *s, real *u, integer *ldu, real *vt, integer *ldvt, - real *work, integer *lwork, integer *iwork, integer *info); - -/* Subroutine */ int sgesv_(integer *n, integer *nrhs, real *a, integer *lda, - integer *ipiv, real *b, integer *ldb, integer *info); - -/* Subroutine */ int sgesvd_(char *jobu, char *jobvt, integer *m, integer *n, - real *a, integer *lda, real *s, real *u, integer *ldu, real *vt, - integer *ldvt, real *work, integer *lwork, integer *info); - -/* Subroutine */ int sgesvx_(char *fact, char *trans, integer *n, integer * - nrhs, real *a, integer *lda, real *af, integer *ldaf, integer *ipiv, - char *equed, real *r__, real *c__, real *b, integer *ldb, real *x, - integer *ldx, real *rcond, real *ferr, real *berr, real *work, - integer *iwork, integer *info); - -/* Subroutine */ int sgetc2_(integer *n, real *a, integer *lda, integer *ipiv, - integer *jpiv, integer *info); - -/* Subroutine */ int sgetf2_(integer *m, integer *n, real *a, integer *lda, - integer *ipiv, integer *info); - -/* Subroutine */ int sgetrf_(integer *m, integer *n, real *a, integer *lda, - integer *ipiv, integer *info); - -/* Subroutine */ int sgetri_(integer *n, real *a, integer *lda, integer *ipiv, - real *work, integer *lwork, integer *info); - -/* Subroutine */ int sgetrs_(char *trans, integer *n, integer *nrhs, real *a, - integer *lda, integer *ipiv, real *b, integer *ldb, integer *info); - -/* Subroutine */ int sggbak_(char *job, char *side, integer *n, integer *ilo, - integer *ihi, real *lscale, real *rscale, integer *m, real *v, - integer *ldv, integer *info); - -/* Subroutine */ int sggbal_(char *job, integer *n, real *a, integer *lda, - real *b, integer *ldb, integer *ilo, integer *ihi, real *lscale, real - *rscale, real *work, integer *info); - -/* Subroutine */ int sgges_(char *jobvsl, char *jobvsr, char *sort, L_fp - selctg, integer *n, real *a, integer *lda, real *b, integer *ldb, - integer *sdim, real *alphar, real *alphai, real *beta, real *vsl, - integer *ldvsl, real *vsr, integer *ldvsr, real *work, integer *lwork, - logical *bwork, integer *info); - -/* Subroutine */ int sggesx_(char *jobvsl, char *jobvsr, char *sort, L_fp - selctg, char *sense, integer *n, real *a, integer *lda, real *b, - integer *ldb, integer *sdim, real *alphar, real *alphai, real *beta, - real *vsl, integer *ldvsl, real *vsr, integer *ldvsr, real *rconde, - real *rcondv, real *work, integer *lwork, integer *iwork, integer * - liwork, logical *bwork, integer *info); - -/* Subroutine */ int sggev_(char *jobvl, char *jobvr, integer *n, real *a, - integer *lda, real *b, integer *ldb, real *alphar, real *alphai, real - *beta, real *vl, integer *ldvl, real *vr, integer *ldvr, real *work, - integer *lwork, integer *info); - -/* Subroutine */ int sggevx_(char *balanc, char *jobvl, char *jobvr, char * - sense, integer *n, real *a, integer *lda, real *b, integer *ldb, real - *alphar, real *alphai, real *beta, real *vl, integer *ldvl, real *vr, - integer *ldvr, integer *ilo, integer *ihi, real *lscale, real *rscale, - real *abnrm, real *bbnrm, real *rconde, real *rcondv, real *work, - integer *lwork, integer *iwork, logical *bwork, integer *info); - -/* Subroutine */ int sggglm_(integer *n, integer *m, integer *p, real *a, - integer *lda, real *b, integer *ldb, real *d__, real *x, real *y, - real *work, integer *lwork, integer *info); - -/* Subroutine */ int sgghrd_(char *compq, char *compz, integer *n, integer * - ilo, integer *ihi, real *a, integer *lda, real *b, integer *ldb, real - *q, integer *ldq, real *z__, integer *ldz, integer *info); - -/* Subroutine */ int sgglse_(integer *m, integer *n, integer *p, real *a, - integer *lda, real *b, integer *ldb, real *c__, real *d__, real *x, - real *work, integer *lwork, integer *info); - -/* Subroutine */ int sggqrf_(integer *n, integer *m, integer *p, real *a, - integer *lda, real *taua, real *b, integer *ldb, real *taub, real * - work, integer *lwork, integer *info); - -/* Subroutine */ int sggrqf_(integer *m, integer *p, integer *n, real *a, - integer *lda, real *taua, real *b, integer *ldb, real *taub, real * - work, integer *lwork, integer *info); - -/* Subroutine */ int sggsvd_(char *jobu, char *jobv, char *jobq, integer *m, - integer *n, integer *p, integer *k, integer *l, real *a, integer *lda, - real *b, integer *ldb, real *alpha, real *beta, real *u, integer * - ldu, real *v, integer *ldv, real *q, integer *ldq, real *work, - integer *iwork, integer *info); - -/* Subroutine */ int sggsvp_(char *jobu, char *jobv, char *jobq, integer *m, - integer *p, integer *n, real *a, integer *lda, real *b, integer *ldb, - real *tola, real *tolb, integer *k, integer *l, real *u, integer *ldu, - real *v, integer *ldv, real *q, integer *ldq, integer *iwork, real * - tau, real *work, integer *info); - -/* Subroutine */ int sgtcon_(char *norm, integer *n, real *dl, real *d__, - real *du, real *du2, integer *ipiv, real *anorm, real *rcond, real * - work, integer *iwork, integer *info); - -/* Subroutine */ int sgtrfs_(char *trans, integer *n, integer *nrhs, real *dl, - real *d__, real *du, real *dlf, real *df, real *duf, real *du2, - integer *ipiv, real *b, integer *ldb, real *x, integer *ldx, real * - ferr, real *berr, real *work, integer *iwork, integer *info); - -/* Subroutine */ int sgtsv_(integer *n, integer *nrhs, real *dl, real *d__, - real *du, real *b, integer *ldb, integer *info); - -/* Subroutine */ int sgtsvx_(char *fact, char *trans, integer *n, integer * - nrhs, real *dl, real *d__, real *du, real *dlf, real *df, real *duf, - real *du2, integer *ipiv, real *b, integer *ldb, real *x, integer * - ldx, real *rcond, real *ferr, real *berr, real *work, integer *iwork, - integer *info); - -/* Subroutine */ int sgttrf_(integer *n, real *dl, real *d__, real *du, real * - du2, integer *ipiv, integer *info); - -/* Subroutine */ int sgttrs_(char *trans, integer *n, integer *nrhs, real *dl, - real *d__, real *du, real *du2, integer *ipiv, real *b, integer *ldb, - integer *info); - -/* Subroutine */ int sgtts2_(integer *itrans, integer *n, integer *nrhs, real - *dl, real *d__, real *du, real *du2, integer *ipiv, real *b, integer * - ldb); - -/* Subroutine */ int shgeqz_(char *job, char *compq, char *compz, integer *n, - integer *ilo, integer *ihi, real *a, integer *lda, real *b, integer * - ldb, real *alphar, real *alphai, real *beta, real *q, integer *ldq, - real *z__, integer *ldz, real *work, integer *lwork, integer *info); - -/* Subroutine */ int shsein_(char *side, char *eigsrc, char *initv, logical * - select, integer *n, real *h__, integer *ldh, real *wr, real *wi, real - *vl, integer *ldvl, real *vr, integer *ldvr, integer *mm, integer *m, - real *work, integer *ifaill, integer *ifailr, integer *info); - -/* Subroutine */ int shseqr_(char *job, char *compz, integer *n, integer *ilo, - integer *ihi, real *h__, integer *ldh, real *wr, real *wi, real *z__, - integer *ldz, real *work, integer *lwork, integer *info); - -/* Subroutine */ int slabad_(real *small, real *large); - -/* Subroutine */ int slabrd_(integer *m, integer *n, integer *nb, real *a, - integer *lda, real *d__, real *e, real *tauq, real *taup, real *x, - integer *ldx, real *y, integer *ldy); - -/* Subroutine */ int slacon_(integer *n, real *v, real *x, integer *isgn, - real *est, integer *kase); - -/* Subroutine */ int slacpy_(char *uplo, integer *m, integer *n, real *a, - integer *lda, real *b, integer *ldb); - -/* Subroutine */ int sladiv_(real *a, real *b, real *c__, real *d__, real *p, - real *q); - -/* Subroutine */ int slae2_(real *a, real *b, real *c__, real *rt1, real *rt2); - -/* Subroutine */ int slaebz_(integer *ijob, integer *nitmax, integer *n, - integer *mmax, integer *minp, integer *nbmin, real *abstol, real * - reltol, real *pivmin, real *d__, real *e, real *e2, integer *nval, - real *ab, real *c__, integer *mout, integer *nab, real *work, integer - *iwork, integer *info); - -/* Subroutine */ int slaed0_(integer *icompq, integer *qsiz, integer *n, real - *d__, real *e, real *q, integer *ldq, real *qstore, integer *ldqs, - real *work, integer *iwork, integer *info); - -/* Subroutine */ int slaed1_(integer *n, real *d__, real *q, integer *ldq, - integer *indxq, real *rho, integer *cutpnt, real *work, integer * - iwork, integer *info); - -/* Subroutine */ int slaed2_(integer *k, integer *n, integer *n1, real *d__, - real *q, integer *ldq, integer *indxq, real *rho, real *z__, real * - dlamda, real *w, real *q2, integer *indx, integer *indxc, integer * - indxp, integer *coltyp, integer *info); - -/* Subroutine */ int slaed3_(integer *k, integer *n, integer *n1, real *d__, - real *q, integer *ldq, real *rho, real *dlamda, real *q2, integer * - indx, integer *ctot, real *w, real *s, integer *info); - -/* Subroutine */ int slaed4_(integer *n, integer *i__, real *d__, real *z__, - real *delta, real *rho, real *dlam, integer *info); - -/* Subroutine */ int slaed5_(integer *i__, real *d__, real *z__, real *delta, - real *rho, real *dlam); - -/* Subroutine */ int slaed6_(integer *kniter, logical *orgati, real *rho, - real *d__, real *z__, real *finit, real *tau, integer *info); - -/* Subroutine */ int slaed7_(integer *icompq, integer *n, integer *qsiz, - integer *tlvls, integer *curlvl, integer *curpbm, real *d__, real *q, - integer *ldq, integer *indxq, real *rho, integer *cutpnt, real * - qstore, integer *qptr, integer *prmptr, integer *perm, integer * - givptr, integer *givcol, real *givnum, real *work, integer *iwork, - integer *info); - -/* Subroutine */ int slaed8_(integer *icompq, integer *k, integer *n, integer - *qsiz, real *d__, real *q, integer *ldq, integer *indxq, real *rho, - integer *cutpnt, real *z__, real *dlamda, real *q2, integer *ldq2, - real *w, integer *perm, integer *givptr, integer *givcol, real * - givnum, integer *indxp, integer *indx, integer *info); - -/* Subroutine */ int slaed9_(integer *k, integer *kstart, integer *kstop, - integer *n, real *d__, real *q, integer *ldq, real *rho, real *dlamda, - real *w, real *s, integer *lds, integer *info); - -/* Subroutine */ int slaeda_(integer *n, integer *tlvls, integer *curlvl, - integer *curpbm, integer *prmptr, integer *perm, integer *givptr, - integer *givcol, real *givnum, real *q, integer *qptr, real *z__, - real *ztemp, integer *info); - -/* Subroutine */ int slaein_(logical *rightv, logical *noinit, integer *n, - real *h__, integer *ldh, real *wr, real *wi, real *vr, real *vi, real - *b, integer *ldb, real *work, real *eps3, real *smlnum, real *bignum, - integer *info); - -/* Subroutine */ int slaev2_(real *a, real *b, real *c__, real *rt1, real * - rt2, real *cs1, real *sn1); - -/* Subroutine */ int slaexc_(logical *wantq, integer *n, real *t, integer * - ldt, real *q, integer *ldq, integer *j1, integer *n1, integer *n2, - real *work, integer *info); - -/* Subroutine */ int slag2_(real *a, integer *lda, real *b, integer *ldb, - real *safmin, real *scale1, real *scale2, real *wr1, real *wr2, real * - wi); - -/* Subroutine */ int slags2_(logical *upper, real *a1, real *a2, real *a3, - real *b1, real *b2, real *b3, real *csu, real *snu, real *csv, real * - snv, real *csq, real *snq); - -/* Subroutine */ int slagtf_(integer *n, real *a, real *lambda, real *b, real - *c__, real *tol, real *d__, integer *in, integer *info); - -/* Subroutine */ int slagtm_(char *trans, integer *n, integer *nrhs, real * - alpha, real *dl, real *d__, real *du, real *x, integer *ldx, real * - beta, real *b, integer *ldb); - -/* Subroutine */ int slagts_(integer *job, integer *n, real *a, real *b, real - *c__, real *d__, integer *in, real *y, real *tol, integer *info); - -/* Subroutine */ int slagv2_(real *a, integer *lda, real *b, integer *ldb, - real *alphar, real *alphai, real *beta, real *csl, real *snl, real * - csr, real *snr); - -/* Subroutine */ int slahqr_(logical *wantt, logical *wantz, integer *n, - integer *ilo, integer *ihi, real *h__, integer *ldh, real *wr, real * - wi, integer *iloz, integer *ihiz, real *z__, integer *ldz, integer * - info); - -/* Subroutine */ int slahrd_(integer *n, integer *k, integer *nb, real *a, - integer *lda, real *tau, real *t, integer *ldt, real *y, integer *ldy); - -/* Subroutine */ int slaic1_(integer *job, integer *j, real *x, real *sest, - real *w, real *gamma, real *sestpr, real *s, real *c__); - -/* Subroutine */ int slaln2_(logical *ltrans, integer *na, integer *nw, real * - smin, real *ca, real *a, integer *lda, real *d1, real *d2, real *b, - integer *ldb, real *wr, real *wi, real *x, integer *ldx, real *scale, - real *xnorm, integer *info); - -/* Subroutine */ int slals0_(integer *icompq, integer *nl, integer *nr, - integer *sqre, integer *nrhs, real *b, integer *ldb, real *bx, - integer *ldbx, integer *perm, integer *givptr, integer *givcol, - integer *ldgcol, real *givnum, integer *ldgnum, real *poles, real * - difl, real *difr, real *z__, integer *k, real *c__, real *s, real * - work, integer *info); - -/* Subroutine */ int slalsa_(integer *icompq, integer *smlsiz, integer *n, - integer *nrhs, real *b, integer *ldb, real *bx, integer *ldbx, real * - u, integer *ldu, real *vt, integer *k, real *difl, real *difr, real * - z__, real *poles, integer *givptr, integer *givcol, integer *ldgcol, - integer *perm, real *givnum, real *c__, real *s, real *work, integer * - iwork, integer *info); - -/* Subroutine */ int slalsd_(char *uplo, integer *smlsiz, integer *n, integer - *nrhs, real *d__, real *e, real *b, integer *ldb, real *rcond, - integer *rank, real *work, integer *iwork, integer *info); - -/* Subroutine */ int slamc1_(integer *beta, integer *t, logical *rnd, logical - *ieee1); - -/* Subroutine */ int slamc2_(integer *beta, integer *t, logical *rnd, real * - eps, integer *emin, real *rmin, integer *emax, real *rmax); - -/* Subroutine */ int slamc4_(integer *emin, real *start, integer *base); - -/* Subroutine */ int slamc5_(integer *beta, integer *p, integer *emin, - logical *ieee, integer *emax, real *rmax); - -/* Subroutine */ int slamrg_(integer *n1, integer *n2, real *a, integer * - strd1, integer *strd2, integer *index); - -/* Subroutine */ int slanv2_(real *a, real *b, real *c__, real *d__, real * - rt1r, real *rt1i, real *rt2r, real *rt2i, real *cs, real *sn); - -/* Subroutine */ int slapll_(integer *n, real *x, integer *incx, real *y, - integer *incy, real *ssmin); - -/* Subroutine */ int slapmt_(logical *forwrd, integer *m, integer *n, real *x, - integer *ldx, integer *k); - -/* Subroutine */ int slaqgb_(integer *m, integer *n, integer *kl, integer *ku, - real *ab, integer *ldab, real *r__, real *c__, real *rowcnd, real * - colcnd, real *amax, char *equed); - -/* Subroutine */ int slaqge_(integer *m, integer *n, real *a, integer *lda, - real *r__, real *c__, real *rowcnd, real *colcnd, real *amax, char * - equed); - -/* Subroutine */ int slaqp2_(integer *m, integer *n, integer *offset, real *a, - integer *lda, integer *jpvt, real *tau, real *vn1, real *vn2, real * - work); - -/* Subroutine */ int slaqps_(integer *m, integer *n, integer *offset, integer - *nb, integer *kb, real *a, integer *lda, integer *jpvt, real *tau, - real *vn1, real *vn2, real *auxv, real *f, integer *ldf); - -/* Subroutine */ int slaqsb_(char *uplo, integer *n, integer *kd, real *ab, - integer *ldab, real *s, real *scond, real *amax, char *equed); - -/* Subroutine */ int slaqsp_(char *uplo, integer *n, real *ap, real *s, real * - scond, real *amax, char *equed); - -/* Subroutine */ int slaqsy_(char *uplo, integer *n, real *a, integer *lda, - real *s, real *scond, real *amax, char *equed); - -/* Subroutine */ int slaqtr_(logical *ltran, logical *lreal, integer *n, real - *t, integer *ldt, real *b, real *w, real *scale, real *x, real *work, - integer *info); - -/* Subroutine */ int slar1v_(integer *n, integer *b1, integer *bn, real * - sigma, real *d__, real *l, real *ld, real *lld, real *gersch, real * - z__, real *ztz, real *mingma, integer *r__, integer *isuppz, real * - work); - -/* Subroutine */ int slar2v_(integer *n, real *x, real *y, real *z__, integer - *incx, real *c__, real *s, integer *incc); - -/* Subroutine */ int slarf_(char *side, integer *m, integer *n, real *v, - integer *incv, real *tau, real *c__, integer *ldc, real *work); - -/* Subroutine */ int slarfb_(char *side, char *trans, char *direct, char * - storev, integer *m, integer *n, integer *k, real *v, integer *ldv, - real *t, integer *ldt, real *c__, integer *ldc, real *work, integer * - ldwork); - -/* Subroutine */ int slarfg_(integer *n, real *alpha, real *x, integer *incx, - real *tau); - -/* Subroutine */ int slarft_(char *direct, char *storev, integer *n, integer * - k, real *v, integer *ldv, real *tau, real *t, integer *ldt); - -/* Subroutine */ int slarfx_(char *side, integer *m, integer *n, real *v, - real *tau, real *c__, integer *ldc, real *work); - -/* Subroutine */ int slargv_(integer *n, real *x, integer *incx, real *y, - integer *incy, real *c__, integer *incc); - -/* Subroutine */ int slarnv_(integer *idist, integer *iseed, integer *n, real - *x); - -/* Subroutine */ int slarrb_(integer *n, real *d__, real *l, real *ld, real * - lld, integer *ifirst, integer *ilast, real *sigma, real *reltol, real - *w, real *wgap, real *werr, real *work, integer *iwork, integer *info); - -/* Subroutine */ int slarre_(integer *n, real *d__, real *e, real *tol, - integer *nsplit, integer *isplit, integer *m, real *w, real *woff, - real *gersch, real *work, integer *info); - -/* Subroutine */ int slarrf_(integer *n, real *d__, real *l, real *ld, real * - lld, integer *ifirst, integer *ilast, real *w, real *dplus, real * - lplus, real *work, integer *iwork, integer *info); - -/* Subroutine */ int slarrv_(integer *n, real *d__, real *l, integer *isplit, - integer *m, real *w, integer *iblock, real *gersch, real *tol, real * - z__, integer *ldz, integer *isuppz, real *work, integer *iwork, - integer *info); - -/* Subroutine */ int slartg_(real *f, real *g, real *cs, real *sn, real *r__); - -/* Subroutine */ int slartv_(integer *n, real *x, integer *incx, real *y, - integer *incy, real *c__, real *s, integer *incc); - -/* Subroutine */ int slaruv_(integer *iseed, integer *n, real *x); - -/* Subroutine */ int slarz_(char *side, integer *m, integer *n, integer *l, - real *v, integer *incv, real *tau, real *c__, integer *ldc, real * - work); - -/* Subroutine */ int slarzb_(char *side, char *trans, char *direct, char * - storev, integer *m, integer *n, integer *k, integer *l, real *v, - integer *ldv, real *t, integer *ldt, real *c__, integer *ldc, real * - work, integer *ldwork); - -/* Subroutine */ int slarzt_(char *direct, char *storev, integer *n, integer * - k, real *v, integer *ldv, real *tau, real *t, integer *ldt); - -/* Subroutine */ int slas2_(real *f, real *g, real *h__, real *ssmin, real * - ssmax); - -/* Subroutine */ int slascl_(char *type__, integer *kl, integer *ku, real * - cfrom, real *cto, integer *m, integer *n, real *a, integer *lda, - integer *info); - -/* Subroutine */ int slasd0_(integer *n, integer *sqre, real *d__, real *e, - real *u, integer *ldu, real *vt, integer *ldvt, integer *smlsiz, - integer *iwork, real *work, integer *info); - -/* Subroutine */ int slasd1_(integer *nl, integer *nr, integer *sqre, real * - d__, real *alpha, real *beta, real *u, integer *ldu, real *vt, - integer *ldvt, integer *idxq, integer *iwork, real *work, integer * - info); - -/* Subroutine */ int slasd2_(integer *nl, integer *nr, integer *sqre, integer - *k, real *d__, real *z__, real *alpha, real *beta, real *u, integer * - ldu, real *vt, integer *ldvt, real *dsigma, real *u2, integer *ldu2, - real *vt2, integer *ldvt2, integer *idxp, integer *idx, integer *idxc, - integer *idxq, integer *coltyp, integer *info); - -/* Subroutine */ int slasd3_(integer *nl, integer *nr, integer *sqre, integer - *k, real *d__, real *q, integer *ldq, real *dsigma, real *u, integer * - ldu, real *u2, integer *ldu2, real *vt, integer *ldvt, real *vt2, - integer *ldvt2, integer *idxc, integer *ctot, real *z__, integer * - info); - -/* Subroutine */ int slasd4_(integer *n, integer *i__, real *d__, real *z__, - real *delta, real *rho, real *sigma, real *work, integer *info); - -/* Subroutine */ int slasd5_(integer *i__, real *d__, real *z__, real *delta, - real *rho, real *dsigma, real *work); - -/* Subroutine */ int slasd6_(integer *icompq, integer *nl, integer *nr, - integer *sqre, real *d__, real *vf, real *vl, real *alpha, real *beta, - integer *idxq, integer *perm, integer *givptr, integer *givcol, - integer *ldgcol, real *givnum, integer *ldgnum, real *poles, real * - difl, real *difr, real *z__, integer *k, real *c__, real *s, real * - work, integer *iwork, integer *info); - -/* Subroutine */ int slasd7_(integer *icompq, integer *nl, integer *nr, - integer *sqre, integer *k, real *d__, real *z__, real *zw, real *vf, - real *vfw, real *vl, real *vlw, real *alpha, real *beta, real *dsigma, - integer *idx, integer *idxp, integer *idxq, integer *perm, integer * - givptr, integer *givcol, integer *ldgcol, real *givnum, integer * - ldgnum, real *c__, real *s, integer *info); - -/* Subroutine */ int slasd8_(integer *icompq, integer *k, real *d__, real * - z__, real *vf, real *vl, real *difl, real *difr, integer *lddifr, - real *dsigma, real *work, integer *info); - -/* Subroutine */ int slasd9_(integer *icompq, integer *ldu, integer *k, real * - d__, real *z__, real *vf, real *vl, real *difl, real *difr, real * - dsigma, real *work, integer *info); - -/* Subroutine */ int slasda_(integer *icompq, integer *smlsiz, integer *n, - integer *sqre, real *d__, real *e, real *u, integer *ldu, real *vt, - integer *k, real *difl, real *difr, real *z__, real *poles, integer * - givptr, integer *givcol, integer *ldgcol, integer *perm, real *givnum, - real *c__, real *s, real *work, integer *iwork, integer *info); - -/* Subroutine */ int slasdq_(char *uplo, integer *sqre, integer *n, integer * - ncvt, integer *nru, integer *ncc, real *d__, real *e, real *vt, - integer *ldvt, real *u, integer *ldu, real *c__, integer *ldc, real * - work, integer *info); - -/* Subroutine */ int slasdt_(integer *n, integer *lvl, integer *nd, integer * - inode, integer *ndiml, integer *ndimr, integer *msub); - -/* Subroutine */ int slaset_(char *uplo, integer *m, integer *n, real *alpha, - real *beta, real *a, integer *lda); - -/* Subroutine */ int slasq1_(integer *n, real *d__, real *e, real *work, - integer *info); - -/* Subroutine */ int slasq2_(integer *n, real *z__, integer *info); - -/* Subroutine */ int slasq3_(integer *i0, integer *n0, real *z__, integer *pp, - real *dmin__, real *sigma, real *desig, real *qmax, integer *nfail, - integer *iter, integer *ndiv, logical *ieee); - -/* Subroutine */ int slasq4_(integer *i0, integer *n0, real *z__, integer *pp, - integer *n0in, real *dmin__, real *dmin1, real *dmin2, real *dn, - real *dn1, real *dn2, real *tau, integer *ttype); - -/* Subroutine */ int slasq5_(integer *i0, integer *n0, real *z__, integer *pp, - real *tau, real *dmin__, real *dmin1, real *dmin2, real *dn, real * - dnm1, real *dnm2, logical *ieee); - -/* Subroutine */ int slasq6_(integer *i0, integer *n0, real *z__, integer *pp, - real *dmin__, real *dmin1, real *dmin2, real *dn, real *dnm1, real * - dnm2); - -/* Subroutine */ int slasr_(char *side, char *pivot, char *direct, integer *m, - integer *n, real *c__, real *s, real *a, integer *lda); - -/* Subroutine */ int slasrt_(char *id, integer *n, real *d__, integer *info); - -/* Subroutine */ int slassq_(integer *n, real *x, integer *incx, real *scale, - real *sumsq); - -/* Subroutine */ int slasv2_(real *f, real *g, real *h__, real *ssmin, real * - ssmax, real *snr, real *csr, real *snl, real *csl); - -/* Subroutine */ int slaswp_(integer *n, real *a, integer *lda, integer *k1, - integer *k2, integer *ipiv, integer *incx); - -/* Subroutine */ int slasy2_(logical *ltranl, logical *ltranr, integer *isgn, - integer *n1, integer *n2, real *tl, integer *ldtl, real *tr, integer * - ldtr, real *b, integer *ldb, real *scale, real *x, integer *ldx, real - *xnorm, integer *info); - -/* Subroutine */ int slasyf_(char *uplo, integer *n, integer *nb, integer *kb, - real *a, integer *lda, integer *ipiv, real *w, integer *ldw, integer - *info); - -/* Subroutine */ int slatbs_(char *uplo, char *trans, char *diag, char * - normin, integer *n, integer *kd, real *ab, integer *ldab, real *x, - real *scale, real *cnorm, integer *info); - -/* Subroutine */ int slatdf_(integer *ijob, integer *n, real *z__, integer * - ldz, real *rhs, real *rdsum, real *rdscal, integer *ipiv, integer * - jpiv); - -/* Subroutine */ int slatps_(char *uplo, char *trans, char *diag, char * - normin, integer *n, real *ap, real *x, real *scale, real *cnorm, - integer *info); - -/* Subroutine */ int slatrd_(char *uplo, integer *n, integer *nb, real *a, - integer *lda, real *e, real *tau, real *w, integer *ldw); - -/* Subroutine */ int slatrs_(char *uplo, char *trans, char *diag, char * - normin, integer *n, real *a, integer *lda, real *x, real *scale, real - *cnorm, integer *info); - -/* Subroutine */ int slatrz_(integer *m, integer *n, integer *l, real *a, - integer *lda, real *tau, real *work); - -/* Subroutine */ int slatzm_(char *side, integer *m, integer *n, real *v, - integer *incv, real *tau, real *c1, real *c2, integer *ldc, real * - work); - -/* Subroutine */ int slauu2_(char *uplo, integer *n, real *a, integer *lda, - integer *info); - -/* Subroutine */ int slauum_(char *uplo, integer *n, real *a, integer *lda, - integer *info); - -/* Subroutine */ int sopgtr_(char *uplo, integer *n, real *ap, real *tau, - real *q, integer *ldq, real *work, integer *info); - -/* Subroutine */ int sopmtr_(char *side, char *uplo, char *trans, integer *m, - integer *n, real *ap, real *tau, real *c__, integer *ldc, real *work, - integer *info); - -/* Subroutine */ int sorg2l_(integer *m, integer *n, integer *k, real *a, - integer *lda, real *tau, real *work, integer *info); - -/* Subroutine */ int sorg2r_(integer *m, integer *n, integer *k, real *a, - integer *lda, real *tau, real *work, integer *info); - -/* Subroutine */ int sorgbr_(char *vect, integer *m, integer *n, integer *k, - real *a, integer *lda, real *tau, real *work, integer *lwork, integer - *info); - -/* Subroutine */ int sorghr_(integer *n, integer *ilo, integer *ihi, real *a, - integer *lda, real *tau, real *work, integer *lwork, integer *info); - -/* Subroutine */ int sorgl2_(integer *m, integer *n, integer *k, real *a, - integer *lda, real *tau, real *work, integer *info); - -/* Subroutine */ int sorglq_(integer *m, integer *n, integer *k, real *a, - integer *lda, real *tau, real *work, integer *lwork, integer *info); - -/* Subroutine */ int sorgql_(integer *m, integer *n, integer *k, real *a, - integer *lda, real *tau, real *work, integer *lwork, integer *info); - -/* Subroutine */ int sorgqr_(integer *m, integer *n, integer *k, real *a, - integer *lda, real *tau, real *work, integer *lwork, integer *info); - -/* Subroutine */ int sorgr2_(integer *m, integer *n, integer *k, real *a, - integer *lda, real *tau, real *work, integer *info); - -/* Subroutine */ int sorgrq_(integer *m, integer *n, integer *k, real *a, - integer *lda, real *tau, real *work, integer *lwork, integer *info); - -/* Subroutine */ int sorgtr_(char *uplo, integer *n, real *a, integer *lda, - real *tau, real *work, integer *lwork, integer *info); - -/* Subroutine */ int sorm2l_(char *side, char *trans, integer *m, integer *n, - integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, - real *work, integer *info); - -/* Subroutine */ int sorm2r_(char *side, char *trans, integer *m, integer *n, - integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, - real *work, integer *info); - -/* Subroutine */ int sormbr_(char *vect, char *side, char *trans, integer *m, - integer *n, integer *k, real *a, integer *lda, real *tau, real *c__, - integer *ldc, real *work, integer *lwork, integer *info); - -/* Subroutine */ int sormhr_(char *side, char *trans, integer *m, integer *n, - integer *ilo, integer *ihi, real *a, integer *lda, real *tau, real * - c__, integer *ldc, real *work, integer *lwork, integer *info); - -/* Subroutine */ int sorml2_(char *side, char *trans, integer *m, integer *n, - integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, - real *work, integer *info); - -/* Subroutine */ int sormlq_(char *side, char *trans, integer *m, integer *n, - integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, - real *work, integer *lwork, integer *info); - -/* Subroutine */ int sormql_(char *side, char *trans, integer *m, integer *n, - integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, - real *work, integer *lwork, integer *info); - -/* Subroutine */ int sormqr_(char *side, char *trans, integer *m, integer *n, - integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, - real *work, integer *lwork, integer *info); - -/* Subroutine */ int sormr2_(char *side, char *trans, integer *m, integer *n, - integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, - real *work, integer *info); - -/* Subroutine */ int sormr3_(char *side, char *trans, integer *m, integer *n, - integer *k, integer *l, real *a, integer *lda, real *tau, real *c__, - integer *ldc, real *work, integer *info); - -/* Subroutine */ int sormrq_(char *side, char *trans, integer *m, integer *n, - integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, - real *work, integer *lwork, integer *info); - -/* Subroutine */ int sormrz_(char *side, char *trans, integer *m, integer *n, - integer *k, integer *l, real *a, integer *lda, real *tau, real *c__, - integer *ldc, real *work, integer *lwork, integer *info); - -/* Subroutine */ int sormtr_(char *side, char *uplo, char *trans, integer *m, - integer *n, real *a, integer *lda, real *tau, real *c__, integer *ldc, - real *work, integer *lwork, integer *info); - -/* Subroutine */ int spbcon_(char *uplo, integer *n, integer *kd, real *ab, - integer *ldab, real *anorm, real *rcond, real *work, integer *iwork, - integer *info); - -/* Subroutine */ int spbequ_(char *uplo, integer *n, integer *kd, real *ab, - integer *ldab, real *s, real *scond, real *amax, integer *info); - -/* Subroutine */ int spbrfs_(char *uplo, integer *n, integer *kd, integer * - nrhs, real *ab, integer *ldab, real *afb, integer *ldafb, real *b, - integer *ldb, real *x, integer *ldx, real *ferr, real *berr, real * - work, integer *iwork, integer *info); - -/* Subroutine */ int spbstf_(char *uplo, integer *n, integer *kd, real *ab, - integer *ldab, integer *info); - -/* Subroutine */ int spbsv_(char *uplo, integer *n, integer *kd, integer * - nrhs, real *ab, integer *ldab, real *b, integer *ldb, integer *info); - -/* Subroutine */ int spbsvx_(char *fact, char *uplo, integer *n, integer *kd, - integer *nrhs, real *ab, integer *ldab, real *afb, integer *ldafb, - char *equed, real *s, real *b, integer *ldb, real *x, integer *ldx, - real *rcond, real *ferr, real *berr, real *work, integer *iwork, - integer *info); - -/* Subroutine */ int spbtf2_(char *uplo, integer *n, integer *kd, real *ab, - integer *ldab, integer *info); - -/* Subroutine */ int spbtrf_(char *uplo, integer *n, integer *kd, real *ab, - integer *ldab, integer *info); - -/* Subroutine */ int spbtrs_(char *uplo, integer *n, integer *kd, integer * - nrhs, real *ab, integer *ldab, real *b, integer *ldb, integer *info); - -/* Subroutine */ int spocon_(char *uplo, integer *n, real *a, integer *lda, - real *anorm, real *rcond, real *work, integer *iwork, integer *info); - -/* Subroutine */ int spoequ_(integer *n, real *a, integer *lda, real *s, real - *scond, real *amax, integer *info); - -/* Subroutine */ int sporfs_(char *uplo, integer *n, integer *nrhs, real *a, - integer *lda, real *af, integer *ldaf, real *b, integer *ldb, real *x, - integer *ldx, real *ferr, real *berr, real *work, integer *iwork, - integer *info); - -/* Subroutine */ int sposv_(char *uplo, integer *n, integer *nrhs, real *a, - integer *lda, real *b, integer *ldb, integer *info); - -/* Subroutine */ int sposvx_(char *fact, char *uplo, integer *n, integer * - nrhs, real *a, integer *lda, real *af, integer *ldaf, char *equed, - real *s, real *b, integer *ldb, real *x, integer *ldx, real *rcond, - real *ferr, real *berr, real *work, integer *iwork, integer *info); - -/* Subroutine */ int spotf2_(char *uplo, integer *n, real *a, integer *lda, - integer *info); - -/* Subroutine */ int spotrf_(char *uplo, integer *n, real *a, integer *lda, - integer *info); - -/* Subroutine */ int spotri_(char *uplo, integer *n, real *a, integer *lda, - integer *info); - -/* Subroutine */ int spotrs_(char *uplo, integer *n, integer *nrhs, real *a, - integer *lda, real *b, integer *ldb, integer *info); - -/* Subroutine */ int sppcon_(char *uplo, integer *n, real *ap, real *anorm, - real *rcond, real *work, integer *iwork, integer *info); - -/* Subroutine */ int sppequ_(char *uplo, integer *n, real *ap, real *s, real * - scond, real *amax, integer *info); - -/* Subroutine */ int spprfs_(char *uplo, integer *n, integer *nrhs, real *ap, - real *afp, real *b, integer *ldb, real *x, integer *ldx, real *ferr, - real *berr, real *work, integer *iwork, integer *info); - -/* Subroutine */ int sppsv_(char *uplo, integer *n, integer *nrhs, real *ap, - real *b, integer *ldb, integer *info); - -/* Subroutine */ int sppsvx_(char *fact, char *uplo, integer *n, integer * - nrhs, real *ap, real *afp, char *equed, real *s, real *b, integer * - ldb, real *x, integer *ldx, real *rcond, real *ferr, real *berr, real - *work, integer *iwork, integer *info); - -/* Subroutine */ int spptrf_(char *uplo, integer *n, real *ap, integer *info); - -/* Subroutine */ int spptri_(char *uplo, integer *n, real *ap, integer *info); - -/* Subroutine */ int spptrs_(char *uplo, integer *n, integer *nrhs, real *ap, - real *b, integer *ldb, integer *info); - -/* Subroutine */ int sptcon_(integer *n, real *d__, real *e, real *anorm, - real *rcond, real *work, integer *info); - -/* Subroutine */ int spteqr_(char *compz, integer *n, real *d__, real *e, - real *z__, integer *ldz, real *work, integer *info); - -/* Subroutine */ int sptrfs_(integer *n, integer *nrhs, real *d__, real *e, - real *df, real *ef, real *b, integer *ldb, real *x, integer *ldx, - real *ferr, real *berr, real *work, integer *info); - -/* Subroutine */ int sptsv_(integer *n, integer *nrhs, real *d__, real *e, - real *b, integer *ldb, integer *info); - -/* Subroutine */ int sptsvx_(char *fact, integer *n, integer *nrhs, real *d__, - real *e, real *df, real *ef, real *b, integer *ldb, real *x, integer - *ldx, real *rcond, real *ferr, real *berr, real *work, integer *info); - -/* Subroutine */ int spttrf_(integer *n, real *d__, real *e, integer *info); - -/* Subroutine */ int spttrs_(integer *n, integer *nrhs, real *d__, real *e, - real *b, integer *ldb, integer *info); - -/* Subroutine */ int sptts2_(integer *n, integer *nrhs, real *d__, real *e, - real *b, integer *ldb); - -/* Subroutine */ int srscl_(integer *n, real *sa, real *sx, integer *incx); - -/* Subroutine */ int ssbev_(char *jobz, char *uplo, integer *n, integer *kd, - real *ab, integer *ldab, real *w, real *z__, integer *ldz, real *work, - integer *info); - -/* Subroutine */ int ssbevd_(char *jobz, char *uplo, integer *n, integer *kd, - real *ab, integer *ldab, real *w, real *z__, integer *ldz, real *work, - integer *lwork, integer *iwork, integer *liwork, integer *info); - -/* Subroutine */ int ssbevx_(char *jobz, char *range, char *uplo, integer *n, - integer *kd, real *ab, integer *ldab, real *q, integer *ldq, real *vl, - real *vu, integer *il, integer *iu, real *abstol, integer *m, real * - w, real *z__, integer *ldz, real *work, integer *iwork, integer * - ifail, integer *info); - -/* Subroutine */ int ssbgst_(char *vect, char *uplo, integer *n, integer *ka, - integer *kb, real *ab, integer *ldab, real *bb, integer *ldbb, real * - x, integer *ldx, real *work, integer *info); - -/* Subroutine */ int ssbgv_(char *jobz, char *uplo, integer *n, integer *ka, - integer *kb, real *ab, integer *ldab, real *bb, integer *ldbb, real * - w, real *z__, integer *ldz, real *work, integer *info); - -/* Subroutine */ int ssbgvd_(char *jobz, char *uplo, integer *n, integer *ka, - integer *kb, real *ab, integer *ldab, real *bb, integer *ldbb, real * - w, real *z__, integer *ldz, real *work, integer *lwork, integer * - iwork, integer *liwork, integer *info); - -/* Subroutine */ int ssbgvx_(char *jobz, char *range, char *uplo, integer *n, - integer *ka, integer *kb, real *ab, integer *ldab, real *bb, integer * - ldbb, real *q, integer *ldq, real *vl, real *vu, integer *il, integer - *iu, real *abstol, integer *m, real *w, real *z__, integer *ldz, real - *work, integer *iwork, integer *ifail, integer *info); - -/* Subroutine */ int ssbtrd_(char *vect, char *uplo, integer *n, integer *kd, - real *ab, integer *ldab, real *d__, real *e, real *q, integer *ldq, - real *work, integer *info); - -/* Subroutine */ int sspcon_(char *uplo, integer *n, real *ap, integer *ipiv, - real *anorm, real *rcond, real *work, integer *iwork, integer *info); - -/* Subroutine */ int sspev_(char *jobz, char *uplo, integer *n, real *ap, - real *w, real *z__, integer *ldz, real *work, integer *info); - -/* Subroutine */ int sspevd_(char *jobz, char *uplo, integer *n, real *ap, - real *w, real *z__, integer *ldz, real *work, integer *lwork, integer - *iwork, integer *liwork, integer *info); - -/* Subroutine */ int sspevx_(char *jobz, char *range, char *uplo, integer *n, - real *ap, real *vl, real *vu, integer *il, integer *iu, real *abstol, - integer *m, real *w, real *z__, integer *ldz, real *work, integer * - iwork, integer *ifail, integer *info); - -/* Subroutine */ int sspgst_(integer *itype, char *uplo, integer *n, real *ap, - real *bp, integer *info); - -/* Subroutine */ int sspgv_(integer *itype, char *jobz, char *uplo, integer * - n, real *ap, real *bp, real *w, real *z__, integer *ldz, real *work, - integer *info); - -/* Subroutine */ int sspgvd_(integer *itype, char *jobz, char *uplo, integer * - n, real *ap, real *bp, real *w, real *z__, integer *ldz, real *work, - integer *lwork, integer *iwork, integer *liwork, integer *info); - -/* Subroutine */ int sspgvx_(integer *itype, char *jobz, char *range, char * - uplo, integer *n, real *ap, real *bp, real *vl, real *vu, integer *il, - integer *iu, real *abstol, integer *m, real *w, real *z__, integer * - ldz, real *work, integer *iwork, integer *ifail, integer *info); - -/* Subroutine */ int ssprfs_(char *uplo, integer *n, integer *nrhs, real *ap, - real *afp, integer *ipiv, real *b, integer *ldb, real *x, integer * - ldx, real *ferr, real *berr, real *work, integer *iwork, integer * - info); - -/* Subroutine */ int sspsv_(char *uplo, integer *n, integer *nrhs, real *ap, - integer *ipiv, real *b, integer *ldb, integer *info); - -/* Subroutine */ int sspsvx_(char *fact, char *uplo, integer *n, integer * - nrhs, real *ap, real *afp, integer *ipiv, real *b, integer *ldb, real - *x, integer *ldx, real *rcond, real *ferr, real *berr, real *work, - integer *iwork, integer *info); - -/* Subroutine */ int ssptrd_(char *uplo, integer *n, real *ap, real *d__, - real *e, real *tau, integer *info); - -/* Subroutine */ int ssptrf_(char *uplo, integer *n, real *ap, integer *ipiv, - integer *info); - -/* Subroutine */ int ssptri_(char *uplo, integer *n, real *ap, integer *ipiv, - real *work, integer *info); - -/* Subroutine */ int ssptrs_(char *uplo, integer *n, integer *nrhs, real *ap, - integer *ipiv, real *b, integer *ldb, integer *info); - -/* Subroutine */ int sstebz_(char *range, char *order, integer *n, real *vl, - real *vu, integer *il, integer *iu, real *abstol, real *d__, real *e, - integer *m, integer *nsplit, real *w, integer *iblock, integer * - isplit, real *work, integer *iwork, integer *info); - -/* Subroutine */ int sstedc_(char *compz, integer *n, real *d__, real *e, - real *z__, integer *ldz, real *work, integer *lwork, integer *iwork, - integer *liwork, integer *info); - -/* Subroutine */ int sstegr_(char *jobz, char *range, integer *n, real *d__, - real *e, real *vl, real *vu, integer *il, integer *iu, real *abstol, - integer *m, real *w, real *z__, integer *ldz, integer *isuppz, real * - work, integer *lwork, integer *iwork, integer *liwork, integer *info); - -/* Subroutine */ int sstein_(integer *n, real *d__, real *e, integer *m, real - *w, integer *iblock, integer *isplit, real *z__, integer *ldz, real * - work, integer *iwork, integer *ifail, integer *info); - -/* Subroutine */ int ssteqr_(char *compz, integer *n, real *d__, real *e, - real *z__, integer *ldz, real *work, integer *info); - -/* Subroutine */ int ssterf_(integer *n, real *d__, real *e, integer *info); - -/* Subroutine */ int sstev_(char *jobz, integer *n, real *d__, real *e, real * - z__, integer *ldz, real *work, integer *info); - -/* Subroutine */ int sstevd_(char *jobz, integer *n, real *d__, real *e, real - *z__, integer *ldz, real *work, integer *lwork, integer *iwork, - integer *liwork, integer *info); - -/* Subroutine */ int sstevr_(char *jobz, char *range, integer *n, real *d__, - real *e, real *vl, real *vu, integer *il, integer *iu, real *abstol, - integer *m, real *w, real *z__, integer *ldz, integer *isuppz, real * - work, integer *lwork, integer *iwork, integer *liwork, integer *info); - -/* Subroutine */ int sstevx_(char *jobz, char *range, integer *n, real *d__, - real *e, real *vl, real *vu, integer *il, integer *iu, real *abstol, - integer *m, real *w, real *z__, integer *ldz, real *work, integer * - iwork, integer *ifail, integer *info); - -/* Subroutine */ int ssycon_(char *uplo, integer *n, real *a, integer *lda, - integer *ipiv, real *anorm, real *rcond, real *work, integer *iwork, - integer *info); - -/* Subroutine */ int ssyev_(char *jobz, char *uplo, integer *n, real *a, - integer *lda, real *w, real *work, integer *lwork, integer *info); - -/* Subroutine */ int ssyevd_(char *jobz, char *uplo, integer *n, real *a, - integer *lda, real *w, real *work, integer *lwork, integer *iwork, - integer *liwork, integer *info); - -/* Subroutine */ int ssyevr_(char *jobz, char *range, char *uplo, integer *n, - real *a, integer *lda, real *vl, real *vu, integer *il, integer *iu, - real *abstol, integer *m, real *w, real *z__, integer *ldz, integer * - isuppz, real *work, integer *lwork, integer *iwork, integer *liwork, - integer *info); - -/* Subroutine */ int ssyevx_(char *jobz, char *range, char *uplo, integer *n, - real *a, integer *lda, real *vl, real *vu, integer *il, integer *iu, - real *abstol, integer *m, real *w, real *z__, integer *ldz, real * - work, integer *lwork, integer *iwork, integer *ifail, integer *info); - -/* Subroutine */ int ssygs2_(integer *itype, char *uplo, integer *n, real *a, - integer *lda, real *b, integer *ldb, integer *info); - -/* Subroutine */ int ssygst_(integer *itype, char *uplo, integer *n, real *a, - integer *lda, real *b, integer *ldb, integer *info); - -/* Subroutine */ int ssygv_(integer *itype, char *jobz, char *uplo, integer * - n, real *a, integer *lda, real *b, integer *ldb, real *w, real *work, - integer *lwork, integer *info); - -/* Subroutine */ int ssygvd_(integer *itype, char *jobz, char *uplo, integer * - n, real *a, integer *lda, real *b, integer *ldb, real *w, real *work, - integer *lwork, integer *iwork, integer *liwork, integer *info); - -/* Subroutine */ int ssygvx_(integer *itype, char *jobz, char *range, char * - uplo, integer *n, real *a, integer *lda, real *b, integer *ldb, real * - vl, real *vu, integer *il, integer *iu, real *abstol, integer *m, - real *w, real *z__, integer *ldz, real *work, integer *lwork, integer - *iwork, integer *ifail, integer *info); - -/* Subroutine */ int ssyrfs_(char *uplo, integer *n, integer *nrhs, real *a, - integer *lda, real *af, integer *ldaf, integer *ipiv, real *b, - integer *ldb, real *x, integer *ldx, real *ferr, real *berr, real * - work, integer *iwork, integer *info); - -/* Subroutine */ int ssysv_(char *uplo, integer *n, integer *nrhs, real *a, - integer *lda, integer *ipiv, real *b, integer *ldb, real *work, - integer *lwork, integer *info); - -/* Subroutine */ int ssysvx_(char *fact, char *uplo, integer *n, integer * - nrhs, real *a, integer *lda, real *af, integer *ldaf, integer *ipiv, - real *b, integer *ldb, real *x, integer *ldx, real *rcond, real *ferr, - real *berr, real *work, integer *lwork, integer *iwork, integer * - info); - -/* Subroutine */ int ssytd2_(char *uplo, integer *n, real *a, integer *lda, - real *d__, real *e, real *tau, integer *info); - -/* Subroutine */ int ssytf2_(char *uplo, integer *n, real *a, integer *lda, - integer *ipiv, integer *info); - -/* Subroutine */ int ssytrd_(char *uplo, integer *n, real *a, integer *lda, - real *d__, real *e, real *tau, real *work, integer *lwork, integer * - info); - -/* Subroutine */ int ssytrf_(char *uplo, integer *n, real *a, integer *lda, - integer *ipiv, real *work, integer *lwork, integer *info); - -/* Subroutine */ int ssytri_(char *uplo, integer *n, real *a, integer *lda, - integer *ipiv, real *work, integer *info); - -/* Subroutine */ int ssytrs_(char *uplo, integer *n, integer *nrhs, real *a, - integer *lda, integer *ipiv, real *b, integer *ldb, integer *info); - -/* Subroutine */ int stbcon_(char *norm, char *uplo, char *diag, integer *n, - integer *kd, real *ab, integer *ldab, real *rcond, real *work, - integer *iwork, integer *info); - -/* Subroutine */ int stbrfs_(char *uplo, char *trans, char *diag, integer *n, - integer *kd, integer *nrhs, real *ab, integer *ldab, real *b, integer - *ldb, real *x, integer *ldx, real *ferr, real *berr, real *work, - integer *iwork, integer *info); - -/* Subroutine */ int stbtrs_(char *uplo, char *trans, char *diag, integer *n, - integer *kd, integer *nrhs, real *ab, integer *ldab, real *b, integer - *ldb, integer *info); - -/* Subroutine */ int stgevc_(char *side, char *howmny, logical *select, - integer *n, real *a, integer *lda, real *b, integer *ldb, real *vl, - integer *ldvl, real *vr, integer *ldvr, integer *mm, integer *m, real - *work, integer *info); - -/* Subroutine */ int stgex2_(logical *wantq, logical *wantz, integer *n, real - *a, integer *lda, real *b, integer *ldb, real *q, integer *ldq, real * - z__, integer *ldz, integer *j1, integer *n1, integer *n2, real *work, - integer *lwork, integer *info); - -/* Subroutine */ int stgexc_(logical *wantq, logical *wantz, integer *n, real - *a, integer *lda, real *b, integer *ldb, real *q, integer *ldq, real * - z__, integer *ldz, integer *ifst, integer *ilst, real *work, integer * - lwork, integer *info); - -/* Subroutine */ int stgsen_(integer *ijob, logical *wantq, logical *wantz, - logical *select, integer *n, real *a, integer *lda, real *b, integer * - ldb, real *alphar, real *alphai, real *beta, real *q, integer *ldq, - real *z__, integer *ldz, integer *m, real *pl, real *pr, real *dif, - real *work, integer *lwork, integer *iwork, integer *liwork, integer * - info); - -/* Subroutine */ int stgsja_(char *jobu, char *jobv, char *jobq, integer *m, - integer *p, integer *n, integer *k, integer *l, real *a, integer *lda, - real *b, integer *ldb, real *tola, real *tolb, real *alpha, real * - beta, real *u, integer *ldu, real *v, integer *ldv, real *q, integer * - ldq, real *work, integer *ncycle, integer *info); - -/* Subroutine */ int stgsna_(char *job, char *howmny, logical *select, - integer *n, real *a, integer *lda, real *b, integer *ldb, real *vl, - integer *ldvl, real *vr, integer *ldvr, real *s, real *dif, integer * - mm, integer *m, real *work, integer *lwork, integer *iwork, integer * - info); - -/* Subroutine */ int stgsy2_(char *trans, integer *ijob, integer *m, integer * - n, real *a, integer *lda, real *b, integer *ldb, real *c__, integer * - ldc, real *d__, integer *ldd, real *e, integer *lde, real *f, integer - *ldf, real *scale, real *rdsum, real *rdscal, integer *iwork, integer - *pq, integer *info); - -/* Subroutine */ int stgsyl_(char *trans, integer *ijob, integer *m, integer * - n, real *a, integer *lda, real *b, integer *ldb, real *c__, integer * - ldc, real *d__, integer *ldd, real *e, integer *lde, real *f, integer - *ldf, real *scale, real *dif, real *work, integer *lwork, integer * - iwork, integer *info); - -/* Subroutine */ int stpcon_(char *norm, char *uplo, char *diag, integer *n, - real *ap, real *rcond, real *work, integer *iwork, integer *info); - -/* Subroutine */ int stprfs_(char *uplo, char *trans, char *diag, integer *n, - integer *nrhs, real *ap, real *b, integer *ldb, real *x, integer *ldx, - real *ferr, real *berr, real *work, integer *iwork, integer *info); - -/* Subroutine */ int stptri_(char *uplo, char *diag, integer *n, real *ap, - integer *info); - -/* Subroutine */ int stptrs_(char *uplo, char *trans, char *diag, integer *n, - integer *nrhs, real *ap, real *b, integer *ldb, integer *info); - -/* Subroutine */ int strcon_(char *norm, char *uplo, char *diag, integer *n, - real *a, integer *lda, real *rcond, real *work, integer *iwork, - integer *info); - -/* Subroutine */ int strevc_(char *side, char *howmny, logical *select, - integer *n, real *t, integer *ldt, real *vl, integer *ldvl, real *vr, - integer *ldvr, integer *mm, integer *m, real *work, integer *info); - -/* Subroutine */ int strexc_(char *compq, integer *n, real *t, integer *ldt, - real *q, integer *ldq, integer *ifst, integer *ilst, real *work, - integer *info); - -/* Subroutine */ int strrfs_(char *uplo, char *trans, char *diag, integer *n, - integer *nrhs, real *a, integer *lda, real *b, integer *ldb, real *x, - integer *ldx, real *ferr, real *berr, real *work, integer *iwork, - integer *info); - -/* Subroutine */ int strsen_(char *job, char *compq, logical *select, integer - *n, real *t, integer *ldt, real *q, integer *ldq, real *wr, real *wi, - integer *m, real *s, real *sep, real *work, integer *lwork, integer * - iwork, integer *liwork, integer *info); - -/* Subroutine */ int strsna_(char *job, char *howmny, logical *select, - integer *n, real *t, integer *ldt, real *vl, integer *ldvl, real *vr, - integer *ldvr, real *s, real *sep, integer *mm, integer *m, real * - work, integer *ldwork, integer *iwork, integer *info); - -/* Subroutine */ int strsyl_(char *trana, char *tranb, integer *isgn, integer - *m, integer *n, real *a, integer *lda, real *b, integer *ldb, real * - c__, integer *ldc, real *scale, integer *info); - -/* Subroutine */ int strti2_(char *uplo, char *diag, integer *n, real *a, - integer *lda, integer *info); - -/* Subroutine */ int strtri_(char *uplo, char *diag, integer *n, real *a, - integer *lda, integer *info); - -/* Subroutine */ int strtrs_(char *uplo, char *trans, char *diag, integer *n, - integer *nrhs, real *a, integer *lda, real *b, integer *ldb, integer * - info); - -/* Subroutine */ int stzrqf_(integer *m, integer *n, real *a, integer *lda, - real *tau, integer *info); - -/* Subroutine */ int stzrzf_(integer *m, integer *n, real *a, integer *lda, - real *tau, real *work, integer *lwork, integer *info); - -/* Subroutine */ int xerbla_(char *srname, integer *info); - -/* Subroutine */ int zbdsqr_(char *uplo, integer *n, integer *ncvt, integer * - nru, integer *ncc, doublereal *d__, doublereal *e, doublecomplex *vt, - integer *ldvt, doublecomplex *u, integer *ldu, doublecomplex *c__, - integer *ldc, doublereal *rwork, integer *info); - -/* Subroutine */ int zdrot_(integer *n, doublecomplex *cx, integer *incx, - doublecomplex *cy, integer *incy, doublereal *c__, doublereal *s); - -/* Subroutine */ int zdrscl_(integer *n, doublereal *sa, doublecomplex *sx, - integer *incx); - -/* Subroutine */ int zgbbrd_(char *vect, integer *m, integer *n, integer *ncc, - integer *kl, integer *ku, doublecomplex *ab, integer *ldab, - doublereal *d__, doublereal *e, doublecomplex *q, integer *ldq, - doublecomplex *pt, integer *ldpt, doublecomplex *c__, integer *ldc, - doublecomplex *work, doublereal *rwork, integer *info); - -/* Subroutine */ int zgbcon_(char *norm, integer *n, integer *kl, integer *ku, - doublecomplex *ab, integer *ldab, integer *ipiv, doublereal *anorm, - doublereal *rcond, doublecomplex *work, doublereal *rwork, integer * - info); - -/* Subroutine */ int zgbequ_(integer *m, integer *n, integer *kl, integer *ku, - doublecomplex *ab, integer *ldab, doublereal *r__, doublereal *c__, - doublereal *rowcnd, doublereal *colcnd, doublereal *amax, integer * - info); - -/* Subroutine */ int zgbrfs_(char *trans, integer *n, integer *kl, integer * - ku, integer *nrhs, doublecomplex *ab, integer *ldab, doublecomplex * - afb, integer *ldafb, integer *ipiv, doublecomplex *b, integer *ldb, - doublecomplex *x, integer *ldx, doublereal *ferr, doublereal *berr, - doublecomplex *work, doublereal *rwork, integer *info); - -/* Subroutine */ int zgbsv_(integer *n, integer *kl, integer *ku, integer * - nrhs, doublecomplex *ab, integer *ldab, integer *ipiv, doublecomplex * - b, integer *ldb, integer *info); - -/* Subroutine */ int zgbsvx_(char *fact, char *trans, integer *n, integer *kl, - integer *ku, integer *nrhs, doublecomplex *ab, integer *ldab, - doublecomplex *afb, integer *ldafb, integer *ipiv, char *equed, - doublereal *r__, doublereal *c__, doublecomplex *b, integer *ldb, - doublecomplex *x, integer *ldx, doublereal *rcond, doublereal *ferr, - doublereal *berr, doublecomplex *work, doublereal *rwork, integer * - info); - -/* Subroutine */ int zgbtf2_(integer *m, integer *n, integer *kl, integer *ku, - doublecomplex *ab, integer *ldab, integer *ipiv, integer *info); - -/* Subroutine */ int zgbtrf_(integer *m, integer *n, integer *kl, integer *ku, - doublecomplex *ab, integer *ldab, integer *ipiv, integer *info); - -/* Subroutine */ int zgbtrs_(char *trans, integer *n, integer *kl, integer * - ku, integer *nrhs, doublecomplex *ab, integer *ldab, integer *ipiv, - doublecomplex *b, integer *ldb, integer *info); - -/* Subroutine */ int zgebak_(char *job, char *side, integer *n, integer *ilo, - integer *ihi, doublereal *scale, integer *m, doublecomplex *v, - integer *ldv, integer *info); - -/* Subroutine */ int zgebal_(char *job, integer *n, doublecomplex *a, integer - *lda, integer *ilo, integer *ihi, doublereal *scale, integer *info); - -/* Subroutine */ int zgebd2_(integer *m, integer *n, doublecomplex *a, - integer *lda, doublereal *d__, doublereal *e, doublecomplex *tauq, - doublecomplex *taup, doublecomplex *work, integer *info); - -/* Subroutine */ int zgebrd_(integer *m, integer *n, doublecomplex *a, - integer *lda, doublereal *d__, doublereal *e, doublecomplex *tauq, - doublecomplex *taup, doublecomplex *work, integer *lwork, integer * - info); - -/* Subroutine */ int zgecon_(char *norm, integer *n, doublecomplex *a, - integer *lda, doublereal *anorm, doublereal *rcond, doublecomplex * - work, doublereal *rwork, integer *info); - -/* Subroutine */ int zgeequ_(integer *m, integer *n, doublecomplex *a, - integer *lda, doublereal *r__, doublereal *c__, doublereal *rowcnd, - doublereal *colcnd, doublereal *amax, integer *info); - -/* Subroutine */ int zgees_(char *jobvs, char *sort, L_fp select, integer *n, - doublecomplex *a, integer *lda, integer *sdim, doublecomplex *w, - doublecomplex *vs, integer *ldvs, doublecomplex *work, integer *lwork, - doublereal *rwork, logical *bwork, integer *info); - -/* Subroutine */ int zgeesx_(char *jobvs, char *sort, L_fp select, char * - sense, integer *n, doublecomplex *a, integer *lda, integer *sdim, - doublecomplex *w, doublecomplex *vs, integer *ldvs, doublereal * - rconde, doublereal *rcondv, doublecomplex *work, integer *lwork, - doublereal *rwork, logical *bwork, integer *info); - -/* Subroutine */ int zgeev_(char *jobvl, char *jobvr, integer *n, - doublecomplex *a, integer *lda, doublecomplex *w, doublecomplex *vl, - integer *ldvl, doublecomplex *vr, integer *ldvr, doublecomplex *work, - integer *lwork, doublereal *rwork, integer *info); - -/* Subroutine */ int zgeevx_(char *balanc, char *jobvl, char *jobvr, char * - sense, integer *n, doublecomplex *a, integer *lda, doublecomplex *w, - doublecomplex *vl, integer *ldvl, doublecomplex *vr, integer *ldvr, - integer *ilo, integer *ihi, doublereal *scale, doublereal *abnrm, - doublereal *rconde, doublereal *rcondv, doublecomplex *work, integer * - lwork, doublereal *rwork, integer *info); - -/* Subroutine */ int zgegs_(char *jobvsl, char *jobvsr, integer *n, - doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, - doublecomplex *alpha, doublecomplex *beta, doublecomplex *vsl, - integer *ldvsl, doublecomplex *vsr, integer *ldvsr, doublecomplex * - work, integer *lwork, doublereal *rwork, integer *info); - -/* Subroutine */ int zgegv_(char *jobvl, char *jobvr, integer *n, - doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, - doublecomplex *alpha, doublecomplex *beta, doublecomplex *vl, integer - *ldvl, doublecomplex *vr, integer *ldvr, doublecomplex *work, integer - *lwork, doublereal *rwork, integer *info); - -/* Subroutine */ int zgehd2_(integer *n, integer *ilo, integer *ihi, - doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * - work, integer *info); - -/* Subroutine */ int zgehrd_(integer *n, integer *ilo, integer *ihi, - doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * - work, integer *lwork, integer *info); - -/* Subroutine */ int zgelq2_(integer *m, integer *n, doublecomplex *a, - integer *lda, doublecomplex *tau, doublecomplex *work, integer *info); - -/* Subroutine */ int zgelqf_(integer *m, integer *n, doublecomplex *a, - integer *lda, doublecomplex *tau, doublecomplex *work, integer *lwork, - integer *info); - -/* Subroutine */ int zgels_(char *trans, integer *m, integer *n, integer * - nrhs, doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, - doublecomplex *work, integer *lwork, integer *info); - -/* Subroutine */ int zgelsx_(integer *m, integer *n, integer *nrhs, - doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, - integer *jpvt, doublereal *rcond, integer *rank, doublecomplex *work, - doublereal *rwork, integer *info); - -/* Subroutine */ int zgelsy_(integer *m, integer *n, integer *nrhs, - doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, - integer *jpvt, doublereal *rcond, integer *rank, doublecomplex *work, - integer *lwork, doublereal *rwork, integer *info); - -/* Subroutine */ int zgeql2_(integer *m, integer *n, doublecomplex *a, - integer *lda, doublecomplex *tau, doublecomplex *work, integer *info); - -/* Subroutine */ int zgeqlf_(integer *m, integer *n, doublecomplex *a, - integer *lda, doublecomplex *tau, doublecomplex *work, integer *lwork, - integer *info); - -/* Subroutine */ int zgeqp3_(integer *m, integer *n, doublecomplex *a, - integer *lda, integer *jpvt, doublecomplex *tau, doublecomplex *work, - integer *lwork, doublereal *rwork, integer *info); - -/* Subroutine */ int zgeqpf_(integer *m, integer *n, doublecomplex *a, - integer *lda, integer *jpvt, doublecomplex *tau, doublecomplex *work, - doublereal *rwork, integer *info); - -/* Subroutine */ int zgeqr2_(integer *m, integer *n, doublecomplex *a, - integer *lda, doublecomplex *tau, doublecomplex *work, integer *info); - -/* Subroutine */ int zgeqrf_(integer *m, integer *n, doublecomplex *a, - integer *lda, doublecomplex *tau, doublecomplex *work, integer *lwork, - integer *info); - -/* Subroutine */ int zgerfs_(char *trans, integer *n, integer *nrhs, - doublecomplex *a, integer *lda, doublecomplex *af, integer *ldaf, - integer *ipiv, doublecomplex *b, integer *ldb, doublecomplex *x, - integer *ldx, doublereal *ferr, doublereal *berr, doublecomplex *work, - doublereal *rwork, integer *info); - -/* Subroutine */ int zgerq2_(integer *m, integer *n, doublecomplex *a, - integer *lda, doublecomplex *tau, doublecomplex *work, integer *info); - -/* Subroutine */ int zgerqf_(integer *m, integer *n, doublecomplex *a, - integer *lda, doublecomplex *tau, doublecomplex *work, integer *lwork, - integer *info); - -/* Subroutine */ int zgesc2_(integer *n, doublecomplex *a, integer *lda, - doublecomplex *rhs, integer *ipiv, integer *jpiv, doublereal *scale); - -/* Subroutine */ int zgesv_(integer *n, integer *nrhs, doublecomplex *a, - integer *lda, integer *ipiv, doublecomplex *b, integer *ldb, integer * - info); - -/* Subroutine */ int zgesvx_(char *fact, char *trans, integer *n, integer * - nrhs, doublecomplex *a, integer *lda, doublecomplex *af, integer * - ldaf, integer *ipiv, char *equed, doublereal *r__, doublereal *c__, - doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, - doublereal *rcond, doublereal *ferr, doublereal *berr, doublecomplex * - work, doublereal *rwork, integer *info); - -/* Subroutine */ int zgetc2_(integer *n, doublecomplex *a, integer *lda, - integer *ipiv, integer *jpiv, integer *info); - -/* Subroutine */ int zgetf2_(integer *m, integer *n, doublecomplex *a, - integer *lda, integer *ipiv, integer *info); - -/* Subroutine */ int zgetrf_(integer *m, integer *n, doublecomplex *a, - integer *lda, integer *ipiv, integer *info); - -/* Subroutine */ int zgetri_(integer *n, doublecomplex *a, integer *lda, - integer *ipiv, doublecomplex *work, integer *lwork, integer *info); - -/* Subroutine */ int zgetrs_(char *trans, integer *n, integer *nrhs, - doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *b, - integer *ldb, integer *info); - -/* Subroutine */ int zggbak_(char *job, char *side, integer *n, integer *ilo, - integer *ihi, doublereal *lscale, doublereal *rscale, integer *m, - doublecomplex *v, integer *ldv, integer *info); - -/* Subroutine */ int zggbal_(char *job, integer *n, doublecomplex *a, integer - *lda, doublecomplex *b, integer *ldb, integer *ilo, integer *ihi, - doublereal *lscale, doublereal *rscale, doublereal *work, integer * - info); - -/* Subroutine */ int zgges_(char *jobvsl, char *jobvsr, char *sort, L_fp - delctg, integer *n, doublecomplex *a, integer *lda, doublecomplex *b, - integer *ldb, integer *sdim, doublecomplex *alpha, doublecomplex * - beta, doublecomplex *vsl, integer *ldvsl, doublecomplex *vsr, integer - *ldvsr, doublecomplex *work, integer *lwork, doublereal *rwork, - logical *bwork, integer *info); - -/* Subroutine */ int zggesx_(char *jobvsl, char *jobvsr, char *sort, L_fp - delctg, char *sense, integer *n, doublecomplex *a, integer *lda, - doublecomplex *b, integer *ldb, integer *sdim, doublecomplex *alpha, - doublecomplex *beta, doublecomplex *vsl, integer *ldvsl, - doublecomplex *vsr, integer *ldvsr, doublereal *rconde, doublereal * - rcondv, doublecomplex *work, integer *lwork, doublereal *rwork, - integer *iwork, integer *liwork, logical *bwork, integer *info); - -/* Subroutine */ int zggev_(char *jobvl, char *jobvr, integer *n, - doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, - doublecomplex *alpha, doublecomplex *beta, doublecomplex *vl, integer - *ldvl, doublecomplex *vr, integer *ldvr, doublecomplex *work, integer - *lwork, doublereal *rwork, integer *info); - -/* Subroutine */ int zggevx_(char *balanc, char *jobvl, char *jobvr, char * - sense, integer *n, doublecomplex *a, integer *lda, doublecomplex *b, - integer *ldb, doublecomplex *alpha, doublecomplex *beta, - doublecomplex *vl, integer *ldvl, doublecomplex *vr, integer *ldvr, - integer *ilo, integer *ihi, doublereal *lscale, doublereal *rscale, - doublereal *abnrm, doublereal *bbnrm, doublereal *rconde, doublereal * - rcondv, doublecomplex *work, integer *lwork, doublereal *rwork, - integer *iwork, logical *bwork, integer *info); - -/* Subroutine */ int zggglm_(integer *n, integer *m, integer *p, - doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, - doublecomplex *d__, doublecomplex *x, doublecomplex *y, doublecomplex - *work, integer *lwork, integer *info); - -/* Subroutine */ int zgghrd_(char *compq, char *compz, integer *n, integer * - ilo, integer *ihi, doublecomplex *a, integer *lda, doublecomplex *b, - integer *ldb, doublecomplex *q, integer *ldq, doublecomplex *z__, - integer *ldz, integer *info); - -/* Subroutine */ int zgglse_(integer *m, integer *n, integer *p, - doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, - doublecomplex *c__, doublecomplex *d__, doublecomplex *x, - doublecomplex *work, integer *lwork, integer *info); - -/* Subroutine */ int zggqrf_(integer *n, integer *m, integer *p, - doublecomplex *a, integer *lda, doublecomplex *taua, doublecomplex *b, - integer *ldb, doublecomplex *taub, doublecomplex *work, integer * - lwork, integer *info); - -/* Subroutine */ int zggrqf_(integer *m, integer *p, integer *n, - doublecomplex *a, integer *lda, doublecomplex *taua, doublecomplex *b, - integer *ldb, doublecomplex *taub, doublecomplex *work, integer * - lwork, integer *info); - -/* Subroutine */ int zggsvd_(char *jobu, char *jobv, char *jobq, integer *m, - integer *n, integer *p, integer *k, integer *l, doublecomplex *a, - integer *lda, doublecomplex *b, integer *ldb, doublereal *alpha, - doublereal *beta, doublecomplex *u, integer *ldu, doublecomplex *v, - integer *ldv, doublecomplex *q, integer *ldq, doublecomplex *work, - doublereal *rwork, integer *iwork, integer *info); - -/* Subroutine */ int zggsvp_(char *jobu, char *jobv, char *jobq, integer *m, - integer *p, integer *n, doublecomplex *a, integer *lda, doublecomplex - *b, integer *ldb, doublereal *tola, doublereal *tolb, integer *k, - integer *l, doublecomplex *u, integer *ldu, doublecomplex *v, integer - *ldv, doublecomplex *q, integer *ldq, integer *iwork, doublereal * - rwork, doublecomplex *tau, doublecomplex *work, integer *info); - -/* Subroutine */ int zgtcon_(char *norm, integer *n, doublecomplex *dl, - doublecomplex *d__, doublecomplex *du, doublecomplex *du2, integer * - ipiv, doublereal *anorm, doublereal *rcond, doublecomplex *work, - integer *info); - -/* Subroutine */ int zgtrfs_(char *trans, integer *n, integer *nrhs, - doublecomplex *dl, doublecomplex *d__, doublecomplex *du, - doublecomplex *dlf, doublecomplex *df, doublecomplex *duf, - doublecomplex *du2, integer *ipiv, doublecomplex *b, integer *ldb, - doublecomplex *x, integer *ldx, doublereal *ferr, doublereal *berr, - doublecomplex *work, doublereal *rwork, integer *info); - -/* Subroutine */ int zgtsv_(integer *n, integer *nrhs, doublecomplex *dl, - doublecomplex *d__, doublecomplex *du, doublecomplex *b, integer *ldb, - integer *info); - -/* Subroutine */ int zgtsvx_(char *fact, char *trans, integer *n, integer * - nrhs, doublecomplex *dl, doublecomplex *d__, doublecomplex *du, - doublecomplex *dlf, doublecomplex *df, doublecomplex *duf, - doublecomplex *du2, integer *ipiv, doublecomplex *b, integer *ldb, - doublecomplex *x, integer *ldx, doublereal *rcond, doublereal *ferr, - doublereal *berr, doublecomplex *work, doublereal *rwork, integer * - info); - -/* Subroutine */ int zgttrf_(integer *n, doublecomplex *dl, doublecomplex * - d__, doublecomplex *du, doublecomplex *du2, integer *ipiv, integer * - info); - -/* Subroutine */ int zgttrs_(char *trans, integer *n, integer *nrhs, - doublecomplex *dl, doublecomplex *d__, doublecomplex *du, - doublecomplex *du2, integer *ipiv, doublecomplex *b, integer *ldb, - integer *info); - -/* Subroutine */ int zgtts2_(integer *itrans, integer *n, integer *nrhs, - doublecomplex *dl, doublecomplex *d__, doublecomplex *du, - doublecomplex *du2, integer *ipiv, doublecomplex *b, integer *ldb); - -/* Subroutine */ int zhbev_(char *jobz, char *uplo, integer *n, integer *kd, - doublecomplex *ab, integer *ldab, doublereal *w, doublecomplex *z__, - integer *ldz, doublecomplex *work, doublereal *rwork, integer *info); - -/* Subroutine */ int zhbevd_(char *jobz, char *uplo, integer *n, integer *kd, - doublecomplex *ab, integer *ldab, doublereal *w, doublecomplex *z__, - integer *ldz, doublecomplex *work, integer *lwork, doublereal *rwork, - integer *lrwork, integer *iwork, integer *liwork, integer *info); - -/* Subroutine */ int zhbevx_(char *jobz, char *range, char *uplo, integer *n, - integer *kd, doublecomplex *ab, integer *ldab, doublecomplex *q, - integer *ldq, doublereal *vl, doublereal *vu, integer *il, integer * - iu, doublereal *abstol, integer *m, doublereal *w, doublecomplex *z__, - integer *ldz, doublecomplex *work, doublereal *rwork, integer *iwork, - integer *ifail, integer *info); - -/* Subroutine */ int zhbgst_(char *vect, char *uplo, integer *n, integer *ka, - integer *kb, doublecomplex *ab, integer *ldab, doublecomplex *bb, - integer *ldbb, doublecomplex *x, integer *ldx, doublecomplex *work, - doublereal *rwork, integer *info); - -/* Subroutine */ int zhbgv_(char *jobz, char *uplo, integer *n, integer *ka, - integer *kb, doublecomplex *ab, integer *ldab, doublecomplex *bb, - integer *ldbb, doublereal *w, doublecomplex *z__, integer *ldz, - doublecomplex *work, doublereal *rwork, integer *info); - -/* Subroutine */ int zhbgvx_(char *jobz, char *range, char *uplo, integer *n, - integer *ka, integer *kb, doublecomplex *ab, integer *ldab, - doublecomplex *bb, integer *ldbb, doublecomplex *q, integer *ldq, - doublereal *vl, doublereal *vu, integer *il, integer *iu, doublereal * - abstol, integer *m, doublereal *w, doublecomplex *z__, integer *ldz, - doublecomplex *work, doublereal *rwork, integer *iwork, integer * - ifail, integer *info); - -/* Subroutine */ int zhbtrd_(char *vect, char *uplo, integer *n, integer *kd, - doublecomplex *ab, integer *ldab, doublereal *d__, doublereal *e, - doublecomplex *q, integer *ldq, doublecomplex *work, integer *info); - -/* Subroutine */ int zhecon_(char *uplo, integer *n, doublecomplex *a, - integer *lda, integer *ipiv, doublereal *anorm, doublereal *rcond, - doublecomplex *work, integer *info); - -/* Subroutine */ int zheev_(char *jobz, char *uplo, integer *n, doublecomplex - *a, integer *lda, doublereal *w, doublecomplex *work, integer *lwork, - doublereal *rwork, integer *info); - -/* Subroutine */ int zheevd_(char *jobz, char *uplo, integer *n, - doublecomplex *a, integer *lda, doublereal *w, doublecomplex *work, - integer *lwork, doublereal *rwork, integer *lrwork, integer *iwork, - integer *liwork, integer *info); - -/* Subroutine */ int zheevr_(char *jobz, char *range, char *uplo, integer *n, - doublecomplex *a, integer *lda, doublereal *vl, doublereal *vu, - integer *il, integer *iu, doublereal *abstol, integer *m, doublereal * - w, doublecomplex *z__, integer *ldz, integer *isuppz, doublecomplex * - work, integer *lwork, doublereal *rwork, integer *lrwork, integer * - iwork, integer *liwork, integer *info); - -/* Subroutine */ int zheevx_(char *jobz, char *range, char *uplo, integer *n, - doublecomplex *a, integer *lda, doublereal *vl, doublereal *vu, - integer *il, integer *iu, doublereal *abstol, integer *m, doublereal * - w, doublecomplex *z__, integer *ldz, doublecomplex *work, integer * - lwork, doublereal *rwork, integer *iwork, integer *ifail, integer * - info); - -/* Subroutine */ int zhegs2_(integer *itype, char *uplo, integer *n, - doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, - integer *info); - -/* Subroutine */ int zhegst_(integer *itype, char *uplo, integer *n, - doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, - integer *info); - -/* Subroutine */ int zhegv_(integer *itype, char *jobz, char *uplo, integer * - n, doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, - doublereal *w, doublecomplex *work, integer *lwork, doublereal *rwork, - integer *info); - -/* Subroutine */ int zhegvd_(integer *itype, char *jobz, char *uplo, integer * - n, doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, - doublereal *w, doublecomplex *work, integer *lwork, doublereal *rwork, - integer *lrwork, integer *iwork, integer *liwork, integer *info); - -/* Subroutine */ int zhegvx_(integer *itype, char *jobz, char *range, char * - uplo, integer *n, doublecomplex *a, integer *lda, doublecomplex *b, - integer *ldb, doublereal *vl, doublereal *vu, integer *il, integer * - iu, doublereal *abstol, integer *m, doublereal *w, doublecomplex *z__, - integer *ldz, doublecomplex *work, integer *lwork, doublereal *rwork, - integer *iwork, integer *ifail, integer *info); - -/* Subroutine */ int zherfs_(char *uplo, integer *n, integer *nrhs, - doublecomplex *a, integer *lda, doublecomplex *af, integer *ldaf, - integer *ipiv, doublecomplex *b, integer *ldb, doublecomplex *x, - integer *ldx, doublereal *ferr, doublereal *berr, doublecomplex *work, - doublereal *rwork, integer *info); - -/* Subroutine */ int zhesv_(char *uplo, integer *n, integer *nrhs, - doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *b, - integer *ldb, doublecomplex *work, integer *lwork, integer *info); - -/* Subroutine */ int zhesvx_(char *fact, char *uplo, integer *n, integer * - nrhs, doublecomplex *a, integer *lda, doublecomplex *af, integer * - ldaf, integer *ipiv, doublecomplex *b, integer *ldb, doublecomplex *x, - integer *ldx, doublereal *rcond, doublereal *ferr, doublereal *berr, - doublecomplex *work, integer *lwork, doublereal *rwork, integer *info); - -/* Subroutine */ int zhetf2_(char *uplo, integer *n, doublecomplex *a, - integer *lda, integer *ipiv, integer *info); - -/* Subroutine */ int zhetrd_(char *uplo, integer *n, doublecomplex *a, - integer *lda, doublereal *d__, doublereal *e, doublecomplex *tau, - doublecomplex *work, integer *lwork, integer *info); - -/* Subroutine */ int zhetrf_(char *uplo, integer *n, doublecomplex *a, - integer *lda, integer *ipiv, doublecomplex *work, integer *lwork, - integer *info); - -/* Subroutine */ int zhetri_(char *uplo, integer *n, doublecomplex *a, - integer *lda, integer *ipiv, doublecomplex *work, integer *info); - -/* Subroutine */ int zhetrs_(char *uplo, integer *n, integer *nrhs, - doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *b, - integer *ldb, integer *info); - -/* Subroutine */ int zhgeqz_(char *job, char *compq, char *compz, integer *n, - integer *ilo, integer *ihi, doublecomplex *a, integer *lda, - doublecomplex *b, integer *ldb, doublecomplex *alpha, doublecomplex * - beta, doublecomplex *q, integer *ldq, doublecomplex *z__, integer * - ldz, doublecomplex *work, integer *lwork, doublereal *rwork, integer * - info); - -/* Subroutine */ int zhpcon_(char *uplo, integer *n, doublecomplex *ap, - integer *ipiv, doublereal *anorm, doublereal *rcond, doublecomplex * - work, integer *info); - -/* Subroutine */ int zhpev_(char *jobz, char *uplo, integer *n, doublecomplex - *ap, doublereal *w, doublecomplex *z__, integer *ldz, doublecomplex * - work, doublereal *rwork, integer *info); - -/* Subroutine */ int zhpevd_(char *jobz, char *uplo, integer *n, - doublecomplex *ap, doublereal *w, doublecomplex *z__, integer *ldz, - doublecomplex *work, integer *lwork, doublereal *rwork, integer * - lrwork, integer *iwork, integer *liwork, integer *info); - -/* Subroutine */ int zhpevx_(char *jobz, char *range, char *uplo, integer *n, - doublecomplex *ap, doublereal *vl, doublereal *vu, integer *il, - integer *iu, doublereal *abstol, integer *m, doublereal *w, - doublecomplex *z__, integer *ldz, doublecomplex *work, doublereal * - rwork, integer *iwork, integer *ifail, integer *info); - -/* Subroutine */ int zhpgst_(integer *itype, char *uplo, integer *n, - doublecomplex *ap, doublecomplex *bp, integer *info); - -/* Subroutine */ int zhpgv_(integer *itype, char *jobz, char *uplo, integer * - n, doublecomplex *ap, doublecomplex *bp, doublereal *w, doublecomplex - *z__, integer *ldz, doublecomplex *work, doublereal *rwork, integer * - info); - -/* Subroutine */ int zhpgvd_(integer *itype, char *jobz, char *uplo, integer * - n, doublecomplex *ap, doublecomplex *bp, doublereal *w, doublecomplex - *z__, integer *ldz, doublecomplex *work, integer *lwork, doublereal * - rwork, integer *lrwork, integer *iwork, integer *liwork, integer * - info); - -/* Subroutine */ int zhpgvx_(integer *itype, char *jobz, char *range, char * - uplo, integer *n, doublecomplex *ap, doublecomplex *bp, doublereal * - vl, doublereal *vu, integer *il, integer *iu, doublereal *abstol, - integer *m, doublereal *w, doublecomplex *z__, integer *ldz, - doublecomplex *work, doublereal *rwork, integer *iwork, integer * - ifail, integer *info); - -/* Subroutine */ int zhprfs_(char *uplo, integer *n, integer *nrhs, - doublecomplex *ap, doublecomplex *afp, integer *ipiv, doublecomplex * - b, integer *ldb, doublecomplex *x, integer *ldx, doublereal *ferr, - doublereal *berr, doublecomplex *work, doublereal *rwork, integer * - info); - -/* Subroutine */ int zhpsv_(char *uplo, integer *n, integer *nrhs, - doublecomplex *ap, integer *ipiv, doublecomplex *b, integer *ldb, - integer *info); - -/* Subroutine */ int zhpsvx_(char *fact, char *uplo, integer *n, integer * - nrhs, doublecomplex *ap, doublecomplex *afp, integer *ipiv, - doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, - doublereal *rcond, doublereal *ferr, doublereal *berr, doublecomplex * - work, doublereal *rwork, integer *info); - -/* Subroutine */ int zhptrd_(char *uplo, integer *n, doublecomplex *ap, - doublereal *d__, doublereal *e, doublecomplex *tau, integer *info); - -/* Subroutine */ int zhptrf_(char *uplo, integer *n, doublecomplex *ap, - integer *ipiv, integer *info); - -/* Subroutine */ int zhptri_(char *uplo, integer *n, doublecomplex *ap, - integer *ipiv, doublecomplex *work, integer *info); - -/* Subroutine */ int zhptrs_(char *uplo, integer *n, integer *nrhs, - doublecomplex *ap, integer *ipiv, doublecomplex *b, integer *ldb, - integer *info); - -/* Subroutine */ int zhsein_(char *side, char *eigsrc, char *initv, logical * - select, integer *n, doublecomplex *h__, integer *ldh, doublecomplex * - w, doublecomplex *vl, integer *ldvl, doublecomplex *vr, integer *ldvr, - integer *mm, integer *m, doublecomplex *work, doublereal *rwork, - integer *ifaill, integer *ifailr, integer *info); - -/* Subroutine */ int zhseqr_(char *job, char *compz, integer *n, integer *ilo, - integer *ihi, doublecomplex *h__, integer *ldh, doublecomplex *w, - doublecomplex *z__, integer *ldz, doublecomplex *work, integer *lwork, - integer *info); - -/* Subroutine */ int zlabrd_(integer *m, integer *n, integer *nb, - doublecomplex *a, integer *lda, doublereal *d__, doublereal *e, - doublecomplex *tauq, doublecomplex *taup, doublecomplex *x, integer * - ldx, doublecomplex *y, integer *ldy); - -/* Subroutine */ int zlacgv_(integer *n, doublecomplex *x, integer *incx); - -/* Subroutine */ int zlacon_(integer *n, doublecomplex *v, doublecomplex *x, - doublereal *est, integer *kase); - -/* Subroutine */ int zlacp2_(char *uplo, integer *m, integer *n, doublereal * - a, integer *lda, doublecomplex *b, integer *ldb); - -/* Subroutine */ int zlacpy_(char *uplo, integer *m, integer *n, - doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb); - -/* Subroutine */ int zlacrm_(integer *m, integer *n, doublecomplex *a, - integer *lda, doublereal *b, integer *ldb, doublecomplex *c__, - integer *ldc, doublereal *rwork); - -/* Subroutine */ int zlacrt_(integer *n, doublecomplex *cx, integer *incx, - doublecomplex *cy, integer *incy, doublecomplex *c__, doublecomplex * - s); - -/* Subroutine */ int zlaed0_(integer *qsiz, integer *n, doublereal *d__, - doublereal *e, doublecomplex *q, integer *ldq, doublecomplex *qstore, - integer *ldqs, doublereal *rwork, integer *iwork, integer *info); - -/* Subroutine */ int zlaed7_(integer *n, integer *cutpnt, integer *qsiz, - integer *tlvls, integer *curlvl, integer *curpbm, doublereal *d__, - doublecomplex *q, integer *ldq, doublereal *rho, integer *indxq, - doublereal *qstore, integer *qptr, integer *prmptr, integer *perm, - integer *givptr, integer *givcol, doublereal *givnum, doublecomplex * - work, doublereal *rwork, integer *iwork, integer *info); - -/* Subroutine */ int zlaed8_(integer *k, integer *n, integer *qsiz, - doublecomplex *q, integer *ldq, doublereal *d__, doublereal *rho, - integer *cutpnt, doublereal *z__, doublereal *dlamda, doublecomplex * - q2, integer *ldq2, doublereal *w, integer *indxp, integer *indx, - integer *indxq, integer *perm, integer *givptr, integer *givcol, - doublereal *givnum, integer *info); - -/* Subroutine */ int zlaein_(logical *rightv, logical *noinit, integer *n, - doublecomplex *h__, integer *ldh, doublecomplex *w, doublecomplex *v, - doublecomplex *b, integer *ldb, doublereal *rwork, doublereal *eps3, - doublereal *smlnum, integer *info); - -/* Subroutine */ int zlaesy_(doublecomplex *a, doublecomplex *b, - doublecomplex *c__, doublecomplex *rt1, doublecomplex *rt2, - doublecomplex *evscal, doublecomplex *cs1, doublecomplex *sn1); - -/* Subroutine */ int zlaev2_(doublecomplex *a, doublecomplex *b, - doublecomplex *c__, doublereal *rt1, doublereal *rt2, doublereal *cs1, - doublecomplex *sn1); - -/* Subroutine */ int zlags2_(logical *upper, doublereal *a1, doublecomplex * - a2, doublereal *a3, doublereal *b1, doublecomplex *b2, doublereal *b3, - doublereal *csu, doublecomplex *snu, doublereal *csv, doublecomplex * - snv, doublereal *csq, doublecomplex *snq); - -/* Subroutine */ int zlagtm_(char *trans, integer *n, integer *nrhs, - doublereal *alpha, doublecomplex *dl, doublecomplex *d__, - doublecomplex *du, doublecomplex *x, integer *ldx, doublereal *beta, - doublecomplex *b, integer *ldb); - -/* Subroutine */ int zlahef_(char *uplo, integer *n, integer *nb, integer *kb, - doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *w, - integer *ldw, integer *info); - -/* Subroutine */ int zlahqr_(logical *wantt, logical *wantz, integer *n, - integer *ilo, integer *ihi, doublecomplex *h__, integer *ldh, - doublecomplex *w, integer *iloz, integer *ihiz, doublecomplex *z__, - integer *ldz, integer *info); - -/* Subroutine */ int zlahrd_(integer *n, integer *k, integer *nb, - doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex *t, - integer *ldt, doublecomplex *y, integer *ldy); - -/* Subroutine */ int zlaic1_(integer *job, integer *j, doublecomplex *x, - doublereal *sest, doublecomplex *w, doublecomplex *gamma, doublereal * - sestpr, doublecomplex *s, doublecomplex *c__); - -/* Subroutine */ int zlals0_(integer *icompq, integer *nl, integer *nr, - integer *sqre, integer *nrhs, doublecomplex *b, integer *ldb, - doublecomplex *bx, integer *ldbx, integer *perm, integer *givptr, - integer *givcol, integer *ldgcol, doublereal *givnum, integer *ldgnum, - doublereal *poles, doublereal *difl, doublereal *difr, doublereal * - z__, integer *k, doublereal *c__, doublereal *s, doublereal *rwork, - integer *info); - -/* Subroutine */ int zlalsa_(integer *icompq, integer *smlsiz, integer *n, - integer *nrhs, doublecomplex *b, integer *ldb, doublecomplex *bx, - integer *ldbx, doublereal *u, integer *ldu, doublereal *vt, integer * - k, doublereal *difl, doublereal *difr, doublereal *z__, doublereal * - poles, integer *givptr, integer *givcol, integer *ldgcol, integer * - perm, doublereal *givnum, doublereal *c__, doublereal *s, doublereal * - rwork, integer *iwork, integer *info); - -/* Subroutine */ int zlapll_(integer *n, doublecomplex *x, integer *incx, - doublecomplex *y, integer *incy, doublereal *ssmin); - -/* Subroutine */ int zlapmt_(logical *forwrd, integer *m, integer *n, - doublecomplex *x, integer *ldx, integer *k); - -/* Subroutine */ int zlaqgb_(integer *m, integer *n, integer *kl, integer *ku, - doublecomplex *ab, integer *ldab, doublereal *r__, doublereal *c__, - doublereal *rowcnd, doublereal *colcnd, doublereal *amax, char *equed); - -/* Subroutine */ int zlaqge_(integer *m, integer *n, doublecomplex *a, - integer *lda, doublereal *r__, doublereal *c__, doublereal *rowcnd, - doublereal *colcnd, doublereal *amax, char *equed); - -/* Subroutine */ int zlaqhb_(char *uplo, integer *n, integer *kd, - doublecomplex *ab, integer *ldab, doublereal *s, doublereal *scond, - doublereal *amax, char *equed); - -/* Subroutine */ int zlaqhe_(char *uplo, integer *n, doublecomplex *a, - integer *lda, doublereal *s, doublereal *scond, doublereal *amax, - char *equed); - -/* Subroutine */ int zlaqhp_(char *uplo, integer *n, doublecomplex *ap, - doublereal *s, doublereal *scond, doublereal *amax, char *equed); - -/* Subroutine */ int zlaqp2_(integer *m, integer *n, integer *offset, - doublecomplex *a, integer *lda, integer *jpvt, doublecomplex *tau, - doublereal *vn1, doublereal *vn2, doublecomplex *work); - -/* Subroutine */ int zlaqps_(integer *m, integer *n, integer *offset, integer - *nb, integer *kb, doublecomplex *a, integer *lda, integer *jpvt, - doublecomplex *tau, doublereal *vn1, doublereal *vn2, doublecomplex * - auxv, doublecomplex *f, integer *ldf); - -/* Subroutine */ int zlaqsb_(char *uplo, integer *n, integer *kd, - doublecomplex *ab, integer *ldab, doublereal *s, doublereal *scond, - doublereal *amax, char *equed); - -/* Subroutine */ int zlaqsp_(char *uplo, integer *n, doublecomplex *ap, - doublereal *s, doublereal *scond, doublereal *amax, char *equed); - -/* Subroutine */ int zlaqsy_(char *uplo, integer *n, doublecomplex *a, - integer *lda, doublereal *s, doublereal *scond, doublereal *amax, - char *equed); - -/* Subroutine */ int zlar1v_(integer *n, integer *b1, integer *bn, doublereal - *sigma, doublereal *d__, doublereal *l, doublereal *ld, doublereal * - lld, doublereal *gersch, doublecomplex *z__, doublereal *ztz, - doublereal *mingma, integer *r__, integer *isuppz, doublereal *work); - -/* Subroutine */ int zlar2v_(integer *n, doublecomplex *x, doublecomplex *y, - doublecomplex *z__, integer *incx, doublereal *c__, doublecomplex *s, - integer *incc); - -/* Subroutine */ int zlarcm_(integer *m, integer *n, doublereal *a, integer * - lda, doublecomplex *b, integer *ldb, doublecomplex *c__, integer *ldc, - doublereal *rwork); - -/* Subroutine */ int zlarf_(char *side, integer *m, integer *n, doublecomplex - *v, integer *incv, doublecomplex *tau, doublecomplex *c__, integer * - ldc, doublecomplex *work); - -/* Subroutine */ int zlarfb_(char *side, char *trans, char *direct, char * - storev, integer *m, integer *n, integer *k, doublecomplex *v, integer - *ldv, doublecomplex *t, integer *ldt, doublecomplex *c__, integer * - ldc, doublecomplex *work, integer *ldwork); - -/* Subroutine */ int zlarfg_(integer *n, doublecomplex *alpha, doublecomplex * - x, integer *incx, doublecomplex *tau); - -/* Subroutine */ int zlarft_(char *direct, char *storev, integer *n, integer * - k, doublecomplex *v, integer *ldv, doublecomplex *tau, doublecomplex * - t, integer *ldt); - -/* Subroutine */ int zlarfx_(char *side, integer *m, integer *n, - doublecomplex *v, doublecomplex *tau, doublecomplex *c__, integer * - ldc, doublecomplex *work); - -/* Subroutine */ int zlargv_(integer *n, doublecomplex *x, integer *incx, - doublecomplex *y, integer *incy, doublereal *c__, integer *incc); - -/* Subroutine */ int zlarnv_(integer *idist, integer *iseed, integer *n, - doublecomplex *x); - -/* Subroutine */ int zlarrv_(integer *n, doublereal *d__, doublereal *l, - integer *isplit, integer *m, doublereal *w, integer *iblock, - doublereal *gersch, doublereal *tol, doublecomplex *z__, integer *ldz, - integer *isuppz, doublereal *work, integer *iwork, integer *info); - -/* Subroutine */ int zlartg_(doublecomplex *f, doublecomplex *g, doublereal * - cs, doublecomplex *sn, doublecomplex *r__); - -/* Subroutine */ int zlartv_(integer *n, doublecomplex *x, integer *incx, - doublecomplex *y, integer *incy, doublereal *c__, doublecomplex *s, - integer *incc); - -/* Subroutine */ int zlarz_(char *side, integer *m, integer *n, integer *l, - doublecomplex *v, integer *incv, doublecomplex *tau, doublecomplex * - c__, integer *ldc, doublecomplex *work); - -/* Subroutine */ int zlarzb_(char *side, char *trans, char *direct, char * - storev, integer *m, integer *n, integer *k, integer *l, doublecomplex - *v, integer *ldv, doublecomplex *t, integer *ldt, doublecomplex *c__, - integer *ldc, doublecomplex *work, integer *ldwork); - -/* Subroutine */ int zlarzt_(char *direct, char *storev, integer *n, integer * - k, doublecomplex *v, integer *ldv, doublecomplex *tau, doublecomplex * - t, integer *ldt); - -/* Subroutine */ int zlascl_(char *type__, integer *kl, integer *ku, - doublereal *cfrom, doublereal *cto, integer *m, integer *n, - doublecomplex *a, integer *lda, integer *info); - -/* Subroutine */ int zlaset_(char *uplo, integer *m, integer *n, - doublecomplex *alpha, doublecomplex *beta, doublecomplex *a, integer * - lda); - -/* Subroutine */ int zlasr_(char *side, char *pivot, char *direct, integer *m, - integer *n, doublereal *c__, doublereal *s, doublecomplex *a, - integer *lda); - -/* Subroutine */ int zlassq_(integer *n, doublecomplex *x, integer *incx, - doublereal *scale, doublereal *sumsq); - -/* Subroutine */ int zlaswp_(integer *n, doublecomplex *a, integer *lda, - integer *k1, integer *k2, integer *ipiv, integer *incx); - -/* Subroutine */ int zlasyf_(char *uplo, integer *n, integer *nb, integer *kb, - doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *w, - integer *ldw, integer *info); - -/* Subroutine */ int zlatbs_(char *uplo, char *trans, char *diag, char * - normin, integer *n, integer *kd, doublecomplex *ab, integer *ldab, - doublecomplex *x, doublereal *scale, doublereal *cnorm, integer *info); - -/* Subroutine */ int zlatdf_(integer *ijob, integer *n, doublecomplex *z__, - integer *ldz, doublecomplex *rhs, doublereal *rdsum, doublereal * - rdscal, integer *ipiv, integer *jpiv); - -/* Subroutine */ int zlatps_(char *uplo, char *trans, char *diag, char * - normin, integer *n, doublecomplex *ap, doublecomplex *x, doublereal * - scale, doublereal *cnorm, integer *info); - -/* Subroutine */ int zlatrd_(char *uplo, integer *n, integer *nb, - doublecomplex *a, integer *lda, doublereal *e, doublecomplex *tau, - doublecomplex *w, integer *ldw); - -/* Subroutine */ int zlatrs_(char *uplo, char *trans, char *diag, char * - normin, integer *n, doublecomplex *a, integer *lda, doublecomplex *x, - doublereal *scale, doublereal *cnorm, integer *info); - -/* Subroutine */ int zlatrz_(integer *m, integer *n, integer *l, - doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * - work); - -/* Subroutine */ int zlatzm_(char *side, integer *m, integer *n, - doublecomplex *v, integer *incv, doublecomplex *tau, doublecomplex * - c1, doublecomplex *c2, integer *ldc, doublecomplex *work); - -/* Subroutine */ int zlauu2_(char *uplo, integer *n, doublecomplex *a, - integer *lda, integer *info); - -/* Subroutine */ int zlauum_(char *uplo, integer *n, doublecomplex *a, - integer *lda, integer *info); - -/* Subroutine */ int zpbcon_(char *uplo, integer *n, integer *kd, - doublecomplex *ab, integer *ldab, doublereal *anorm, doublereal * - rcond, doublecomplex *work, doublereal *rwork, integer *info); - -/* Subroutine */ int zpbequ_(char *uplo, integer *n, integer *kd, - doublecomplex *ab, integer *ldab, doublereal *s, doublereal *scond, - doublereal *amax, integer *info); - -/* Subroutine */ int zpbrfs_(char *uplo, integer *n, integer *kd, integer * - nrhs, doublecomplex *ab, integer *ldab, doublecomplex *afb, integer * - ldafb, doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, - doublereal *ferr, doublereal *berr, doublecomplex *work, doublereal * - rwork, integer *info); - -/* Subroutine */ int zpbstf_(char *uplo, integer *n, integer *kd, - doublecomplex *ab, integer *ldab, integer *info); - -/* Subroutine */ int zpbsv_(char *uplo, integer *n, integer *kd, integer * - nrhs, doublecomplex *ab, integer *ldab, doublecomplex *b, integer * - ldb, integer *info); - -/* Subroutine */ int zpbsvx_(char *fact, char *uplo, integer *n, integer *kd, - integer *nrhs, doublecomplex *ab, integer *ldab, doublecomplex *afb, - integer *ldafb, char *equed, doublereal *s, doublecomplex *b, integer - *ldb, doublecomplex *x, integer *ldx, doublereal *rcond, doublereal * - ferr, doublereal *berr, doublecomplex *work, doublereal *rwork, - integer *info); - -/* Subroutine */ int zpbtf2_(char *uplo, integer *n, integer *kd, - doublecomplex *ab, integer *ldab, integer *info); - -/* Subroutine */ int zpbtrf_(char *uplo, integer *n, integer *kd, - doublecomplex *ab, integer *ldab, integer *info); - -/* Subroutine */ int zpbtrs_(char *uplo, integer *n, integer *kd, integer * - nrhs, doublecomplex *ab, integer *ldab, doublecomplex *b, integer * - ldb, integer *info); - -/* Subroutine */ int zpocon_(char *uplo, integer *n, doublecomplex *a, - integer *lda, doublereal *anorm, doublereal *rcond, doublecomplex * - work, doublereal *rwork, integer *info); - -/* Subroutine */ int zpoequ_(integer *n, doublecomplex *a, integer *lda, - doublereal *s, doublereal *scond, doublereal *amax, integer *info); - -/* Subroutine */ int zporfs_(char *uplo, integer *n, integer *nrhs, - doublecomplex *a, integer *lda, doublecomplex *af, integer *ldaf, - doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, - doublereal *ferr, doublereal *berr, doublecomplex *work, doublereal * - rwork, integer *info); - -/* Subroutine */ int zposv_(char *uplo, integer *n, integer *nrhs, - doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, - integer *info); - -/* Subroutine */ int zposvx_(char *fact, char *uplo, integer *n, integer * - nrhs, doublecomplex *a, integer *lda, doublecomplex *af, integer * - ldaf, char *equed, doublereal *s, doublecomplex *b, integer *ldb, - doublecomplex *x, integer *ldx, doublereal *rcond, doublereal *ferr, - doublereal *berr, doublecomplex *work, doublereal *rwork, integer * - info); - -/* Subroutine */ int zpotf2_(char *uplo, integer *n, doublecomplex *a, - integer *lda, integer *info); - -/* Subroutine */ int zpotrf_(char *uplo, integer *n, doublecomplex *a, - integer *lda, integer *info); - -/* Subroutine */ int zpotri_(char *uplo, integer *n, doublecomplex *a, - integer *lda, integer *info); - -/* Subroutine */ int zpotrs_(char *uplo, integer *n, integer *nrhs, - doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, - integer *info); - -/* Subroutine */ int zppcon_(char *uplo, integer *n, doublecomplex *ap, - doublereal *anorm, doublereal *rcond, doublecomplex *work, doublereal - *rwork, integer *info); - -/* Subroutine */ int zppequ_(char *uplo, integer *n, doublecomplex *ap, - doublereal *s, doublereal *scond, doublereal *amax, integer *info); - -/* Subroutine */ int zpprfs_(char *uplo, integer *n, integer *nrhs, - doublecomplex *ap, doublecomplex *afp, doublecomplex *b, integer *ldb, - doublecomplex *x, integer *ldx, doublereal *ferr, doublereal *berr, - doublecomplex *work, doublereal *rwork, integer *info); - -/* Subroutine */ int zppsv_(char *uplo, integer *n, integer *nrhs, - doublecomplex *ap, doublecomplex *b, integer *ldb, integer *info); - -/* Subroutine */ int zppsvx_(char *fact, char *uplo, integer *n, integer * - nrhs, doublecomplex *ap, doublecomplex *afp, char *equed, doublereal * - s, doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, - doublereal *rcond, doublereal *ferr, doublereal *berr, doublecomplex * - work, doublereal *rwork, integer *info); - -/* Subroutine */ int zpptrf_(char *uplo, integer *n, doublecomplex *ap, - integer *info); - -/* Subroutine */ int zpptri_(char *uplo, integer *n, doublecomplex *ap, - integer *info); - -/* Subroutine */ int zpptrs_(char *uplo, integer *n, integer *nrhs, - doublecomplex *ap, doublecomplex *b, integer *ldb, integer *info); - -/* Subroutine */ int zptcon_(integer *n, doublereal *d__, doublecomplex *e, - doublereal *anorm, doublereal *rcond, doublereal *rwork, integer * - info); - -/* Subroutine */ int zptrfs_(char *uplo, integer *n, integer *nrhs, - doublereal *d__, doublecomplex *e, doublereal *df, doublecomplex *ef, - doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, - doublereal *ferr, doublereal *berr, doublecomplex *work, doublereal * - rwork, integer *info); - -/* Subroutine */ int zptsv_(integer *n, integer *nrhs, doublereal *d__, - doublecomplex *e, doublecomplex *b, integer *ldb, integer *info); - -/* Subroutine */ int zptsvx_(char *fact, integer *n, integer *nrhs, - doublereal *d__, doublecomplex *e, doublereal *df, doublecomplex *ef, - doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, - doublereal *rcond, doublereal *ferr, doublereal *berr, doublecomplex * - work, doublereal *rwork, integer *info); - -/* Subroutine */ int zpttrf_(integer *n, doublereal *d__, doublecomplex *e, - integer *info); - -/* Subroutine */ int zpttrs_(char *uplo, integer *n, integer *nrhs, - doublereal *d__, doublecomplex *e, doublecomplex *b, integer *ldb, - integer *info); - -/* Subroutine */ int zptts2_(integer *iuplo, integer *n, integer *nrhs, - doublereal *d__, doublecomplex *e, doublecomplex *b, integer *ldb); - -/* Subroutine */ int zrot_(integer *n, doublecomplex *cx, integer *incx, - doublecomplex *cy, integer *incy, doublereal *c__, doublecomplex *s); - -/* Subroutine */ int zspcon_(char *uplo, integer *n, doublecomplex *ap, - integer *ipiv, doublereal *anorm, doublereal *rcond, doublecomplex * - work, integer *info); - -/* Subroutine */ int zspmv_(char *uplo, integer *n, doublecomplex *alpha, - doublecomplex *ap, doublecomplex *x, integer *incx, doublecomplex * - beta, doublecomplex *y, integer *incy); - -/* Subroutine */ int zspr_(char *uplo, integer *n, doublecomplex *alpha, - doublecomplex *x, integer *incx, doublecomplex *ap); - -/* Subroutine */ int zsprfs_(char *uplo, integer *n, integer *nrhs, - doublecomplex *ap, doublecomplex *afp, integer *ipiv, doublecomplex * - b, integer *ldb, doublecomplex *x, integer *ldx, doublereal *ferr, - doublereal *berr, doublecomplex *work, doublereal *rwork, integer * - info); - -/* Subroutine */ int zspsv_(char *uplo, integer *n, integer *nrhs, - doublecomplex *ap, integer *ipiv, doublecomplex *b, integer *ldb, - integer *info); - -/* Subroutine */ int zspsvx_(char *fact, char *uplo, integer *n, integer * - nrhs, doublecomplex *ap, doublecomplex *afp, integer *ipiv, - doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, - doublereal *rcond, doublereal *ferr, doublereal *berr, doublecomplex * - work, doublereal *rwork, integer *info); - -/* Subroutine */ int zsptrf_(char *uplo, integer *n, doublecomplex *ap, - integer *ipiv, integer *info); - -/* Subroutine */ int zsptri_(char *uplo, integer *n, doublecomplex *ap, - integer *ipiv, doublecomplex *work, integer *info); - -/* Subroutine */ int zsptrs_(char *uplo, integer *n, integer *nrhs, - doublecomplex *ap, integer *ipiv, doublecomplex *b, integer *ldb, - integer *info); - -/* Subroutine */ int zstedc_(char *compz, integer *n, doublereal *d__, - doublereal *e, doublecomplex *z__, integer *ldz, doublecomplex *work, - integer *lwork, doublereal *rwork, integer *lrwork, integer *iwork, - integer *liwork, integer *info); - -/* Subroutine */ int zstein_(integer *n, doublereal *d__, doublereal *e, - integer *m, doublereal *w, integer *iblock, integer *isplit, - doublecomplex *z__, integer *ldz, doublereal *work, integer *iwork, - integer *ifail, integer *info); - -/* Subroutine */ int zsteqr_(char *compz, integer *n, doublereal *d__, - doublereal *e, doublecomplex *z__, integer *ldz, doublereal *work, - integer *info); - -/* Subroutine */ int zsycon_(char *uplo, integer *n, doublecomplex *a, - integer *lda, integer *ipiv, doublereal *anorm, doublereal *rcond, - doublecomplex *work, integer *info); - -/* Subroutine */ int zsymv_(char *uplo, integer *n, doublecomplex *alpha, - doublecomplex *a, integer *lda, doublecomplex *x, integer *incx, - doublecomplex *beta, doublecomplex *y, integer *incy); - -/* Subroutine */ int zsyr_(char *uplo, integer *n, doublecomplex *alpha, - doublecomplex *x, integer *incx, doublecomplex *a, integer *lda); - -/* Subroutine */ int zsyrfs_(char *uplo, integer *n, integer *nrhs, - doublecomplex *a, integer *lda, doublecomplex *af, integer *ldaf, - integer *ipiv, doublecomplex *b, integer *ldb, doublecomplex *x, - integer *ldx, doublereal *ferr, doublereal *berr, doublecomplex *work, - doublereal *rwork, integer *info); - -/* Subroutine */ int zsysv_(char *uplo, integer *n, integer *nrhs, - doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *b, - integer *ldb, doublecomplex *work, integer *lwork, integer *info); - -/* Subroutine */ int zsysvx_(char *fact, char *uplo, integer *n, integer * - nrhs, doublecomplex *a, integer *lda, doublecomplex *af, integer * - ldaf, integer *ipiv, doublecomplex *b, integer *ldb, doublecomplex *x, - integer *ldx, doublereal *rcond, doublereal *ferr, doublereal *berr, - doublecomplex *work, integer *lwork, doublereal *rwork, integer *info); - -/* Subroutine */ int zsytf2_(char *uplo, integer *n, doublecomplex *a, - integer *lda, integer *ipiv, integer *info); - -/* Subroutine */ int zsytrf_(char *uplo, integer *n, doublecomplex *a, - integer *lda, integer *ipiv, doublecomplex *work, integer *lwork, - integer *info); - -/* Subroutine */ int zsytri_(char *uplo, integer *n, doublecomplex *a, - integer *lda, integer *ipiv, doublecomplex *work, integer *info); - -/* Subroutine */ int zsytrs_(char *uplo, integer *n, integer *nrhs, - doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *b, - integer *ldb, integer *info); - -/* Subroutine */ int ztbcon_(char *norm, char *uplo, char *diag, integer *n, - integer *kd, doublecomplex *ab, integer *ldab, doublereal *rcond, - doublecomplex *work, doublereal *rwork, integer *info); - -/* Subroutine */ int ztbrfs_(char *uplo, char *trans, char *diag, integer *n, - integer *kd, integer *nrhs, doublecomplex *ab, integer *ldab, - doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, - doublereal *ferr, doublereal *berr, doublecomplex *work, doublereal * - rwork, integer *info); - -/* Subroutine */ int ztbtrs_(char *uplo, char *trans, char *diag, integer *n, - integer *kd, integer *nrhs, doublecomplex *ab, integer *ldab, - doublecomplex *b, integer *ldb, integer *info); - -/* Subroutine */ int ztgevc_(char *side, char *howmny, logical *select, - integer *n, doublecomplex *a, integer *lda, doublecomplex *b, integer - *ldb, doublecomplex *vl, integer *ldvl, doublecomplex *vr, integer * - ldvr, integer *mm, integer *m, doublecomplex *work, doublereal *rwork, - integer *info); - -/* Subroutine */ int ztgex2_(logical *wantq, logical *wantz, integer *n, - doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, - doublecomplex *q, integer *ldq, doublecomplex *z__, integer *ldz, - integer *j1, integer *info); - -/* Subroutine */ int ztgexc_(logical *wantq, logical *wantz, integer *n, - doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, - doublecomplex *q, integer *ldq, doublecomplex *z__, integer *ldz, - integer *ifst, integer *ilst, integer *info); - -/* Subroutine */ int ztgsen_(integer *ijob, logical *wantq, logical *wantz, - logical *select, integer *n, doublecomplex *a, integer *lda, - doublecomplex *b, integer *ldb, doublecomplex *alpha, doublecomplex * - beta, doublecomplex *q, integer *ldq, doublecomplex *z__, integer * - ldz, integer *m, doublereal *pl, doublereal *pr, doublereal *dif, - doublecomplex *work, integer *lwork, integer *iwork, integer *liwork, - integer *info); - -/* Subroutine */ int ztgsja_(char *jobu, char *jobv, char *jobq, integer *m, - integer *p, integer *n, integer *k, integer *l, doublecomplex *a, - integer *lda, doublecomplex *b, integer *ldb, doublereal *tola, - doublereal *tolb, doublereal *alpha, doublereal *beta, doublecomplex * - u, integer *ldu, doublecomplex *v, integer *ldv, doublecomplex *q, - integer *ldq, doublecomplex *work, integer *ncycle, integer *info); - -/* Subroutine */ int ztgsna_(char *job, char *howmny, logical *select, - integer *n, doublecomplex *a, integer *lda, doublecomplex *b, integer - *ldb, doublecomplex *vl, integer *ldvl, doublecomplex *vr, integer * - ldvr, doublereal *s, doublereal *dif, integer *mm, integer *m, - doublecomplex *work, integer *lwork, integer *iwork, integer *info); - -/* Subroutine */ int ztgsy2_(char *trans, integer *ijob, integer *m, integer * - n, doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, - doublecomplex *c__, integer *ldc, doublecomplex *d__, integer *ldd, - doublecomplex *e, integer *lde, doublecomplex *f, integer *ldf, - doublereal *scale, doublereal *rdsum, doublereal *rdscal, integer * - info); - -/* Subroutine */ int ztgsyl_(char *trans, integer *ijob, integer *m, integer * - n, doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, - doublecomplex *c__, integer *ldc, doublecomplex *d__, integer *ldd, - doublecomplex *e, integer *lde, doublecomplex *f, integer *ldf, - doublereal *scale, doublereal *dif, doublecomplex *work, integer * - lwork, integer *iwork, integer *info); - -/* Subroutine */ int ztpcon_(char *norm, char *uplo, char *diag, integer *n, - doublecomplex *ap, doublereal *rcond, doublecomplex *work, doublereal - *rwork, integer *info); - -/* Subroutine */ int ztprfs_(char *uplo, char *trans, char *diag, integer *n, - integer *nrhs, doublecomplex *ap, doublecomplex *b, integer *ldb, - doublecomplex *x, integer *ldx, doublereal *ferr, doublereal *berr, - doublecomplex *work, doublereal *rwork, integer *info); - -/* Subroutine */ int ztptri_(char *uplo, char *diag, integer *n, - doublecomplex *ap, integer *info); - -/* Subroutine */ int ztptrs_(char *uplo, char *trans, char *diag, integer *n, - integer *nrhs, doublecomplex *ap, doublecomplex *b, integer *ldb, - integer *info); - -/* Subroutine */ int ztrcon_(char *norm, char *uplo, char *diag, integer *n, - doublecomplex *a, integer *lda, doublereal *rcond, doublecomplex * - work, doublereal *rwork, integer *info); - -/* Subroutine */ int ztrevc_(char *side, char *howmny, logical *select, - integer *n, doublecomplex *t, integer *ldt, doublecomplex *vl, - integer *ldvl, doublecomplex *vr, integer *ldvr, integer *mm, integer - *m, doublecomplex *work, doublereal *rwork, integer *info); - -/* Subroutine */ int ztrexc_(char *compq, integer *n, doublecomplex *t, - integer *ldt, doublecomplex *q, integer *ldq, integer *ifst, integer * - ilst, integer *info); - -/* Subroutine */ int ztrrfs_(char *uplo, char *trans, char *diag, integer *n, - integer *nrhs, doublecomplex *a, integer *lda, doublecomplex *b, - integer *ldb, doublecomplex *x, integer *ldx, doublereal *ferr, - doublereal *berr, doublecomplex *work, doublereal *rwork, integer * - info); - -/* Subroutine */ int ztrsen_(char *job, char *compq, logical *select, integer - *n, doublecomplex *t, integer *ldt, doublecomplex *q, integer *ldq, - doublecomplex *w, integer *m, doublereal *s, doublereal *sep, - doublecomplex *work, integer *lwork, integer *info); - -/* Subroutine */ int ztrsna_(char *job, char *howmny, logical *select, - integer *n, doublecomplex *t, integer *ldt, doublecomplex *vl, - integer *ldvl, doublecomplex *vr, integer *ldvr, doublereal *s, - doublereal *sep, integer *mm, integer *m, doublecomplex *work, - integer *ldwork, doublereal *rwork, integer *info); - -/* Subroutine */ int ztrsyl_(char *trana, char *tranb, integer *isgn, integer - *m, integer *n, doublecomplex *a, integer *lda, doublecomplex *b, - integer *ldb, doublecomplex *c__, integer *ldc, doublereal *scale, - integer *info); - -/* Subroutine */ int ztrti2_(char *uplo, char *diag, integer *n, - doublecomplex *a, integer *lda, integer *info); - -/* Subroutine */ int ztrtri_(char *uplo, char *diag, integer *n, - doublecomplex *a, integer *lda, integer *info); - -/* Subroutine */ int ztrtrs_(char *uplo, char *trans, char *diag, integer *n, - integer *nrhs, doublecomplex *a, integer *lda, doublecomplex *b, - integer *ldb, integer *info); - -/* Subroutine */ int ztzrqf_(integer *m, integer *n, doublecomplex *a, - integer *lda, doublecomplex *tau, integer *info); - -/* Subroutine */ int ztzrzf_(integer *m, integer *n, doublecomplex *a, - integer *lda, doublecomplex *tau, doublecomplex *work, integer *lwork, - integer *info); - -/* Subroutine */ int zung2l_(integer *m, integer *n, integer *k, - doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * - work, integer *info); - -/* Subroutine */ int zung2r_(integer *m, integer *n, integer *k, - doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * - work, integer *info); - -/* Subroutine */ int zungbr_(char *vect, integer *m, integer *n, integer *k, - doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * - work, integer *lwork, integer *info); - -/* Subroutine */ int zunghr_(integer *n, integer *ilo, integer *ihi, - doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * - work, integer *lwork, integer *info); - -/* Subroutine */ int zungl2_(integer *m, integer *n, integer *k, - doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * - work, integer *info); - -/* Subroutine */ int zunglq_(integer *m, integer *n, integer *k, - doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * - work, integer *lwork, integer *info); - -/* Subroutine */ int zungql_(integer *m, integer *n, integer *k, - doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * - work, integer *lwork, integer *info); - -/* Subroutine */ int zungqr_(integer *m, integer *n, integer *k, - doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * - work, integer *lwork, integer *info); - -/* Subroutine */ int zungr2_(integer *m, integer *n, integer *k, - doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * - work, integer *info); - -/* Subroutine */ int zungrq_(integer *m, integer *n, integer *k, - doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * - work, integer *lwork, integer *info); - -/* Subroutine */ int zungtr_(char *uplo, integer *n, doublecomplex *a, - integer *lda, doublecomplex *tau, doublecomplex *work, integer *lwork, - integer *info); - -/* Subroutine */ int zunm2l_(char *side, char *trans, integer *m, integer *n, - integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, - doublecomplex *c__, integer *ldc, doublecomplex *work, integer *info); - -/* Subroutine */ int zunm2r_(char *side, char *trans, integer *m, integer *n, - integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, - doublecomplex *c__, integer *ldc, doublecomplex *work, integer *info); - -/* Subroutine */ int zunmbr_(char *vect, char *side, char *trans, integer *m, - integer *n, integer *k, doublecomplex *a, integer *lda, doublecomplex - *tau, doublecomplex *c__, integer *ldc, doublecomplex *work, integer * - lwork, integer *info); - -/* Subroutine */ int zunmhr_(char *side, char *trans, integer *m, integer *n, - integer *ilo, integer *ihi, doublecomplex *a, integer *lda, - doublecomplex *tau, doublecomplex *c__, integer *ldc, doublecomplex * - work, integer *lwork, integer *info); - -/* Subroutine */ int zunml2_(char *side, char *trans, integer *m, integer *n, - integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, - doublecomplex *c__, integer *ldc, doublecomplex *work, integer *info); - -/* Subroutine */ int zunmlq_(char *side, char *trans, integer *m, integer *n, - integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, - doublecomplex *c__, integer *ldc, doublecomplex *work, integer *lwork, - integer *info); - -/* Subroutine */ int zunmql_(char *side, char *trans, integer *m, integer *n, - integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, - doublecomplex *c__, integer *ldc, doublecomplex *work, integer *lwork, - integer *info); - -/* Subroutine */ int zunmqr_(char *side, char *trans, integer *m, integer *n, - integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, - doublecomplex *c__, integer *ldc, doublecomplex *work, integer *lwork, - integer *info); - -/* Subroutine */ int zunmr2_(char *side, char *trans, integer *m, integer *n, - integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, - doublecomplex *c__, integer *ldc, doublecomplex *work, integer *info); - -/* Subroutine */ int zunmr3_(char *side, char *trans, integer *m, integer *n, - integer *k, integer *l, doublecomplex *a, integer *lda, doublecomplex - *tau, doublecomplex *c__, integer *ldc, doublecomplex *work, integer * - info); - -/* Subroutine */ int zunmrq_(char *side, char *trans, integer *m, integer *n, - integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, - doublecomplex *c__, integer *ldc, doublecomplex *work, integer *lwork, - integer *info); - -/* Subroutine */ int zunmrz_(char *side, char *trans, integer *m, integer *n, - integer *k, integer *l, doublecomplex *a, integer *lda, doublecomplex - *tau, doublecomplex *c__, integer *ldc, doublecomplex *work, integer * - lwork, integer *info); - -/* Subroutine */ int zunmtr_(char *side, char *uplo, char *trans, integer *m, - integer *n, doublecomplex *a, integer *lda, doublecomplex *tau, - doublecomplex *c__, integer *ldc, doublecomplex *work, integer *lwork, - integer *info); - -/* Subroutine */ int zupgtr_(char *uplo, integer *n, doublecomplex *ap, - doublecomplex *tau, doublecomplex *q, integer *ldq, doublecomplex * - work, integer *info); - -/* Subroutine */ int zupmtr_(char *side, char *uplo, char *trans, integer *m, - integer *n, doublecomplex *ap, doublecomplex *tau, doublecomplex *c__, - integer *ldc, doublecomplex *work, integer *info); - -#endif /* __CLAPACK_H */ diff --git a/lib/LinearAlgebra/LAPACK/f2c.h b/lib/LinearAlgebra/LAPACK/f2c.h deleted file mode 100644 index b94ee7c..0000000 --- a/lib/LinearAlgebra/LAPACK/f2c.h +++ /dev/null @@ -1,223 +0,0 @@ -/* f2c.h -- Standard Fortran to C header file */ - -/** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed." - - - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */ - -#ifndef F2C_INCLUDE -#define F2C_INCLUDE - -typedef long int integer; -typedef unsigned long int uinteger; -typedef char *address; -typedef short int shortint; -typedef float real; -typedef double doublereal; -typedef struct { real r, i; } complex; -typedef struct { doublereal r, i; } doublecomplex; -typedef long int logical; -typedef short int shortlogical; -typedef char logical1; -typedef char integer1; -#ifdef INTEGER_STAR_8 /* Adjust for integer*8. */ -typedef long long longint; /* system-dependent */ -typedef unsigned long long ulongint; /* system-dependent */ -#define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b))) -#define qbit_set(a,b) ((a) | ((ulongint)1 << (b))) -#endif - -#define TRUE_ (1) -#define FALSE_ (0) - -/* Extern is for use with -E */ -#ifndef Extern -#define Extern extern -#endif - -/* I/O stuff */ - -#ifdef f2c_i2 -/* for -i2 */ -typedef short flag; -typedef short ftnlen; -typedef short ftnint; -#else -typedef long int flag; -typedef long int ftnlen; -typedef long int ftnint; -#endif - -/*external read, write*/ -typedef struct -{ flag cierr; - ftnint ciunit; - flag ciend; - char *cifmt; - ftnint cirec; -} cilist; - -/*internal read, write*/ -typedef struct -{ flag icierr; - char *iciunit; - flag iciend; - char *icifmt; - ftnint icirlen; - ftnint icirnum; -} icilist; - -/*open*/ -typedef struct -{ flag oerr; - ftnint ounit; - char *ofnm; - ftnlen ofnmlen; - char *osta; - char *oacc; - char *ofm; - ftnint orl; - char *oblnk; -} olist; - -/*close*/ -typedef struct -{ flag cerr; - ftnint cunit; - char *csta; -} cllist; - -/*rewind, backspace, endfile*/ -typedef struct -{ flag aerr; - ftnint aunit; -} alist; - -/* inquire */ -typedef struct -{ flag inerr; - ftnint inunit; - char *infile; - ftnlen infilen; - ftnint *inex; /*parameters in standard's order*/ - ftnint *inopen; - ftnint *innum; - ftnint *innamed; - char *inname; - ftnlen innamlen; - char *inacc; - ftnlen inacclen; - char *inseq; - ftnlen inseqlen; - char *indir; - ftnlen indirlen; - char *infmt; - ftnlen infmtlen; - char *inform; - ftnint informlen; - char *inunf; - ftnlen inunflen; - ftnint *inrecl; - ftnint *innrec; - char *inblank; - ftnlen inblanklen; -} inlist; - -#define VOID void - -union Multitype { /* for multiple entry points */ - integer1 g; - shortint h; - integer i; - /* longint j; */ - real r; - doublereal d; - complex c; - doublecomplex z; - }; - -typedef union Multitype Multitype; - -/*typedef long int Long;*/ /* No longer used; formerly in Namelist */ - -struct Vardesc { /* for Namelist */ - char *name; - char *addr; - ftnlen *dims; - int type; - }; -typedef struct Vardesc Vardesc; - -struct Namelist { - char *name; - Vardesc **vars; - int nvars; - }; -typedef struct Namelist Namelist; - -#define abs(x) ((x) >= 0 ? (x) : -(x)) -#define dabs(x) (doublereal)abs(x) -#define min(a,b) ((a) <= (b) ? (a) : (b)) -#define max(a,b) ((a) >= (b) ? (a) : (b)) -#define dmin(a,b) (doublereal)min(a,b) -#define dmax(a,b) (doublereal)max(a,b) -#define bit_test(a,b) ((a) >> (b) & 1) -#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b))) -#define bit_set(a,b) ((a) | ((uinteger)1 << (b))) - -/* procedure parameter types for -A and -C++ */ - -#define F2C_proc_par_types 1 -#ifdef __cplusplus -typedef int /* Unknown procedure type */ (*U_fp)(...); -typedef shortint (*J_fp)(...); -typedef integer (*I_fp)(...); -typedef real (*R_fp)(...); -typedef doublereal (*D_fp)(...), (*E_fp)(...); -typedef /* Complex */ VOID (*C_fp)(...); -typedef /* Double Complex */ VOID (*Z_fp)(...); -typedef logical (*L_fp)(...); -typedef shortlogical (*K_fp)(...); -typedef /* Character */ VOID (*H_fp)(...); -typedef /* Subroutine */ int (*S_fp)(...); -#else -typedef int /* Unknown procedure type */ (*U_fp)(); -typedef shortint (*J_fp)(); -typedef integer (*I_fp)(); -typedef real (*R_fp)(); -typedef doublereal (*D_fp)(), (*E_fp)(); -typedef /* Complex */ VOID (*C_fp)(); -typedef /* Double Complex */ VOID (*Z_fp)(); -typedef logical (*L_fp)(); -typedef shortlogical (*K_fp)(); -typedef /* Character */ VOID (*H_fp)(); -typedef /* Subroutine */ int (*S_fp)(); -#endif -/* E_fp is for real functions when -R is not specified */ -typedef VOID C_f; /* complex function */ -typedef VOID H_f; /* character function */ -typedef VOID Z_f; /* double complex function */ -typedef doublereal E_f; /* real function with -R not specified */ - -/* undef any lower-case symbols that your C compiler predefines, e.g.: */ - -#ifndef Skip_f2c_Undefs -#undef cray -#undef gcos -#undef mc68010 -#undef mc68020 -#undef mips -#undef pdp11 -#undef sgi -#undef sparc -#undef sun -#undef sun2 -#undef sun3 -#undef sun4 -#undef u370 -#undef u3b -#undef u3b2 -#undef u3b5 -#undef unix -#undef vax -#endif -#endif diff --git a/lib/LinearAlgebra/LAPACK/lapack-aux.c b/lib/LinearAlgebra/LAPACK/lapack-aux.c deleted file mode 100644 index 4ef9a6e..0000000 --- a/lib/LinearAlgebra/LAPACK/lapack-aux.c +++ /dev/null @@ -1,656 +0,0 @@ -#include -#include -#include -#include -#include -#include "lapack-aux.h" - -#define MACRO(B) do {B} while (0) -#define ERROR(CODE) MACRO(return CODE;) -#define REQUIRES(COND, CODE) MACRO(if(!(COND)) {ERROR(CODE);}) - -#define MIN(A,B) ((A)<(B)?(A):(B)) -#define MAX(A,B) ((A)>(B)?(A):(B)) - -#ifdef DBGL -#define DEBUGMSG(M) printf("LAPACK Wrapper "M"\n: "); size_t t0 = time(NULL); -#define OK MACRO(printf("%ld s\n",time(0)-t0); return 0;); -#else -#define DEBUGMSG(M) -#define OK return 0; -#endif - -#define CHECK(RES,CODE) MACRO(if(RES) return CODE;) - -#define BAD_SIZE 2000 -#define BAD_CODE 2001 -#define MEM 2002 -#define BAD_FILE 2003 -#define SINGULAR 2004 -#define NOCONVER 2005 -#define NODEFPOS 2006 - -//////////////////// real svd //////////////////////////////////// - -int svd_l_R(KDMAT(a),DMAT(u), DVEC(s),DMAT(v)) { - integer m = ar; - integer n = ac; - integer q = MIN(m,n); - REQUIRES(ur==m && uc==m && sn==q && vr==n && vc==n,BAD_SIZE); - DEBUGMSG("svd_l_R"); - double *B = (double*)malloc(m*n*sizeof(double)); - CHECK(!B,MEM); - memcpy(B,ap,m*n*sizeof(double)); - integer lwork = -1; - integer res; - // ask for optimal lwork - double ans; - //printf("ask zgesvd\n"); - char* job = "A"; - dgesvd_ (job,job, - &m,&n,B,&m, - sp, - up,&m, - vp,&n, - &ans, &lwork, - &res); - lwork = ceil(ans); - //printf("ans = %d\n",lwork); - double * work = (double*)malloc(lwork*sizeof(double)); - CHECK(!work,MEM); - //printf("dgesdd\n"); - dgesvd_ (job,job, - &m,&n,B,&m, - sp, - up,&m, - vp,&n, - work, &lwork, - &res); - CHECK(res,res); - free(work); - free(B); - OK -} - -// (alternative version) - -int svd_l_Rdd(KDMAT(a),DMAT(u), DVEC(s),DMAT(v)) { - integer m = ar; - integer n = ac; - integer q = MIN(m,n); - REQUIRES(ur==m && uc==m && sn==q && vr==n && vc==n,BAD_SIZE); - DEBUGMSG("svd_l_Rdd"); - double *B = (double*)malloc(m*n*sizeof(double)); - CHECK(!B,MEM); - memcpy(B,ap,m*n*sizeof(double)); - integer* iwk = (integer*) malloc(8*q*sizeof(int)); - CHECK(!iwk,MEM); - integer lwk = -1; - integer res; - // ask for optimal lwk - double ans; - //printf("ask dgesdd\n"); - dgesdd_ ("A",&m,&n,B,&m,sp,up,&m,vp,&n,&ans,&lwk,iwk,&res); - lwk = 2*ceil(ans); // ????? otherwise 50x100 rejects lwk - //printf("lwk = %d\n",lwk); - double * workv = (double*)malloc(lwk*sizeof(double)); - CHECK(!workv,MEM); - //printf("dgesdd\n"); - dgesdd_ ("A",&m,&n,B,&m,sp,up,&m,vp,&n,workv,&lwk,iwk,&res); - CHECK(res,res); - free(iwk); - free(workv); - free(B); - OK -} - -//////////////////// complex svd //////////////////////////////////// - -// not in clapack.h - -int zgesvd_(char *jobu, char *jobvt, integer *m, integer *n, - doublecomplex *a, integer *lda, doublereal *s, doublecomplex *u, - integer *ldu, doublecomplex *vt, integer *ldvt, doublecomplex *work, - integer *lwork, doublereal *rwork, integer *info); - -int svd_l_C(KCMAT(a),CMAT(u), DVEC(s),CMAT(v)) { - integer m = ar; - integer n = ac; - integer q = MIN(m,n); - REQUIRES(ur==m && uc==m && sn==q && vr==n && vc==n,BAD_SIZE); - DEBUGMSG("svd_l_C"); - double *B = (double*)malloc(2*m*n*sizeof(double)); - CHECK(!B,MEM); - memcpy(B,ap,m*n*2*sizeof(double)); - - double *rwork = (double*) malloc(5*q*sizeof(double)); - CHECK(!rwork,MEM); - integer lwork = -1; - integer res; - // ask for optimal lwork - doublecomplex ans; - //printf("ask zgesvd\n"); - char* job = "A"; - zgesvd_ (job,job, - &m,&n,(doublecomplex*)B,&m, - sp, - (doublecomplex*)up,&m, - (doublecomplex*)vp,&n, - &ans, &lwork, - rwork, - &res); - lwork = ceil(ans.r); - //printf("ans = %d\n",lwork); - doublecomplex * work = (doublecomplex*)malloc(lwork*2*sizeof(double)); - CHECK(!work,MEM); - //printf("zgesvd\n"); - zgesvd_ (job,job, - &m,&n,(doublecomplex*)B,&m, - sp, - (doublecomplex*)up,&m, - (doublecomplex*)vp,&n, - work, &lwork, - rwork, - &res); - CHECK(res,res); - free(work); - free(rwork); - free(B); - OK -} - - - -//////////////////// general complex eigensystem //////////// - -int eig_l_C(KCMAT(a),CMAT(u), CVEC(s),CMAT(v)) { - integer n = ar; - REQUIRES(n>=2 && ac==n && (ur==1 || (ur==n && uc==n)) && sn==n && (vr==1 || (vr==n && vc==n)),BAD_SIZE); - DEBUGMSG("eig_l_C"); - double *B = (double*)malloc(2*n*n*sizeof(double)); - CHECK(!B,MEM); - memcpy(B,ap,n*n*2*sizeof(double)); - - double *rwork = (double*) malloc(2*n*sizeof(double)); - CHECK(!rwork,MEM); - integer lwork = -1; - char jobvl = ur==1?'N':'V'; - char jobvr = vr==1?'N':'V'; - integer res; - // ask for optimal lwork - doublecomplex ans; - //printf("ask zgeev\n"); - zgeev_ (&jobvl,&jobvr, - &n,(doublecomplex*)B,&n, - (doublecomplex*)sp, - (doublecomplex*)up,&n, - (doublecomplex*)vp,&n, - &ans, &lwork, - rwork, - &res); - lwork = ceil(ans.r); - //printf("ans = %d\n",lwork); - doublecomplex * work = (doublecomplex*)malloc(lwork*2*sizeof(double)); - CHECK(!work,MEM); - //printf("zgeev\n"); - zgeev_ (&jobvl,&jobvr, - &n,(doublecomplex*)B,&n, - (doublecomplex*)sp, - (doublecomplex*)up,&n, - (doublecomplex*)vp,&n, - work, &lwork, - rwork, - &res); - CHECK(res,res); - free(work); - free(rwork); - free(B); - OK -} - - - -//////////////////// general real eigensystem //////////// - -int eig_l_R(KDMAT(a),DMAT(u), CVEC(s),DMAT(v)) { - integer n = ar; - REQUIRES(n>=2 && ac == n && (ur==1 || (ur==n && uc==n)) && sn==n && (vr==1 || (vr==n && vc==n)),BAD_SIZE); - DEBUGMSG("eig_l_R"); - double *B = (double*)malloc(n*n*sizeof(double)); - CHECK(!B,MEM); - memcpy(B,ap,n*n*sizeof(double)); - integer lwork = -1; - char jobvl = ur==1?'N':'V'; - char jobvr = vr==1?'N':'V'; - integer res; - // ask for optimal lwork - double ans; - //printf("ask dgeev\n"); - dgeev_ (&jobvl,&jobvr, - &n,B,&n, - sp, sp+n, - up,&n, - vp,&n, - &ans, &lwork, - &res); - lwork = ceil(ans); - //printf("ans = %d\n",lwork); - double * work = (double*)malloc(lwork*sizeof(double)); - CHECK(!work,MEM); - //printf("dgeev\n"); - dgeev_ (&jobvl,&jobvr, - &n,B,&n, - sp, sp+n, - up,&n, - vp,&n, - work, &lwork, - &res); - CHECK(res,res); - free(work); - free(B); - OK -} - - -//////////////////// symmetric real eigensystem //////////// - - -int eig_l_S(KDMAT(a),DVEC(s),DMAT(v)) { - integer n = ar; - REQUIRES(n>=2 && ac == n && sn==n && (vr==1 || (vr==n && vc==n)),BAD_SIZE); - DEBUGMSG("eig_l_S"); - memcpy(vp,ap,n*n*sizeof(double)); - integer lwork = -1; - char jobz = vr==1?'N':'V'; - char uplo = 'U'; - integer res; - // ask for optimal lwork - double ans; - //printf("ask dsyev\n"); - dsyev_ (&jobz,&uplo, - &n,vp,&n, - sp, - &ans, &lwork, - &res); - lwork = ceil(ans); - //printf("ans = %d\n",lwork); - double * work = (double*)malloc(lwork*sizeof(double)); - CHECK(!work,MEM); - dsyev_ (&jobz,&uplo, - &n,vp,&n, - sp, - work, &lwork, - &res); - CHECK(res,res); - free(work); - OK -} - -//////////////////// hermitian complex eigensystem //////////// - -int eig_l_H(KCMAT(a),DVEC(s),CMAT(v)) { - integer n = ar; - REQUIRES(n>=2 && ac==n && sn==n && (vr==1 || (vr==n && vc==n)),BAD_SIZE); - DEBUGMSG("eig_l_H"); - memcpy(vp,ap,2*n*n*sizeof(double)); - double *rwork = (double*) malloc((3*n-2)*sizeof(double)); - CHECK(!rwork,MEM); - integer lwork = -1; - char jobz = vr==1?'N':'V'; - char uplo = 'U'; - integer res; - // ask for optimal lwork - doublecomplex ans; - //printf("ask zheev\n"); - zheev_ (&jobz,&uplo, - &n,(doublecomplex*)vp,&n, - sp, - &ans, &lwork, - rwork, - &res); - lwork = ceil(ans.r); - //printf("ans = %d\n",lwork); - doublecomplex * work = (doublecomplex*)malloc(lwork*2*sizeof(double)); - CHECK(!work,MEM); - zheev_ (&jobz,&uplo, - &n,(doublecomplex*)vp,&n, - sp, - work, &lwork, - rwork, - &res); - CHECK(res,res); - free(work); - free(rwork); - OK -} - -//////////////////// general real linear system //////////// - -int linearSolveR_l(KDMAT(a),KDMAT(b),DMAT(x)) { - integer n = ar; - integer nhrs = bc; - REQUIRES(n>=1 && ar==ac && ar==br,BAD_SIZE); - DEBUGMSG("linearSolveR_l"); - double*AC = (double*)malloc(n*n*sizeof(double)); - memcpy(AC,ap,n*n*sizeof(double)); - memcpy(xp,bp,n*nhrs*sizeof(double)); - integer * ipiv = (integer*)malloc(n*sizeof(integer)); - integer res; - dgesv_ (&n,&nhrs, - AC, &n, - ipiv, - xp, &n, - &res); - if(res>0) { - return SINGULAR; - } - CHECK(res,res); - free(ipiv); - free(AC); - OK -} - -//////////////////// general complex linear system //////////// - -int linearSolveC_l(KCMAT(a),KCMAT(b),CMAT(x)) { - integer n = ar; - integer nhrs = bc; - REQUIRES(n>=1 && ar==ac && ar==br,BAD_SIZE); - DEBUGMSG("linearSolveC_l"); - double*AC = (double*)malloc(2*n*n*sizeof(double)); - memcpy(AC,ap,2*n*n*sizeof(double)); - memcpy(xp,bp,2*n*nhrs*sizeof(double)); - integer * ipiv = (integer*)malloc(n*sizeof(integer)); - integer res; - zgesv_ (&n,&nhrs, - (doublecomplex*)AC, &n, - ipiv, - (doublecomplex*)xp, &n, - &res); - if(res>0) { - return SINGULAR; - } - CHECK(res,res); - free(ipiv); - free(AC); - OK -} - -//////////////////// least squares real linear system //////////// - -int linearSolveLSR_l(KDMAT(a),KDMAT(b),DMAT(x)) { - integer m = ar; - integer n = ac; - integer nrhs = bc; - integer ldb = xr; - REQUIRES(m>=1 && n>=1 && ar==br && xr==MAX(m,n) && xc == bc, BAD_SIZE); - DEBUGMSG("linearSolveLSR_l"); - double*AC = (double*)malloc(m*n*sizeof(double)); - memcpy(AC,ap,m*n*sizeof(double)); - if (m>=n) { - memcpy(xp,bp,m*nrhs*sizeof(double)); - } else { - int k; - for(k = 0; k0) { - return SINGULAR; - } - CHECK(res,res); - free(work); - free(AC); - OK -} - -//////////////////// least squares complex linear system //////////// - -int linearSolveLSC_l(KCMAT(a),KCMAT(b),CMAT(x)) { - integer m = ar; - integer n = ac; - integer nrhs = bc; - integer ldb = xr; - REQUIRES(m>=1 && n>=1 && ar==br && xr==MAX(m,n) && xc == bc, BAD_SIZE); - DEBUGMSG("linearSolveLSC_l"); - double*AC = (double*)malloc(2*m*n*sizeof(double)); - memcpy(AC,ap,2*m*n*sizeof(double)); - memcpy(AC,ap,2*m*n*sizeof(double)); - if (m>=n) { - memcpy(xp,bp,2*m*nrhs*sizeof(double)); - } else { - int k; - for(k = 0; k0) { - return SINGULAR; - } - CHECK(res,res); - free(work); - free(AC); - OK -} - -//////////////////// least squares real linear system using SVD //////////// - -int linearSolveSVDR_l(double rcond,KDMAT(a),KDMAT(b),DMAT(x)) { - integer m = ar; - integer n = ac; - integer nrhs = bc; - integer ldb = xr; - REQUIRES(m>=1 && n>=1 && ar==br && xr==MAX(m,n) && xc == bc, BAD_SIZE); - DEBUGMSG("linearSolveSVDR_l"); - double*AC = (double*)malloc(m*n*sizeof(double)); - double*S = (double*)malloc(MIN(m,n)*sizeof(double)); - memcpy(AC,ap,m*n*sizeof(double)); - if (m>=n) { - memcpy(xp,bp,m*nrhs*sizeof(double)); - } else { - int k; - for(k = 0; k0) { - return NOCONVER; - } - CHECK(res,res); - free(work); - free(S); - free(AC); - OK -} - -//////////////////// least squares complex linear system using SVD //////////// - -// not in clapack.h - -int zgelss_(integer *m, integer *n, integer *nhrs, - doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, doublereal *s, - doublereal *rcond, integer* rank, - doublecomplex *work, integer* lwork, doublereal* rwork, - integer *info); - -int linearSolveSVDC_l(double rcond, KCMAT(a),KCMAT(b),CMAT(x)) { - integer m = ar; - integer n = ac; - integer nrhs = bc; - integer ldb = xr; - REQUIRES(m>=1 && n>=1 && ar==br && xr==MAX(m,n) && xc == bc, BAD_SIZE); - DEBUGMSG("linearSolveSVDC_l"); - double*AC = (double*)malloc(2*m*n*sizeof(double)); - double*S = (double*)malloc(MIN(m,n)*sizeof(double)); - double*RWORK = (double*)malloc(5*MIN(m,n)*sizeof(double)); - memcpy(AC,ap,2*m*n*sizeof(double)); - if (m>=n) { - memcpy(xp,bp,2*m*nrhs*sizeof(double)); - } else { - int k; - for(k = 0; k0) { - return NOCONVER; - } - CHECK(res,res); - free(work); - free(RWORK); - free(S); - free(AC); - OK -} - -//////////////////// Cholesky factorization ///////////////////////// - -int chol_l_H(KCMAT(a),CMAT(l)) { - integer n = ar; - REQUIRES(n>=1 && ac == n && lr==n && lc==n,BAD_SIZE); - DEBUGMSG("chol_l_H"); - memcpy(lp,ap,n*n*sizeof(doublecomplex)); - char uplo = 'U'; - integer res; - zpotrf_ (&uplo,&n,(doublecomplex*)lp,&n,&res); - CHECK(res>0,NODEFPOS); - CHECK(res,res); - doublecomplex zero = {0.,0.}; - int r,c; - for (r=0; r=1 && ac == n && lr==n && lc==n,BAD_SIZE); - DEBUGMSG("chol_l_S"); - memcpy(lp,ap,n*n*sizeof(double)); - char uplo = 'U'; - integer res; - dpotrf_ (&uplo,&n,lp,&n,&res); - CHECK(res>0,NODEFPOS); - CHECK(res,res); - int r,c; - for (r=0; r=1 && n >=1 && rr== m && rc == n && taun == mn, BAD_SIZE); - DEBUGMSG("qr_l_R"); - double *WORK = (double*)malloc(m*sizeof(double)); - CHECK(!WORK,MEM); - memcpy(rp,ap,m*n*sizeof(double)); - integer res; - dgeqr2_ (&m,&n,rp,&m,taup,WORK,&res); - CHECK(res,res); - free(WORK); - OK -} - -int qr_l_C(KCMAT(a), CVEC(tau), CMAT(r)) { - integer m = ar; - integer n = ac; - integer mn = MIN(m,n); - REQUIRES(m>=1 && n >=1 && rr== m && rc == n && taun == mn, BAD_SIZE); - DEBUGMSG("qr_l_C"); - doublecomplex *WORK = (doublecomplex*)malloc(m*sizeof(doublecomplex)); - CHECK(!WORK,MEM); - memcpy(rp,ap,m*n*sizeof(doublecomplex)); - integer res; - zgeqr2_ (&m,&n,(doublecomplex*)rp,&m,(doublecomplex*)taup,WORK,&res); - CHECK(res,res); - free(WORK); - OK -} diff --git a/lib/LinearAlgebra/LAPACK/lapack-aux.h b/lib/LinearAlgebra/LAPACK/lapack-aux.h deleted file mode 100644 index ea71847..0000000 --- a/lib/LinearAlgebra/LAPACK/lapack-aux.h +++ /dev/null @@ -1,46 +0,0 @@ -#include "f2c.h" -#include "clapack.h" - -#define DVEC(A) int A##n, double*A##p -#define CVEC(A) int A##n, double*A##p -#define DMAT(A) int A##r, int A##c, double* A##p -#define CMAT(A) int A##r, int A##c, double* A##p - -// const pointer versions for the parameters -#define KDVEC(A) int A##n, const double*A##p -#define KCVEC(A) int A##n, const double*A##p -#define KDMAT(A) int A##r, int A##c, const double* A##p -#define KCMAT(A) int A##r, int A##c, const double* A##p - -int svd_l_R(KDMAT(x),DMAT(u),DVEC(s),DMAT(v)); -int svd_l_Rdd(KDMAT(x),DMAT(u),DVEC(s),DMAT(v)); - -int svd_l_C(KCMAT(a),CMAT(u),DVEC(s),CMAT(v)); - -int eig_l_C(KCMAT(a),CMAT(u),CVEC(s),CMAT(v)); - -int eig_l_R(KDMAT(a),DMAT(u),CVEC(s),DMAT(v)); - -int eig_l_S(KDMAT(a),DVEC(s),DMAT(v)); - -int eig_l_H(KCMAT(a),DVEC(s),CMAT(v)); - -int linearSolveR_l(KDMAT(a),KDMAT(b),DMAT(x)); - -int linearSolveC_l(KCMAT(a),KCMAT(b),CMAT(x)); - -int linearSolveLSR_l(KDMAT(a),KDMAT(b),DMAT(x)); - -int linearSolveLSC_l(KCMAT(a),KCMAT(b),CMAT(x)); - -int linearSolveSVDR_l(double,KDMAT(a),KDMAT(b),DMAT(x)); - -int linearSolveSVDC_l(double,KCMAT(a),KCMAT(b),CMAT(x)); - -int chol_l_H(KCMAT(a),CMAT(r)); - -int chol_l_S(KDMAT(a),DMAT(r)); - -int qr_l_R(KDMAT(a), DVEC(tau), DMAT(r)); - -int qr_l_C(KCMAT(a), CVEC(tau), CMAT(r)); diff --git a/lib/LinearAlgebra/Linear.hs b/lib/LinearAlgebra/Linear.hs deleted file mode 100644 index 7cd1a52..0000000 --- a/lib/LinearAlgebra/Linear.hs +++ /dev/null @@ -1,102 +0,0 @@ -{-# OPTIONS_GHC -fglasgow-exts #-} ------------------------------------------------------------------------------ -{- | -Module : LinearAlgebra.Linear -Copyright : (c) Alberto Ruiz 2006-7 -License : GPL-style - -Maintainer : Alberto Ruiz (aruiz at um dot es) -Stability : provisional -Portability : uses ffi - -Basic optimized operations on vectors and matrices. - --} ------------------------------------------------------------------------------ - -module LinearAlgebra.Linear ( - Linear(..), - multiply, dot, outer -) where - - -import Data.Packed.Internal -import Data.Packed -import GSL.Vector -import Complex - --- | basic optimized operations -class (Container c e) => Linear c e where - scale :: e -> c e -> c e - addConstant :: e -> c e -> c e - add :: c e -> c e -> c e - sub :: c e -> c e -> c e - -- | element by element multiplication - mul :: c e -> c e -> c e - -- | element by element division - divide :: c e -> c e -> c e - -- | scale the element by element reciprocal of the object: @scaleRecip 2 (fromList [5,i]) == 2 |> [0.4 :+ 0.0,0.0 :+ (-2.0)]@ - scaleRecip :: e -> c e -> c e - equal :: c e -> c e -> Bool --- numequal :: Double -> c e -> c e -> Bool - -instance Linear Vector Double where - scale = vectorMapValR Scale - scaleRecip = vectorMapValR Recip - addConstant = vectorMapValR AddConstant - add = vectorZipR Add - sub = vectorZipR Sub - mul = vectorZipR Mul - divide = vectorZipR Div - equal u v = dim u == dim v && vectorMax (vectorMapR Abs (sub u v)) == 0.0 - -instance Linear Vector (Complex Double) where - scale = vectorMapValC Scale - scaleRecip = vectorMapValC Recip - addConstant = vectorMapValC AddConstant - add = vectorZipC Add - sub = vectorZipC Sub - mul = vectorZipC Mul - divide = vectorZipC Div - equal u v = dim u == dim v && vectorMax (liftVector magnitude (sub u v)) == 0.0 - -instance Linear Matrix Double where - scale x = liftMatrix (scale x) - scaleRecip x = liftMatrix (scaleRecip x) - addConstant x = liftMatrix (addConstant x) - add = liftMatrix2 add - sub = liftMatrix2 sub - mul = liftMatrix2 mul - divide = liftMatrix2 divide - equal a b = cols a == cols b && cdat a `equal` cdat b - - -instance Linear Matrix (Complex Double) where - scale x = liftMatrix (scale x) - scaleRecip x = liftMatrix (scaleRecip x) - addConstant x = liftMatrix (addConstant x) - add = liftMatrix2 add - sub = liftMatrix2 sub - mul = liftMatrix2 mul - divide = liftMatrix2 divide - equal a b = cols a == cols b && cdat a `equal` cdat b - --------------------------------------------------- - --- | euclidean inner product -dot :: (Field t) => Vector t -> Vector t -> t -dot u v = dat (multiply r c) `at` 0 - where r = asRow u - c = asColumn v - - -{- | Outer product of two vectors. - -@\> 'fromList' [1,2,3] \`outer\` 'fromList' [5,2,3] -(3><3) - [ 5.0, 2.0, 3.0 - , 10.0, 4.0, 6.0 - , 15.0, 6.0, 9.0 ]@ --} -outer :: (Field t) => Vector t -> Vector t -> Matrix t -outer u v = asColumn u `multiply` asRow v 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 @@ +{- | + +Module : Numeric.GSL +Copyright : (c) Alberto Ruiz 2006-7 +License : GPL-style + +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses -fffi and -fglasgow-exts + +This module reexports all the available Numeric.GSL functions (except those in "LinearAlgebra"). + +-} + +module Numeric.GSL ( + module Numeric.GSL.Integration +, module Numeric.GSL.Differentiation +, module Numeric.GSL.Fourier +, module Numeric.GSL.Polynomials +, module Numeric.GSL.Minimization +, module Numeric.GSL.Special +, module Complex +, setErrorHandlerOff +) where + +import Numeric.GSL.Integration +import Numeric.GSL.Differentiation +import Numeric.GSL.Special +import Numeric.GSL.Fourier +import Numeric.GSL.Polynomials +import Numeric.GSL.Minimization +import Complex +import Numeric.GSL.Special + + +-- | This action removes the GSL default error handler (which aborts the program), so that +-- GSL errors can be handled by Haskell (using Control.Exception) and ghci doesn't abort. +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 @@ +{-# OPTIONS #-} +----------------------------------------------------------------------------- +{- | +Module : Numeric.GSL.Differentiation +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style + +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Numerical differentiation. + + + +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.\" +-} +----------------------------------------------------------------------------- +module Numeric.GSL.Differentiation ( + derivCentral, + derivForward, + derivBackward +) where + +import Foreign +import Data.Packed.Internal(mkfun,check,(//)) + +derivGen :: + Int -- ^ type: 0 central, 1 forward, 2 backward + -> Double -- ^ initial step size + -> (Double -> Double) -- ^ function + -> Double -- ^ point where the derivative is taken + -> (Double, Double) -- ^ result and error +derivGen c h f x = unsafePerformIO $ do + r <- malloc + e <- malloc + fp <- mkfun (\x _ -> f x) + c_deriv c fp x h r e // check "deriv" [] + vr <- peek r + ve <- peek e + let result = (vr,ve) + free r + free e + freeHaskellFunPtr fp + return result + +foreign import ccall "gsl-aux.h deriv" + c_deriv :: Int -> FunPtr (Double -> Ptr () -> Double) -> Double -> Double + -> Ptr Double -> Ptr Double -> IO Int + + +{- | Adaptive central difference algorithm, /gsl_deriv_central/. For example: + +> > let deriv = derivCentral 0.01 +> > deriv sin (pi/4) +>(0.7071067812000676,1.0600063101654055e-10) +> > cos (pi/4) +>0.7071067811865476 + +-} +derivCentral :: Double -- ^ initial step size + -> (Double -> Double) -- ^ function + -> Double -- ^ point where the derivative is taken + -> (Double, Double) -- ^ result and absolute error +derivCentral = derivGen 0 + +-- | 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. +derivForward :: Double -- ^ initial step size + -> (Double -> Double) -- ^ function + -> Double -- ^ point where the derivative is taken + -> (Double, Double) -- ^ result and absolute error +derivForward = derivGen 1 + +-- | Adaptive backward difference algorithm, /gsl_deriv_backward/. +derivBackward ::Double -- ^ initial step size + -> (Double -> Double) -- ^ function + -> Double -- ^ point where the derivative is taken + -> (Double, Double) -- ^ result and absolute error +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 @@ +{-# OPTIONS_GHC -fglasgow-exts #-} +----------------------------------------------------------------------------- +{- | +Module : Numeric.GSL.Fourier +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style + +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Fourier Transform. + + + +-} +----------------------------------------------------------------------------- +module Numeric.GSL.Fourier ( + fft, + ifft +) where + +import Data.Packed.Internal +import Complex +import Foreign + +genfft code v = unsafePerformIO $ do + r <- createVector (dim v) + c_fft code // vec v // vec r // check "fft" [v] + return r + +foreign import ccall "gsl-aux.h fft" c_fft :: Int -> TCVCV + + +{- | Fast 1D Fourier transform of a 'Vector' @(@'Complex' 'Double'@)@ using /gsl_fft_complex_forward/. It uses the same scaling conventions as GNU Octave. + +@> fft ('GSL.Matrix.fromList' [1,2,3,4]) +vector (4) [10.0 :+ 0.0,(-2.0) :+ 2.0,(-2.0) :+ 0.0,(-2.0) :+ (-2.0)]@ + +-} +fft :: Vector (Complex Double) -> Vector (Complex Double) +fft = genfft 0 + +-- | The inverse of 'fft', using /gsl_fft_complex_inverse/. +ifft :: Vector (Complex Double) -> Vector (Complex Double) +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 @@ +{-# OPTIONS #-} +----------------------------------------------------------------------------- +{- | +Module : Numeric.GSL.Integration +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style + +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Numerical integration routines. + + +-} +----------------------------------------------------------------------------- + +module Numeric.GSL.Integration ( + integrateQNG, + integrateQAGS +) where + +import Foreign +import Data.Packed.Internal(mkfun,check,(//)) + + +-------------------------------------------------------------------- +{- | Numerical integration using /gsl_integration_qags/ (adaptive integration with singularities). For example: + +@\> let quad = integrateQAGS 1E-9 1000 +\> let f a x = x**(-0.5) * log (a*x) +\> quad (f 1) 0 1 +(-3.999999999999974,4.871658632055187e-13)@ + +-} + +integrateQAGS :: Double -- ^ precision (e.g. 1E-9) + -> Int -- ^ size of auxiliary workspace (e.g. 1000) + -> (Double -> Double) -- ^ function to be integrated on the interval (a,b) + -> Double -- ^ a + -> Double -- ^ b + -> (Double, Double) -- ^ result of the integration and error +integrateQAGS prec n f a b = unsafePerformIO $ do + r <- malloc + e <- malloc + fp <- mkfun (\x _ -> f x) + c_integrate_qags fp a b prec n r e // check "integrate_qags" [] + vr <- peek r + ve <- peek e + let result = (vr,ve) + free r + free e + freeHaskellFunPtr fp + return result + +foreign import ccall "gsl-aux.h integrate_qags" + c_integrate_qags :: FunPtr (Double-> Ptr() -> Double) -> Double -> Double -> Double -> Int + -> Ptr Double -> Ptr Double -> IO Int + +----------------------------------------------------------------- +{- | Numerical integration using /gsl_integration_qng/ (useful for fast integration of smooth functions). For example: + +@\> let quad = integrateQNG 1E-6 +\> quad (\\x -> 4\/(1+x*x)) 0 1 +(3.141592653589793,3.487868498008632e-14)@ + +-} + +integrateQNG :: Double -- ^ precision (e.g. 1E-9) + -> (Double -> Double) -- ^ function to be integrated on the interval (a,b) + -> Double -- ^ a + -> Double -- ^ b + -> (Double, Double) -- ^ result of the integration and error +integrateQNG prec f a b = unsafePerformIO $ do + r <- malloc + e <- malloc + fp <- mkfun (\x _ -> f x) + c_integrate_qng fp a b prec r e // check "integrate_qng" [] + vr <- peek r + ve <- peek e + let result = (vr,ve) + free r + free e + freeHaskellFunPtr fp + return result + +foreign import ccall "gsl-aux.h integrate_qng" + c_integrate_qng :: FunPtr (Double-> Ptr() -> Double) -> Double -> Double -> Double + -> Ptr Double -> Ptr Double -> IO Int + 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 @@ +----------------------------------------------------------------------------- +-- | +-- Module : Numeric.GSL.Matrix +-- Copyright : (c) Alberto Ruiz 2007 +-- License : GPL-style +-- +-- Maintainer : Alberto Ruiz +-- Stability : provisional +-- Portability : portable (uses FFI) +-- +-- A few linear algebra computations based on the Numeric.GSL (). +-- +----------------------------------------------------------------------------- +-- #hide + +module Numeric.GSL.Matrix( + eigSg, eigHg, + svdg, + qr, + cholR, -- cholC, + luSolveR, luSolveC, + luR, luC +) where + +import Data.Packed.Internal +import Data.Packed.Matrix(fromLists,ident,takeDiag) +import Numeric.GSL.Vector +import Foreign +import Complex + +{- | eigendecomposition of a real symmetric matrix using /gsl_eigen_symmv/. + +> > let (l,v) = eigS $ 'fromLists' [[1,2],[2,1]] +> > l +> 3.000 -1.000 +> +> > v +> 0.707 -0.707 +> 0.707 0.707 +> +> > v <> diag l <> trans v +> 1.000 2.000 +> 2.000 1.000 + +-} +eigSg :: Matrix Double -> (Vector Double, Matrix Double) +eigSg m + | r == 1 = (fromList [cdat m `at` 0], singleton 1) + | otherwise = unsafePerformIO $ do + l <- createVector r + v <- createMatrix RowMajor r r + c_eigS // mat cdat m // vec l // mat dat v // check "eigSg" [cdat m] + return (l,v) + where r = rows m +foreign import ccall "gsl-aux.h eigensystemR" c_eigS :: TMVM + +------------------------------------------------------------------ + + + +{- | eigendecomposition of a complex hermitian matrix using /gsl_eigen_hermv/ + +> > let (l,v) = eigH $ 'fromLists' [[1,2+i],[2-i,3]] +> +> > l +> 4.449 -0.449 +> +> > v +> -0.544 0.839 +> (-0.751,0.375) (-0.487,0.243) +> +> > v <> diag l <> (conjTrans) v +> 1.000 (2.000,1.000) +> (2.000,-1.000) 3.000 + +-} +eigHg :: Matrix (Complex Double)-> (Vector Double, Matrix (Complex Double)) +eigHg m + | r == 1 = (fromList [realPart $ cdat m `at` 0], singleton 1) + | otherwise = unsafePerformIO $ do + l <- createVector r + v <- createMatrix RowMajor r r + c_eigH // mat cdat m // vec l // mat dat v // check "eigHg" [cdat m] + return (l,v) + where r = rows m +foreign import ccall "gsl-aux.h eigensystemC" c_eigH :: TCMVCM + + +{- | Singular value decomposition of a real matrix, using /gsl_linalg_SV_decomp_mod/: + +@\> let (u,s,v) = svdg $ 'fromLists' [[1,2,3],[-4,1,7]] +\ +\> u +0.310 -0.951 +0.951 0.310 +\ +\> s +8.497 2.792 +\ +\> v +-0.411 -0.785 + 0.185 -0.570 + 0.893 -0.243 +\ +\> u \<\> 'diag' s \<\> 'trans' v + 1. 2. 3. +-4. 1. 7.@ + +-} +svdg :: Matrix Double -> (Matrix Double, Vector Double, Matrix Double) +svdg x = if rows x >= cols x + then svd' x + else (v, s, u) where (u,s,v) = svd' (trans x) + +svd' x = unsafePerformIO $ do + u <- createMatrix RowMajor r c + s <- createVector c + v <- createMatrix RowMajor c c + c_svd // mat cdat x // mat dat u // vec s // mat dat v // check "svdg" [cdat x] + return (u,s,v) + where r = rows x + c = cols x +foreign import ccall "gsl-aux.h svd" c_svd :: TMMVM + +{- | QR decomposition of a real matrix using /gsl_linalg_QR_decomp/ and /gsl_linalg_QR_unpack/. + +@\> let (q,r) = qr $ 'fromLists' [[1,3,5,7],[2,0,-2,4]] +\ +\> q +-0.447 -0.894 +-0.894 0.447 +\ +\> r +-2.236 -1.342 -0.447 -6.708 + 0. -2.683 -5.367 -4.472 +\ +\> q \<\> r +1.000 3.000 5.000 7.000 +2.000 0. -2.000 4.000@ + +-} +qr :: Matrix Double -> (Matrix Double, Matrix Double) +qr x = unsafePerformIO $ do + q <- createMatrix RowMajor r r + rot <- createMatrix RowMajor r c + c_qr // mat cdat x // mat dat q // mat dat rot // check "qr" [cdat x] + return (q,rot) + where r = rows x + c = cols x +foreign import ccall "gsl-aux.h QR" c_qr :: TMMM + +{- | Cholesky decomposition of a symmetric positive definite real matrix using /gsl_linalg_cholesky_decomp/. + +@\> chol $ (2><2) [1,2, + 2,9::Double] +(2><2) + [ 1.0, 0.0 + , 2.0, 2.23606797749979 ]@ + +-} +cholR :: Matrix Double -> Matrix Double +cholR x = unsafePerformIO $ do + res <- createMatrix RowMajor r r + c_cholR // mat cdat x // mat dat res // check "cholR" [cdat x] + return res + where r = rows x +foreign import ccall "gsl-aux.h cholR" c_cholR :: TMM + +cholC :: Matrix (Complex Double) -> Matrix (Complex Double) +cholC x = unsafePerformIO $ do + res <- createMatrix RowMajor r r + c_cholC // mat cdat x // mat dat res // check "cholC" [cdat x] + return res + where r = rows x +foreign import ccall "gsl-aux.h cholC" c_cholC :: TCMCM + + +-------------------------------------------------------- + +{- -| efficient multiplication by the inverse of a matrix (for real matrices) +-} +luSolveR :: Matrix Double -> Matrix Double -> Matrix Double +luSolveR a b + | n1==n2 && n1==r = unsafePerformIO $ do + s <- createMatrix RowMajor r c + c_luSolveR // mat cdat a // mat cdat b // mat dat s // check "luSolveR" [cdat a, cdat b] + return s + | otherwise = error "luSolveR of nonsquare matrix" + where n1 = rows a + n2 = cols a + r = rows b + c = cols b +foreign import ccall "gsl-aux.h luSolveR" c_luSolveR :: TMMM + +{- -| efficient multiplication by the inverse of a matrix (for complex matrices). +-} +luSolveC :: Matrix (Complex Double) -> Matrix (Complex Double) -> Matrix (Complex Double) +luSolveC a b + | n1==n2 && n1==r = unsafePerformIO $ do + s <- createMatrix RowMajor r c + c_luSolveC // mat cdat a // mat cdat b // mat dat s // check "luSolveC" [cdat a, cdat b] + return s + | otherwise = error "luSolveC of nonsquare matrix" + where n1 = rows a + n2 = cols a + r = rows b + c = cols b +foreign import ccall "gsl-aux.h luSolveC" c_luSolveC :: TCMCMCM + +{- | lu decomposition of real matrix (packed as a vector including l, u, the permutation and sign) +-} +luRaux :: Matrix Double -> Vector Double +luRaux x = unsafePerformIO $ do + res <- createVector (r*r+r+1) + c_luRaux // mat cdat x // vec res // check "luRaux" [cdat x] + return res + where r = rows x + c = cols x +foreign import ccall "gsl-aux.h luRaux" c_luRaux :: TMV + +{- | lu decomposition of complex matrix (packed as a vector including l, u, the permutation and sign) +-} +luCaux :: Matrix (Complex Double) -> Vector (Complex Double) +luCaux x = unsafePerformIO $ do + res <- createVector (r*r+r+1) + c_luCaux // mat cdat x // vec res // check "luCaux" [cdat x] + return res + where r = rows x + c = cols x +foreign import ccall "gsl-aux.h luCaux" c_luCaux :: TCMCV + +{- | The LU decomposition of a square matrix. Is based on /gsl_linalg_LU_decomp/ and /gsl_linalg_complex_LU_decomp/ as described in . + +@\> let m = 'fromLists' [[1,2,-3],[2+3*i,-7,0],[1,-i,2*i]] +\> let (l,u,p,s) = luR m@ + +L is the lower triangular: + +@\> l + 1. 0. 0. +0.154-0.231i 1. 0. +0.154-0.231i 0.624-0.522i 1.@ + +U is the upper triangular: + +@\> u +2.+3.i -7. 0. + 0. 3.077-1.615i -3. + 0. 0. 1.873+0.433i@ + +p is a permutation: + +@\> p +[1,0,2]@ + +L \* U obtains a permuted version of the original matrix: + +@\> extractRows p m + 2.+3.i -7. 0. + 1. 2. -3. + 1. -1.i 2.i +\ +\> l \<\> u + 2.+3.i -7. 0. + 1. 2. -3. + 1. -1.i 2.i@ + +s is the sign of the permutation, required to obtain sign of the determinant: + +@\> s * product ('toList' $ 'takeDiag' u) +(-18.0) :+ (-16.000000000000004) +\> 'LinearAlgebra.Algorithms.det' m +(-18.0) :+ (-16.000000000000004)@ + + -} +luR :: Matrix Double -> (Matrix Double, Matrix Double, [Int], Double) +luR m = (l,u,p, fromIntegral s') where + r = rows m + v = luRaux m + lu = reshape r $ subVector 0 (r*r) v + s':p = map round . toList . subVector (r*r) (r+1) $ v + u = triang r r 0 1`mul` lu + l = (triang r r 0 0 `mul` lu) `add` ident r + add = liftMatrix2 $ vectorZipR Add + mul = liftMatrix2 $ vectorZipR Mul + +-- | Complex version of 'luR'. +luC :: Matrix (Complex Double) -> (Matrix (Complex Double), Matrix (Complex Double), [Int], Complex Double) +luC m = (l,u,p, fromIntegral s') where + r = rows m + v = luCaux m + lu = reshape r $ subVector 0 (r*r) v + s':p = map (round.realPart) . toList . subVector (r*r) (r+1) $ v + u = triang r r 0 1 `mul` lu + l = (triang r r 0 0 `mul` lu) `add` liftMatrix comp (ident r) + add = liftMatrix2 $ vectorZipC Add + mul = liftMatrix2 $ vectorZipC Mul + +{- auxiliary function to get triangular matrices +-} +triang r c h v = reshape c $ fromList [el i j | i<-[0..r-1], j<-[0..c-1]] + 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 @@ +{-# OPTIONS_GHC -fglasgow-exts #-} +----------------------------------------------------------------------------- +{- | +Module : Numeric.GSL.Minimization +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style + +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Minimization of a multidimensional function Minimization of a multidimensional function using some of the algorithms described in: + + + +-} +----------------------------------------------------------------------------- +module Numeric.GSL.Minimization ( + minimizeConjugateGradient, + minimizeNMSimplex +) where + + +import Data.Packed.Internal +import Data.Packed.Matrix +import Foreign +import Complex + + +------------------------------------------------------------------------- + +{- | 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: + +@minimize f xi = minimizeNMSimplex f xi (replicate (length xi) 1) 1e-2 100 +\ +f [x,y] = 10*(x-1)^2 + 20*(y-2)^2 + 30 +\ +main = do + let (s,p) = minimize f [5,7] + print s + print p +\ +\> main +[0.9920430849306285,1.9969168063253164] +0. 512.500 1.082 6.500 5. + 1. 290.625 1.372 5.250 4. + 2. 290.625 1.372 5.250 4. + 3. 252.500 1.372 5.500 1. + 4. 101.406 1.823 2.625 3.500 + 5. 101.406 1.823 2.625 3.500 + 6. 60. 1.823 0. 3. + 7. 42.275 1.303 2.094 1.875 + 8. 42.275 1.303 2.094 1.875 + 9. 35.684 1.026 0.258 1.906 +10. 35.664 0.804 0.588 2.445 +11. 30.680 0.467 1.258 2.025 +12. 30.680 0.356 1.258 2.025 +13. 30.539 0.285 1.093 1.849 +14. 30.137 0.168 0.883 2.004 +15. 30.137 0.123 0.883 2.004 +16. 30.090 0.100 0.958 2.060 +17. 30.005 6.051e-2 1.022 2.004 +18. 30.005 4.249e-2 1.022 2.004 +19. 30.005 4.249e-2 1.022 2.004 +20. 30.005 2.742e-2 1.022 2.004 +21. 30.005 2.119e-2 1.022 2.004 +22. 30.001 1.530e-2 0.992 1.997 +23. 30.001 1.259e-2 0.992 1.997 +24. 30.001 7.663e-3 0.992 1.997@ + +The path to the solution can be graphically shown by means of: + +@'GSL.Plot.mplot' $ drop 3 ('toColumns' p)@ + +-} +minimizeNMSimplex :: ([Double] -> Double) -- ^ function to minimize + -> [Double] -- ^ starting point + -> [Double] -- ^ sizes of the initial search box + -> Double -- ^ desired precision of the solution + -> Int -- ^ maximum number of iterations allowed + -> ([Double], Matrix Double) + -- ^ solution vector, and the optimization trajectory followed by the algorithm +minimizeNMSimplex f xi sz tol maxit = unsafePerformIO $ do + let xiv = fromList xi + szv = fromList sz + n = dim xiv + fp <- mkVecfun (iv (f.toList)) + rawpath <- createMIO maxit (n+3) + (c_minimizeNMSimplex fp tol maxit // vec xiv // vec szv) + "minimizeNMSimplex" [xiv,szv] + let it = round (rawpath @@> (maxit-1,0)) + path = takeRows it rawpath + [sol] = toLists $ dropRows (it-1) path + freeHaskellFunPtr fp + return (drop 3 sol, path) + + +foreign import ccall "gsl-aux.h minimize" + c_minimizeNMSimplex:: FunPtr (Int -> Ptr Double -> Double) -> Double -> Int + -> TVVM + +---------------------------------------------------------------------------------- + +{- | The Fletcher-Reeves conjugate gradient algorithm /gsl_multimin_fminimizer_conjugate_fr/. This is the example in the GSL manual: + +@minimize = minimizeConjugateGradient 1E-2 1E-4 1E-3 30 +f [x,y] = 10*(x-1)^2 + 20*(y-2)^2 + 30 +\ +df [x,y] = [20*(x-1), 40*(y-2)] +\ +main = do + let (s,p) = minimize f df [5,7] + print s + print p +\ +\> main +[1.0,2.0] + 0. 687.848 4.996 6.991 + 1. 683.555 4.989 6.972 + 2. 675.013 4.974 6.935 + 3. 658.108 4.944 6.861 + 4. 625.013 4.885 6.712 + 5. 561.684 4.766 6.415 + 6. 446.467 4.528 5.821 + 7. 261.794 4.053 4.632 + 8. 75.498 3.102 2.255 + 9. 67.037 2.852 1.630 +10. 45.316 2.191 1.762 +11. 30.186 0.869 2.026 +12. 30. 1. 2.@ + +The path to the solution can be graphically shown by means of: + +@'GSL.Plot.mplot' $ drop 2 ('toColumns' p)@ + +-} +minimizeConjugateGradient :: + Double -- ^ initial step size + -> Double -- ^ minimization parameter + -> Double -- ^ desired precision of the solution (gradient test) + -> Int -- ^ maximum number of iterations allowed + -> ([Double] -> Double) -- ^ function to minimize + -> ([Double] -> [Double]) -- ^ gradient + -> [Double] -- ^ starting point + -> ([Double], Matrix Double) -- ^ solution vector, and the optimization trajectory followed by the algorithm +minimizeConjugateGradient istep minimpar tol maxit f df xi = unsafePerformIO $ do + let xiv = fromList xi + n = dim xiv + f' = f . toList + df' = (fromList . df . toList) + fp <- mkVecfun (iv f') + dfp <- mkVecVecfun (aux_vTov df') + print "entro" + rawpath <- createMIO maxit (n+2) + (c_minimizeConjugateGradient fp dfp istep minimpar tol maxit // vec xiv) + "minimizeDerivV" [xiv] + print "salgo" + let it = round (rawpath @@> (maxit-1,0)) + path = takeRows it rawpath + sol = toList $ cdat $ dropColumns 2 $ dropRows (it-1) path + freeHaskellFunPtr fp + freeHaskellFunPtr dfp + return (sol,path) + + +foreign import ccall "gsl-aux.h minimizeWithDeriv" + c_minimizeConjugateGradient :: FunPtr (Int -> Ptr Double -> Double) + -> FunPtr (Int -> Ptr Double -> Ptr Double -> IO ()) + -> Double -> Double -> Double -> Int + -> TVM + +--------------------------------------------------------------------- +iv :: (Vector Double -> Double) -> (Int -> Ptr Double -> Double) +iv f n p = f (createV n copy "iv" []) where + copy n q = do + copyArray q p n + return 0 + +-- | conversion of Haskell functions into function pointers that can be used in the C side +foreign import ccall "wrapper" + mkVecfun :: (Int -> Ptr Double -> Double) + -> IO( FunPtr (Int -> Ptr Double -> Double)) + +-- | another required conversion +foreign import ccall "wrapper" + mkVecVecfun :: (Int -> Ptr Double -> Ptr Double -> IO ()) + -> IO (FunPtr (Int -> Ptr Double -> Ptr Double->IO())) + +aux_vTov :: (Vector Double -> Vector Double) -> (Int -> Ptr Double -> Ptr Double -> IO()) +aux_vTov f n p r = g where + V {fptr = pr, ptr = t} = f x + x = createV n copy "aux_vTov" [] + copy n q = do + copyArray q p n + return 0 + g = withForeignPtr pr $ \_ -> copyArray r t n + +-------------------------------------------------------------------- + +createV n fun msg ptrs = unsafePerformIO $ do + r <- createVector n + fun // vec r // check msg ptrs + return r + +createM r c fun msg ptrs = unsafePerformIO $ do + r <- createMatrix RowMajor r c + fun // mat cdat r // check msg ptrs + return r + +createMIO r c fun msg ptrs = do + r <- createMatrix RowMajor r c + fun // mat cdat r // check msg ptrs + 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 @@ +{-# OPTIONS_GHC -fglasgow-exts #-} +----------------------------------------------------------------------------- +{- | +Module : Numeric.GSL.Polynomials +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style + +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Polynomials. + + + +-} +----------------------------------------------------------------------------- +module Numeric.GSL.Polynomials ( + polySolve +) where + +import Data.Packed.Internal +import Complex +import Foreign + +{- | Solution of general polynomial equations, using /gsl_poly_complex_solve/. For example, + the three solutions of x^3 + 8 = 0 + +@\> polySolve [8,0,0,1] +[(-1.9999999999999998) :+ 0.0, + 1.0 :+ 1.732050807568877, + 1.0 :+ (-1.732050807568877)]@ + +The example in the GSL manual: To find the roots of x^5 -1 = 0: + +@\> polySolve [-1, 0, 0, 0, 0, 1] +[(-0.8090169943749475) :+ 0.5877852522924731, +(-0.8090169943749475) :+ (-0.5877852522924731), +0.30901699437494734 :+ 0.9510565162951536, +0.30901699437494734 :+ (-0.9510565162951536), +1.0 :+ 0.0]@ + +-} +polySolve :: [Double] -> [Complex Double] +polySolve = toList . polySolve' . fromList + +polySolve' :: Vector Double -> Vector (Complex Double) +polySolve' v | dim v > 1 = unsafePerformIO $ do + r <- createVector (dim v-1) + c_polySolve // vec v // vec r // check "polySolve" [v] + return r + | otherwise = error "polySolve on a polynomial of degree zero" + +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 @@ +----------------------------------------------------------------------------- +{- | +Module : Numeric.GSL.Special +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style + +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected special functions. + + +-} +----------------------------------------------------------------------------- + +module Numeric.GSL.Special ( + module Numeric.GSL.Special.Airy +, module Numeric.GSL.Special.Bessel +, module Numeric.GSL.Special.Clausen +, module Numeric.GSL.Special.Coulomb +, module Numeric.GSL.Special.Coupling +, module Numeric.GSL.Special.Dawson +, module Numeric.GSL.Special.Debye +, module Numeric.GSL.Special.Dilog +, module Numeric.GSL.Special.Elementary +, module Numeric.GSL.Special.Ellint +, module Numeric.GSL.Special.Erf +, module Numeric.GSL.Special.Exp +, module Numeric.GSL.Special.Expint +, module Numeric.GSL.Special.Fermi_dirac +, module Numeric.GSL.Special.Gamma +, module Numeric.GSL.Special.Gegenbauer +, module Numeric.GSL.Special.Hyperg +, module Numeric.GSL.Special.Laguerre +, module Numeric.GSL.Special.Lambert +, module Numeric.GSL.Special.Legendre +, module Numeric.GSL.Special.Log +, module Numeric.GSL.Special.Pow_int +, module Numeric.GSL.Special.Psi +, module Numeric.GSL.Special.Synchrotron +, module Numeric.GSL.Special.Trig +, module Numeric.GSL.Special.Zeta +) +where + +import Foreign +import Numeric.GSL.Special.Internal +import Numeric.GSL.Special.Airy +import Numeric.GSL.Special.Bessel +import Numeric.GSL.Special.Clausen +import Numeric.GSL.Special.Coulomb +import Numeric.GSL.Special.Coupling +import Numeric.GSL.Special.Dawson +import Numeric.GSL.Special.Debye +import Numeric.GSL.Special.Dilog +import Numeric.GSL.Special.Elementary +import Numeric.GSL.Special.Ellint +import Numeric.GSL.Special.Erf +import Numeric.GSL.Special.Exp +import Numeric.GSL.Special.Expint +import Numeric.GSL.Special.Fermi_dirac +import Numeric.GSL.Special.Gamma +import Numeric.GSL.Special.Gegenbauer +import Numeric.GSL.Special.Hyperg +import Numeric.GSL.Special.Laguerre +import Numeric.GSL.Special.Lambert +import Numeric.GSL.Special.Legendre +import Numeric.GSL.Special.Log +import Numeric.GSL.Special.Pow_int +import Numeric.GSL.Special.Psi +import Numeric.GSL.Special.Synchrotron +import Numeric.GSL.Special.Trig +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Airy +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Airy( + Precision (..) +, airy_Ai_e +, airy_Ai +, airy_Bi_e +, airy_Bi +, airy_Ai_scaled_e +, airy_Ai_scaled +, airy_Bi_scaled_e +, airy_Bi_scaled +, airy_Ai_deriv_e +, airy_Ai_deriv +, airy_Bi_deriv_e +, airy_Bi_deriv +, airy_Ai_deriv_scaled_e +, airy_Ai_deriv_scaled +, airy_Bi_deriv_scaled_e +, airy_Bi_deriv_scaled +, airy_zero_Ai_e +, airy_zero_Ai +, airy_zero_Bi_e +, airy_zero_Bi +, airy_zero_Ai_deriv_e +, airy_zero_Ai_deriv +, airy_zero_Bi_deriv_e +, airy_zero_Bi_deriv +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_airy_Ai_e(double x,gsl_mode_t mode,gsl_sf_result* result); +airy_Ai_e :: Double -> Precision -> (Double,Double) +airy_Ai_e x mode = createSFR "airy_Ai_e" $ gsl_sf_airy_Ai_e x (precCode mode) +foreign import ccall "airy.h gsl_sf_airy_Ai_e" gsl_sf_airy_Ai_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_airy_Ai(double x,gsl_mode_t mode); +airy_Ai :: Double -> Precision -> Double +airy_Ai x mode = gsl_sf_airy_Ai x (precCode mode) +foreign import ccall "airy.h gsl_sf_airy_Ai" gsl_sf_airy_Ai :: Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_airy_Bi_e(double x,gsl_mode_t mode,gsl_sf_result* result); +airy_Bi_e :: Double -> Precision -> (Double,Double) +airy_Bi_e x mode = createSFR "airy_Bi_e" $ gsl_sf_airy_Bi_e x (precCode mode) +foreign import ccall "airy.h gsl_sf_airy_Bi_e" gsl_sf_airy_Bi_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_airy_Bi(double x,gsl_mode_t mode); +airy_Bi :: Double -> Precision -> Double +airy_Bi x mode = gsl_sf_airy_Bi x (precCode mode) +foreign import ccall "airy.h gsl_sf_airy_Bi" gsl_sf_airy_Bi :: Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_airy_Ai_scaled_e(double x,gsl_mode_t mode,gsl_sf_result* result); +airy_Ai_scaled_e :: Double -> Precision -> (Double,Double) +airy_Ai_scaled_e x mode = createSFR "airy_Ai_scaled_e" $ gsl_sf_airy_Ai_scaled_e x (precCode mode) +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) + +-- | wrapper for double gsl_sf_airy_Ai_scaled(double x,gsl_mode_t mode); +airy_Ai_scaled :: Double -> Precision -> Double +airy_Ai_scaled x mode = gsl_sf_airy_Ai_scaled x (precCode mode) +foreign import ccall "airy.h gsl_sf_airy_Ai_scaled" gsl_sf_airy_Ai_scaled :: Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_airy_Bi_scaled_e(double x,gsl_mode_t mode,gsl_sf_result* result); +airy_Bi_scaled_e :: Double -> Precision -> (Double,Double) +airy_Bi_scaled_e x mode = createSFR "airy_Bi_scaled_e" $ gsl_sf_airy_Bi_scaled_e x (precCode mode) +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) + +-- | wrapper for double gsl_sf_airy_Bi_scaled(double x,gsl_mode_t mode); +airy_Bi_scaled :: Double -> Precision -> Double +airy_Bi_scaled x mode = gsl_sf_airy_Bi_scaled x (precCode mode) +foreign import ccall "airy.h gsl_sf_airy_Bi_scaled" gsl_sf_airy_Bi_scaled :: Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_airy_Ai_deriv_e(double x,gsl_mode_t mode,gsl_sf_result* result); +airy_Ai_deriv_e :: Double -> Precision -> (Double,Double) +airy_Ai_deriv_e x mode = createSFR "airy_Ai_deriv_e" $ gsl_sf_airy_Ai_deriv_e x (precCode mode) +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) + +-- | wrapper for double gsl_sf_airy_Ai_deriv(double x,gsl_mode_t mode); +airy_Ai_deriv :: Double -> Precision -> Double +airy_Ai_deriv x mode = gsl_sf_airy_Ai_deriv x (precCode mode) +foreign import ccall "airy.h gsl_sf_airy_Ai_deriv" gsl_sf_airy_Ai_deriv :: Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_airy_Bi_deriv_e(double x,gsl_mode_t mode,gsl_sf_result* result); +airy_Bi_deriv_e :: Double -> Precision -> (Double,Double) +airy_Bi_deriv_e x mode = createSFR "airy_Bi_deriv_e" $ gsl_sf_airy_Bi_deriv_e x (precCode mode) +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) + +-- | wrapper for double gsl_sf_airy_Bi_deriv(double x,gsl_mode_t mode); +airy_Bi_deriv :: Double -> Precision -> Double +airy_Bi_deriv x mode = gsl_sf_airy_Bi_deriv x (precCode mode) +foreign import ccall "airy.h gsl_sf_airy_Bi_deriv" gsl_sf_airy_Bi_deriv :: Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_airy_Ai_deriv_scaled_e(double x,gsl_mode_t mode,gsl_sf_result* result); +airy_Ai_deriv_scaled_e :: Double -> Precision -> (Double,Double) +airy_Ai_deriv_scaled_e x mode = createSFR "airy_Ai_deriv_scaled_e" $ gsl_sf_airy_Ai_deriv_scaled_e x (precCode mode) +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) + +-- | wrapper for double gsl_sf_airy_Ai_deriv_scaled(double x,gsl_mode_t mode); +airy_Ai_deriv_scaled :: Double -> Precision -> Double +airy_Ai_deriv_scaled x mode = gsl_sf_airy_Ai_deriv_scaled x (precCode mode) +foreign import ccall "airy.h gsl_sf_airy_Ai_deriv_scaled" gsl_sf_airy_Ai_deriv_scaled :: Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_airy_Bi_deriv_scaled_e(double x,gsl_mode_t mode,gsl_sf_result* result); +airy_Bi_deriv_scaled_e :: Double -> Precision -> (Double,Double) +airy_Bi_deriv_scaled_e x mode = createSFR "airy_Bi_deriv_scaled_e" $ gsl_sf_airy_Bi_deriv_scaled_e x (precCode mode) +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) + +-- | wrapper for double gsl_sf_airy_Bi_deriv_scaled(double x,gsl_mode_t mode); +airy_Bi_deriv_scaled :: Double -> Precision -> Double +airy_Bi_deriv_scaled x mode = gsl_sf_airy_Bi_deriv_scaled x (precCode mode) +foreign import ccall "airy.h gsl_sf_airy_Bi_deriv_scaled" gsl_sf_airy_Bi_deriv_scaled :: Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_airy_zero_Ai_e(int s,gsl_sf_result* result); +airy_zero_Ai_e :: Int -> (Double,Double) +airy_zero_Ai_e s = createSFR "airy_zero_Ai_e" $ gsl_sf_airy_zero_Ai_e s +foreign import ccall "airy.h gsl_sf_airy_zero_Ai_e" gsl_sf_airy_zero_Ai_e :: Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_airy_zero_Ai(int s); +airy_zero_Ai :: Int -> Double +airy_zero_Ai = gsl_sf_airy_zero_Ai +foreign import ccall "airy.h gsl_sf_airy_zero_Ai" gsl_sf_airy_zero_Ai :: Int -> Double + +-- | wrapper for int gsl_sf_airy_zero_Bi_e(int s,gsl_sf_result* result); +airy_zero_Bi_e :: Int -> (Double,Double) +airy_zero_Bi_e s = createSFR "airy_zero_Bi_e" $ gsl_sf_airy_zero_Bi_e s +foreign import ccall "airy.h gsl_sf_airy_zero_Bi_e" gsl_sf_airy_zero_Bi_e :: Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_airy_zero_Bi(int s); +airy_zero_Bi :: Int -> Double +airy_zero_Bi = gsl_sf_airy_zero_Bi +foreign import ccall "airy.h gsl_sf_airy_zero_Bi" gsl_sf_airy_zero_Bi :: Int -> Double + +-- | wrapper for int gsl_sf_airy_zero_Ai_deriv_e(int s,gsl_sf_result* result); +airy_zero_Ai_deriv_e :: Int -> (Double,Double) +airy_zero_Ai_deriv_e s = createSFR "airy_zero_Ai_deriv_e" $ gsl_sf_airy_zero_Ai_deriv_e s +foreign import ccall "airy.h gsl_sf_airy_zero_Ai_deriv_e" gsl_sf_airy_zero_Ai_deriv_e :: Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_airy_zero_Ai_deriv(int s); +airy_zero_Ai_deriv :: Int -> Double +airy_zero_Ai_deriv = gsl_sf_airy_zero_Ai_deriv +foreign import ccall "airy.h gsl_sf_airy_zero_Ai_deriv" gsl_sf_airy_zero_Ai_deriv :: Int -> Double + +-- | wrapper for int gsl_sf_airy_zero_Bi_deriv_e(int s,gsl_sf_result* result); +airy_zero_Bi_deriv_e :: Int -> (Double,Double) +airy_zero_Bi_deriv_e s = createSFR "airy_zero_Bi_deriv_e" $ gsl_sf_airy_zero_Bi_deriv_e s +foreign import ccall "airy.h gsl_sf_airy_zero_Bi_deriv_e" gsl_sf_airy_zero_Bi_deriv_e :: Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_airy_zero_Bi_deriv(int s); +airy_zero_Bi_deriv :: Int -> Double +airy_zero_Bi_deriv = gsl_sf_airy_zero_Bi_deriv +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Bessel +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Bessel( + bessel_J0_e +, bessel_J0 +, bessel_J1_e +, bessel_J1 +, bessel_Jn_e +, bessel_Jn +, bessel_Y0_e +, bessel_Y0 +, bessel_Y1_e +, bessel_Y1 +, bessel_Yn_e +, bessel_Yn +, bessel_I0_e +, bessel_I0 +, bessel_I1_e +, bessel_I1 +, bessel_In_e +, bessel_In +, bessel_I0_scaled_e +, bessel_I0_scaled +, bessel_I1_scaled_e +, bessel_I1_scaled +, bessel_In_scaled_e +, bessel_In_scaled +, bessel_K0_e +, bessel_K0 +, bessel_K1_e +, bessel_K1 +, bessel_Kn_e +, bessel_Kn +, bessel_K0_scaled_e +, bessel_K0_scaled +, bessel_K1_scaled_e +, bessel_K1_scaled +, bessel_Kn_scaled_e +, bessel_Kn_scaled +, bessel_j0_e +, bessel_j0 +, bessel_j1_e +, bessel_j1 +, bessel_j2_e +, bessel_j2 +, bessel_jl_e +, bessel_jl +, bessel_y0_e +, bessel_y0 +, bessel_y1_e +, bessel_y1 +, bessel_y2_e +, bessel_y2 +, bessel_yl_e +, bessel_yl +, bessel_i0_scaled_e +, bessel_i0_scaled +, bessel_i1_scaled_e +, bessel_i1_scaled +, bessel_i2_scaled_e +, bessel_i2_scaled +, bessel_il_scaled_e +, bessel_il_scaled +, bessel_k0_scaled_e +, bessel_k0_scaled +, bessel_k1_scaled_e +, bessel_k1_scaled +, bessel_k2_scaled_e +, bessel_k2_scaled +, bessel_kl_scaled_e +, bessel_kl_scaled +, bessel_Jnu_e +, bessel_Jnu +, bessel_Ynu_e +, bessel_Ynu +, bessel_Inu_scaled_e +, bessel_Inu_scaled +, bessel_Inu_e +, bessel_Inu +, bessel_Knu_scaled_e +, bessel_Knu_scaled +, bessel_Knu_e +, bessel_Knu +, bessel_lnKnu_e +, bessel_lnKnu +, bessel_zero_J0_e +, bessel_zero_J0 +, bessel_zero_J1_e +, bessel_zero_J1 +, bessel_zero_Jnu_e +, bessel_zero_Jnu +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_bessel_J0_e(double x,gsl_sf_result* result); +-- +-- +bessel_J0_e :: Double -> (Double,Double) +bessel_J0_e x = createSFR "bessel_J0_e" $ gsl_sf_bessel_J0_e x +foreign import ccall "bessel.h gsl_sf_bessel_J0_e" gsl_sf_bessel_J0_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_J0(double x); +-- +-- +bessel_J0 :: Double -> Double +bessel_J0 = gsl_sf_bessel_J0 +foreign import ccall "bessel.h gsl_sf_bessel_J0" gsl_sf_bessel_J0 :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_J1_e(double x,gsl_sf_result* result); +-- +-- +bessel_J1_e :: Double -> (Double,Double) +bessel_J1_e x = createSFR "bessel_J1_e" $ gsl_sf_bessel_J1_e x +foreign import ccall "bessel.h gsl_sf_bessel_J1_e" gsl_sf_bessel_J1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_J1(double x); +-- +-- +bessel_J1 :: Double -> Double +bessel_J1 = gsl_sf_bessel_J1 +foreign import ccall "bessel.h gsl_sf_bessel_J1" gsl_sf_bessel_J1 :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_Jn_e(int n,double x,gsl_sf_result* result); +-- +-- +bessel_Jn_e :: Int -> Double -> (Double,Double) +bessel_Jn_e n x = createSFR "bessel_Jn_e" $ gsl_sf_bessel_Jn_e n x +foreign import ccall "bessel.h gsl_sf_bessel_Jn_e" gsl_sf_bessel_Jn_e :: Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_Jn(int n,double x); +-- +-- +bessel_Jn :: Int -> Double -> Double +bessel_Jn = gsl_sf_bessel_Jn +foreign import ccall "bessel.h gsl_sf_bessel_Jn" gsl_sf_bessel_Jn :: Int -> Double -> Double + +-- | wrapper for int gsl_sf_bessel_Jn_array(int nmin,int nmax,double x,double* result_array); +-- +-- +bessel_Jn_array :: Int -> Int -> Double -> Ptr Double -> Int +bessel_Jn_array = gsl_sf_bessel_Jn_array +foreign import ccall "bessel.h gsl_sf_bessel_Jn_array" gsl_sf_bessel_Jn_array :: Int -> Int -> Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_bessel_Y0_e(double x,gsl_sf_result* result); +-- +-- +bessel_Y0_e :: Double -> (Double,Double) +bessel_Y0_e x = createSFR "bessel_Y0_e" $ gsl_sf_bessel_Y0_e x +foreign import ccall "bessel.h gsl_sf_bessel_Y0_e" gsl_sf_bessel_Y0_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_Y0(double x); +-- +-- +bessel_Y0 :: Double -> Double +bessel_Y0 = gsl_sf_bessel_Y0 +foreign import ccall "bessel.h gsl_sf_bessel_Y0" gsl_sf_bessel_Y0 :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_Y1_e(double x,gsl_sf_result* result); +-- +-- +bessel_Y1_e :: Double -> (Double,Double) +bessel_Y1_e x = createSFR "bessel_Y1_e" $ gsl_sf_bessel_Y1_e x +foreign import ccall "bessel.h gsl_sf_bessel_Y1_e" gsl_sf_bessel_Y1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_Y1(double x); +-- +-- +bessel_Y1 :: Double -> Double +bessel_Y1 = gsl_sf_bessel_Y1 +foreign import ccall "bessel.h gsl_sf_bessel_Y1" gsl_sf_bessel_Y1 :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_Yn_e(int n,double x,gsl_sf_result* result); +-- +-- +bessel_Yn_e :: Int -> Double -> (Double,Double) +bessel_Yn_e n x = createSFR "bessel_Yn_e" $ gsl_sf_bessel_Yn_e n x +foreign import ccall "bessel.h gsl_sf_bessel_Yn_e" gsl_sf_bessel_Yn_e :: Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_Yn(int n,double x); +-- +-- +bessel_Yn :: Int -> Double -> Double +bessel_Yn = gsl_sf_bessel_Yn +foreign import ccall "bessel.h gsl_sf_bessel_Yn" gsl_sf_bessel_Yn :: Int -> Double -> Double + +-- | wrapper for int gsl_sf_bessel_Yn_array(int nmin,int nmax,double x,double* result_array); +-- +-- +bessel_Yn_array :: Int -> Int -> Double -> Ptr Double -> Int +bessel_Yn_array = gsl_sf_bessel_Yn_array +foreign import ccall "bessel.h gsl_sf_bessel_Yn_array" gsl_sf_bessel_Yn_array :: Int -> Int -> Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_bessel_I0_e(double x,gsl_sf_result* result); +-- +-- +bessel_I0_e :: Double -> (Double,Double) +bessel_I0_e x = createSFR "bessel_I0_e" $ gsl_sf_bessel_I0_e x +foreign import ccall "bessel.h gsl_sf_bessel_I0_e" gsl_sf_bessel_I0_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_I0(double x); +-- +-- +bessel_I0 :: Double -> Double +bessel_I0 = gsl_sf_bessel_I0 +foreign import ccall "bessel.h gsl_sf_bessel_I0" gsl_sf_bessel_I0 :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_I1_e(double x,gsl_sf_result* result); +-- +-- +bessel_I1_e :: Double -> (Double,Double) +bessel_I1_e x = createSFR "bessel_I1_e" $ gsl_sf_bessel_I1_e x +foreign import ccall "bessel.h gsl_sf_bessel_I1_e" gsl_sf_bessel_I1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_I1(double x); +-- +-- +bessel_I1 :: Double -> Double +bessel_I1 = gsl_sf_bessel_I1 +foreign import ccall "bessel.h gsl_sf_bessel_I1" gsl_sf_bessel_I1 :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_In_e(int n,double x,gsl_sf_result* result); +-- +-- +bessel_In_e :: Int -> Double -> (Double,Double) +bessel_In_e n x = createSFR "bessel_In_e" $ gsl_sf_bessel_In_e n x +foreign import ccall "bessel.h gsl_sf_bessel_In_e" gsl_sf_bessel_In_e :: Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_In(int n,double x); +-- +-- +bessel_In :: Int -> Double -> Double +bessel_In = gsl_sf_bessel_In +foreign import ccall "bessel.h gsl_sf_bessel_In" gsl_sf_bessel_In :: Int -> Double -> Double + +-- | wrapper for int gsl_sf_bessel_In_array(int nmin,int nmax,double x,double* result_array); +-- +-- +bessel_In_array :: Int -> Int -> Double -> Ptr Double -> Int +bessel_In_array = gsl_sf_bessel_In_array +foreign import ccall "bessel.h gsl_sf_bessel_In_array" gsl_sf_bessel_In_array :: Int -> Int -> Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_bessel_I0_scaled_e(double x,gsl_sf_result* result); +-- +-- +bessel_I0_scaled_e :: Double -> (Double,Double) +bessel_I0_scaled_e x = createSFR "bessel_I0_scaled_e" $ gsl_sf_bessel_I0_scaled_e x +foreign import ccall "bessel.h gsl_sf_bessel_I0_scaled_e" gsl_sf_bessel_I0_scaled_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_I0_scaled(double x); +-- +-- +bessel_I0_scaled :: Double -> Double +bessel_I0_scaled = gsl_sf_bessel_I0_scaled +foreign import ccall "bessel.h gsl_sf_bessel_I0_scaled" gsl_sf_bessel_I0_scaled :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_I1_scaled_e(double x,gsl_sf_result* result); +-- +-- +bessel_I1_scaled_e :: Double -> (Double,Double) +bessel_I1_scaled_e x = createSFR "bessel_I1_scaled_e" $ gsl_sf_bessel_I1_scaled_e x +foreign import ccall "bessel.h gsl_sf_bessel_I1_scaled_e" gsl_sf_bessel_I1_scaled_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_I1_scaled(double x); +-- +-- +bessel_I1_scaled :: Double -> Double +bessel_I1_scaled = gsl_sf_bessel_I1_scaled +foreign import ccall "bessel.h gsl_sf_bessel_I1_scaled" gsl_sf_bessel_I1_scaled :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_In_scaled_e(int n,double x,gsl_sf_result* result); +-- +-- +bessel_In_scaled_e :: Int -> Double -> (Double,Double) +bessel_In_scaled_e n x = createSFR "bessel_In_scaled_e" $ gsl_sf_bessel_In_scaled_e n x +foreign import ccall "bessel.h gsl_sf_bessel_In_scaled_e" gsl_sf_bessel_In_scaled_e :: Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_In_scaled(int n,double x); +-- +-- +bessel_In_scaled :: Int -> Double -> Double +bessel_In_scaled = gsl_sf_bessel_In_scaled +foreign import ccall "bessel.h gsl_sf_bessel_In_scaled" gsl_sf_bessel_In_scaled :: Int -> Double -> Double + +-- | wrapper for int gsl_sf_bessel_In_scaled_array(int nmin,int nmax,double x,double* result_array); +-- +-- +bessel_In_scaled_array :: Int -> Int -> Double -> Ptr Double -> Int +bessel_In_scaled_array = gsl_sf_bessel_In_scaled_array +foreign import ccall "bessel.h gsl_sf_bessel_In_scaled_array" gsl_sf_bessel_In_scaled_array :: Int -> Int -> Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_bessel_K0_e(double x,gsl_sf_result* result); +-- +-- +bessel_K0_e :: Double -> (Double,Double) +bessel_K0_e x = createSFR "bessel_K0_e" $ gsl_sf_bessel_K0_e x +foreign import ccall "bessel.h gsl_sf_bessel_K0_e" gsl_sf_bessel_K0_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_K0(double x); +-- +-- +bessel_K0 :: Double -> Double +bessel_K0 = gsl_sf_bessel_K0 +foreign import ccall "bessel.h gsl_sf_bessel_K0" gsl_sf_bessel_K0 :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_K1_e(double x,gsl_sf_result* result); +-- +-- +bessel_K1_e :: Double -> (Double,Double) +bessel_K1_e x = createSFR "bessel_K1_e" $ gsl_sf_bessel_K1_e x +foreign import ccall "bessel.h gsl_sf_bessel_K1_e" gsl_sf_bessel_K1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_K1(double x); +-- +-- +bessel_K1 :: Double -> Double +bessel_K1 = gsl_sf_bessel_K1 +foreign import ccall "bessel.h gsl_sf_bessel_K1" gsl_sf_bessel_K1 :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_Kn_e(int n,double x,gsl_sf_result* result); +-- +-- +bessel_Kn_e :: Int -> Double -> (Double,Double) +bessel_Kn_e n x = createSFR "bessel_Kn_e" $ gsl_sf_bessel_Kn_e n x +foreign import ccall "bessel.h gsl_sf_bessel_Kn_e" gsl_sf_bessel_Kn_e :: Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_Kn(int n,double x); +-- +-- +bessel_Kn :: Int -> Double -> Double +bessel_Kn = gsl_sf_bessel_Kn +foreign import ccall "bessel.h gsl_sf_bessel_Kn" gsl_sf_bessel_Kn :: Int -> Double -> Double + +-- | wrapper for int gsl_sf_bessel_Kn_array(int nmin,int nmax,double x,double* result_array); +-- +-- +bessel_Kn_array :: Int -> Int -> Double -> Ptr Double -> Int +bessel_Kn_array = gsl_sf_bessel_Kn_array +foreign import ccall "bessel.h gsl_sf_bessel_Kn_array" gsl_sf_bessel_Kn_array :: Int -> Int -> Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_bessel_K0_scaled_e(double x,gsl_sf_result* result); +-- +-- +bessel_K0_scaled_e :: Double -> (Double,Double) +bessel_K0_scaled_e x = createSFR "bessel_K0_scaled_e" $ gsl_sf_bessel_K0_scaled_e x +foreign import ccall "bessel.h gsl_sf_bessel_K0_scaled_e" gsl_sf_bessel_K0_scaled_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_K0_scaled(double x); +-- +-- +bessel_K0_scaled :: Double -> Double +bessel_K0_scaled = gsl_sf_bessel_K0_scaled +foreign import ccall "bessel.h gsl_sf_bessel_K0_scaled" gsl_sf_bessel_K0_scaled :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_K1_scaled_e(double x,gsl_sf_result* result); +-- +-- +bessel_K1_scaled_e :: Double -> (Double,Double) +bessel_K1_scaled_e x = createSFR "bessel_K1_scaled_e" $ gsl_sf_bessel_K1_scaled_e x +foreign import ccall "bessel.h gsl_sf_bessel_K1_scaled_e" gsl_sf_bessel_K1_scaled_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_K1_scaled(double x); +-- +-- +bessel_K1_scaled :: Double -> Double +bessel_K1_scaled = gsl_sf_bessel_K1_scaled +foreign import ccall "bessel.h gsl_sf_bessel_K1_scaled" gsl_sf_bessel_K1_scaled :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_Kn_scaled_e(int n,double x,gsl_sf_result* result); +-- +-- +bessel_Kn_scaled_e :: Int -> Double -> (Double,Double) +bessel_Kn_scaled_e n x = createSFR "bessel_Kn_scaled_e" $ gsl_sf_bessel_Kn_scaled_e n x +foreign import ccall "bessel.h gsl_sf_bessel_Kn_scaled_e" gsl_sf_bessel_Kn_scaled_e :: Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_Kn_scaled(int n,double x); +-- +-- +bessel_Kn_scaled :: Int -> Double -> Double +bessel_Kn_scaled = gsl_sf_bessel_Kn_scaled +foreign import ccall "bessel.h gsl_sf_bessel_Kn_scaled" gsl_sf_bessel_Kn_scaled :: Int -> Double -> Double + +-- | wrapper for int gsl_sf_bessel_Kn_scaled_array(int nmin,int nmax,double x,double* result_array); +-- +-- +bessel_Kn_scaled_array :: Int -> Int -> Double -> Ptr Double -> Int +bessel_Kn_scaled_array = gsl_sf_bessel_Kn_scaled_array +foreign import ccall "bessel.h gsl_sf_bessel_Kn_scaled_array" gsl_sf_bessel_Kn_scaled_array :: Int -> Int -> Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_bessel_j0_e(double x,gsl_sf_result* result); +-- +-- +bessel_j0_e :: Double -> (Double,Double) +bessel_j0_e x = createSFR "bessel_j0_e" $ gsl_sf_bessel_j0_e x +foreign import ccall "bessel.h gsl_sf_bessel_j0_e" gsl_sf_bessel_j0_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_j0(double x); +-- +-- +bessel_j0 :: Double -> Double +bessel_j0 = gsl_sf_bessel_j0 +foreign import ccall "bessel.h gsl_sf_bessel_j0" gsl_sf_bessel_j0 :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_j1_e(double x,gsl_sf_result* result); +-- +-- +bessel_j1_e :: Double -> (Double,Double) +bessel_j1_e x = createSFR "bessel_j1_e" $ gsl_sf_bessel_j1_e x +foreign import ccall "bessel.h gsl_sf_bessel_j1_e" gsl_sf_bessel_j1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_j1(double x); +-- +-- +bessel_j1 :: Double -> Double +bessel_j1 = gsl_sf_bessel_j1 +foreign import ccall "bessel.h gsl_sf_bessel_j1" gsl_sf_bessel_j1 :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_j2_e(double x,gsl_sf_result* result); +-- +-- +bessel_j2_e :: Double -> (Double,Double) +bessel_j2_e x = createSFR "bessel_j2_e" $ gsl_sf_bessel_j2_e x +foreign import ccall "bessel.h gsl_sf_bessel_j2_e" gsl_sf_bessel_j2_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_j2(double x); +-- +-- +bessel_j2 :: Double -> Double +bessel_j2 = gsl_sf_bessel_j2 +foreign import ccall "bessel.h gsl_sf_bessel_j2" gsl_sf_bessel_j2 :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_jl_e(int l,double x,gsl_sf_result* result); +-- +-- +bessel_jl_e :: Int -> Double -> (Double,Double) +bessel_jl_e l x = createSFR "bessel_jl_e" $ gsl_sf_bessel_jl_e l x +foreign import ccall "bessel.h gsl_sf_bessel_jl_e" gsl_sf_bessel_jl_e :: Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_jl(int l,double x); +-- +-- +bessel_jl :: Int -> Double -> Double +bessel_jl = gsl_sf_bessel_jl +foreign import ccall "bessel.h gsl_sf_bessel_jl" gsl_sf_bessel_jl :: Int -> Double -> Double + +-- | wrapper for int gsl_sf_bessel_jl_array(int lmax,double x,double* result_array); +-- +-- +bessel_jl_array :: Int -> Double -> Ptr Double -> Int +bessel_jl_array = gsl_sf_bessel_jl_array +foreign import ccall "bessel.h gsl_sf_bessel_jl_array" gsl_sf_bessel_jl_array :: Int -> Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_bessel_jl_steed_array(int lmax,double x,double* jl_x_array); +-- +-- +bessel_jl_steed_array :: Int -> Double -> Ptr Double -> Int +bessel_jl_steed_array = gsl_sf_bessel_jl_steed_array +foreign import ccall "bessel.h gsl_sf_bessel_jl_steed_array" gsl_sf_bessel_jl_steed_array :: Int -> Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_bessel_y0_e(double x,gsl_sf_result* result); +-- +-- +bessel_y0_e :: Double -> (Double,Double) +bessel_y0_e x = createSFR "bessel_y0_e" $ gsl_sf_bessel_y0_e x +foreign import ccall "bessel.h gsl_sf_bessel_y0_e" gsl_sf_bessel_y0_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_y0(double x); +-- +-- +bessel_y0 :: Double -> Double +bessel_y0 = gsl_sf_bessel_y0 +foreign import ccall "bessel.h gsl_sf_bessel_y0" gsl_sf_bessel_y0 :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_y1_e(double x,gsl_sf_result* result); +-- +-- +bessel_y1_e :: Double -> (Double,Double) +bessel_y1_e x = createSFR "bessel_y1_e" $ gsl_sf_bessel_y1_e x +foreign import ccall "bessel.h gsl_sf_bessel_y1_e" gsl_sf_bessel_y1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_y1(double x); +-- +-- +bessel_y1 :: Double -> Double +bessel_y1 = gsl_sf_bessel_y1 +foreign import ccall "bessel.h gsl_sf_bessel_y1" gsl_sf_bessel_y1 :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_y2_e(double x,gsl_sf_result* result); +-- +-- +bessel_y2_e :: Double -> (Double,Double) +bessel_y2_e x = createSFR "bessel_y2_e" $ gsl_sf_bessel_y2_e x +foreign import ccall "bessel.h gsl_sf_bessel_y2_e" gsl_sf_bessel_y2_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_y2(double x); +-- +-- +bessel_y2 :: Double -> Double +bessel_y2 = gsl_sf_bessel_y2 +foreign import ccall "bessel.h gsl_sf_bessel_y2" gsl_sf_bessel_y2 :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_yl_e(int l,double x,gsl_sf_result* result); +-- +-- +bessel_yl_e :: Int -> Double -> (Double,Double) +bessel_yl_e l x = createSFR "bessel_yl_e" $ gsl_sf_bessel_yl_e l x +foreign import ccall "bessel.h gsl_sf_bessel_yl_e" gsl_sf_bessel_yl_e :: Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_yl(int l,double x); +-- +-- +bessel_yl :: Int -> Double -> Double +bessel_yl = gsl_sf_bessel_yl +foreign import ccall "bessel.h gsl_sf_bessel_yl" gsl_sf_bessel_yl :: Int -> Double -> Double + +-- | wrapper for int gsl_sf_bessel_yl_array(int lmax,double x,double* result_array); +-- +-- +bessel_yl_array :: Int -> Double -> Ptr Double -> Int +bessel_yl_array = gsl_sf_bessel_yl_array +foreign import ccall "bessel.h gsl_sf_bessel_yl_array" gsl_sf_bessel_yl_array :: Int -> Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_bessel_i0_scaled_e(double x,gsl_sf_result* result); +-- +-- +bessel_i0_scaled_e :: Double -> (Double,Double) +bessel_i0_scaled_e x = createSFR "bessel_i0_scaled_e" $ gsl_sf_bessel_i0_scaled_e x +foreign import ccall "bessel.h gsl_sf_bessel_i0_scaled_e" gsl_sf_bessel_i0_scaled_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_i0_scaled(double x); +-- +-- +bessel_i0_scaled :: Double -> Double +bessel_i0_scaled = gsl_sf_bessel_i0_scaled +foreign import ccall "bessel.h gsl_sf_bessel_i0_scaled" gsl_sf_bessel_i0_scaled :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_i1_scaled_e(double x,gsl_sf_result* result); +-- +-- +bessel_i1_scaled_e :: Double -> (Double,Double) +bessel_i1_scaled_e x = createSFR "bessel_i1_scaled_e" $ gsl_sf_bessel_i1_scaled_e x +foreign import ccall "bessel.h gsl_sf_bessel_i1_scaled_e" gsl_sf_bessel_i1_scaled_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_i1_scaled(double x); +-- +-- +bessel_i1_scaled :: Double -> Double +bessel_i1_scaled = gsl_sf_bessel_i1_scaled +foreign import ccall "bessel.h gsl_sf_bessel_i1_scaled" gsl_sf_bessel_i1_scaled :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_i2_scaled_e(double x,gsl_sf_result* result); +-- +-- +bessel_i2_scaled_e :: Double -> (Double,Double) +bessel_i2_scaled_e x = createSFR "bessel_i2_scaled_e" $ gsl_sf_bessel_i2_scaled_e x +foreign import ccall "bessel.h gsl_sf_bessel_i2_scaled_e" gsl_sf_bessel_i2_scaled_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_i2_scaled(double x); +-- +-- +bessel_i2_scaled :: Double -> Double +bessel_i2_scaled = gsl_sf_bessel_i2_scaled +foreign import ccall "bessel.h gsl_sf_bessel_i2_scaled" gsl_sf_bessel_i2_scaled :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_il_scaled_e(int l,double x,gsl_sf_result* result); +-- +-- +bessel_il_scaled_e :: Int -> Double -> (Double,Double) +bessel_il_scaled_e l x = createSFR "bessel_il_scaled_e" $ gsl_sf_bessel_il_scaled_e l x +foreign import ccall "bessel.h gsl_sf_bessel_il_scaled_e" gsl_sf_bessel_il_scaled_e :: Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_il_scaled(int l,double x); +-- +-- +bessel_il_scaled :: Int -> Double -> Double +bessel_il_scaled = gsl_sf_bessel_il_scaled +foreign import ccall "bessel.h gsl_sf_bessel_il_scaled" gsl_sf_bessel_il_scaled :: Int -> Double -> Double + +-- | wrapper for int gsl_sf_bessel_il_scaled_array(int lmax,double x,double* result_array); +-- +-- +bessel_il_scaled_array :: Int -> Double -> Ptr Double -> Int +bessel_il_scaled_array = gsl_sf_bessel_il_scaled_array +foreign import ccall "bessel.h gsl_sf_bessel_il_scaled_array" gsl_sf_bessel_il_scaled_array :: Int -> Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_bessel_k0_scaled_e(double x,gsl_sf_result* result); +-- +-- +bessel_k0_scaled_e :: Double -> (Double,Double) +bessel_k0_scaled_e x = createSFR "bessel_k0_scaled_e" $ gsl_sf_bessel_k0_scaled_e x +foreign import ccall "bessel.h gsl_sf_bessel_k0_scaled_e" gsl_sf_bessel_k0_scaled_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_k0_scaled(double x); +-- +-- +bessel_k0_scaled :: Double -> Double +bessel_k0_scaled = gsl_sf_bessel_k0_scaled +foreign import ccall "bessel.h gsl_sf_bessel_k0_scaled" gsl_sf_bessel_k0_scaled :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_k1_scaled_e(double x,gsl_sf_result* result); +-- +-- +bessel_k1_scaled_e :: Double -> (Double,Double) +bessel_k1_scaled_e x = createSFR "bessel_k1_scaled_e" $ gsl_sf_bessel_k1_scaled_e x +foreign import ccall "bessel.h gsl_sf_bessel_k1_scaled_e" gsl_sf_bessel_k1_scaled_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_k1_scaled(double x); +-- +-- +bessel_k1_scaled :: Double -> Double +bessel_k1_scaled = gsl_sf_bessel_k1_scaled +foreign import ccall "bessel.h gsl_sf_bessel_k1_scaled" gsl_sf_bessel_k1_scaled :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_k2_scaled_e(double x,gsl_sf_result* result); +-- +-- +bessel_k2_scaled_e :: Double -> (Double,Double) +bessel_k2_scaled_e x = createSFR "bessel_k2_scaled_e" $ gsl_sf_bessel_k2_scaled_e x +foreign import ccall "bessel.h gsl_sf_bessel_k2_scaled_e" gsl_sf_bessel_k2_scaled_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_k2_scaled(double x); +-- +-- +bessel_k2_scaled :: Double -> Double +bessel_k2_scaled = gsl_sf_bessel_k2_scaled +foreign import ccall "bessel.h gsl_sf_bessel_k2_scaled" gsl_sf_bessel_k2_scaled :: Double -> Double + +-- | wrapper for int gsl_sf_bessel_kl_scaled_e(int l,double x,gsl_sf_result* result); +-- +-- +bessel_kl_scaled_e :: Int -> Double -> (Double,Double) +bessel_kl_scaled_e l x = createSFR "bessel_kl_scaled_e" $ gsl_sf_bessel_kl_scaled_e l x +foreign import ccall "bessel.h gsl_sf_bessel_kl_scaled_e" gsl_sf_bessel_kl_scaled_e :: Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_kl_scaled(int l,double x); +-- +-- +bessel_kl_scaled :: Int -> Double -> Double +bessel_kl_scaled = gsl_sf_bessel_kl_scaled +foreign import ccall "bessel.h gsl_sf_bessel_kl_scaled" gsl_sf_bessel_kl_scaled :: Int -> Double -> Double + +-- | wrapper for int gsl_sf_bessel_kl_scaled_array(int lmax,double x,double* result_array); +-- +-- +bessel_kl_scaled_array :: Int -> Double -> Ptr Double -> Int +bessel_kl_scaled_array = gsl_sf_bessel_kl_scaled_array +foreign import ccall "bessel.h gsl_sf_bessel_kl_scaled_array" gsl_sf_bessel_kl_scaled_array :: Int -> Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_bessel_Jnu_e(double nu,double x,gsl_sf_result* result); +-- +-- +bessel_Jnu_e :: Double -> Double -> (Double,Double) +bessel_Jnu_e nu x = createSFR "bessel_Jnu_e" $ gsl_sf_bessel_Jnu_e nu x +foreign import ccall "bessel.h gsl_sf_bessel_Jnu_e" gsl_sf_bessel_Jnu_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_Jnu(double nu,double x); +-- +-- +bessel_Jnu :: Double -> Double -> Double +bessel_Jnu = gsl_sf_bessel_Jnu +foreign import ccall "bessel.h gsl_sf_bessel_Jnu" gsl_sf_bessel_Jnu :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_bessel_Ynu_e(double nu,double x,gsl_sf_result* result); +-- +-- +bessel_Ynu_e :: Double -> Double -> (Double,Double) +bessel_Ynu_e nu x = createSFR "bessel_Ynu_e" $ gsl_sf_bessel_Ynu_e nu x +foreign import ccall "bessel.h gsl_sf_bessel_Ynu_e" gsl_sf_bessel_Ynu_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_Ynu(double nu,double x); +-- +-- +bessel_Ynu :: Double -> Double -> Double +bessel_Ynu = gsl_sf_bessel_Ynu +foreign import ccall "bessel.h gsl_sf_bessel_Ynu" gsl_sf_bessel_Ynu :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_bessel_sequence_Jnu_e(double nu,gsl_mode_t mode,size_t size,double* v); +-- +-- +bessel_sequence_Jnu_e :: Double -> Precision -> Size_t -> Ptr Double -> Int +bessel_sequence_Jnu_e nu mode size v = gsl_sf_bessel_sequence_Jnu_e nu (precCode mode) size v +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 + +-- | wrapper for int gsl_sf_bessel_Inu_scaled_e(double nu,double x,gsl_sf_result* result); +-- +-- +bessel_Inu_scaled_e :: Double -> Double -> (Double,Double) +bessel_Inu_scaled_e nu x = createSFR "bessel_Inu_scaled_e" $ gsl_sf_bessel_Inu_scaled_e nu x +foreign import ccall "bessel.h gsl_sf_bessel_Inu_scaled_e" gsl_sf_bessel_Inu_scaled_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_Inu_scaled(double nu,double x); +-- +-- +bessel_Inu_scaled :: Double -> Double -> Double +bessel_Inu_scaled = gsl_sf_bessel_Inu_scaled +foreign import ccall "bessel.h gsl_sf_bessel_Inu_scaled" gsl_sf_bessel_Inu_scaled :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_bessel_Inu_e(double nu,double x,gsl_sf_result* result); +-- +-- +bessel_Inu_e :: Double -> Double -> (Double,Double) +bessel_Inu_e nu x = createSFR "bessel_Inu_e" $ gsl_sf_bessel_Inu_e nu x +foreign import ccall "bessel.h gsl_sf_bessel_Inu_e" gsl_sf_bessel_Inu_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_Inu(double nu,double x); +-- +-- +bessel_Inu :: Double -> Double -> Double +bessel_Inu = gsl_sf_bessel_Inu +foreign import ccall "bessel.h gsl_sf_bessel_Inu" gsl_sf_bessel_Inu :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_bessel_Knu_scaled_e(double nu,double x,gsl_sf_result* result); +-- +-- +bessel_Knu_scaled_e :: Double -> Double -> (Double,Double) +bessel_Knu_scaled_e nu x = createSFR "bessel_Knu_scaled_e" $ gsl_sf_bessel_Knu_scaled_e nu x +foreign import ccall "bessel.h gsl_sf_bessel_Knu_scaled_e" gsl_sf_bessel_Knu_scaled_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_Knu_scaled(double nu,double x); +-- +-- +bessel_Knu_scaled :: Double -> Double -> Double +bessel_Knu_scaled = gsl_sf_bessel_Knu_scaled +foreign import ccall "bessel.h gsl_sf_bessel_Knu_scaled" gsl_sf_bessel_Knu_scaled :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_bessel_Knu_e(double nu,double x,gsl_sf_result* result); +-- +-- +bessel_Knu_e :: Double -> Double -> (Double,Double) +bessel_Knu_e nu x = createSFR "bessel_Knu_e" $ gsl_sf_bessel_Knu_e nu x +foreign import ccall "bessel.h gsl_sf_bessel_Knu_e" gsl_sf_bessel_Knu_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_Knu(double nu,double x); +-- +-- +bessel_Knu :: Double -> Double -> Double +bessel_Knu = gsl_sf_bessel_Knu +foreign import ccall "bessel.h gsl_sf_bessel_Knu" gsl_sf_bessel_Knu :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_bessel_lnKnu_e(double nu,double x,gsl_sf_result* result); +-- +-- +bessel_lnKnu_e :: Double -> Double -> (Double,Double) +bessel_lnKnu_e nu x = createSFR "bessel_lnKnu_e" $ gsl_sf_bessel_lnKnu_e nu x +foreign import ccall "bessel.h gsl_sf_bessel_lnKnu_e" gsl_sf_bessel_lnKnu_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_lnKnu(double nu,double x); +-- +-- +bessel_lnKnu :: Double -> Double -> Double +bessel_lnKnu = gsl_sf_bessel_lnKnu +foreign import ccall "bessel.h gsl_sf_bessel_lnKnu" gsl_sf_bessel_lnKnu :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_bessel_zero_J0_e(int s,gsl_sf_result* result); +-- +-- +bessel_zero_J0_e :: Int -> (Double,Double) +bessel_zero_J0_e s = createSFR "bessel_zero_J0_e" $ gsl_sf_bessel_zero_J0_e s +foreign import ccall "bessel.h gsl_sf_bessel_zero_J0_e" gsl_sf_bessel_zero_J0_e :: Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_zero_J0(int s); +-- +-- +bessel_zero_J0 :: Int -> Double +bessel_zero_J0 = gsl_sf_bessel_zero_J0 +foreign import ccall "bessel.h gsl_sf_bessel_zero_J0" gsl_sf_bessel_zero_J0 :: Int -> Double + +-- | wrapper for int gsl_sf_bessel_zero_J1_e(int s,gsl_sf_result* result); +-- +-- +bessel_zero_J1_e :: Int -> (Double,Double) +bessel_zero_J1_e s = createSFR "bessel_zero_J1_e" $ gsl_sf_bessel_zero_J1_e s +foreign import ccall "bessel.h gsl_sf_bessel_zero_J1_e" gsl_sf_bessel_zero_J1_e :: Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_zero_J1(int s); +-- +-- +bessel_zero_J1 :: Int -> Double +bessel_zero_J1 = gsl_sf_bessel_zero_J1 +foreign import ccall "bessel.h gsl_sf_bessel_zero_J1" gsl_sf_bessel_zero_J1 :: Int -> Double + +-- | wrapper for int gsl_sf_bessel_zero_Jnu_e(double nu,int s,gsl_sf_result* result); +-- +-- +bessel_zero_Jnu_e :: Double -> Int -> (Double,Double) +bessel_zero_Jnu_e nu s = createSFR "bessel_zero_Jnu_e" $ gsl_sf_bessel_zero_Jnu_e nu s +foreign import ccall "bessel.h gsl_sf_bessel_zero_Jnu_e" gsl_sf_bessel_zero_Jnu_e :: Double -> Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_bessel_zero_Jnu(double nu,int s); +-- +-- +bessel_zero_Jnu :: Double -> Int -> Double +bessel_zero_Jnu = gsl_sf_bessel_zero_Jnu +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Clausen +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Clausen( + clausen_e +, clausen +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_clausen_e(double x,gsl_sf_result* result); +-- +-- +clausen_e :: Double -> (Double,Double) +clausen_e x = createSFR "clausen_e" $ gsl_sf_clausen_e x +foreign import ccall "clausen.h gsl_sf_clausen_e" gsl_sf_clausen_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_clausen(double x); +-- +-- +clausen :: Double -> Double +clausen = gsl_sf_clausen +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Coulomb +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Coulomb( + hydrogenicR_1_e +, hydrogenicR_1 +, hydrogenicR_e +, hydrogenicR +, coulomb_CL_e +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_hydrogenicR_1_e(double Z,double r,gsl_sf_result* result); +-- +-- +hydrogenicR_1_e :: Double -> Double -> (Double,Double) +hydrogenicR_1_e zZ r = createSFR "hydrogenicR_1_e" $ gsl_sf_hydrogenicR_1_e zZ r +foreign import ccall "coulomb.h gsl_sf_hydrogenicR_1_e" gsl_sf_hydrogenicR_1_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hydrogenicR_1(double Z,double r); +-- +-- +hydrogenicR_1 :: Double -> Double -> Double +hydrogenicR_1 = gsl_sf_hydrogenicR_1 +foreign import ccall "coulomb.h gsl_sf_hydrogenicR_1" gsl_sf_hydrogenicR_1 :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_hydrogenicR_e(int n,int l,double Z,double r,gsl_sf_result* result); +-- +-- +hydrogenicR_e :: Int -> Int -> Double -> Double -> (Double,Double) +hydrogenicR_e n l zZ r = createSFR "hydrogenicR_e" $ gsl_sf_hydrogenicR_e n l zZ r +foreign import ccall "coulomb.h gsl_sf_hydrogenicR_e" gsl_sf_hydrogenicR_e :: Int -> Int -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hydrogenicR(int n,int l,double Z,double r); +-- +-- +hydrogenicR :: Int -> Int -> Double -> Double -> Double +hydrogenicR = gsl_sf_hydrogenicR +foreign import ccall "coulomb.h gsl_sf_hydrogenicR" gsl_sf_hydrogenicR :: Int -> Int -> Double -> Double -> Double + +-- | 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); +-- +-- +coulomb_wave_FG_e :: Double -> Double -> Double -> Int -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int +coulomb_wave_FG_e = gsl_sf_coulomb_wave_FG_e +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 + +-- | wrapper for int gsl_sf_coulomb_wave_F_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent); +-- +-- +coulomb_wave_F_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Int +coulomb_wave_F_array = gsl_sf_coulomb_wave_F_array +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 + +-- | 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); +-- +-- +coulomb_wave_FG_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int +coulomb_wave_FG_array = gsl_sf_coulomb_wave_FG_array +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 + +-- | 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); +-- +-- +coulomb_wave_FGp_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int +coulomb_wave_FGp_array = gsl_sf_coulomb_wave_FGp_array +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 + +-- | wrapper for int gsl_sf_coulomb_wave_sphF_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent); +-- +-- +coulomb_wave_sphF_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Int +coulomb_wave_sphF_array = gsl_sf_coulomb_wave_sphF_array +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 + +-- | wrapper for int gsl_sf_coulomb_CL_e(double L,double eta,gsl_sf_result* result); +-- +-- +coulomb_CL_e :: Double -> Double -> (Double,Double) +coulomb_CL_e lL eta = createSFR "coulomb_CL_e" $ gsl_sf_coulomb_CL_e lL eta +foreign import ccall "coulomb.h gsl_sf_coulomb_CL_e" gsl_sf_coulomb_CL_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_coulomb_CL_array(double Lmin,int kmax,double eta,double* cl); +-- +-- +coulomb_CL_array :: Double -> Int -> Double -> Ptr Double -> Int +coulomb_CL_array = gsl_sf_coulomb_CL_array +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Coupling +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Coupling( + coupling_3j_e +, coupling_3j +, coupling_6j_e +, coupling_6j +, coupling_RacahW_e +, coupling_RacahW +, coupling_9j_e +, coupling_9j +-- , coupling_6j_INCORRECT_e +-- , coupling_6j_INCORRECT +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | 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); +coupling_3j_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double) +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 +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) + +-- | 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); +coupling_3j :: Int -> Int -> Int -> Int -> Int -> Int -> Double +coupling_3j = gsl_sf_coupling_3j +foreign import ccall "coupling.h gsl_sf_coupling_3j" gsl_sf_coupling_3j :: Int -> Int -> Int -> Int -> Int -> Int -> Double + +-- | 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); +coupling_6j_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double) +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 +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) + +-- | 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); +coupling_6j :: Int -> Int -> Int -> Int -> Int -> Int -> Double +coupling_6j = gsl_sf_coupling_6j +foreign import ccall "coupling.h gsl_sf_coupling_6j" gsl_sf_coupling_6j :: Int -> Int -> Int -> Int -> Int -> Int -> Double + +-- | 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); +coupling_RacahW_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double) +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 +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) + +-- | 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); +coupling_RacahW :: Int -> Int -> Int -> Int -> Int -> Int -> Double +coupling_RacahW = gsl_sf_coupling_RacahW +foreign import ccall "coupling.h gsl_sf_coupling_RacahW" gsl_sf_coupling_RacahW :: Int -> Int -> Int -> Int -> Int -> Int -> Double + +-- | 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); +coupling_9j_e :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double) +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 +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) + +-- | 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); +coupling_9j :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Double +coupling_9j = gsl_sf_coupling_9j +foreign import ccall "coupling.h gsl_sf_coupling_9j" gsl_sf_coupling_9j :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Double + +-- | 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); +coupling_6j_INCORRECT_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double) +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 +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) + +-- | 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); +coupling_6j_INCORRECT :: Int -> Int -> Int -> Int -> Int -> Int -> Double +coupling_6j_INCORRECT = gsl_sf_coupling_6j_INCORRECT +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Dawson +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Dawson( + dawson_e +, dawson +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_dawson_e(double x,gsl_sf_result* result); +-- +-- +dawson_e :: Double -> (Double,Double) +dawson_e x = createSFR "dawson_e" $ gsl_sf_dawson_e x +foreign import ccall "dawson.h gsl_sf_dawson_e" gsl_sf_dawson_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_dawson(double x); +-- +-- +dawson :: Double -> Double +dawson = gsl_sf_dawson +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Debye +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Debye( + debye_1_e +, debye_1 +, debye_2_e +, debye_2 +, debye_3_e +, debye_3 +, debye_4_e +, debye_4 +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_debye_1_e(double x,gsl_sf_result* result); +-- +-- +debye_1_e :: Double -> (Double,Double) +debye_1_e x = createSFR "debye_1_e" $ gsl_sf_debye_1_e x +foreign import ccall "debye.h gsl_sf_debye_1_e" gsl_sf_debye_1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_debye_1(double x); +-- +-- +debye_1 :: Double -> Double +debye_1 = gsl_sf_debye_1 +foreign import ccall "debye.h gsl_sf_debye_1" gsl_sf_debye_1 :: Double -> Double + +-- | wrapper for int gsl_sf_debye_2_e(double x,gsl_sf_result* result); +-- +-- +debye_2_e :: Double -> (Double,Double) +debye_2_e x = createSFR "debye_2_e" $ gsl_sf_debye_2_e x +foreign import ccall "debye.h gsl_sf_debye_2_e" gsl_sf_debye_2_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_debye_2(double x); +-- +-- +debye_2 :: Double -> Double +debye_2 = gsl_sf_debye_2 +foreign import ccall "debye.h gsl_sf_debye_2" gsl_sf_debye_2 :: Double -> Double + +-- | wrapper for int gsl_sf_debye_3_e(double x,gsl_sf_result* result); +-- +-- +debye_3_e :: Double -> (Double,Double) +debye_3_e x = createSFR "debye_3_e" $ gsl_sf_debye_3_e x +foreign import ccall "debye.h gsl_sf_debye_3_e" gsl_sf_debye_3_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_debye_3(double x); +-- +-- +debye_3 :: Double -> Double +debye_3 = gsl_sf_debye_3 +foreign import ccall "debye.h gsl_sf_debye_3" gsl_sf_debye_3 :: Double -> Double + +-- | wrapper for int gsl_sf_debye_4_e(double x,gsl_sf_result* result); +-- +-- +debye_4_e :: Double -> (Double,Double) +debye_4_e x = createSFR "debye_4_e" $ gsl_sf_debye_4_e x +foreign import ccall "debye.h gsl_sf_debye_4_e" gsl_sf_debye_4_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_debye_4(double x); +-- +-- +debye_4 :: Double -> Double +debye_4 = gsl_sf_debye_4 +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Dilog +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Dilog( + dilog_e +, dilog +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_dilog_e(double x,gsl_sf_result* result); +-- +-- +dilog_e :: Double -> (Double,Double) +dilog_e x = createSFR "dilog_e" $ gsl_sf_dilog_e x +foreign import ccall "dilog.h gsl_sf_dilog_e" gsl_sf_dilog_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_dilog(double x); +-- +-- +dilog :: Double -> Double +dilog = gsl_sf_dilog +foreign import ccall "dilog.h gsl_sf_dilog" gsl_sf_dilog :: Double -> Double + +-- | wrapper for int gsl_sf_complex_dilog_xy_e(double x,double y,gsl_sf_result* result_re,gsl_sf_result* result_im); +-- +-- +complex_dilog_xy_e :: Double -> Double -> Ptr Double -> (Double,Double) +complex_dilog_xy_e x y result_re = createSFR "complex_dilog_xy_e" $ gsl_sf_complex_dilog_xy_e x y result_re +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) + +-- | wrapper for int gsl_sf_complex_dilog_e(double r,double theta,gsl_sf_result* result_re,gsl_sf_result* result_im); +-- +-- +complex_dilog_e :: Double -> Double -> Ptr Double -> (Double,Double) +complex_dilog_e r theta result_re = createSFR "complex_dilog_e" $ gsl_sf_complex_dilog_e r theta result_re +foreign import ccall "dilog.h gsl_sf_complex_dilog_e" gsl_sf_complex_dilog_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_complex_spence_xy_e(double x,double y,gsl_sf_result* real_sp,gsl_sf_result* imag_sp); +-- +-- +complex_spence_xy_e :: Double -> Double -> Ptr Double -> (Double,Double) +complex_spence_xy_e x y real_sp = createSFR "complex_spence_xy_e" $ gsl_sf_complex_spence_xy_e x y real_sp +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Elementary +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Elementary( + multiply_e +, multiply +, multiply_err_e +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_multiply_e(double x,double y,gsl_sf_result* result); +-- +-- +multiply_e :: Double -> Double -> (Double,Double) +multiply_e x y = createSFR "multiply_e" $ gsl_sf_multiply_e x y +foreign import ccall "elementary.h gsl_sf_multiply_e" gsl_sf_multiply_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_multiply(double x,double y); +-- +-- +multiply :: Double -> Double -> Double +multiply = gsl_sf_multiply +foreign import ccall "elementary.h gsl_sf_multiply" gsl_sf_multiply :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_multiply_err_e(double x,double dx,double y,double dy,gsl_sf_result* result); +-- +-- +multiply_err_e :: Double -> Double -> Double -> Double -> (Double,Double) +multiply_err_e x dx y dy = createSFR "multiply_err_e" $ gsl_sf_multiply_err_e x dx y dy +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Ellint +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Ellint( + ellint_Kcomp_e +, ellint_Kcomp +, ellint_Ecomp_e +, ellint_Ecomp +, ellint_F_e +, ellint_F +, ellint_E_e +, ellint_E +, ellint_P_e +, ellint_P +, ellint_D_e +, ellint_D +, ellint_RC_e +, ellint_RC +, ellint_RD_e +, ellint_RD +, ellint_RF_e +, ellint_RF +, ellint_RJ_e +, ellint_RJ +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_ellint_Kcomp_e(double k,gsl_mode_t mode,gsl_sf_result* result); +-- +-- +ellint_Kcomp_e :: Double -> Precision -> (Double,Double) +ellint_Kcomp_e k mode = createSFR "ellint_Kcomp_e" $ gsl_sf_ellint_Kcomp_e k (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_Kcomp_e" gsl_sf_ellint_Kcomp_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_ellint_Kcomp(double k,gsl_mode_t mode); +-- +-- +ellint_Kcomp :: Double -> Precision -> Double +ellint_Kcomp k mode = gsl_sf_ellint_Kcomp k (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_Kcomp" gsl_sf_ellint_Kcomp :: Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_ellint_Ecomp_e(double k,gsl_mode_t mode,gsl_sf_result* result); +-- +-- +ellint_Ecomp_e :: Double -> Precision -> (Double,Double) +ellint_Ecomp_e k mode = createSFR "ellint_Ecomp_e" $ gsl_sf_ellint_Ecomp_e k (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_Ecomp_e" gsl_sf_ellint_Ecomp_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_ellint_Ecomp(double k,gsl_mode_t mode); +-- +-- +ellint_Ecomp :: Double -> Precision -> Double +ellint_Ecomp k mode = gsl_sf_ellint_Ecomp k (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_Ecomp" gsl_sf_ellint_Ecomp :: Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_ellint_F_e(double phi,double k,gsl_mode_t mode,gsl_sf_result* result); +-- +-- +ellint_F_e :: Double -> Double -> Precision -> (Double,Double) +ellint_F_e phi k mode = createSFR "ellint_F_e" $ gsl_sf_ellint_F_e phi k (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_F_e" gsl_sf_ellint_F_e :: Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_ellint_F(double phi,double k,gsl_mode_t mode); +-- +-- +ellint_F :: Double -> Double -> Precision -> Double +ellint_F phi k mode = gsl_sf_ellint_F phi k (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_F" gsl_sf_ellint_F :: Double -> Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_ellint_E_e(double phi,double k,gsl_mode_t mode,gsl_sf_result* result); +-- +-- +ellint_E_e :: Double -> Double -> Precision -> (Double,Double) +ellint_E_e phi k mode = createSFR "ellint_E_e" $ gsl_sf_ellint_E_e phi k (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_E_e" gsl_sf_ellint_E_e :: Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_ellint_E(double phi,double k,gsl_mode_t mode); +-- +-- +ellint_E :: Double -> Double -> Precision -> Double +ellint_E phi k mode = gsl_sf_ellint_E phi k (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_E" gsl_sf_ellint_E :: Double -> Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_ellint_P_e(double phi,double k,double n,gsl_mode_t mode,gsl_sf_result* result); +-- +-- +ellint_P_e :: Double -> Double -> Double -> Precision -> (Double,Double) +ellint_P_e phi k n mode = createSFR "ellint_P_e" $ gsl_sf_ellint_P_e phi k n (precCode mode) +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) + +-- | wrapper for double gsl_sf_ellint_P(double phi,double k,double n,gsl_mode_t mode); +-- +-- +ellint_P :: Double -> Double -> Double -> Precision -> Double +ellint_P phi k n mode = gsl_sf_ellint_P phi k n (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_P" gsl_sf_ellint_P :: Double -> Double -> Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_ellint_D_e(double phi,double k,double n,gsl_mode_t mode,gsl_sf_result* result); +-- +-- +ellint_D_e :: Double -> Double -> Double -> Precision -> (Double,Double) +ellint_D_e phi k n mode = createSFR "ellint_D_e" $ gsl_sf_ellint_D_e phi k n (precCode mode) +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) + +-- | wrapper for double gsl_sf_ellint_D(double phi,double k,double n,gsl_mode_t mode); +-- +-- +ellint_D :: Double -> Double -> Double -> Precision -> Double +ellint_D phi k n mode = gsl_sf_ellint_D phi k n (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_D" gsl_sf_ellint_D :: Double -> Double -> Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_ellint_RC_e(double x,double y,gsl_mode_t mode,gsl_sf_result* result); +-- +-- +ellint_RC_e :: Double -> Double -> Precision -> (Double,Double) +ellint_RC_e x y mode = createSFR "ellint_RC_e" $ gsl_sf_ellint_RC_e x y (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_RC_e" gsl_sf_ellint_RC_e :: Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_ellint_RC(double x,double y,gsl_mode_t mode); +-- +-- +ellint_RC :: Double -> Double -> Precision -> Double +ellint_RC x y mode = gsl_sf_ellint_RC x y (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_RC" gsl_sf_ellint_RC :: Double -> Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_ellint_RD_e(double x,double y,double z,gsl_mode_t mode,gsl_sf_result* result); +-- +-- +ellint_RD_e :: Double -> Double -> Double -> Precision -> (Double,Double) +ellint_RD_e x y z mode = createSFR "ellint_RD_e" $ gsl_sf_ellint_RD_e x y z (precCode mode) +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) + +-- | wrapper for double gsl_sf_ellint_RD(double x,double y,double z,gsl_mode_t mode); +-- +-- +ellint_RD :: Double -> Double -> Double -> Precision -> Double +ellint_RD x y z mode = gsl_sf_ellint_RD x y z (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_RD" gsl_sf_ellint_RD :: Double -> Double -> Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_ellint_RF_e(double x,double y,double z,gsl_mode_t mode,gsl_sf_result* result); +-- +-- +ellint_RF_e :: Double -> Double -> Double -> Precision -> (Double,Double) +ellint_RF_e x y z mode = createSFR "ellint_RF_e" $ gsl_sf_ellint_RF_e x y z (precCode mode) +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) + +-- | wrapper for double gsl_sf_ellint_RF(double x,double y,double z,gsl_mode_t mode); +-- +-- +ellint_RF :: Double -> Double -> Double -> Precision -> Double +ellint_RF x y z mode = gsl_sf_ellint_RF x y z (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_RF" gsl_sf_ellint_RF :: Double -> Double -> Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_ellint_RJ_e(double x,double y,double z,double p,gsl_mode_t mode,gsl_sf_result* result); +-- +-- +ellint_RJ_e :: Double -> Double -> Double -> Double -> Precision -> (Double,Double) +ellint_RJ_e x y z p mode = createSFR "ellint_RJ_e" $ gsl_sf_ellint_RJ_e x y z p (precCode mode) +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) + +-- | wrapper for double gsl_sf_ellint_RJ(double x,double y,double z,double p,gsl_mode_t mode); +-- +-- +ellint_RJ :: Double -> Double -> Double -> Double -> Precision -> Double +ellint_RJ x y z p mode = gsl_sf_ellint_RJ x y z p (precCode mode) +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Erf +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Erf( + erfc_e +, erfc +, log_erfc_e +, log_erfc +, erf_e +, erf +, erf_Z_e +, erf_Q_e +, erf_Z +, erf_Q +, hazard_e +, hazard +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_erfc_e(double x,gsl_sf_result* result); +-- +-- +erfc_e :: Double -> (Double,Double) +erfc_e x = createSFR "erfc_e" $ gsl_sf_erfc_e x +foreign import ccall "erf.h gsl_sf_erfc_e" gsl_sf_erfc_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_erfc(double x); +-- +-- +erfc :: Double -> Double +erfc = gsl_sf_erfc +foreign import ccall "erf.h gsl_sf_erfc" gsl_sf_erfc :: Double -> Double + +-- | wrapper for int gsl_sf_log_erfc_e(double x,gsl_sf_result* result); +-- +-- +log_erfc_e :: Double -> (Double,Double) +log_erfc_e x = createSFR "log_erfc_e" $ gsl_sf_log_erfc_e x +foreign import ccall "erf.h gsl_sf_log_erfc_e" gsl_sf_log_erfc_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_log_erfc(double x); +-- +-- +log_erfc :: Double -> Double +log_erfc = gsl_sf_log_erfc +foreign import ccall "erf.h gsl_sf_log_erfc" gsl_sf_log_erfc :: Double -> Double + +-- | wrapper for int gsl_sf_erf_e(double x,gsl_sf_result* result); +-- +-- +erf_e :: Double -> (Double,Double) +erf_e x = createSFR "erf_e" $ gsl_sf_erf_e x +foreign import ccall "erf.h gsl_sf_erf_e" gsl_sf_erf_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_erf(double x); +-- +-- +erf :: Double -> Double +erf = gsl_sf_erf +foreign import ccall "erf.h gsl_sf_erf" gsl_sf_erf :: Double -> Double + +-- | wrapper for int gsl_sf_erf_Z_e(double x,gsl_sf_result* result); +-- +-- +erf_Z_e :: Double -> (Double,Double) +erf_Z_e x = createSFR "erf_Z_e" $ gsl_sf_erf_Z_e x +foreign import ccall "erf.h gsl_sf_erf_Z_e" gsl_sf_erf_Z_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_erf_Q_e(double x,gsl_sf_result* result); +-- +-- +erf_Q_e :: Double -> (Double,Double) +erf_Q_e x = createSFR "erf_Q_e" $ gsl_sf_erf_Q_e x +foreign import ccall "erf.h gsl_sf_erf_Q_e" gsl_sf_erf_Q_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_erf_Z(double x); +-- +-- +erf_Z :: Double -> Double +erf_Z = gsl_sf_erf_Z +foreign import ccall "erf.h gsl_sf_erf_Z" gsl_sf_erf_Z :: Double -> Double + +-- | wrapper for double gsl_sf_erf_Q(double x); +-- +-- +erf_Q :: Double -> Double +erf_Q = gsl_sf_erf_Q +foreign import ccall "erf.h gsl_sf_erf_Q" gsl_sf_erf_Q :: Double -> Double + +-- | wrapper for int gsl_sf_hazard_e(double x,gsl_sf_result* result); +-- +-- +hazard_e :: Double -> (Double,Double) +hazard_e x = createSFR "hazard_e" $ gsl_sf_hazard_e x +foreign import ccall "erf.h gsl_sf_hazard_e" gsl_sf_hazard_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hazard(double x); +-- +-- +hazard :: Double -> Double +hazard = gsl_sf_hazard +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Exp +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Exp( + exp_e +, Numeric.GSL.Special.Exp.exp +, exp_e10_e +, exp_mult_e +, exp_mult +, exp_mult_e10_e +, expm1_e +, expm1 +, exprel_e +, exprel +, exprel_2_e +, exprel_2 +, exprel_n_e +, exprel_n +, exp_err_e +, exp_err_e10_e +, exp_mult_err_e +, exp_mult_err_e10_e +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_exp_e(double x,gsl_sf_result* result); +exp_e :: Double -> (Double,Double) +exp_e x = createSFR "exp_e" $ gsl_sf_exp_e x +foreign import ccall "exp.h gsl_sf_exp_e" gsl_sf_exp_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_exp(double x); +exp :: Double -> Double +exp = gsl_sf_exp +foreign import ccall "exp.h gsl_sf_exp" gsl_sf_exp :: Double -> Double + +-- | wrapper for int gsl_sf_exp_e10_e(double x,gsl_sf_result_e10* result); +exp_e10_e :: Double -> (Double,Int,Double) +exp_e10_e x = createSFR_E10 "exp_e10_e" $ gsl_sf_exp_e10_e x +foreign import ccall "exp.h gsl_sf_exp_e10_e" gsl_sf_exp_e10_e :: Double -> Ptr () -> IO(Int) + +-- | wrapper for int gsl_sf_exp_mult_e(double x,double y,gsl_sf_result* result); +exp_mult_e :: Double -> Double -> (Double,Double) +exp_mult_e x y = createSFR "exp_mult_e" $ gsl_sf_exp_mult_e x y +foreign import ccall "exp.h gsl_sf_exp_mult_e" gsl_sf_exp_mult_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_exp_mult(double x,double y); +exp_mult :: Double -> Double -> Double +exp_mult = gsl_sf_exp_mult +foreign import ccall "exp.h gsl_sf_exp_mult" gsl_sf_exp_mult :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_exp_mult_e10_e(double x,double y,gsl_sf_result_e10* result); +exp_mult_e10_e :: Double -> Double -> (Double,Int,Double) +exp_mult_e10_e x y = createSFR_E10 "exp_mult_e10_e" $ gsl_sf_exp_mult_e10_e x y +foreign import ccall "exp.h gsl_sf_exp_mult_e10_e" gsl_sf_exp_mult_e10_e :: Double -> Double -> Ptr () -> IO(Int) + +-- | wrapper for int gsl_sf_expm1_e(double x,gsl_sf_result* result); +expm1_e :: Double -> (Double,Double) +expm1_e x = createSFR "expm1_e" $ gsl_sf_expm1_e x +foreign import ccall "exp.h gsl_sf_expm1_e" gsl_sf_expm1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_expm1(double x); +expm1 :: Double -> Double +expm1 = gsl_sf_expm1 +foreign import ccall "exp.h gsl_sf_expm1" gsl_sf_expm1 :: Double -> Double + +-- | wrapper for int gsl_sf_exprel_e(double x,gsl_sf_result* result); +exprel_e :: Double -> (Double,Double) +exprel_e x = createSFR "exprel_e" $ gsl_sf_exprel_e x +foreign import ccall "exp.h gsl_sf_exprel_e" gsl_sf_exprel_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_exprel(double x); +exprel :: Double -> Double +exprel = gsl_sf_exprel +foreign import ccall "exp.h gsl_sf_exprel" gsl_sf_exprel :: Double -> Double + +-- | wrapper for int gsl_sf_exprel_2_e(double x,gsl_sf_result* result); +exprel_2_e :: Double -> (Double,Double) +exprel_2_e x = createSFR "exprel_2_e" $ gsl_sf_exprel_2_e x +foreign import ccall "exp.h gsl_sf_exprel_2_e" gsl_sf_exprel_2_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_exprel_2(double x); +exprel_2 :: Double -> Double +exprel_2 = gsl_sf_exprel_2 +foreign import ccall "exp.h gsl_sf_exprel_2" gsl_sf_exprel_2 :: Double -> Double + +-- | wrapper for int gsl_sf_exprel_n_e(int n,double x,gsl_sf_result* result); +exprel_n_e :: Int -> Double -> (Double,Double) +exprel_n_e n x = createSFR "exprel_n_e" $ gsl_sf_exprel_n_e n x +foreign import ccall "exp.h gsl_sf_exprel_n_e" gsl_sf_exprel_n_e :: Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_exprel_n(int n,double x); +exprel_n :: Int -> Double -> Double +exprel_n = gsl_sf_exprel_n +foreign import ccall "exp.h gsl_sf_exprel_n" gsl_sf_exprel_n :: Int -> Double -> Double + +-- | wrapper for int gsl_sf_exp_err_e(double x,double dx,gsl_sf_result* result); +exp_err_e :: Double -> Double -> (Double,Double) +exp_err_e x dx = createSFR "exp_err_e" $ gsl_sf_exp_err_e x dx +foreign import ccall "exp.h gsl_sf_exp_err_e" gsl_sf_exp_err_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_exp_err_e10_e(double x,double dx,gsl_sf_result_e10* result); +exp_err_e10_e :: Double -> Double -> (Double,Int,Double) +exp_err_e10_e x dx = createSFR_E10 "exp_err_e10_e" $ gsl_sf_exp_err_e10_e x dx +foreign import ccall "exp.h gsl_sf_exp_err_e10_e" gsl_sf_exp_err_e10_e :: Double -> Double -> Ptr () -> IO(Int) + +-- | wrapper for int gsl_sf_exp_mult_err_e(double x,double dx,double y,double dy,gsl_sf_result* result); +exp_mult_err_e :: Double -> Double -> Double -> Double -> (Double,Double) +exp_mult_err_e x dx y dy = createSFR "exp_mult_err_e" $ gsl_sf_exp_mult_err_e x dx y dy +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) + +-- | wrapper for int gsl_sf_exp_mult_err_e10_e(double x,double dx,double y,double dy,gsl_sf_result_e10* result); +exp_mult_err_e10_e :: Double -> Double -> Double -> Double -> (Double,Int,Double) +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 +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Expint +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Expint( + expint_E1_e +, expint_E1 +, expint_E2_e +, expint_E2 +, expint_E1_scaled_e +, expint_E1_scaled +, expint_E2_scaled_e +, expint_E2_scaled +, expint_Ei_e +, expint_Ei +, expint_Ei_scaled_e +, expint_Ei_scaled +, shi_e +, shi +, chi_e +, chi +, expint_3_e +, expint_3 +, si_e +, si +, ci_e +, ci +, atanint_e +, atanint +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_expint_E1_e(double x,gsl_sf_result* result); +-- +-- +expint_E1_e :: Double -> (Double,Double) +expint_E1_e x = createSFR "expint_E1_e" $ gsl_sf_expint_E1_e x +foreign import ccall "expint.h gsl_sf_expint_E1_e" gsl_sf_expint_E1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_expint_E1(double x); +-- +-- +expint_E1 :: Double -> Double +expint_E1 = gsl_sf_expint_E1 +foreign import ccall "expint.h gsl_sf_expint_E1" gsl_sf_expint_E1 :: Double -> Double + +-- | wrapper for int gsl_sf_expint_E2_e(double x,gsl_sf_result* result); +-- +-- +expint_E2_e :: Double -> (Double,Double) +expint_E2_e x = createSFR "expint_E2_e" $ gsl_sf_expint_E2_e x +foreign import ccall "expint.h gsl_sf_expint_E2_e" gsl_sf_expint_E2_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_expint_E2(double x); +-- +-- +expint_E2 :: Double -> Double +expint_E2 = gsl_sf_expint_E2 +foreign import ccall "expint.h gsl_sf_expint_E2" gsl_sf_expint_E2 :: Double -> Double + +-- | wrapper for int gsl_sf_expint_E1_scaled_e(double x,gsl_sf_result* result); +-- +-- +expint_E1_scaled_e :: Double -> (Double,Double) +expint_E1_scaled_e x = createSFR "expint_E1_scaled_e" $ gsl_sf_expint_E1_scaled_e x +foreign import ccall "expint.h gsl_sf_expint_E1_scaled_e" gsl_sf_expint_E1_scaled_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_expint_E1_scaled(double x); +-- +-- +expint_E1_scaled :: Double -> Double +expint_E1_scaled = gsl_sf_expint_E1_scaled +foreign import ccall "expint.h gsl_sf_expint_E1_scaled" gsl_sf_expint_E1_scaled :: Double -> Double + +-- | wrapper for int gsl_sf_expint_E2_scaled_e(double x,gsl_sf_result* result); +-- +-- +expint_E2_scaled_e :: Double -> (Double,Double) +expint_E2_scaled_e x = createSFR "expint_E2_scaled_e" $ gsl_sf_expint_E2_scaled_e x +foreign import ccall "expint.h gsl_sf_expint_E2_scaled_e" gsl_sf_expint_E2_scaled_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_expint_E2_scaled(double x); +-- +-- +expint_E2_scaled :: Double -> Double +expint_E2_scaled = gsl_sf_expint_E2_scaled +foreign import ccall "expint.h gsl_sf_expint_E2_scaled" gsl_sf_expint_E2_scaled :: Double -> Double + +-- | wrapper for int gsl_sf_expint_Ei_e(double x,gsl_sf_result* result); +-- +-- +expint_Ei_e :: Double -> (Double,Double) +expint_Ei_e x = createSFR "expint_Ei_e" $ gsl_sf_expint_Ei_e x +foreign import ccall "expint.h gsl_sf_expint_Ei_e" gsl_sf_expint_Ei_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_expint_Ei(double x); +-- +-- +expint_Ei :: Double -> Double +expint_Ei = gsl_sf_expint_Ei +foreign import ccall "expint.h gsl_sf_expint_Ei" gsl_sf_expint_Ei :: Double -> Double + +-- | wrapper for int gsl_sf_expint_Ei_scaled_e(double x,gsl_sf_result* result); +-- +-- +expint_Ei_scaled_e :: Double -> (Double,Double) +expint_Ei_scaled_e x = createSFR "expint_Ei_scaled_e" $ gsl_sf_expint_Ei_scaled_e x +foreign import ccall "expint.h gsl_sf_expint_Ei_scaled_e" gsl_sf_expint_Ei_scaled_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_expint_Ei_scaled(double x); +-- +-- +expint_Ei_scaled :: Double -> Double +expint_Ei_scaled = gsl_sf_expint_Ei_scaled +foreign import ccall "expint.h gsl_sf_expint_Ei_scaled" gsl_sf_expint_Ei_scaled :: Double -> Double + +-- | wrapper for int gsl_sf_Shi_e(double x,gsl_sf_result* result); +-- +-- +shi_e :: Double -> (Double,Double) +shi_e x = createSFR "shi_e" $ gsl_sf_Shi_e x +foreign import ccall "expint.h gsl_sf_Shi_e" gsl_sf_Shi_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_Shi(double x); +-- +-- +shi :: Double -> Double +shi = gsl_sf_Shi +foreign import ccall "expint.h gsl_sf_Shi" gsl_sf_Shi :: Double -> Double + +-- | wrapper for int gsl_sf_Chi_e(double x,gsl_sf_result* result); +-- +-- +chi_e :: Double -> (Double,Double) +chi_e x = createSFR "chi_e" $ gsl_sf_Chi_e x +foreign import ccall "expint.h gsl_sf_Chi_e" gsl_sf_Chi_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_Chi(double x); +-- +-- +chi :: Double -> Double +chi = gsl_sf_Chi +foreign import ccall "expint.h gsl_sf_Chi" gsl_sf_Chi :: Double -> Double + +-- | wrapper for int gsl_sf_expint_3_e(double x,gsl_sf_result* result); +-- +-- +expint_3_e :: Double -> (Double,Double) +expint_3_e x = createSFR "expint_3_e" $ gsl_sf_expint_3_e x +foreign import ccall "expint.h gsl_sf_expint_3_e" gsl_sf_expint_3_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_expint_3(double x); +-- +-- +expint_3 :: Double -> Double +expint_3 = gsl_sf_expint_3 +foreign import ccall "expint.h gsl_sf_expint_3" gsl_sf_expint_3 :: Double -> Double + +-- | wrapper for int gsl_sf_Si_e(double x,gsl_sf_result* result); +-- +-- +si_e :: Double -> (Double,Double) +si_e x = createSFR "si_e" $ gsl_sf_Si_e x +foreign import ccall "expint.h gsl_sf_Si_e" gsl_sf_Si_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_Si(double x); +-- +-- +si :: Double -> Double +si = gsl_sf_Si +foreign import ccall "expint.h gsl_sf_Si" gsl_sf_Si :: Double -> Double + +-- | wrapper for int gsl_sf_Ci_e(double x,gsl_sf_result* result); +-- +-- +ci_e :: Double -> (Double,Double) +ci_e x = createSFR "ci_e" $ gsl_sf_Ci_e x +foreign import ccall "expint.h gsl_sf_Ci_e" gsl_sf_Ci_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_Ci(double x); +-- +-- +ci :: Double -> Double +ci = gsl_sf_Ci +foreign import ccall "expint.h gsl_sf_Ci" gsl_sf_Ci :: Double -> Double + +-- | wrapper for int gsl_sf_atanint_e(double x,gsl_sf_result* result); +-- +-- +atanint_e :: Double -> (Double,Double) +atanint_e x = createSFR "atanint_e" $ gsl_sf_atanint_e x +foreign import ccall "expint.h gsl_sf_atanint_e" gsl_sf_atanint_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_atanint(double x); +-- +-- +atanint :: Double -> Double +atanint = gsl_sf_atanint +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Fermi_dirac +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Fermi_dirac( + fermi_dirac_m1_e +, fermi_dirac_m1 +, fermi_dirac_0_e +, fermi_dirac_0 +, fermi_dirac_1_e +, fermi_dirac_1 +, fermi_dirac_2_e +, fermi_dirac_2 +, fermi_dirac_int_e +, fermi_dirac_int +, fermi_dirac_mhalf_e +, fermi_dirac_mhalf +, fermi_dirac_half_e +, fermi_dirac_half +, fermi_dirac_3half_e +, fermi_dirac_3half +, fermi_dirac_inc_0_e +, fermi_dirac_inc_0 +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_fermi_dirac_m1_e(double x,gsl_sf_result* result); +-- +-- +fermi_dirac_m1_e :: Double -> (Double,Double) +fermi_dirac_m1_e x = createSFR "fermi_dirac_m1_e" $ gsl_sf_fermi_dirac_m1_e x +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_m1_e" gsl_sf_fermi_dirac_m1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_fermi_dirac_m1(double x); +-- +-- +fermi_dirac_m1 :: Double -> Double +fermi_dirac_m1 = gsl_sf_fermi_dirac_m1 +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_m1" gsl_sf_fermi_dirac_m1 :: Double -> Double + +-- | wrapper for int gsl_sf_fermi_dirac_0_e(double x,gsl_sf_result* result); +-- +-- +fermi_dirac_0_e :: Double -> (Double,Double) +fermi_dirac_0_e x = createSFR "fermi_dirac_0_e" $ gsl_sf_fermi_dirac_0_e x +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_0_e" gsl_sf_fermi_dirac_0_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_fermi_dirac_0(double x); +-- +-- +fermi_dirac_0 :: Double -> Double +fermi_dirac_0 = gsl_sf_fermi_dirac_0 +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_0" gsl_sf_fermi_dirac_0 :: Double -> Double + +-- | wrapper for int gsl_sf_fermi_dirac_1_e(double x,gsl_sf_result* result); +-- +-- +fermi_dirac_1_e :: Double -> (Double,Double) +fermi_dirac_1_e x = createSFR "fermi_dirac_1_e" $ gsl_sf_fermi_dirac_1_e x +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_1_e" gsl_sf_fermi_dirac_1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_fermi_dirac_1(double x); +-- +-- +fermi_dirac_1 :: Double -> Double +fermi_dirac_1 = gsl_sf_fermi_dirac_1 +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_1" gsl_sf_fermi_dirac_1 :: Double -> Double + +-- | wrapper for int gsl_sf_fermi_dirac_2_e(double x,gsl_sf_result* result); +-- +-- +fermi_dirac_2_e :: Double -> (Double,Double) +fermi_dirac_2_e x = createSFR "fermi_dirac_2_e" $ gsl_sf_fermi_dirac_2_e x +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_2_e" gsl_sf_fermi_dirac_2_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_fermi_dirac_2(double x); +-- +-- +fermi_dirac_2 :: Double -> Double +fermi_dirac_2 = gsl_sf_fermi_dirac_2 +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_2" gsl_sf_fermi_dirac_2 :: Double -> Double + +-- | wrapper for int gsl_sf_fermi_dirac_int_e(int j,double x,gsl_sf_result* result); +-- +-- +fermi_dirac_int_e :: Int -> Double -> (Double,Double) +fermi_dirac_int_e j x = createSFR "fermi_dirac_int_e" $ gsl_sf_fermi_dirac_int_e j x +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_int_e" gsl_sf_fermi_dirac_int_e :: Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_fermi_dirac_int(int j,double x); +-- +-- +fermi_dirac_int :: Int -> Double -> Double +fermi_dirac_int = gsl_sf_fermi_dirac_int +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_int" gsl_sf_fermi_dirac_int :: Int -> Double -> Double + +-- | wrapper for int gsl_sf_fermi_dirac_mhalf_e(double x,gsl_sf_result* result); +-- +-- +fermi_dirac_mhalf_e :: Double -> (Double,Double) +fermi_dirac_mhalf_e x = createSFR "fermi_dirac_mhalf_e" $ gsl_sf_fermi_dirac_mhalf_e x +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_mhalf_e" gsl_sf_fermi_dirac_mhalf_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_fermi_dirac_mhalf(double x); +-- +-- +fermi_dirac_mhalf :: Double -> Double +fermi_dirac_mhalf = gsl_sf_fermi_dirac_mhalf +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_mhalf" gsl_sf_fermi_dirac_mhalf :: Double -> Double + +-- | wrapper for int gsl_sf_fermi_dirac_half_e(double x,gsl_sf_result* result); +-- +-- +fermi_dirac_half_e :: Double -> (Double,Double) +fermi_dirac_half_e x = createSFR "fermi_dirac_half_e" $ gsl_sf_fermi_dirac_half_e x +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_half_e" gsl_sf_fermi_dirac_half_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_fermi_dirac_half(double x); +-- +-- +fermi_dirac_half :: Double -> Double +fermi_dirac_half = gsl_sf_fermi_dirac_half +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_half" gsl_sf_fermi_dirac_half :: Double -> Double + +-- | wrapper for int gsl_sf_fermi_dirac_3half_e(double x,gsl_sf_result* result); +-- +-- +fermi_dirac_3half_e :: Double -> (Double,Double) +fermi_dirac_3half_e x = createSFR "fermi_dirac_3half_e" $ gsl_sf_fermi_dirac_3half_e x +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_3half_e" gsl_sf_fermi_dirac_3half_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_fermi_dirac_3half(double x); +-- +-- +fermi_dirac_3half :: Double -> Double +fermi_dirac_3half = gsl_sf_fermi_dirac_3half +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_3half" gsl_sf_fermi_dirac_3half :: Double -> Double + +-- | wrapper for int gsl_sf_fermi_dirac_inc_0_e(double x,double b,gsl_sf_result* result); +-- +-- +fermi_dirac_inc_0_e :: Double -> Double -> (Double,Double) +fermi_dirac_inc_0_e x b = createSFR "fermi_dirac_inc_0_e" $ gsl_sf_fermi_dirac_inc_0_e x b +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) + +-- | wrapper for double gsl_sf_fermi_dirac_inc_0(double x,double b); +-- +-- +fermi_dirac_inc_0 :: Double -> Double -> Double +fermi_dirac_inc_0 = gsl_sf_fermi_dirac_inc_0 +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Gamma +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Gamma( + lngamma_e +, lngamma +, gamma_e +, gamma +, gammastar_e +, gammastar +, gammainv_e +, gammainv +, taylorcoeff_e +, taylorcoeff +, fact_e +, fact +, doublefact_e +, doublefact +, lnfact_e +, lnfact +, lndoublefact_e +, lndoublefact +, lnchoose_e +, lnchoose +, choose_e +, choose +, lnpoch_e +, lnpoch +, poch_e +, poch +, pochrel_e +, pochrel +, gamma_inc_Q_e +, gamma_inc_Q +, gamma_inc_P_e +, gamma_inc_P +, gamma_inc_e +, gamma_inc +, lnbeta_e +, lnbeta +, beta_e +, beta +, beta_inc_e +, beta_inc +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_lngamma_e(double x,gsl_sf_result* result); +-- +-- +lngamma_e :: Double -> (Double,Double) +lngamma_e x = createSFR "lngamma_e" $ gsl_sf_lngamma_e x +foreign import ccall "gamma.h gsl_sf_lngamma_e" gsl_sf_lngamma_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_lngamma(double x); +-- +-- +lngamma :: Double -> Double +lngamma = gsl_sf_lngamma +foreign import ccall "gamma.h gsl_sf_lngamma" gsl_sf_lngamma :: Double -> Double + +-- | wrapper for int gsl_sf_lngamma_sgn_e(double x,gsl_sf_result* result_lg,double* sgn); +-- +-- +lngamma_sgn_e :: Double -> Ptr Double -> Ptr Double -> Int +lngamma_sgn_e = gsl_sf_lngamma_sgn_e +foreign import ccall "gamma.h gsl_sf_lngamma_sgn_e" gsl_sf_lngamma_sgn_e :: Double -> Ptr Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_gamma_e(double x,gsl_sf_result* result); +-- +-- +gamma_e :: Double -> (Double,Double) +gamma_e x = createSFR "gamma_e" $ gsl_sf_gamma_e x +foreign import ccall "gamma.h gsl_sf_gamma_e" gsl_sf_gamma_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_gamma(double x); +-- +-- +gamma :: Double -> Double +gamma = gsl_sf_gamma +foreign import ccall "gamma.h gsl_sf_gamma" gsl_sf_gamma :: Double -> Double + +-- | wrapper for int gsl_sf_gammastar_e(double x,gsl_sf_result* result); +-- +-- +gammastar_e :: Double -> (Double,Double) +gammastar_e x = createSFR "gammastar_e" $ gsl_sf_gammastar_e x +foreign import ccall "gamma.h gsl_sf_gammastar_e" gsl_sf_gammastar_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_gammastar(double x); +-- +-- +gammastar :: Double -> Double +gammastar = gsl_sf_gammastar +foreign import ccall "gamma.h gsl_sf_gammastar" gsl_sf_gammastar :: Double -> Double + +-- | wrapper for int gsl_sf_gammainv_e(double x,gsl_sf_result* result); +-- +-- +gammainv_e :: Double -> (Double,Double) +gammainv_e x = createSFR "gammainv_e" $ gsl_sf_gammainv_e x +foreign import ccall "gamma.h gsl_sf_gammainv_e" gsl_sf_gammainv_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_gammainv(double x); +-- +-- +gammainv :: Double -> Double +gammainv = gsl_sf_gammainv +foreign import ccall "gamma.h gsl_sf_gammainv" gsl_sf_gammainv :: Double -> Double + +-- | wrapper for int gsl_sf_lngamma_complex_e(double zr,double zi,gsl_sf_result* lnr,gsl_sf_result* arg); +-- +-- +lngamma_complex_e :: Double -> Double -> Ptr Double -> (Double,Double) +lngamma_complex_e zr zi lnr = createSFR "lngamma_complex_e" $ gsl_sf_lngamma_complex_e zr zi lnr +foreign import ccall "gamma.h gsl_sf_lngamma_complex_e" gsl_sf_lngamma_complex_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_taylorcoeff_e(int n,double x,gsl_sf_result* result); +-- +-- +taylorcoeff_e :: Int -> Double -> (Double,Double) +taylorcoeff_e n x = createSFR "taylorcoeff_e" $ gsl_sf_taylorcoeff_e n x +foreign import ccall "gamma.h gsl_sf_taylorcoeff_e" gsl_sf_taylorcoeff_e :: Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_taylorcoeff(int n,double x); +-- +-- +taylorcoeff :: Int -> Double -> Double +taylorcoeff = gsl_sf_taylorcoeff +foreign import ccall "gamma.h gsl_sf_taylorcoeff" gsl_sf_taylorcoeff :: Int -> Double -> Double + +-- | wrapper for int gsl_sf_fact_e(int n,gsl_sf_result* result); +-- +-- +fact_e :: Int -> (Double,Double) +fact_e n = createSFR "fact_e" $ gsl_sf_fact_e n +foreign import ccall "gamma.h gsl_sf_fact_e" gsl_sf_fact_e :: Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_fact(int n); +-- +-- +fact :: Int -> Double +fact = gsl_sf_fact +foreign import ccall "gamma.h gsl_sf_fact" gsl_sf_fact :: Int -> Double + +-- | wrapper for int gsl_sf_doublefact_e(int n,gsl_sf_result* result); +-- +-- +doublefact_e :: Int -> (Double,Double) +doublefact_e n = createSFR "doublefact_e" $ gsl_sf_doublefact_e n +foreign import ccall "gamma.h gsl_sf_doublefact_e" gsl_sf_doublefact_e :: Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_doublefact(int n); +-- +-- +doublefact :: Int -> Double +doublefact = gsl_sf_doublefact +foreign import ccall "gamma.h gsl_sf_doublefact" gsl_sf_doublefact :: Int -> Double + +-- | wrapper for int gsl_sf_lnfact_e(int n,gsl_sf_result* result); +-- +-- +lnfact_e :: Int -> (Double,Double) +lnfact_e n = createSFR "lnfact_e" $ gsl_sf_lnfact_e n +foreign import ccall "gamma.h gsl_sf_lnfact_e" gsl_sf_lnfact_e :: Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_lnfact(int n); +-- +-- +lnfact :: Int -> Double +lnfact = gsl_sf_lnfact +foreign import ccall "gamma.h gsl_sf_lnfact" gsl_sf_lnfact :: Int -> Double + +-- | wrapper for int gsl_sf_lndoublefact_e(int n,gsl_sf_result* result); +-- +-- +lndoublefact_e :: Int -> (Double,Double) +lndoublefact_e n = createSFR "lndoublefact_e" $ gsl_sf_lndoublefact_e n +foreign import ccall "gamma.h gsl_sf_lndoublefact_e" gsl_sf_lndoublefact_e :: Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_lndoublefact(int n); +-- +-- +lndoublefact :: Int -> Double +lndoublefact = gsl_sf_lndoublefact +foreign import ccall "gamma.h gsl_sf_lndoublefact" gsl_sf_lndoublefact :: Int -> Double + +-- | wrapper for int gsl_sf_lnchoose_e(int n,int m,gsl_sf_result* result); +-- +-- +lnchoose_e :: Int -> Int -> (Double,Double) +lnchoose_e n m = createSFR "lnchoose_e" $ gsl_sf_lnchoose_e n m +foreign import ccall "gamma.h gsl_sf_lnchoose_e" gsl_sf_lnchoose_e :: Int -> Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_lnchoose(int n,int m); +-- +-- +lnchoose :: Int -> Int -> Double +lnchoose = gsl_sf_lnchoose +foreign import ccall "gamma.h gsl_sf_lnchoose" gsl_sf_lnchoose :: Int -> Int -> Double + +-- | wrapper for int gsl_sf_choose_e(int n,int m,gsl_sf_result* result); +-- +-- +choose_e :: Int -> Int -> (Double,Double) +choose_e n m = createSFR "choose_e" $ gsl_sf_choose_e n m +foreign import ccall "gamma.h gsl_sf_choose_e" gsl_sf_choose_e :: Int -> Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_choose(int n,int m); +-- +-- +choose :: Int -> Int -> Double +choose = gsl_sf_choose +foreign import ccall "gamma.h gsl_sf_choose" gsl_sf_choose :: Int -> Int -> Double + +-- | wrapper for int gsl_sf_lnpoch_e(double a,double x,gsl_sf_result* result); +-- +-- +lnpoch_e :: Double -> Double -> (Double,Double) +lnpoch_e a x = createSFR "lnpoch_e" $ gsl_sf_lnpoch_e a x +foreign import ccall "gamma.h gsl_sf_lnpoch_e" gsl_sf_lnpoch_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_lnpoch(double a,double x); +-- +-- +lnpoch :: Double -> Double -> Double +lnpoch = gsl_sf_lnpoch +foreign import ccall "gamma.h gsl_sf_lnpoch" gsl_sf_lnpoch :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_lnpoch_sgn_e(double a,double x,gsl_sf_result* result,double* sgn); +-- +-- +lnpoch_sgn_e :: Double -> Double -> Ptr Double -> Ptr Double -> Int +lnpoch_sgn_e = gsl_sf_lnpoch_sgn_e +foreign import ccall "gamma.h gsl_sf_lnpoch_sgn_e" gsl_sf_lnpoch_sgn_e :: Double -> Double -> Ptr Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_poch_e(double a,double x,gsl_sf_result* result); +-- +-- +poch_e :: Double -> Double -> (Double,Double) +poch_e a x = createSFR "poch_e" $ gsl_sf_poch_e a x +foreign import ccall "gamma.h gsl_sf_poch_e" gsl_sf_poch_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_poch(double a,double x); +-- +-- +poch :: Double -> Double -> Double +poch = gsl_sf_poch +foreign import ccall "gamma.h gsl_sf_poch" gsl_sf_poch :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_pochrel_e(double a,double x,gsl_sf_result* result); +-- +-- +pochrel_e :: Double -> Double -> (Double,Double) +pochrel_e a x = createSFR "pochrel_e" $ gsl_sf_pochrel_e a x +foreign import ccall "gamma.h gsl_sf_pochrel_e" gsl_sf_pochrel_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_pochrel(double a,double x); +-- +-- +pochrel :: Double -> Double -> Double +pochrel = gsl_sf_pochrel +foreign import ccall "gamma.h gsl_sf_pochrel" gsl_sf_pochrel :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_gamma_inc_Q_e(double a,double x,gsl_sf_result* result); +-- +-- +gamma_inc_Q_e :: Double -> Double -> (Double,Double) +gamma_inc_Q_e a x = createSFR "gamma_inc_Q_e" $ gsl_sf_gamma_inc_Q_e a x +foreign import ccall "gamma.h gsl_sf_gamma_inc_Q_e" gsl_sf_gamma_inc_Q_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_gamma_inc_Q(double a,double x); +-- +-- +gamma_inc_Q :: Double -> Double -> Double +gamma_inc_Q = gsl_sf_gamma_inc_Q +foreign import ccall "gamma.h gsl_sf_gamma_inc_Q" gsl_sf_gamma_inc_Q :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_gamma_inc_P_e(double a,double x,gsl_sf_result* result); +-- +-- +gamma_inc_P_e :: Double -> Double -> (Double,Double) +gamma_inc_P_e a x = createSFR "gamma_inc_P_e" $ gsl_sf_gamma_inc_P_e a x +foreign import ccall "gamma.h gsl_sf_gamma_inc_P_e" gsl_sf_gamma_inc_P_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_gamma_inc_P(double a,double x); +-- +-- +gamma_inc_P :: Double -> Double -> Double +gamma_inc_P = gsl_sf_gamma_inc_P +foreign import ccall "gamma.h gsl_sf_gamma_inc_P" gsl_sf_gamma_inc_P :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_gamma_inc_e(double a,double x,gsl_sf_result* result); +-- +-- +gamma_inc_e :: Double -> Double -> (Double,Double) +gamma_inc_e a x = createSFR "gamma_inc_e" $ gsl_sf_gamma_inc_e a x +foreign import ccall "gamma.h gsl_sf_gamma_inc_e" gsl_sf_gamma_inc_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_gamma_inc(double a,double x); +-- +-- +gamma_inc :: Double -> Double -> Double +gamma_inc = gsl_sf_gamma_inc +foreign import ccall "gamma.h gsl_sf_gamma_inc" gsl_sf_gamma_inc :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_lnbeta_e(double a,double b,gsl_sf_result* result); +-- +-- +lnbeta_e :: Double -> Double -> (Double,Double) +lnbeta_e a b = createSFR "lnbeta_e" $ gsl_sf_lnbeta_e a b +foreign import ccall "gamma.h gsl_sf_lnbeta_e" gsl_sf_lnbeta_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_lnbeta(double a,double b); +-- +-- +lnbeta :: Double -> Double -> Double +lnbeta = gsl_sf_lnbeta +foreign import ccall "gamma.h gsl_sf_lnbeta" gsl_sf_lnbeta :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_beta_e(double a,double b,gsl_sf_result* result); +-- +-- +beta_e :: Double -> Double -> (Double,Double) +beta_e a b = createSFR "beta_e" $ gsl_sf_beta_e a b +foreign import ccall "gamma.h gsl_sf_beta_e" gsl_sf_beta_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_beta(double a,double b); +-- +-- +beta :: Double -> Double -> Double +beta = gsl_sf_beta +foreign import ccall "gamma.h gsl_sf_beta" gsl_sf_beta :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_beta_inc_e(double a,double b,double x,gsl_sf_result* result); +-- +-- +beta_inc_e :: Double -> Double -> Double -> (Double,Double) +beta_inc_e a b x = createSFR "beta_inc_e" $ gsl_sf_beta_inc_e a b x +foreign import ccall "gamma.h gsl_sf_beta_inc_e" gsl_sf_beta_inc_e :: Double -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_beta_inc(double a,double b,double x); +-- +-- +beta_inc :: Double -> Double -> Double -> Double +beta_inc = gsl_sf_beta_inc +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Gegenbauer +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Gegenbauer( + gegenpoly_1_e +, gegenpoly_2_e +, gegenpoly_3_e +, gegenpoly_1 +, gegenpoly_2 +, gegenpoly_3 +, gegenpoly_n_e +, gegenpoly_n +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_gegenpoly_1_e(double lambda,double x,gsl_sf_result* result); +-- +-- +gegenpoly_1_e :: Double -> Double -> (Double,Double) +gegenpoly_1_e lambda x = createSFR "gegenpoly_1_e" $ gsl_sf_gegenpoly_1_e lambda x +foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_1_e" gsl_sf_gegenpoly_1_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_gegenpoly_2_e(double lambda,double x,gsl_sf_result* result); +-- +-- +gegenpoly_2_e :: Double -> Double -> (Double,Double) +gegenpoly_2_e lambda x = createSFR "gegenpoly_2_e" $ gsl_sf_gegenpoly_2_e lambda x +foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_2_e" gsl_sf_gegenpoly_2_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_gegenpoly_3_e(double lambda,double x,gsl_sf_result* result); +-- +-- +gegenpoly_3_e :: Double -> Double -> (Double,Double) +gegenpoly_3_e lambda x = createSFR "gegenpoly_3_e" $ gsl_sf_gegenpoly_3_e lambda x +foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_3_e" gsl_sf_gegenpoly_3_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_gegenpoly_1(double lambda,double x); +-- +-- +gegenpoly_1 :: Double -> Double -> Double +gegenpoly_1 = gsl_sf_gegenpoly_1 +foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_1" gsl_sf_gegenpoly_1 :: Double -> Double -> Double + +-- | wrapper for double gsl_sf_gegenpoly_2(double lambda,double x); +-- +-- +gegenpoly_2 :: Double -> Double -> Double +gegenpoly_2 = gsl_sf_gegenpoly_2 +foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_2" gsl_sf_gegenpoly_2 :: Double -> Double -> Double + +-- | wrapper for double gsl_sf_gegenpoly_3(double lambda,double x); +-- +-- +gegenpoly_3 :: Double -> Double -> Double +gegenpoly_3 = gsl_sf_gegenpoly_3 +foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_3" gsl_sf_gegenpoly_3 :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_gegenpoly_n_e(int n,double lambda,double x,gsl_sf_result* result); +-- +-- +gegenpoly_n_e :: Int -> Double -> Double -> (Double,Double) +gegenpoly_n_e n lambda x = createSFR "gegenpoly_n_e" $ gsl_sf_gegenpoly_n_e n lambda x +foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_n_e" gsl_sf_gegenpoly_n_e :: Int -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_gegenpoly_n(int n,double lambda,double x); +-- +-- +gegenpoly_n :: Int -> Double -> Double -> Double +gegenpoly_n = gsl_sf_gegenpoly_n +foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_n" gsl_sf_gegenpoly_n :: Int -> Double -> Double -> Double + +-- | wrapper for int gsl_sf_gegenpoly_array(int nmax,double lambda,double x,double* result_array); +-- +-- +gegenpoly_array :: Int -> Double -> Double -> Ptr Double -> Int +gegenpoly_array = gsl_sf_gegenpoly_array +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Hyperg +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Hyperg( + hyperg_0F1_e +, hyperg_0F1 +, hyperg_1F1_int_e +, hyperg_1F1_int +, hyperg_1F1_e +, hyperg_1F1 +, hyperg_U_int_e +, hyperg_U_int +, hyperg_U_int_e10_e +, hyperg_U_e +, hyperg_U +, hyperg_U_e10_e +, hyperg_2F1_e +, hyperg_2F1 +, hyperg_2F1_conj_e +, hyperg_2F1_conj +, hyperg_2F1_renorm_e +, hyperg_2F1_renorm +, hyperg_2F1_conj_renorm_e +, hyperg_2F1_conj_renorm +, hyperg_2F0_e +, hyperg_2F0 +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_hyperg_0F1_e(double c,double x,gsl_sf_result* result); +-- +-- +hyperg_0F1_e :: Double -> Double -> (Double,Double) +hyperg_0F1_e c x = createSFR "hyperg_0F1_e" $ gsl_sf_hyperg_0F1_e c x +foreign import ccall "hyperg.h gsl_sf_hyperg_0F1_e" gsl_sf_hyperg_0F1_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hyperg_0F1(double c,double x); +-- +-- +hyperg_0F1 :: Double -> Double -> Double +hyperg_0F1 = gsl_sf_hyperg_0F1 +foreign import ccall "hyperg.h gsl_sf_hyperg_0F1" gsl_sf_hyperg_0F1 :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_hyperg_1F1_int_e(int m,int n,double x,gsl_sf_result* result); +-- +-- +hyperg_1F1_int_e :: Int -> Int -> Double -> (Double,Double) +hyperg_1F1_int_e m n x = createSFR "hyperg_1F1_int_e" $ gsl_sf_hyperg_1F1_int_e m n x +foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_int_e" gsl_sf_hyperg_1F1_int_e :: Int -> Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hyperg_1F1_int(int m,int n,double x); +-- +-- +hyperg_1F1_int :: Int -> Int -> Double -> Double +hyperg_1F1_int = gsl_sf_hyperg_1F1_int +foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_int" gsl_sf_hyperg_1F1_int :: Int -> Int -> Double -> Double + +-- | wrapper for int gsl_sf_hyperg_1F1_e(double a,double b,double x,gsl_sf_result* result); +-- +-- +hyperg_1F1_e :: Double -> Double -> Double -> (Double,Double) +hyperg_1F1_e a b x = createSFR "hyperg_1F1_e" $ gsl_sf_hyperg_1F1_e a b x +foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_e" gsl_sf_hyperg_1F1_e :: Double -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hyperg_1F1(double a,double b,double x); +-- +-- +hyperg_1F1 :: Double -> Double -> Double -> Double +hyperg_1F1 = gsl_sf_hyperg_1F1 +foreign import ccall "hyperg.h gsl_sf_hyperg_1F1" gsl_sf_hyperg_1F1 :: Double -> Double -> Double -> Double + +-- | wrapper for int gsl_sf_hyperg_U_int_e(int m,int n,double x,gsl_sf_result* result); +-- +-- +hyperg_U_int_e :: Int -> Int -> Double -> (Double,Double) +hyperg_U_int_e m n x = createSFR "hyperg_U_int_e" $ gsl_sf_hyperg_U_int_e m n x +foreign import ccall "hyperg.h gsl_sf_hyperg_U_int_e" gsl_sf_hyperg_U_int_e :: Int -> Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hyperg_U_int(int m,int n,double x); +-- +-- +hyperg_U_int :: Int -> Int -> Double -> Double +hyperg_U_int = gsl_sf_hyperg_U_int +foreign import ccall "hyperg.h gsl_sf_hyperg_U_int" gsl_sf_hyperg_U_int :: Int -> Int -> Double -> Double + +-- | wrapper for int gsl_sf_hyperg_U_int_e10_e(int m,int n,double x,gsl_sf_result_e10* result); +-- +-- +hyperg_U_int_e10_e :: Int -> Int -> Double -> (Double,Int,Double) +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 +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) + +-- | wrapper for int gsl_sf_hyperg_U_e(double a,double b,double x,gsl_sf_result* result); +-- +-- +hyperg_U_e :: Double -> Double -> Double -> (Double,Double) +hyperg_U_e a b x = createSFR "hyperg_U_e" $ gsl_sf_hyperg_U_e a b x +foreign import ccall "hyperg.h gsl_sf_hyperg_U_e" gsl_sf_hyperg_U_e :: Double -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hyperg_U(double a,double b,double x); +-- +-- +hyperg_U :: Double -> Double -> Double -> Double +hyperg_U = gsl_sf_hyperg_U +foreign import ccall "hyperg.h gsl_sf_hyperg_U" gsl_sf_hyperg_U :: Double -> Double -> Double -> Double + +-- | wrapper for int gsl_sf_hyperg_U_e10_e(double a,double b,double x,gsl_sf_result_e10* result); +-- +-- +hyperg_U_e10_e :: Double -> Double -> Double -> (Double,Int,Double) +hyperg_U_e10_e a b x = createSFR_E10 "hyperg_U_e10_e" $ gsl_sf_hyperg_U_e10_e a b x +foreign import ccall "hyperg.h gsl_sf_hyperg_U_e10_e" gsl_sf_hyperg_U_e10_e :: Double -> Double -> Double -> Ptr () -> IO(Int) + +-- | wrapper for int gsl_sf_hyperg_2F1_e(double a,double b,double c,double x,gsl_sf_result* result); +-- +-- +hyperg_2F1_e :: Double -> Double -> Double -> Double -> (Double,Double) +hyperg_2F1_e a b c x = createSFR "hyperg_2F1_e" $ gsl_sf_hyperg_2F1_e a b c x +foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_e" gsl_sf_hyperg_2F1_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hyperg_2F1(double a,double b,double c,double x); +-- +-- +hyperg_2F1 :: Double -> Double -> Double -> Double -> Double +hyperg_2F1 = gsl_sf_hyperg_2F1 +foreign import ccall "hyperg.h gsl_sf_hyperg_2F1" gsl_sf_hyperg_2F1 :: Double -> Double -> Double -> Double -> Double + +-- | wrapper for int gsl_sf_hyperg_2F1_conj_e(double aR,double aI,double c,double x,gsl_sf_result* result); +-- +-- +hyperg_2F1_conj_e :: Double -> Double -> Double -> Double -> (Double,Double) +hyperg_2F1_conj_e aR aI c x = createSFR "hyperg_2F1_conj_e" $ gsl_sf_hyperg_2F1_conj_e aR aI c x +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) + +-- | wrapper for double gsl_sf_hyperg_2F1_conj(double aR,double aI,double c,double x); +-- +-- +hyperg_2F1_conj :: Double -> Double -> Double -> Double -> Double +hyperg_2F1_conj = gsl_sf_hyperg_2F1_conj +foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_conj" gsl_sf_hyperg_2F1_conj :: Double -> Double -> Double -> Double -> Double + +-- | wrapper for int gsl_sf_hyperg_2F1_renorm_e(double a,double b,double c,double x,gsl_sf_result* result); +-- +-- +hyperg_2F1_renorm_e :: Double -> Double -> Double -> Double -> (Double,Double) +hyperg_2F1_renorm_e a b c x = createSFR "hyperg_2F1_renorm_e" $ gsl_sf_hyperg_2F1_renorm_e a b c x +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) + +-- | wrapper for double gsl_sf_hyperg_2F1_renorm(double a,double b,double c,double x); +-- +-- +hyperg_2F1_renorm :: Double -> Double -> Double -> Double -> Double +hyperg_2F1_renorm = gsl_sf_hyperg_2F1_renorm +foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_renorm" gsl_sf_hyperg_2F1_renorm :: Double -> Double -> Double -> Double -> Double + +-- | wrapper for int gsl_sf_hyperg_2F1_conj_renorm_e(double aR,double aI,double c,double x,gsl_sf_result* result); +-- +-- +hyperg_2F1_conj_renorm_e :: Double -> Double -> Double -> Double -> (Double,Double) +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 +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) + +-- | wrapper for double gsl_sf_hyperg_2F1_conj_renorm(double aR,double aI,double c,double x); +-- +-- +hyperg_2F1_conj_renorm :: Double -> Double -> Double -> Double -> Double +hyperg_2F1_conj_renorm = gsl_sf_hyperg_2F1_conj_renorm +foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_conj_renorm" gsl_sf_hyperg_2F1_conj_renorm :: Double -> Double -> Double -> Double -> Double + +-- | wrapper for int gsl_sf_hyperg_2F0_e(double a,double b,double x,gsl_sf_result* result); +-- +-- +hyperg_2F0_e :: Double -> Double -> Double -> (Double,Double) +hyperg_2F0_e a b x = createSFR "hyperg_2F0_e" $ gsl_sf_hyperg_2F0_e a b x +foreign import ccall "hyperg.h gsl_sf_hyperg_2F0_e" gsl_sf_hyperg_2F0_e :: Double -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hyperg_2F0(double a,double b,double x); +-- +-- +hyperg_2F0 :: Double -> Double -> Double -> Double +hyperg_2F0 = gsl_sf_hyperg_2F0 +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 @@ +{-# OPTIONS #-} +----------------------------------------------------------------------------- +{- | +Module : Numeric.GSL.Special.Internal +Copyright : (c) Alberto Ruiz 2007 +License : GPL-style + +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Support for Special functions. + + +-} +----------------------------------------------------------------------------- + +module Numeric.GSL.Special.Internal ( + createSFR, + createSFR_E10, + Precision(..), + Gsl_mode_t, + Size_t, + precCode +) +where + +import Foreign +import Data.Packed.Internal(check,(//)) + + +data Precision = PrecDouble | PrecSingle | PrecApprox + +precCode :: Precision -> Int +precCode PrecDouble = 0 +precCode PrecSingle = 1 +precCode PrecApprox = 2 + +type Gsl_mode_t = Int + +type Size_t = Int + +---------------------------------------------------------------- +-- | access to a sf_result +createSFR :: Storable a => String -> (Ptr a -> IO Int) -> (a, a) +createSFR s f = unsafePerformIO $ do + p <- mallocArray 2 + f p // check s [] + [val,err] <- peekArray 2 p + free p + return (val,err) + + +--------------------------------------------------------------------- +-- the sf_result_e10 contains two doubles and the exponent + +-- | acces to sf_result_e10 +createSFR_E10 :: (Storable t2, Storable t3, Storable t1) => String -> (Ptr a -> IO Int) -> (t1, t2, t3) +createSFR_E10 s f = unsafePerformIO $ do + let sd = sizeOf (0::Double) + let si = sizeOf (0::Int) + p <- mallocBytes (2*sd + si) + f p // check s [] + val <- peekByteOff p 0 + err <- peekByteOff p sd + expo <- peekByteOff p (2*sd) + free p + 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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Laguerre +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Laguerre( + laguerre_1_e +, laguerre_2_e +, laguerre_3_e +, laguerre_1 +, laguerre_2 +, laguerre_3 +, laguerre_n_e +, laguerre_n +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_laguerre_1_e(double a,double x,gsl_sf_result* result); +-- +-- +laguerre_1_e :: Double -> Double -> (Double,Double) +laguerre_1_e a x = createSFR "laguerre_1_e" $ gsl_sf_laguerre_1_e a x +foreign import ccall "laguerre.h gsl_sf_laguerre_1_e" gsl_sf_laguerre_1_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_laguerre_2_e(double a,double x,gsl_sf_result* result); +-- +-- +laguerre_2_e :: Double -> Double -> (Double,Double) +laguerre_2_e a x = createSFR "laguerre_2_e" $ gsl_sf_laguerre_2_e a x +foreign import ccall "laguerre.h gsl_sf_laguerre_2_e" gsl_sf_laguerre_2_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_laguerre_3_e(double a,double x,gsl_sf_result* result); +-- +-- +laguerre_3_e :: Double -> Double -> (Double,Double) +laguerre_3_e a x = createSFR "laguerre_3_e" $ gsl_sf_laguerre_3_e a x +foreign import ccall "laguerre.h gsl_sf_laguerre_3_e" gsl_sf_laguerre_3_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_laguerre_1(double a,double x); +-- +-- +laguerre_1 :: Double -> Double -> Double +laguerre_1 = gsl_sf_laguerre_1 +foreign import ccall "laguerre.h gsl_sf_laguerre_1" gsl_sf_laguerre_1 :: Double -> Double -> Double + +-- | wrapper for double gsl_sf_laguerre_2(double a,double x); +-- +-- +laguerre_2 :: Double -> Double -> Double +laguerre_2 = gsl_sf_laguerre_2 +foreign import ccall "laguerre.h gsl_sf_laguerre_2" gsl_sf_laguerre_2 :: Double -> Double -> Double + +-- | wrapper for double gsl_sf_laguerre_3(double a,double x); +-- +-- +laguerre_3 :: Double -> Double -> Double +laguerre_3 = gsl_sf_laguerre_3 +foreign import ccall "laguerre.h gsl_sf_laguerre_3" gsl_sf_laguerre_3 :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_laguerre_n_e(int n,double a,double x,gsl_sf_result* result); +-- +-- +laguerre_n_e :: Int -> Double -> Double -> (Double,Double) +laguerre_n_e n a x = createSFR "laguerre_n_e" $ gsl_sf_laguerre_n_e n a x +foreign import ccall "laguerre.h gsl_sf_laguerre_n_e" gsl_sf_laguerre_n_e :: Int -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_laguerre_n(int n,double a,double x); +-- +-- +laguerre_n :: Int -> Double -> Double -> Double +laguerre_n = gsl_sf_laguerre_n +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Lambert +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Lambert( + lambert_W0_e +, lambert_W0 +, lambert_Wm1_e +, lambert_Wm1 +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_lambert_W0_e(double x,gsl_sf_result* result); +-- +-- +lambert_W0_e :: Double -> (Double,Double) +lambert_W0_e x = createSFR "lambert_W0_e" $ gsl_sf_lambert_W0_e x +foreign import ccall "lambert.h gsl_sf_lambert_W0_e" gsl_sf_lambert_W0_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_lambert_W0(double x); +-- +-- +lambert_W0 :: Double -> Double +lambert_W0 = gsl_sf_lambert_W0 +foreign import ccall "lambert.h gsl_sf_lambert_W0" gsl_sf_lambert_W0 :: Double -> Double + +-- | wrapper for int gsl_sf_lambert_Wm1_e(double x,gsl_sf_result* result); +-- +-- +lambert_Wm1_e :: Double -> (Double,Double) +lambert_Wm1_e x = createSFR "lambert_Wm1_e" $ gsl_sf_lambert_Wm1_e x +foreign import ccall "lambert.h gsl_sf_lambert_Wm1_e" gsl_sf_lambert_Wm1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_lambert_Wm1(double x); +-- +-- +lambert_Wm1 :: Double -> Double +lambert_Wm1 = gsl_sf_lambert_Wm1 +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Legendre +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Legendre( + legendre_Pl_e +, legendre_Pl +, legendre_P1_e +, legendre_P2_e +, legendre_P3_e +, legendre_P1 +, legendre_P2 +, legendre_P3 +, legendre_Q0_e +, legendre_Q0 +, legendre_Q1_e +, legendre_Q1 +, legendre_Ql_e +, legendre_Ql +, legendre_Plm_e +, legendre_Plm +, legendre_sphPlm_e +, legendre_sphPlm +, legendre_array_size +, conicalP_half_e +, conicalP_half +, conicalP_mhalf_e +, conicalP_mhalf +, conicalP_0_e +, conicalP_0 +, conicalP_1_e +, conicalP_1 +, conicalP_sph_reg_e +, conicalP_sph_reg +, conicalP_cyl_reg_e +, conicalP_cyl_reg +, legendre_H3d_0_e +, legendre_H3d_0 +, legendre_H3d_1_e +, legendre_H3d_1 +, legendre_H3d_e +, legendre_H3d +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_legendre_Pl_e(int l,double x,gsl_sf_result* result); +legendre_Pl_e :: Int -> Double -> (Double,Double) +legendre_Pl_e l x = createSFR "legendre_Pl_e" $ gsl_sf_legendre_Pl_e l x +foreign import ccall "legendre.h gsl_sf_legendre_Pl_e" gsl_sf_legendre_Pl_e :: Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_legendre_Pl(int l,double x); +legendre_Pl :: Int -> Double -> Double +legendre_Pl = gsl_sf_legendre_Pl +foreign import ccall "legendre.h gsl_sf_legendre_Pl" gsl_sf_legendre_Pl :: Int -> Double -> Double + +-- | wrapper for int gsl_sf_legendre_Pl_array(int lmax,double x,double* result_array); +legendre_Pl_array :: Int -> Double -> Ptr Double -> Int +legendre_Pl_array = gsl_sf_legendre_Pl_array +foreign import ccall "legendre.h gsl_sf_legendre_Pl_array" gsl_sf_legendre_Pl_array :: Int -> Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_legendre_Pl_deriv_array(int lmax,double x,double* result_array,double* result_deriv_array); +legendre_Pl_deriv_array :: Int -> Double -> Ptr Double -> Ptr Double -> Int +legendre_Pl_deriv_array = gsl_sf_legendre_Pl_deriv_array +foreign import ccall "legendre.h gsl_sf_legendre_Pl_deriv_array" gsl_sf_legendre_Pl_deriv_array :: Int -> Double -> Ptr Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_legendre_P1_e(double x,gsl_sf_result* result); +legendre_P1_e :: Double -> (Double,Double) +legendre_P1_e x = createSFR "legendre_P1_e" $ gsl_sf_legendre_P1_e x +foreign import ccall "legendre.h gsl_sf_legendre_P1_e" gsl_sf_legendre_P1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_legendre_P2_e(double x,gsl_sf_result* result); +legendre_P2_e :: Double -> (Double,Double) +legendre_P2_e x = createSFR "legendre_P2_e" $ gsl_sf_legendre_P2_e x +foreign import ccall "legendre.h gsl_sf_legendre_P2_e" gsl_sf_legendre_P2_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_legendre_P3_e(double x,gsl_sf_result* result); +legendre_P3_e :: Double -> (Double,Double) +legendre_P3_e x = createSFR "legendre_P3_e" $ gsl_sf_legendre_P3_e x +foreign import ccall "legendre.h gsl_sf_legendre_P3_e" gsl_sf_legendre_P3_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_legendre_P1(double x); +legendre_P1 :: Double -> Double +legendre_P1 = gsl_sf_legendre_P1 +foreign import ccall "legendre.h gsl_sf_legendre_P1" gsl_sf_legendre_P1 :: Double -> Double + +-- | wrapper for double gsl_sf_legendre_P2(double x); +legendre_P2 :: Double -> Double +legendre_P2 = gsl_sf_legendre_P2 +foreign import ccall "legendre.h gsl_sf_legendre_P2" gsl_sf_legendre_P2 :: Double -> Double + +-- | wrapper for double gsl_sf_legendre_P3(double x); +legendre_P3 :: Double -> Double +legendre_P3 = gsl_sf_legendre_P3 +foreign import ccall "legendre.h gsl_sf_legendre_P3" gsl_sf_legendre_P3 :: Double -> Double + +-- | wrapper for int gsl_sf_legendre_Q0_e(double x,gsl_sf_result* result); +legendre_Q0_e :: Double -> (Double,Double) +legendre_Q0_e x = createSFR "legendre_Q0_e" $ gsl_sf_legendre_Q0_e x +foreign import ccall "legendre.h gsl_sf_legendre_Q0_e" gsl_sf_legendre_Q0_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_legendre_Q0(double x); +legendre_Q0 :: Double -> Double +legendre_Q0 = gsl_sf_legendre_Q0 +foreign import ccall "legendre.h gsl_sf_legendre_Q0" gsl_sf_legendre_Q0 :: Double -> Double + +-- | wrapper for int gsl_sf_legendre_Q1_e(double x,gsl_sf_result* result); +legendre_Q1_e :: Double -> (Double,Double) +legendre_Q1_e x = createSFR "legendre_Q1_e" $ gsl_sf_legendre_Q1_e x +foreign import ccall "legendre.h gsl_sf_legendre_Q1_e" gsl_sf_legendre_Q1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_legendre_Q1(double x); +legendre_Q1 :: Double -> Double +legendre_Q1 = gsl_sf_legendre_Q1 +foreign import ccall "legendre.h gsl_sf_legendre_Q1" gsl_sf_legendre_Q1 :: Double -> Double + +-- | wrapper for int gsl_sf_legendre_Ql_e(int l,double x,gsl_sf_result* result); +legendre_Ql_e :: Int -> Double -> (Double,Double) +legendre_Ql_e l x = createSFR "legendre_Ql_e" $ gsl_sf_legendre_Ql_e l x +foreign import ccall "legendre.h gsl_sf_legendre_Ql_e" gsl_sf_legendre_Ql_e :: Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_legendre_Ql(int l,double x); +legendre_Ql :: Int -> Double -> Double +legendre_Ql = gsl_sf_legendre_Ql +foreign import ccall "legendre.h gsl_sf_legendre_Ql" gsl_sf_legendre_Ql :: Int -> Double -> Double + +-- | wrapper for int gsl_sf_legendre_Plm_e(int l,int m,double x,gsl_sf_result* result); +legendre_Plm_e :: Int -> Int -> Double -> (Double,Double) +legendre_Plm_e l m x = createSFR "legendre_Plm_e" $ gsl_sf_legendre_Plm_e l m x +foreign import ccall "legendre.h gsl_sf_legendre_Plm_e" gsl_sf_legendre_Plm_e :: Int -> Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_legendre_Plm(int l,int m,double x); +legendre_Plm :: Int -> Int -> Double -> Double +legendre_Plm = gsl_sf_legendre_Plm +foreign import ccall "legendre.h gsl_sf_legendre_Plm" gsl_sf_legendre_Plm :: Int -> Int -> Double -> Double + +-- | wrapper for int gsl_sf_legendre_Plm_array(int lmax,int m,double x,double* result_array); +legendre_Plm_array :: Int -> Int -> Double -> Ptr Double -> Int +legendre_Plm_array = gsl_sf_legendre_Plm_array +foreign import ccall "legendre.h gsl_sf_legendre_Plm_array" gsl_sf_legendre_Plm_array :: Int -> Int -> Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_legendre_Plm_deriv_array(int lmax,int m,double x,double* result_array,double* result_deriv_array); +legendre_Plm_deriv_array :: Int -> Int -> Double -> Ptr Double -> Ptr Double -> Int +legendre_Plm_deriv_array = gsl_sf_legendre_Plm_deriv_array +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 + +-- | wrapper for int gsl_sf_legendre_sphPlm_e(int l,int m,double x,gsl_sf_result* result); +legendre_sphPlm_e :: Int -> Int -> Double -> (Double,Double) +legendre_sphPlm_e l m x = createSFR "legendre_sphPlm_e" $ gsl_sf_legendre_sphPlm_e l m x +foreign import ccall "legendre.h gsl_sf_legendre_sphPlm_e" gsl_sf_legendre_sphPlm_e :: Int -> Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_legendre_sphPlm(int l,int m,double x); +legendre_sphPlm :: Int -> Int -> Double -> Double +legendre_sphPlm = gsl_sf_legendre_sphPlm +foreign import ccall "legendre.h gsl_sf_legendre_sphPlm" gsl_sf_legendre_sphPlm :: Int -> Int -> Double -> Double + +-- | wrapper for int gsl_sf_legendre_sphPlm_array(int lmax,int m,double x,double* result_array); +legendre_sphPlm_array :: Int -> Int -> Double -> Ptr Double -> Int +legendre_sphPlm_array = gsl_sf_legendre_sphPlm_array +foreign import ccall "legendre.h gsl_sf_legendre_sphPlm_array" gsl_sf_legendre_sphPlm_array :: Int -> Int -> Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_legendre_sphPlm_deriv_array(int lmax,int m,double x,double* result_array,double* result_deriv_array); +legendre_sphPlm_deriv_array :: Int -> Int -> Double -> Ptr Double -> Ptr Double -> Int +legendre_sphPlm_deriv_array = gsl_sf_legendre_sphPlm_deriv_array +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 + +-- | wrapper for int gsl_sf_legendre_array_size(int lmax,int m); +legendre_array_size :: Int -> Int -> Int +legendre_array_size = gsl_sf_legendre_array_size +foreign import ccall "legendre.h gsl_sf_legendre_array_size" gsl_sf_legendre_array_size :: Int -> Int -> Int + +-- | wrapper for int gsl_sf_conicalP_half_e(double lambda,double x,gsl_sf_result* result); +conicalP_half_e :: Double -> Double -> (Double,Double) +conicalP_half_e lambda x = createSFR "conicalP_half_e" $ gsl_sf_conicalP_half_e lambda x +foreign import ccall "legendre.h gsl_sf_conicalP_half_e" gsl_sf_conicalP_half_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_conicalP_half(double lambda,double x); +conicalP_half :: Double -> Double -> Double +conicalP_half = gsl_sf_conicalP_half +foreign import ccall "legendre.h gsl_sf_conicalP_half" gsl_sf_conicalP_half :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_conicalP_mhalf_e(double lambda,double x,gsl_sf_result* result); +conicalP_mhalf_e :: Double -> Double -> (Double,Double) +conicalP_mhalf_e lambda x = createSFR "conicalP_mhalf_e" $ gsl_sf_conicalP_mhalf_e lambda x +foreign import ccall "legendre.h gsl_sf_conicalP_mhalf_e" gsl_sf_conicalP_mhalf_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_conicalP_mhalf(double lambda,double x); +conicalP_mhalf :: Double -> Double -> Double +conicalP_mhalf = gsl_sf_conicalP_mhalf +foreign import ccall "legendre.h gsl_sf_conicalP_mhalf" gsl_sf_conicalP_mhalf :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_conicalP_0_e(double lambda,double x,gsl_sf_result* result); +conicalP_0_e :: Double -> Double -> (Double,Double) +conicalP_0_e lambda x = createSFR "conicalP_0_e" $ gsl_sf_conicalP_0_e lambda x +foreign import ccall "legendre.h gsl_sf_conicalP_0_e" gsl_sf_conicalP_0_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_conicalP_0(double lambda,double x); +conicalP_0 :: Double -> Double -> Double +conicalP_0 = gsl_sf_conicalP_0 +foreign import ccall "legendre.h gsl_sf_conicalP_0" gsl_sf_conicalP_0 :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_conicalP_1_e(double lambda,double x,gsl_sf_result* result); +conicalP_1_e :: Double -> Double -> (Double,Double) +conicalP_1_e lambda x = createSFR "conicalP_1_e" $ gsl_sf_conicalP_1_e lambda x +foreign import ccall "legendre.h gsl_sf_conicalP_1_e" gsl_sf_conicalP_1_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_conicalP_1(double lambda,double x); +conicalP_1 :: Double -> Double -> Double +conicalP_1 = gsl_sf_conicalP_1 +foreign import ccall "legendre.h gsl_sf_conicalP_1" gsl_sf_conicalP_1 :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_conicalP_sph_reg_e(int l,double lambda,double x,gsl_sf_result* result); +conicalP_sph_reg_e :: Int -> Double -> Double -> (Double,Double) +conicalP_sph_reg_e l lambda x = createSFR "conicalP_sph_reg_e" $ gsl_sf_conicalP_sph_reg_e l lambda x +foreign import ccall "legendre.h gsl_sf_conicalP_sph_reg_e" gsl_sf_conicalP_sph_reg_e :: Int -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_conicalP_sph_reg(int l,double lambda,double x); +conicalP_sph_reg :: Int -> Double -> Double -> Double +conicalP_sph_reg = gsl_sf_conicalP_sph_reg +foreign import ccall "legendre.h gsl_sf_conicalP_sph_reg" gsl_sf_conicalP_sph_reg :: Int -> Double -> Double -> Double + +-- | wrapper for int gsl_sf_conicalP_cyl_reg_e(int m,double lambda,double x,gsl_sf_result* result); +conicalP_cyl_reg_e :: Int -> Double -> Double -> (Double,Double) +conicalP_cyl_reg_e m lambda x = createSFR "conicalP_cyl_reg_e" $ gsl_sf_conicalP_cyl_reg_e m lambda x +foreign import ccall "legendre.h gsl_sf_conicalP_cyl_reg_e" gsl_sf_conicalP_cyl_reg_e :: Int -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_conicalP_cyl_reg(int m,double lambda,double x); +conicalP_cyl_reg :: Int -> Double -> Double -> Double +conicalP_cyl_reg = gsl_sf_conicalP_cyl_reg +foreign import ccall "legendre.h gsl_sf_conicalP_cyl_reg" gsl_sf_conicalP_cyl_reg :: Int -> Double -> Double -> Double + +-- | wrapper for int gsl_sf_legendre_H3d_0_e(double lambda,double eta,gsl_sf_result* result); +legendre_H3d_0_e :: Double -> Double -> (Double,Double) +legendre_H3d_0_e lambda eta = createSFR "legendre_H3d_0_e" $ gsl_sf_legendre_H3d_0_e lambda eta +foreign import ccall "legendre.h gsl_sf_legendre_H3d_0_e" gsl_sf_legendre_H3d_0_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_legendre_H3d_0(double lambda,double eta); +legendre_H3d_0 :: Double -> Double -> Double +legendre_H3d_0 = gsl_sf_legendre_H3d_0 +foreign import ccall "legendre.h gsl_sf_legendre_H3d_0" gsl_sf_legendre_H3d_0 :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_legendre_H3d_1_e(double lambda,double eta,gsl_sf_result* result); +legendre_H3d_1_e :: Double -> Double -> (Double,Double) +legendre_H3d_1_e lambda eta = createSFR "legendre_H3d_1_e" $ gsl_sf_legendre_H3d_1_e lambda eta +foreign import ccall "legendre.h gsl_sf_legendre_H3d_1_e" gsl_sf_legendre_H3d_1_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_legendre_H3d_1(double lambda,double eta); +legendre_H3d_1 :: Double -> Double -> Double +legendre_H3d_1 = gsl_sf_legendre_H3d_1 +foreign import ccall "legendre.h gsl_sf_legendre_H3d_1" gsl_sf_legendre_H3d_1 :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_legendre_H3d_e(int l,double lambda,double eta,gsl_sf_result* result); +legendre_H3d_e :: Int -> Double -> Double -> (Double,Double) +legendre_H3d_e l lambda eta = createSFR "legendre_H3d_e" $ gsl_sf_legendre_H3d_e l lambda eta +foreign import ccall "legendre.h gsl_sf_legendre_H3d_e" gsl_sf_legendre_H3d_e :: Int -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_legendre_H3d(int l,double lambda,double eta); +legendre_H3d :: Int -> Double -> Double -> Double +legendre_H3d = gsl_sf_legendre_H3d +foreign import ccall "legendre.h gsl_sf_legendre_H3d" gsl_sf_legendre_H3d :: Int -> Double -> Double -> Double + +-- | wrapper for int gsl_sf_legendre_H3d_array(int lmax,double lambda,double eta,double* result_array); +legendre_H3d_array :: Int -> Double -> Double -> Ptr Double -> Int +legendre_H3d_array = gsl_sf_legendre_H3d_array +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Log +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Log( + log_e +, Numeric.GSL.Special.Log.log +, log_abs_e +, log_abs +, log_1plusx_e +, log_1plusx +, log_1plusx_mx_e +, log_1plusx_mx +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_log_e(double x,gsl_sf_result* result); +log_e :: Double -> (Double,Double) +log_e x = createSFR "log_e" $ gsl_sf_log_e x +foreign import ccall "log.h gsl_sf_log_e" gsl_sf_log_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_log(double x); +log :: Double -> Double +log = gsl_sf_log +foreign import ccall "log.h gsl_sf_log" gsl_sf_log :: Double -> Double + +-- | wrapper for int gsl_sf_log_abs_e(double x,gsl_sf_result* result); +log_abs_e :: Double -> (Double,Double) +log_abs_e x = createSFR "log_abs_e" $ gsl_sf_log_abs_e x +foreign import ccall "log.h gsl_sf_log_abs_e" gsl_sf_log_abs_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_log_abs(double x); +log_abs :: Double -> Double +log_abs = gsl_sf_log_abs +foreign import ccall "log.h gsl_sf_log_abs" gsl_sf_log_abs :: Double -> Double + +-- | wrapper for int gsl_sf_complex_log_e(double zr,double zi,gsl_sf_result* lnr,gsl_sf_result* theta); +complex_log_e :: Double -> Double -> Ptr Double -> (Double,Double) +complex_log_e zr zi lnr = createSFR "complex_log_e" $ gsl_sf_complex_log_e zr zi lnr +foreign import ccall "log.h gsl_sf_complex_log_e" gsl_sf_complex_log_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_log_1plusx_e(double x,gsl_sf_result* result); +log_1plusx_e :: Double -> (Double,Double) +log_1plusx_e x = createSFR "log_1plusx_e" $ gsl_sf_log_1plusx_e x +foreign import ccall "log.h gsl_sf_log_1plusx_e" gsl_sf_log_1plusx_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_log_1plusx(double x); +log_1plusx :: Double -> Double +log_1plusx = gsl_sf_log_1plusx +foreign import ccall "log.h gsl_sf_log_1plusx" gsl_sf_log_1plusx :: Double -> Double + +-- | wrapper for int gsl_sf_log_1plusx_mx_e(double x,gsl_sf_result* result); +log_1plusx_mx_e :: Double -> (Double,Double) +log_1plusx_mx_e x = createSFR "log_1plusx_mx_e" $ gsl_sf_log_1plusx_mx_e x +foreign import ccall "log.h gsl_sf_log_1plusx_mx_e" gsl_sf_log_1plusx_mx_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_log_1plusx_mx(double x); +log_1plusx_mx :: Double -> Double +log_1plusx_mx = gsl_sf_log_1plusx_mx +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Pow_int +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Pow_int( + pow_int_e +, pow_int +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_pow_int_e(double x,int n,gsl_sf_result* result); +-- +-- +pow_int_e :: Double -> Int -> (Double,Double) +pow_int_e x n = createSFR "pow_int_e" $ gsl_sf_pow_int_e x n +foreign import ccall "pow_int.h gsl_sf_pow_int_e" gsl_sf_pow_int_e :: Double -> Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_pow_int(double x,int n); +-- +-- +pow_int :: Double -> Int -> Double +pow_int = gsl_sf_pow_int +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Psi +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Psi( + psi_int_e +, psi_int +, psi_e +, psi +, psi_1piy_e +, psi_1piy +, psi_1_int_e +, psi_1_int +, psi_1_e +, psi_1 +, psi_n_e +, psi_n +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_psi_int_e(int n,gsl_sf_result* result); +-- +-- +psi_int_e :: Int -> (Double,Double) +psi_int_e n = createSFR "psi_int_e" $ gsl_sf_psi_int_e n +foreign import ccall "psi.h gsl_sf_psi_int_e" gsl_sf_psi_int_e :: Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_psi_int(int n); +-- +-- +psi_int :: Int -> Double +psi_int = gsl_sf_psi_int +foreign import ccall "psi.h gsl_sf_psi_int" gsl_sf_psi_int :: Int -> Double + +-- | wrapper for int gsl_sf_psi_e(double x,gsl_sf_result* result); +-- +-- +psi_e :: Double -> (Double,Double) +psi_e x = createSFR "psi_e" $ gsl_sf_psi_e x +foreign import ccall "psi.h gsl_sf_psi_e" gsl_sf_psi_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_psi(double x); +-- +-- +psi :: Double -> Double +psi = gsl_sf_psi +foreign import ccall "psi.h gsl_sf_psi" gsl_sf_psi :: Double -> Double + +-- | wrapper for int gsl_sf_psi_1piy_e(double y,gsl_sf_result* result); +-- +-- +psi_1piy_e :: Double -> (Double,Double) +psi_1piy_e y = createSFR "psi_1piy_e" $ gsl_sf_psi_1piy_e y +foreign import ccall "psi.h gsl_sf_psi_1piy_e" gsl_sf_psi_1piy_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_psi_1piy(double y); +-- +-- +psi_1piy :: Double -> Double +psi_1piy = gsl_sf_psi_1piy +foreign import ccall "psi.h gsl_sf_psi_1piy" gsl_sf_psi_1piy :: Double -> Double + +-- | wrapper for int gsl_sf_psi_1_int_e(int n,gsl_sf_result* result); +-- +-- +psi_1_int_e :: Int -> (Double,Double) +psi_1_int_e n = createSFR "psi_1_int_e" $ gsl_sf_psi_1_int_e n +foreign import ccall "psi.h gsl_sf_psi_1_int_e" gsl_sf_psi_1_int_e :: Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_psi_1_int(int n); +-- +-- +psi_1_int :: Int -> Double +psi_1_int = gsl_sf_psi_1_int +foreign import ccall "psi.h gsl_sf_psi_1_int" gsl_sf_psi_1_int :: Int -> Double + +-- | wrapper for int gsl_sf_psi_1_e(double x,gsl_sf_result* result); +-- +-- +psi_1_e :: Double -> (Double,Double) +psi_1_e x = createSFR "psi_1_e" $ gsl_sf_psi_1_e x +foreign import ccall "psi.h gsl_sf_psi_1_e" gsl_sf_psi_1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_psi_1(double x); +-- +-- +psi_1 :: Double -> Double +psi_1 = gsl_sf_psi_1 +foreign import ccall "psi.h gsl_sf_psi_1" gsl_sf_psi_1 :: Double -> Double + +-- | wrapper for int gsl_sf_psi_n_e(int n,double x,gsl_sf_result* result); +-- +-- +psi_n_e :: Int -> Double -> (Double,Double) +psi_n_e n x = createSFR "psi_n_e" $ gsl_sf_psi_n_e n x +foreign import ccall "psi.h gsl_sf_psi_n_e" gsl_sf_psi_n_e :: Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_psi_n(int n,double x); +-- +-- +psi_n :: Int -> Double -> Double +psi_n = gsl_sf_psi_n +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Synchrotron +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Synchrotron( + synchrotron_1_e +, synchrotron_1 +, synchrotron_2_e +, synchrotron_2 +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_synchrotron_1_e(double x,gsl_sf_result* result); +-- +-- +synchrotron_1_e :: Double -> (Double,Double) +synchrotron_1_e x = createSFR "synchrotron_1_e" $ gsl_sf_synchrotron_1_e x +foreign import ccall "synchrotron.h gsl_sf_synchrotron_1_e" gsl_sf_synchrotron_1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_synchrotron_1(double x); +-- +-- +synchrotron_1 :: Double -> Double +synchrotron_1 = gsl_sf_synchrotron_1 +foreign import ccall "synchrotron.h gsl_sf_synchrotron_1" gsl_sf_synchrotron_1 :: Double -> Double + +-- | wrapper for int gsl_sf_synchrotron_2_e(double x,gsl_sf_result* result); +-- +-- +synchrotron_2_e :: Double -> (Double,Double) +synchrotron_2_e x = createSFR "synchrotron_2_e" $ gsl_sf_synchrotron_2_e x +foreign import ccall "synchrotron.h gsl_sf_synchrotron_2_e" gsl_sf_synchrotron_2_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_synchrotron_2(double x); +-- +-- +synchrotron_2 :: Double -> Double +synchrotron_2 = gsl_sf_synchrotron_2 +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Trig +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Trig( + sin_e +, Numeric.GSL.Special.Trig.sin +, cos_e +, Numeric.GSL.Special.Trig.cos +, hypot_e +, hypot +, sinc_e +, sinc +, lnsinh_e +, lnsinh +, lncosh_e +, lncosh +, sin_err_e +, cos_err_e +, angle_restrict_symm +, angle_restrict_pos +, angle_restrict_symm_err_e +, angle_restrict_pos_err_e +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_sin_e(double x,gsl_sf_result* result); +sin_e :: Double -> (Double,Double) +sin_e x = createSFR "sin_e" $ gsl_sf_sin_e x +foreign import ccall "trig.h gsl_sf_sin_e" gsl_sf_sin_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_sin(double x); +sin :: Double -> Double +sin = gsl_sf_sin +foreign import ccall "trig.h gsl_sf_sin" gsl_sf_sin :: Double -> Double + +-- | wrapper for int gsl_sf_cos_e(double x,gsl_sf_result* result); +cos_e :: Double -> (Double,Double) +cos_e x = createSFR "cos_e" $ gsl_sf_cos_e x +foreign import ccall "trig.h gsl_sf_cos_e" gsl_sf_cos_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_cos(double x); +cos :: Double -> Double +cos = gsl_sf_cos +foreign import ccall "trig.h gsl_sf_cos" gsl_sf_cos :: Double -> Double + +-- | wrapper for int gsl_sf_hypot_e(double x,double y,gsl_sf_result* result); +hypot_e :: Double -> Double -> (Double,Double) +hypot_e x y = createSFR "hypot_e" $ gsl_sf_hypot_e x y +foreign import ccall "trig.h gsl_sf_hypot_e" gsl_sf_hypot_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hypot(double x,double y); +hypot :: Double -> Double -> Double +hypot = gsl_sf_hypot +foreign import ccall "trig.h gsl_sf_hypot" gsl_sf_hypot :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_complex_sin_e(double zr,double zi,gsl_sf_result* szr,gsl_sf_result* szi); +complex_sin_e :: Double -> Double -> Ptr Double -> (Double,Double) +complex_sin_e zr zi szr = createSFR "complex_sin_e" $ gsl_sf_complex_sin_e zr zi szr +foreign import ccall "trig.h gsl_sf_complex_sin_e" gsl_sf_complex_sin_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_complex_cos_e(double zr,double zi,gsl_sf_result* czr,gsl_sf_result* czi); +complex_cos_e :: Double -> Double -> Ptr Double -> (Double,Double) +complex_cos_e zr zi czr = createSFR "complex_cos_e" $ gsl_sf_complex_cos_e zr zi czr +foreign import ccall "trig.h gsl_sf_complex_cos_e" gsl_sf_complex_cos_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_complex_logsin_e(double zr,double zi,gsl_sf_result* lszr,gsl_sf_result* lszi); +complex_logsin_e :: Double -> Double -> Ptr Double -> (Double,Double) +complex_logsin_e zr zi lszr = createSFR "complex_logsin_e" $ gsl_sf_complex_logsin_e zr zi lszr +foreign import ccall "trig.h gsl_sf_complex_logsin_e" gsl_sf_complex_logsin_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_sinc_e(double x,gsl_sf_result* result); +sinc_e :: Double -> (Double,Double) +sinc_e x = createSFR "sinc_e" $ gsl_sf_sinc_e x +foreign import ccall "trig.h gsl_sf_sinc_e" gsl_sf_sinc_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_sinc(double x); +sinc :: Double -> Double +sinc = gsl_sf_sinc +foreign import ccall "trig.h gsl_sf_sinc" gsl_sf_sinc :: Double -> Double + +-- | wrapper for int gsl_sf_lnsinh_e(double x,gsl_sf_result* result); +lnsinh_e :: Double -> (Double,Double) +lnsinh_e x = createSFR "lnsinh_e" $ gsl_sf_lnsinh_e x +foreign import ccall "trig.h gsl_sf_lnsinh_e" gsl_sf_lnsinh_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_lnsinh(double x); +lnsinh :: Double -> Double +lnsinh = gsl_sf_lnsinh +foreign import ccall "trig.h gsl_sf_lnsinh" gsl_sf_lnsinh :: Double -> Double + +-- | wrapper for int gsl_sf_lncosh_e(double x,gsl_sf_result* result); +lncosh_e :: Double -> (Double,Double) +lncosh_e x = createSFR "lncosh_e" $ gsl_sf_lncosh_e x +foreign import ccall "trig.h gsl_sf_lncosh_e" gsl_sf_lncosh_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_lncosh(double x); +lncosh :: Double -> Double +lncosh = gsl_sf_lncosh +foreign import ccall "trig.h gsl_sf_lncosh" gsl_sf_lncosh :: Double -> Double + +-- | wrapper for int gsl_sf_polar_to_rect(double r,double theta,gsl_sf_result* x,gsl_sf_result* y); +polar_to_rect :: Double -> Double -> Ptr Double -> (Double,Double) +polar_to_rect r theta x = createSFR "polar_to_rect" $ gsl_sf_polar_to_rect r theta x +foreign import ccall "trig.h gsl_sf_polar_to_rect" gsl_sf_polar_to_rect :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_rect_to_polar(double x,double y,gsl_sf_result* r,gsl_sf_result* theta); +rect_to_polar :: Double -> Double -> Ptr Double -> (Double,Double) +rect_to_polar x y r = createSFR "rect_to_polar" $ gsl_sf_rect_to_polar x y r +foreign import ccall "trig.h gsl_sf_rect_to_polar" gsl_sf_rect_to_polar :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_sin_err_e(double x,double dx,gsl_sf_result* result); +sin_err_e :: Double -> Double -> (Double,Double) +sin_err_e x dx = createSFR "sin_err_e" $ gsl_sf_sin_err_e x dx +foreign import ccall "trig.h gsl_sf_sin_err_e" gsl_sf_sin_err_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_cos_err_e(double x,double dx,gsl_sf_result* result); +cos_err_e :: Double -> Double -> (Double,Double) +cos_err_e x dx = createSFR "cos_err_e" $ gsl_sf_cos_err_e x dx +foreign import ccall "trig.h gsl_sf_cos_err_e" gsl_sf_cos_err_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_angle_restrict_symm_e(double* theta); +angle_restrict_symm_e :: Ptr Double -> Int +angle_restrict_symm_e = gsl_sf_angle_restrict_symm_e +foreign import ccall "trig.h gsl_sf_angle_restrict_symm_e" gsl_sf_angle_restrict_symm_e :: Ptr Double -> Int + +-- | wrapper for double gsl_sf_angle_restrict_symm(double theta); +angle_restrict_symm :: Double -> Double +angle_restrict_symm = gsl_sf_angle_restrict_symm +foreign import ccall "trig.h gsl_sf_angle_restrict_symm" gsl_sf_angle_restrict_symm :: Double -> Double + +-- | wrapper for int gsl_sf_angle_restrict_pos_e(double* theta); +angle_restrict_pos_e :: Ptr Double -> Int +angle_restrict_pos_e = gsl_sf_angle_restrict_pos_e +foreign import ccall "trig.h gsl_sf_angle_restrict_pos_e" gsl_sf_angle_restrict_pos_e :: Ptr Double -> Int + +-- | wrapper for double gsl_sf_angle_restrict_pos(double theta); +angle_restrict_pos :: Double -> Double +angle_restrict_pos = gsl_sf_angle_restrict_pos +foreign import ccall "trig.h gsl_sf_angle_restrict_pos" gsl_sf_angle_restrict_pos :: Double -> Double + +-- | wrapper for int gsl_sf_angle_restrict_symm_err_e(double theta,gsl_sf_result* result); +angle_restrict_symm_err_e :: Double -> (Double,Double) +angle_restrict_symm_err_e theta = createSFR "angle_restrict_symm_err_e" $ gsl_sf_angle_restrict_symm_err_e theta +foreign import ccall "trig.h gsl_sf_angle_restrict_symm_err_e" gsl_sf_angle_restrict_symm_err_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_angle_restrict_pos_err_e(double theta,gsl_sf_result* result); +angle_restrict_pos_err_e :: Double -> (Double,Double) +angle_restrict_pos_err_e theta = createSFR "angle_restrict_pos_err_e" $ gsl_sf_angle_restrict_pos_err_e theta +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 @@ +------------------------------------------------------------ +{- | +Module : Numeric.GSL.Special.Zeta +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Wrappers for selected functions described at: + + + +-} +------------------------------------------------------------ + +module Numeric.GSL.Special.Zeta( + zeta_int_e +, zeta_int +, zeta_e +, zeta +, zetam1_e +, zetam1 +, zetam1_int_e +, zetam1_int +, hzeta_e +, hzeta +, eta_int_e +, eta_int +, eta_e +, eta +) where + +import Foreign(Ptr) +import Numeric.GSL.Special.Internal + +-- | wrapper for int gsl_sf_zeta_int_e(int n,gsl_sf_result* result); +-- +-- +zeta_int_e :: Int -> (Double,Double) +zeta_int_e n = createSFR "zeta_int_e" $ gsl_sf_zeta_int_e n +foreign import ccall "zeta.h gsl_sf_zeta_int_e" gsl_sf_zeta_int_e :: Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_zeta_int(int n); +-- +-- +zeta_int :: Int -> Double +zeta_int = gsl_sf_zeta_int +foreign import ccall "zeta.h gsl_sf_zeta_int" gsl_sf_zeta_int :: Int -> Double + +-- | wrapper for int gsl_sf_zeta_e(double s,gsl_sf_result* result); +-- +-- +zeta_e :: Double -> (Double,Double) +zeta_e s = createSFR "zeta_e" $ gsl_sf_zeta_e s +foreign import ccall "zeta.h gsl_sf_zeta_e" gsl_sf_zeta_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_zeta(double s); +-- +-- +zeta :: Double -> Double +zeta = gsl_sf_zeta +foreign import ccall "zeta.h gsl_sf_zeta" gsl_sf_zeta :: Double -> Double + +-- | wrapper for int gsl_sf_zetam1_e(double s,gsl_sf_result* result); +-- +-- +zetam1_e :: Double -> (Double,Double) +zetam1_e s = createSFR "zetam1_e" $ gsl_sf_zetam1_e s +foreign import ccall "zeta.h gsl_sf_zetam1_e" gsl_sf_zetam1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_zetam1(double s); +-- +-- +zetam1 :: Double -> Double +zetam1 = gsl_sf_zetam1 +foreign import ccall "zeta.h gsl_sf_zetam1" gsl_sf_zetam1 :: Double -> Double + +-- | wrapper for int gsl_sf_zetam1_int_e(int s,gsl_sf_result* result); +-- +-- +zetam1_int_e :: Int -> (Double,Double) +zetam1_int_e s = createSFR "zetam1_int_e" $ gsl_sf_zetam1_int_e s +foreign import ccall "zeta.h gsl_sf_zetam1_int_e" gsl_sf_zetam1_int_e :: Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_zetam1_int(int s); +-- +-- +zetam1_int :: Int -> Double +zetam1_int = gsl_sf_zetam1_int +foreign import ccall "zeta.h gsl_sf_zetam1_int" gsl_sf_zetam1_int :: Int -> Double + +-- | wrapper for int gsl_sf_hzeta_e(double s,double q,gsl_sf_result* result); +-- +-- +hzeta_e :: Double -> Double -> (Double,Double) +hzeta_e s q = createSFR "hzeta_e" $ gsl_sf_hzeta_e s q +foreign import ccall "zeta.h gsl_sf_hzeta_e" gsl_sf_hzeta_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hzeta(double s,double q); +-- +-- +hzeta :: Double -> Double -> Double +hzeta = gsl_sf_hzeta +foreign import ccall "zeta.h gsl_sf_hzeta" gsl_sf_hzeta :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_eta_int_e(int n,gsl_sf_result* result); +-- +-- +eta_int_e :: Int -> (Double,Double) +eta_int_e n = createSFR "eta_int_e" $ gsl_sf_eta_int_e n +foreign import ccall "zeta.h gsl_sf_eta_int_e" gsl_sf_eta_int_e :: Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_eta_int(int n); +-- +-- +eta_int :: Int -> Double +eta_int = gsl_sf_eta_int +foreign import ccall "zeta.h gsl_sf_eta_int" gsl_sf_eta_int :: Int -> Double + +-- | wrapper for int gsl_sf_eta_e(double s,gsl_sf_result* result); +-- +-- +eta_e :: Double -> (Double,Double) +eta_e s = createSFR "eta_e" $ gsl_sf_eta_e s +foreign import ccall "zeta.h gsl_sf_eta_e" gsl_sf_eta_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_eta(double s); +-- +-- +eta :: Double -> Double +eta = gsl_sf_eta +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 @@ +int gsl_sf_airy_Ai_e(double x,int mode,double* result); +double gsl_sf_airy_Ai(double x,int mode); +int gsl_sf_airy_Bi_e(double x,int mode,double* result); +double gsl_sf_airy_Bi(double x,int mode); +int gsl_sf_airy_Ai_scaled_e(double x,int mode,double* result); +double gsl_sf_airy_Ai_scaled(double x,int mode); +int gsl_sf_airy_Bi_scaled_e(double x,int mode,double* result); +double gsl_sf_airy_Bi_scaled(double x,int mode); +int gsl_sf_airy_Ai_deriv_e(double x,int mode,double* result); +double gsl_sf_airy_Ai_deriv(double x,int mode); +int gsl_sf_airy_Bi_deriv_e(double x,int mode,double* result); +double gsl_sf_airy_Bi_deriv(double x,int mode); +int gsl_sf_airy_Ai_deriv_scaled_e(double x,int mode,double* result); +double gsl_sf_airy_Ai_deriv_scaled(double x,int mode); +int gsl_sf_airy_Bi_deriv_scaled_e(double x,int mode,double* result); +double gsl_sf_airy_Bi_deriv_scaled(double x,int mode); +int gsl_sf_airy_zero_Ai_e(int s,double* result); +double gsl_sf_airy_zero_Ai(int s); +int gsl_sf_airy_zero_Bi_e(int s,double* result); +double gsl_sf_airy_zero_Bi(int s); +int gsl_sf_airy_zero_Ai_deriv_e(int s,double* result); +double gsl_sf_airy_zero_Ai_deriv(int s); +int gsl_sf_airy_zero_Bi_deriv_e(int s,double* result); +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 @@ +-- automatic generation of wrappers for simple GSL special functions + +import Text.ParserCombinators.Parsec +import System +import Data.List(intersperse, isPrefixOf) +import Data.Char(toUpper,isUpper,toLower) + +data Type = Normal Ident | Pointer Ident deriving (Eq, Show) + +type Ident = String + +data Header = Header Type Ident [(Type,Ident)] deriving Show + +headers f = case parse parseHeaders "" f of + Right l -> l + Left s -> error (show s) + + +rep (c,r) [] = [] +rep (c,r) f@(x:xs) + | c `isPrefixOf` f = r ++ rep (c,r) (drop (length c) f) + | otherwise = x:(rep (c,r) xs) + + +fixlong [] = [] +fixlong "\\" = [] +fixlong ('\\':'\n':xs) = xs +fixlong (x:xs) = x : fixlong xs + + +safe (Header _ _ args) = all ok args + || all ok (init args) && kn (last args) + where ok ((Normal s),_) | s `elem` ["double","float","int","gsl_mode_t"] = True + ok _ = False + kn ((Pointer "gsl_sf_result"),_) = True + kn ((Pointer "gsl_sf_result_e10"),_) = True + kn _ = False + + + +fixC s = rep ("gsl_mode_t","int") $ rep ("gsl_sf_result","double") $ rep ("gsl_sf_result_e10","double") $ s + +main = do + args <- getArgs + let name = args!!0 + headerfile = + case args of + [n] -> "/usr/include/gsl/gsl_sf_"++n++".h" + [_,f] -> f + file <- readFile headerfile + + putStrLn headerfile + --mapM_ print (headers $ fixlong file) + let parsed = (headers $ fixlong file) + writeFile (name ++".h") (fixC $ unlines $ map showC parsed) + + --putStrLn "" + --mapM (\(Header _ n _) -> putStrLn (drop 7 n ++",")) parsed + --putStrLn "" + --mapM_ (putStrLn.showFull (name ++".h")) parsed + let exports = rep (")",") where") $ rep ("(\n","(\n ") $ rep (",\n",", ") $ unlines $ ["("]++intersperse "," (map (\(Header _ n _) -> hName n) (filter safe parsed))++[")"] + let defs = unlines $ map (showFull (name ++".h")) parsed + let imports = "\nimport Foreign(Ptr)\nimport Numeric.GSL.Special.Internal\n" + let mod = modhead name ++ "module Numeric.GSL.Special."++ upperFirst name++exports++imports++defs + writeFile (upperFirst name ++ ".hs") mod + + +google name = "" + +modhead name = replicate 60 '-' ++ "\n" + ++"{- |\n" + ++"Module : Numeric.GSL.Special."++upperFirst name++"\n" + ++"Copyright : (c) Alberto Ruiz 2006\n" + ++"License : GPL-style\n" + ++"Maintainer : Alberto Ruiz (aruiz at um dot es)\n" + ++"Stability : provisional\n" + ++"Portability : uses ffi\n" + ++"\nWrappers for selected functions described at:\n\n" + ++ google ( "gsl_sf_"++name++".h") + ++"\n\n-}\n" + ++ replicate 60 '-' ++ "\n\n" + +upperFirst (x:xs) = toUpper x : xs + +comment = do + string "/*" + closecomment + spaces + return "comment" + +closecomment = try (string "*/") + <|> (do anyChar + closecomment) + +ident = do + spaces + id <- many1 (noneOf "()[]* \n\t,;") + spaces + return id + +comment' = between (char '(') (char ')') (many $ noneOf ")") + + +define = do + string "#" + closedefine + spaces + return "define" + +closedefine = try (string "\n") + <|> (do anyChar + closedefine) + +marks = do + try (string "__BEGIN_DECLS" >> spaces >> return "begin") + <|> + try (string "__END_DECLS" >> spaces >> return "end") + + + +irrelevant = + try comment + <|> + try define + <|> + marks + + +parseHeaders = many parseHeader + +parseHeader = do + spaces + many irrelevant + spaces + (res,name) <- typ + spaces + args <- between (char '(') (char ')') (sepBy typ (char ',')) + spaces + char ';' + spaces + many irrelevant + return $ Header res name args + +typ = try t1 <|> t2 + +symbol s = spaces >> string s >> spaces + +t1 = do + t <- try (symbol "const" >> symbol "unsigned" >> ident) -- aaagh + <|> + try (symbol "const" >> ident) + <|> + try (symbol "unsigned" >> ident) + <|> ident + n <- ident + return (Normal t,n) + +t2 = do + t <- ident + spaces + char '*' + spaces + n <- ident + return (Pointer t,n) + +pure (Header _ _ args) | fst (last args) == Pointer "gsl_sf_result" = False + | fst (last args) == Pointer "gsl_sf_result_e10" = False + | otherwise = True + +showC (Header t n args) = showCt t ++ " " ++ n ++ "(" ++ (concat $ intersperse "," $ map showCa args) ++ ");" + +showCt (Normal s) = s +showCt (Pointer s) = s ++ "*" + +showCa (t, a) = showCt t ++" "++ a + +showH hc h@(Header t n args) = "foreign import ccall \""++hc++" "++n++"\" "++n++" :: "++ (concat$intersperse" -> "$map showHa args) ++" -> " ++ t' + where t' | pure h = showHt t + | otherwise = "IO("++showHt t++")" + +showHt (Normal (s:ss)) = toUpper s : ss +showHt (Pointer "gsl_sf_result") = "Ptr Double" +showHt (Pointer "gsl_sf_result_e10") = "Ptr ()" +showHt (Pointer (s:ss)) = "Ptr "++toUpper s : ss + +showHa (t,a) = showHt t + +showFull hc h@(Header t n args) = "\n-- | wrapper for "++showC h + ++"\n--\n-- "++google n ++"\n" + ++ boiler h ++"\n" + ++showH hc h + +fixmd1 = rep ("Gsl_mode_t","Precision") +fixmd2 = rep ("mode"," (precCode mode)") + +boiler h@(Header t n args) | fst (last args) == Pointer "gsl_sf_result" = boilerResult h + | fst (last args) == Pointer "gsl_sf_result_e10" = boilerResultE10 h + | any isMode args = boilerMode h + | otherwise = boilerBasic h + +isMode (Normal "gsl_mode_t",_) = True +isMode _ = False + +hName n = f $ drop 7 n + where f (s:ss) = toLower s : ss + + +boilerResult h@(Header t n args) = + hName n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$ map showHa (init args)) ++" -> " ++ "(Double,Double)\n" ++ + hName n ++ " "++ initArgs args ++ + " = createSFR \""++ hName n ++"\" $ " ++ n ++ " "++ (fixmd2 $ initArgs args) + +boilerResultE10 h@(Header t n args) = + hName n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$ map showHa (init args)) ++" -> " ++ "(Double,Int,Double)\n" ++ + hName n ++ " "++ initArgs args ++ + " = createSFR_E10 \""++ hName n ++"\" $ " ++ n ++ " "++ (fixmd2 $ initArgs args) + +boilerBasic h@(Header t n args) = + hName n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$map showHa args) ++" -> " ++showHt t ++ "\n" ++ + hName n ++ " = " ++fixmd2 n + +boilerMode h@(Header t n args) = + hName n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$ map showHa args) ++" -> " ++ showHt t++"\n" ++ + hName n ++ " "++ allArgs args ++ + " = " ++ n ++ " "++ (fixmd2 $ allArgs args) + +cVar (v:vs) | isUpper v = toLower v : v : vs + | otherwise = v:vs + +allArgs args = unwords (map (cVar.snd) args) +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 @@ +#!/bin/bash + +#Airy.hs +# include Precision (..) in the export list +#Exp.hs +# remove extern inline definition, qualify name +#Coupling +# remove deprecated INCORRECT +#Trig.hs +# qualify names +#Legendre.hs +# remove extern inline +#Log.hs +# remove extern inline, qualify name + +#runhaskell auto airy +runhaskell auto bessel +runhaskell auto clausen +runhaskell auto coulomb +#runhaskell auto coupling +runhaskell auto dawson +runhaskell auto debye +runhaskell auto dilog +runhaskell auto elementary +runhaskell auto ellint +runhaskell auto erf +#runhaskell auto exp +runhaskell auto expint +runhaskell auto fermi_dirac +runhaskell auto gamma +runhaskell auto gegenbauer +runhaskell auto hyperg +runhaskell auto laguerre +runhaskell auto lambert +#runhaskell auto legendre +#runhaskell auto log +runhaskell auto pow_int +runhaskell auto psi +runhaskell auto synchrotron +#runhaskell auto trig +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 @@ +int gsl_sf_bessel_J0_e(double x,double* result); +double gsl_sf_bessel_J0(double x); +int gsl_sf_bessel_J1_e(double x,double* result); +double gsl_sf_bessel_J1(double x); +int gsl_sf_bessel_Jn_e(int n,double x,double* result); +double gsl_sf_bessel_Jn(int n,double x); +int gsl_sf_bessel_Jn_array(int nmin,int nmax,double x,double* result_array); +int gsl_sf_bessel_Y0_e(double x,double* result); +double gsl_sf_bessel_Y0(double x); +int gsl_sf_bessel_Y1_e(double x,double* result); +double gsl_sf_bessel_Y1(double x); +int gsl_sf_bessel_Yn_e(int n,double x,double* result); +double gsl_sf_bessel_Yn(int n,double x); +int gsl_sf_bessel_Yn_array(int nmin,int nmax,double x,double* result_array); +int gsl_sf_bessel_I0_e(double x,double* result); +double gsl_sf_bessel_I0(double x); +int gsl_sf_bessel_I1_e(double x,double* result); +double gsl_sf_bessel_I1(double x); +int gsl_sf_bessel_In_e(int n,double x,double* result); +double gsl_sf_bessel_In(int n,double x); +int gsl_sf_bessel_In_array(int nmin,int nmax,double x,double* result_array); +int gsl_sf_bessel_I0_scaled_e(double x,double* result); +double gsl_sf_bessel_I0_scaled(double x); +int gsl_sf_bessel_I1_scaled_e(double x,double* result); +double gsl_sf_bessel_I1_scaled(double x); +int gsl_sf_bessel_In_scaled_e(int n,double x,double* result); +double gsl_sf_bessel_In_scaled(int n,double x); +int gsl_sf_bessel_In_scaled_array(int nmin,int nmax,double x,double* result_array); +int gsl_sf_bessel_K0_e(double x,double* result); +double gsl_sf_bessel_K0(double x); +int gsl_sf_bessel_K1_e(double x,double* result); +double gsl_sf_bessel_K1(double x); +int gsl_sf_bessel_Kn_e(int n,double x,double* result); +double gsl_sf_bessel_Kn(int n,double x); +int gsl_sf_bessel_Kn_array(int nmin,int nmax,double x,double* result_array); +int gsl_sf_bessel_K0_scaled_e(double x,double* result); +double gsl_sf_bessel_K0_scaled(double x); +int gsl_sf_bessel_K1_scaled_e(double x,double* result); +double gsl_sf_bessel_K1_scaled(double x); +int gsl_sf_bessel_Kn_scaled_e(int n,double x,double* result); +double gsl_sf_bessel_Kn_scaled(int n,double x); +int gsl_sf_bessel_Kn_scaled_array(int nmin,int nmax,double x,double* result_array); +int gsl_sf_bessel_j0_e(double x,double* result); +double gsl_sf_bessel_j0(double x); +int gsl_sf_bessel_j1_e(double x,double* result); +double gsl_sf_bessel_j1(double x); +int gsl_sf_bessel_j2_e(double x,double* result); +double gsl_sf_bessel_j2(double x); +int gsl_sf_bessel_jl_e(int l,double x,double* result); +double gsl_sf_bessel_jl(int l,double x); +int gsl_sf_bessel_jl_array(int lmax,double x,double* result_array); +int gsl_sf_bessel_jl_steed_array(int lmax,double x,double* jl_x_array); +int gsl_sf_bessel_y0_e(double x,double* result); +double gsl_sf_bessel_y0(double x); +int gsl_sf_bessel_y1_e(double x,double* result); +double gsl_sf_bessel_y1(double x); +int gsl_sf_bessel_y2_e(double x,double* result); +double gsl_sf_bessel_y2(double x); +int gsl_sf_bessel_yl_e(int l,double x,double* result); +double gsl_sf_bessel_yl(int l,double x); +int gsl_sf_bessel_yl_array(int lmax,double x,double* result_array); +int gsl_sf_bessel_i0_scaled_e(double x,double* result); +double gsl_sf_bessel_i0_scaled(double x); +int gsl_sf_bessel_i1_scaled_e(double x,double* result); +double gsl_sf_bessel_i1_scaled(double x); +int gsl_sf_bessel_i2_scaled_e(double x,double* result); +double gsl_sf_bessel_i2_scaled(double x); +int gsl_sf_bessel_il_scaled_e(int l,double x,double* result); +double gsl_sf_bessel_il_scaled(int l,double x); +int gsl_sf_bessel_il_scaled_array(int lmax,double x,double* result_array); +int gsl_sf_bessel_k0_scaled_e(double x,double* result); +double gsl_sf_bessel_k0_scaled(double x); +int gsl_sf_bessel_k1_scaled_e(double x,double* result); +double gsl_sf_bessel_k1_scaled(double x); +int gsl_sf_bessel_k2_scaled_e(double x,double* result); +double gsl_sf_bessel_k2_scaled(double x); +int gsl_sf_bessel_kl_scaled_e(int l,double x,double* result); +double gsl_sf_bessel_kl_scaled(int l,double x); +int gsl_sf_bessel_kl_scaled_array(int lmax,double x,double* result_array); +int gsl_sf_bessel_Jnu_e(double nu,double x,double* result); +double gsl_sf_bessel_Jnu(double nu,double x); +int gsl_sf_bessel_Ynu_e(double nu,double x,double* result); +double gsl_sf_bessel_Ynu(double nu,double x); +int gsl_sf_bessel_sequence_Jnu_e(double nu,int mode,size_t size,double* v); +int gsl_sf_bessel_Inu_scaled_e(double nu,double x,double* result); +double gsl_sf_bessel_Inu_scaled(double nu,double x); +int gsl_sf_bessel_Inu_e(double nu,double x,double* result); +double gsl_sf_bessel_Inu(double nu,double x); +int gsl_sf_bessel_Knu_scaled_e(double nu,double x,double* result); +double gsl_sf_bessel_Knu_scaled(double nu,double x); +int gsl_sf_bessel_Knu_e(double nu,double x,double* result); +double gsl_sf_bessel_Knu(double nu,double x); +int gsl_sf_bessel_lnKnu_e(double nu,double x,double* result); +double gsl_sf_bessel_lnKnu(double nu,double x); +int gsl_sf_bessel_zero_J0_e(int s,double* result); +double gsl_sf_bessel_zero_J0(int s); +int gsl_sf_bessel_zero_J1_e(int s,double* result); +double gsl_sf_bessel_zero_J1(int s); +int gsl_sf_bessel_zero_Jnu_e(double nu,int s,double* result); +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 @@ +int gsl_sf_clausen_e(double x,double* result); +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 @@ +int gsl_sf_hydrogenicR_1_e(double Z,double r,double* result); +double gsl_sf_hydrogenicR_1(double Z,double r); +int gsl_sf_hydrogenicR_e(int n,int l,double Z,double r,double* result); +double gsl_sf_hydrogenicR(int n,int l,double Z,double r); +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); +int gsl_sf_coulomb_wave_F_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent); +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); +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); +int gsl_sf_coulomb_wave_sphF_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent); +int gsl_sf_coulomb_CL_e(double L,double eta,double* result); +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 @@ +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); +double gsl_sf_coupling_3j(int two_ja,int two_jb,int two_jc,int two_ma,int two_mb,int two_mc); +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); +double gsl_sf_coupling_6j(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf); +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); +double gsl_sf_coupling_RacahW(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf); +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); +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); +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); +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 @@ +int gsl_sf_dawson_e(double x,double* result); +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 @@ +int gsl_sf_debye_1_e(double x,double* result); +double gsl_sf_debye_1(double x); +int gsl_sf_debye_2_e(double x,double* result); +double gsl_sf_debye_2(double x); +int gsl_sf_debye_3_e(double x,double* result); +double gsl_sf_debye_3(double x); +int gsl_sf_debye_4_e(double x,double* result); +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 @@ +int gsl_sf_dilog_e(double x,double* result); +double gsl_sf_dilog(double x); +int gsl_sf_complex_dilog_xy_e(double x,double y,double* result_re,double* result_im); +int gsl_sf_complex_dilog_e(double r,double theta,double* result_re,double* result_im); +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 @@ +int gsl_sf_multiply_e(double x,double y,double* result); +double gsl_sf_multiply(double x,double y); +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 @@ +int gsl_sf_ellint_Kcomp_e(double k,int mode,double* result); +double gsl_sf_ellint_Kcomp(double k,int mode); +int gsl_sf_ellint_Ecomp_e(double k,int mode,double* result); +double gsl_sf_ellint_Ecomp(double k,int mode); +int gsl_sf_ellint_F_e(double phi,double k,int mode,double* result); +double gsl_sf_ellint_F(double phi,double k,int mode); +int gsl_sf_ellint_E_e(double phi,double k,int mode,double* result); +double gsl_sf_ellint_E(double phi,double k,int mode); +int gsl_sf_ellint_P_e(double phi,double k,double n,int mode,double* result); +double gsl_sf_ellint_P(double phi,double k,double n,int mode); +int gsl_sf_ellint_D_e(double phi,double k,double n,int mode,double* result); +double gsl_sf_ellint_D(double phi,double k,double n,int mode); +int gsl_sf_ellint_RC_e(double x,double y,int mode,double* result); +double gsl_sf_ellint_RC(double x,double y,int mode); +int gsl_sf_ellint_RD_e(double x,double y,double z,int mode,double* result); +double gsl_sf_ellint_RD(double x,double y,double z,int mode); +int gsl_sf_ellint_RF_e(double x,double y,double z,int mode,double* result); +double gsl_sf_ellint_RF(double x,double y,double z,int mode); +int gsl_sf_ellint_RJ_e(double x,double y,double z,double p,int mode,double* result); +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 @@ +int gsl_sf_erfc_e(double x,double* result); +double gsl_sf_erfc(double x); +int gsl_sf_log_erfc_e(double x,double* result); +double gsl_sf_log_erfc(double x); +int gsl_sf_erf_e(double x,double* result); +double gsl_sf_erf(double x); +int gsl_sf_erf_Z_e(double x,double* result); +int gsl_sf_erf_Q_e(double x,double* result); +double gsl_sf_erf_Z(double x); +double gsl_sf_erf_Q(double x); +int gsl_sf_hazard_e(double x,double* result); +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 @@ +int gsl_sf_exp_e(double x,double* result); +double gsl_sf_exp(double x); +int gsl_sf_exp_e10_e(double x,double* result); +int gsl_sf_exp_mult_e(double x,double y,double* result); +double gsl_sf_exp_mult(double x,double y); +int gsl_sf_exp_mult_e10_e(double x,double y,double* result); +int gsl_sf_expm1_e(double x,double* result); +double gsl_sf_expm1(double x); +int gsl_sf_exprel_e(double x,double* result); +double gsl_sf_exprel(double x); +int gsl_sf_exprel_2_e(double x,double* result); +double gsl_sf_exprel_2(double x); +int gsl_sf_exprel_n_e(int n,double x,double* result); +double gsl_sf_exprel_n(int n,double x); +int gsl_sf_exp_err_e(double x,double dx,double* result); +int gsl_sf_exp_err_e10_e(double x,double dx,double* result); +int gsl_sf_exp_mult_err_e(double x,double dx,double y,double dy,double* result); +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 @@ +int gsl_sf_expint_E1_e(double x,double* result); +double gsl_sf_expint_E1(double x); +int gsl_sf_expint_E2_e(double x,double* result); +double gsl_sf_expint_E2(double x); +int gsl_sf_expint_E1_scaled_e(double x,double* result); +double gsl_sf_expint_E1_scaled(double x); +int gsl_sf_expint_E2_scaled_e(double x,double* result); +double gsl_sf_expint_E2_scaled(double x); +int gsl_sf_expint_Ei_e(double x,double* result); +double gsl_sf_expint_Ei(double x); +int gsl_sf_expint_Ei_scaled_e(double x,double* result); +double gsl_sf_expint_Ei_scaled(double x); +int gsl_sf_Shi_e(double x,double* result); +double gsl_sf_Shi(double x); +int gsl_sf_Chi_e(double x,double* result); +double gsl_sf_Chi(double x); +int gsl_sf_expint_3_e(double x,double* result); +double gsl_sf_expint_3(double x); +int gsl_sf_Si_e(double x,double* result); +double gsl_sf_Si(double x); +int gsl_sf_Ci_e(double x,double* result); +double gsl_sf_Ci(double x); +int gsl_sf_atanint_e(double x,double* result); +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 @@ +int gsl_sf_fermi_dirac_m1_e(double x,double* result); +double gsl_sf_fermi_dirac_m1(double x); +int gsl_sf_fermi_dirac_0_e(double x,double* result); +double gsl_sf_fermi_dirac_0(double x); +int gsl_sf_fermi_dirac_1_e(double x,double* result); +double gsl_sf_fermi_dirac_1(double x); +int gsl_sf_fermi_dirac_2_e(double x,double* result); +double gsl_sf_fermi_dirac_2(double x); +int gsl_sf_fermi_dirac_int_e(int j,double x,double* result); +double gsl_sf_fermi_dirac_int(int j,double x); +int gsl_sf_fermi_dirac_mhalf_e(double x,double* result); +double gsl_sf_fermi_dirac_mhalf(double x); +int gsl_sf_fermi_dirac_half_e(double x,double* result); +double gsl_sf_fermi_dirac_half(double x); +int gsl_sf_fermi_dirac_3half_e(double x,double* result); +double gsl_sf_fermi_dirac_3half(double x); +int gsl_sf_fermi_dirac_inc_0_e(double x,double b,double* result); +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 @@ +int gsl_sf_lngamma_e(double x,double* result); +double gsl_sf_lngamma(double x); +int gsl_sf_lngamma_sgn_e(double x,double* result_lg,double* sgn); +int gsl_sf_gamma_e(double x,double* result); +double gsl_sf_gamma(double x); +int gsl_sf_gammastar_e(double x,double* result); +double gsl_sf_gammastar(double x); +int gsl_sf_gammainv_e(double x,double* result); +double gsl_sf_gammainv(double x); +int gsl_sf_lngamma_complex_e(double zr,double zi,double* lnr,double* arg); +int gsl_sf_taylorcoeff_e(int n,double x,double* result); +double gsl_sf_taylorcoeff(int n,double x); +int gsl_sf_fact_e(int n,double* result); +double gsl_sf_fact(int n); +int gsl_sf_doublefact_e(int n,double* result); +double gsl_sf_doublefact(int n); +int gsl_sf_lnfact_e(int n,double* result); +double gsl_sf_lnfact(int n); +int gsl_sf_lndoublefact_e(int n,double* result); +double gsl_sf_lndoublefact(int n); +int gsl_sf_lnchoose_e(int n,int m,double* result); +double gsl_sf_lnchoose(int n,int m); +int gsl_sf_choose_e(int n,int m,double* result); +double gsl_sf_choose(int n,int m); +int gsl_sf_lnpoch_e(double a,double x,double* result); +double gsl_sf_lnpoch(double a,double x); +int gsl_sf_lnpoch_sgn_e(double a,double x,double* result,double* sgn); +int gsl_sf_poch_e(double a,double x,double* result); +double gsl_sf_poch(double a,double x); +int gsl_sf_pochrel_e(double a,double x,double* result); +double gsl_sf_pochrel(double a,double x); +int gsl_sf_gamma_inc_Q_e(double a,double x,double* result); +double gsl_sf_gamma_inc_Q(double a,double x); +int gsl_sf_gamma_inc_P_e(double a,double x,double* result); +double gsl_sf_gamma_inc_P(double a,double x); +int gsl_sf_gamma_inc_e(double a,double x,double* result); +double gsl_sf_gamma_inc(double a,double x); +int gsl_sf_lnbeta_e(double a,double b,double* result); +double gsl_sf_lnbeta(double a,double b); +int gsl_sf_beta_e(double a,double b,double* result); +double gsl_sf_beta(double a,double b); +int gsl_sf_beta_inc_e(double a,double b,double x,double* result); +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 @@ +int gsl_sf_gegenpoly_1_e(double lambda,double x,double* result); +int gsl_sf_gegenpoly_2_e(double lambda,double x,double* result); +int gsl_sf_gegenpoly_3_e(double lambda,double x,double* result); +double gsl_sf_gegenpoly_1(double lambda,double x); +double gsl_sf_gegenpoly_2(double lambda,double x); +double gsl_sf_gegenpoly_3(double lambda,double x); +int gsl_sf_gegenpoly_n_e(int n,double lambda,double x,double* result); +double gsl_sf_gegenpoly_n(int n,double lambda,double x); +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 @@ +/* specfunc/gsl_sf_exp.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_EXP_H__ +#define __GSL_SF_EXP_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +/* Provide an exp() function with GSL semantics, + * i.e. with proper error checking, etc. + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_exp_e(const double x, gsl_sf_result * result); +double gsl_sf_exp(const double x); + + +/* Exp(x) + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_exp_e10_e(const double x, gsl_sf_result_e10 * result); + + +/* Exponentiate and multiply by a given factor: y * Exp(x) + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_exp_mult_e(const double x, const double y, gsl_sf_result * result); +double gsl_sf_exp_mult(const double x, const double y); + + +/* Exponentiate and multiply by a given factor: y * Exp(x) + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_exp_mult_e10_e(const double x, const double y, gsl_sf_result_e10 * result); + + +/* exp(x)-1 + * + * exceptions: GSL_EOVRFLW + */ +int gsl_sf_expm1_e(const double x, gsl_sf_result * result); +double gsl_sf_expm1(const double x); + + +/* (exp(x)-1)/x = 1 + x/2 + x^2/(2*3) + x^3/(2*3*4) + ... + * + * exceptions: GSL_EOVRFLW + */ +int gsl_sf_exprel_e(const double x, gsl_sf_result * result); +double gsl_sf_exprel(const double x); + + +/* 2(exp(x)-1-x)/x^2 = 1 + x/3 + x^2/(3*4) + x^3/(3*4*5) + ... + * + * exceptions: GSL_EOVRFLW + */ +int gsl_sf_exprel_2_e(double x, gsl_sf_result * result); +double gsl_sf_exprel_2(const double x); + + +/* Similarly for the N-th generalization of + * the above. The so-called N-relative exponential + * + * exprel_N(x) = N!/x^N (exp(x) - Sum[x^k/k!, {k,0,N-1}]) + * = 1 + x/(N+1) + x^2/((N+1)(N+2)) + ... + * = 1F1(1,1+N,x) + */ +int gsl_sf_exprel_n_e(const int n, const double x, gsl_sf_result * result); +double gsl_sf_exprel_n(const int n, const double x); + + +/* Exponentiate a quantity with an associated error. + */ +int gsl_sf_exp_err_e(const double x, const double dx, gsl_sf_result * result); + +/* Exponentiate a quantity with an associated error. + */ +int gsl_sf_exp_err_e10_e(const double x, const double dx, gsl_sf_result_e10 * result); + + +/* Exponentiate and multiply by a given factor: y * Exp(x), + * for quantities with associated errors. + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_exp_mult_err_e(const double x, const double dx, const double y, const double dy, gsl_sf_result * result); + + +/* Exponentiate and multiply by a given factor: y * Exp(x), + * for quantities with associated errors. + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +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); + +__END_DECLS + + +#ifdef HAVE_INLINE +#include +#include + +__BEGIN_DECLS + + + +__END_DECLS + +#endif /* HAVE_INLINE */ + + +#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 @@ +/* specfunc/gsl_sf_log.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_LOG_H__ +#define __GSL_SF_LOG_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Provide a logarithm function with GSL semantics. + * + * exceptions: GSL_EDOM + */ +int gsl_sf_log_e(const double x, gsl_sf_result * result); +double gsl_sf_log(const double x); + + +/* Log(|x|) + * + * exceptions: GSL_EDOM + */ +int gsl_sf_log_abs_e(const double x, gsl_sf_result * result); +double gsl_sf_log_abs(const double x); + + +/* Complex Logarithm + * exp(lnr + I theta) = zr + I zi + * Returns argument in [-pi,pi]. + * + * exceptions: GSL_EDOM + */ +int gsl_sf_complex_log_e(const double zr, const double zi, gsl_sf_result * lnr, gsl_sf_result * theta); + + +/* Log(1 + x) + * + * exceptions: GSL_EDOM + */ +int gsl_sf_log_1plusx_e(const double x, gsl_sf_result * result); +double gsl_sf_log_1plusx(const double x); + + +/* Log(1 + x) - x + * + * exceptions: GSL_EDOM + */ +int gsl_sf_log_1plusx_mx_e(const double x, gsl_sf_result * result); +double gsl_sf_log_1plusx_mx(const double x); + + +#ifdef HAVE_INLINE +#include +#include + +#endif /* HAVE_INLINE */ + + +__END_DECLS + +#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 @@ +int gsl_sf_hyperg_0F1_e(double c,double x,double* result); +double gsl_sf_hyperg_0F1(double c,double x); +int gsl_sf_hyperg_1F1_int_e(int m,int n,double x,double* result); +double gsl_sf_hyperg_1F1_int(int m,int n,double x); +int gsl_sf_hyperg_1F1_e(double a,double b,double x,double* result); +double gsl_sf_hyperg_1F1(double a,double b,double x); +int gsl_sf_hyperg_U_int_e(int m,int n,double x,double* result); +double gsl_sf_hyperg_U_int(int m,int n,double x); +int gsl_sf_hyperg_U_int_e10_e(int m,int n,double x,double* result); +int gsl_sf_hyperg_U_e(double a,double b,double x,double* result); +double gsl_sf_hyperg_U(double a,double b,double x); +int gsl_sf_hyperg_U_e10_e(double a,double b,double x,double* result); +int gsl_sf_hyperg_2F1_e(double a,double b,double c,double x,double* result); +double gsl_sf_hyperg_2F1(double a,double b,double c,double x); +int gsl_sf_hyperg_2F1_conj_e(double aR,double aI,double c,double x,double* result); +double gsl_sf_hyperg_2F1_conj(double aR,double aI,double c,double x); +int gsl_sf_hyperg_2F1_renorm_e(double a,double b,double c,double x,double* result); +double gsl_sf_hyperg_2F1_renorm(double a,double b,double c,double x); +int gsl_sf_hyperg_2F1_conj_renorm_e(double aR,double aI,double c,double x,double* result); +double gsl_sf_hyperg_2F1_conj_renorm(double aR,double aI,double c,double x); +int gsl_sf_hyperg_2F0_e(double a,double b,double x,double* result); +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 @@ +int gsl_sf_laguerre_1_e(double a,double x,double* result); +int gsl_sf_laguerre_2_e(double a,double x,double* result); +int gsl_sf_laguerre_3_e(double a,double x,double* result); +double gsl_sf_laguerre_1(double a,double x); +double gsl_sf_laguerre_2(double a,double x); +double gsl_sf_laguerre_3(double a,double x); +int gsl_sf_laguerre_n_e(int n,double a,double x,double* result); +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 @@ +int gsl_sf_lambert_W0_e(double x,double* result); +double gsl_sf_lambert_W0(double x); +int gsl_sf_lambert_Wm1_e(double x,double* result); +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 @@ +int gsl_sf_legendre_Pl_e(int l,double x,double* result); +double gsl_sf_legendre_Pl(int l,double x); +int gsl_sf_legendre_Pl_array(int lmax,double x,double* result_array); +int gsl_sf_legendre_Pl_deriv_array(int lmax,double x,double* result_array,double* result_deriv_array); +int gsl_sf_legendre_P1_e(double x,double* result); +int gsl_sf_legendre_P2_e(double x,double* result); +int gsl_sf_legendre_P3_e(double x,double* result); +double gsl_sf_legendre_P1(double x); +double gsl_sf_legendre_P2(double x); +double gsl_sf_legendre_P3(double x); +int gsl_sf_legendre_Q0_e(double x,double* result); +double gsl_sf_legendre_Q0(double x); +int gsl_sf_legendre_Q1_e(double x,double* result); +double gsl_sf_legendre_Q1(double x); +int gsl_sf_legendre_Ql_e(int l,double x,double* result); +double gsl_sf_legendre_Ql(int l,double x); +int gsl_sf_legendre_Plm_e(int l,int m,double x,double* result); +double gsl_sf_legendre_Plm(int l,int m,double x); +int gsl_sf_legendre_Plm_array(int lmax,int m,double x,double* result_array); +int gsl_sf_legendre_Plm_deriv_array(int lmax,int m,double x,double* result_array,double* result_deriv_array); +int gsl_sf_legendre_sphPlm_e(int l,int m,double x,double* result); +double gsl_sf_legendre_sphPlm(int l,int m,double x); +int gsl_sf_legendre_sphPlm_array(int lmax,int m,double x,double* result_array); +int gsl_sf_legendre_sphPlm_deriv_array(int lmax,int m,double x,double* result_array,double* result_deriv_array); +int gsl_sf_legendre_array_size(int lmax,int m); +int gsl_sf_conicalP_half_e(double lambda,double x,double* result); +double gsl_sf_conicalP_half(double lambda,double x); +int gsl_sf_conicalP_mhalf_e(double lambda,double x,double* result); +double gsl_sf_conicalP_mhalf(double lambda,double x); +int gsl_sf_conicalP_0_e(double lambda,double x,double* result); +double gsl_sf_conicalP_0(double lambda,double x); +int gsl_sf_conicalP_1_e(double lambda,double x,double* result); +double gsl_sf_conicalP_1(double lambda,double x); +int gsl_sf_conicalP_sph_reg_e(int l,double lambda,double x,double* result); +double gsl_sf_conicalP_sph_reg(int l,double lambda,double x); +int gsl_sf_conicalP_cyl_reg_e(int m,double lambda,double x,double* result); +double gsl_sf_conicalP_cyl_reg(int m,double lambda,double x); +int gsl_sf_legendre_H3d_0_e(double lambda,double eta,double* result); +double gsl_sf_legendre_H3d_0(double lambda,double eta); +int gsl_sf_legendre_H3d_1_e(double lambda,double eta,double* result); +double gsl_sf_legendre_H3d_1(double lambda,double eta); +int gsl_sf_legendre_H3d_e(int l,double lambda,double eta,double* result); +double gsl_sf_legendre_H3d(int l,double lambda,double eta); +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 @@ +int gsl_sf_log_e(double x,double* result); +double gsl_sf_log(double x); +int gsl_sf_log_abs_e(double x,double* result); +double gsl_sf_log_abs(double x); +int gsl_sf_complex_log_e(double zr,double zi,double* lnr,double* theta); +int gsl_sf_log_1plusx_e(double x,double* result); +double gsl_sf_log_1plusx(double x); +int gsl_sf_log_1plusx_mx_e(double x,double* result); +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 @@ +int gsl_sf_pow_int_e(double x,int n,double* result); +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 @@ +int gsl_sf_psi_int_e(int n,double* result); +double gsl_sf_psi_int(int n); +int gsl_sf_psi_e(double x,double* result); +double gsl_sf_psi(double x); +int gsl_sf_psi_1piy_e(double y,double* result); +double gsl_sf_psi_1piy(double y); +int gsl_sf_psi_1_int_e(int n,double* result); +double gsl_sf_psi_1_int(int n); +int gsl_sf_psi_1_e(double x,double* result); +double gsl_sf_psi_1(double x); +int gsl_sf_psi_n_e(int n,double x,double* result); +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 @@ +int gsl_sf_synchrotron_1_e(double x,double* result); +double gsl_sf_synchrotron_1(double x); +int gsl_sf_synchrotron_2_e(double x,double* result); +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 @@ +int gsl_sf_sin_e(double x,double* result); +double gsl_sf_sin(double x); +int gsl_sf_cos_e(double x,double* result); +double gsl_sf_cos(double x); +int gsl_sf_hypot_e(double x,double y,double* result); +double gsl_sf_hypot(double x,double y); +int gsl_sf_complex_sin_e(double zr,double zi,double* szr,double* szi); +int gsl_sf_complex_cos_e(double zr,double zi,double* czr,double* czi); +int gsl_sf_complex_logsin_e(double zr,double zi,double* lszr,double* lszi); +int gsl_sf_sinc_e(double x,double* result); +double gsl_sf_sinc(double x); +int gsl_sf_lnsinh_e(double x,double* result); +double gsl_sf_lnsinh(double x); +int gsl_sf_lncosh_e(double x,double* result); +double gsl_sf_lncosh(double x); +int gsl_sf_polar_to_rect(double r,double theta,double* x,double* y); +int gsl_sf_rect_to_polar(double x,double y,double* r,double* theta); +int gsl_sf_sin_err_e(double x,double dx,double* result); +int gsl_sf_cos_err_e(double x,double dx,double* result); +int gsl_sf_angle_restrict_symm_e(double* theta); +double gsl_sf_angle_restrict_symm(double theta); +int gsl_sf_angle_restrict_pos_e(double* theta); +double gsl_sf_angle_restrict_pos(double theta); +int gsl_sf_angle_restrict_symm_err_e(double theta,double* result); +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 @@ +int gsl_sf_zeta_int_e(int n,double* result); +double gsl_sf_zeta_int(int n); +int gsl_sf_zeta_e(double s,double* result); +double gsl_sf_zeta(double s); +int gsl_sf_zetam1_e(double s,double* result); +double gsl_sf_zetam1(double s); +int gsl_sf_zetam1_int_e(int s,double* result); +double gsl_sf_zetam1_int(int s); +int gsl_sf_hzeta_e(double s,double q,double* result); +double gsl_sf_hzeta(double s,double q); +int gsl_sf_eta_int_e(int n,double* result); +double gsl_sf_eta_int(int n); +int gsl_sf_eta_e(double s,double* result); +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 @@ +{-# OPTIONS_GHC -fglasgow-exts #-} +----------------------------------------------------------------------------- +-- | +-- Module : Numeric.GSL.Vector +-- Copyright : (c) Alberto Ruiz 2007 +-- License : GPL-style +-- +-- Maintainer : Alberto Ruiz +-- Stability : provisional +-- Portability : portable (uses FFI) +-- +-- Vector operations +-- +----------------------------------------------------------------------------- +-- #hide + +module Numeric.GSL.Vector ( + FunCodeS(..), toScalarR, + FunCodeV(..), vectorMapR, vectorMapC, + FunCodeSV(..), vectorMapValR, vectorMapValC, + FunCodeVV(..), vectorZipR, vectorZipC +) where + +import Data.Packed.Internal.Common +import Data.Packed.Internal.Vector + +import Complex +import Foreign + +data FunCodeV = Sin + | Cos + | Tan + | Abs + | ASin + | ACos + | ATan + | Sinh + | Cosh + | Tanh + | ASinh + | ACosh + | ATanh + | Exp + | Log + | Sign + | Sqrt + deriving Enum + +data FunCodeSV = Scale + | Recip + | AddConstant + | Negate + | PowSV + | PowVS + deriving Enum + +data FunCodeVV = Add + | Sub + | Mul + | Div + | Pow + | ATan2 + deriving Enum + +data FunCodeS = Norm2 + | AbsSum + | MaxIdx + | Max + | MinIdx + | Min + deriving Enum + +------------------------------------------------------------------ + +toScalarAux fun code v = unsafePerformIO $ do + r <- createVector 1 + fun (fromEnum code) // vec v // vec r // check "toScalarAux" [v] + return (r `at` 0) + +vectorMapAux fun code v = unsafePerformIO $ do + r <- createVector (dim v) + fun (fromEnum code) // vec v // vec r // check "vectorMapAux" [v] + return r + +vectorMapValAux fun code val v = unsafePerformIO $ do + r <- createVector (dim v) + pval <- newArray [val] + fun (fromEnum code) pval // vec v // vec r // check "vectorMapValAux" [v] + free pval + return r + +vectorZipAux fun code u v = unsafePerformIO $ do + r <- createVector (dim u) + fun (fromEnum code) // vec u // vec v // vec r // check "vectorZipAux" [u,v] + return r + +--------------------------------------------------------------------- + +-- | obtains different functions of a vector: norm1, norm2, max, min, posmax, posmin, etc. +toScalarR :: FunCodeS -> Vector Double -> Double +toScalarR oper = toScalarAux c_toScalarR (fromEnum oper) + +foreign import ccall safe "gsl-aux.h toScalarR" c_toScalarR :: Int -> TVV + +------------------------------------------------------------------ + +-- | map of real vectors with given function +vectorMapR :: FunCodeV -> Vector Double -> Vector Double +vectorMapR = vectorMapAux c_vectorMapR + +foreign import ccall safe "gsl-aux.h mapR" c_vectorMapR :: Int -> TVV + +-- | map of complex vectors with given function +vectorMapC :: FunCodeV -> Vector (Complex Double) -> Vector (Complex Double) +vectorMapC oper = vectorMapAux c_vectorMapC (fromEnum oper) + +foreign import ccall safe "gsl-aux.h mapC" c_vectorMapC :: Int -> TCVCV + +------------------------------------------------------------------- + +-- | map of real vectors with given function +vectorMapValR :: FunCodeSV -> Double -> Vector Double -> Vector Double +vectorMapValR oper = vectorMapValAux c_vectorMapValR (fromEnum oper) + +foreign import ccall safe "gsl-aux.h mapValR" c_vectorMapValR :: Int -> Ptr Double -> TVV + +-- | map of complex vectors with given function +vectorMapValC :: FunCodeSV -> Complex Double -> Vector (Complex Double) -> Vector (Complex Double) +vectorMapValC = vectorMapValAux c_vectorMapValC + +foreign import ccall safe "gsl-aux.h mapValC" c_vectorMapValC :: Int -> Ptr (Complex Double) -> TCVCV + +------------------------------------------------------------------- + +-- | elementwise operation on real vectors +vectorZipR :: FunCodeVV -> Vector Double -> Vector Double -> Vector Double +vectorZipR = vectorZipAux c_vectorZipR + +foreign import ccall safe "gsl-aux.h zipR" c_vectorZipR :: Int -> TVVV + +-- | elementwise operation on complex vectors +vectorZipC :: FunCodeVV -> Vector (Complex Double) -> Vector (Complex Double) -> Vector (Complex Double) +vectorZipC = vectorZipAux c_vectorZipC + +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 @@ +#include "gsl-aux.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define MACRO(B) do {B} while (0) +#define ERROR(CODE) MACRO(return CODE;) +#define REQUIRES(COND, CODE) MACRO(if(!(COND)) {ERROR(CODE);}) +#define OK return 0; + +#define MIN(A,B) ((A)<(B)?(A):(B)) +#define MAX(A,B) ((A)>(B)?(A):(B)) + +#ifdef DBG +#define DEBUGMSG(M) printf("*** calling aux C function: %s\n",M); +#else +#define DEBUGMSG(M) +#endif + +#define CHECK(RES,CODE) MACRO(if(RES) return CODE;) + +#ifdef DBG +#define DEBUGMAT(MSG,X) printf(MSG" = \n"); gsl_matrix_fprintf(stdout,X,"%f"); printf("\n"); +#else +#define DEBUGMAT(MSG,X) +#endif + +#ifdef DBG +#define DEBUGVEC(MSG,X) printf(MSG" = \n"); gsl_vector_fprintf(stdout,X,"%f"); printf("\n"); +#else +#define DEBUGVEC(MSG,X) +#endif + +#define DVVIEW(A) gsl_vector_view A = gsl_vector_view_array(A##p,A##n) +#define DMVIEW(A) gsl_matrix_view A = gsl_matrix_view_array(A##p,A##r,A##c) +#define CVVIEW(A) gsl_vector_complex_view A = gsl_vector_complex_view_array((double*)A##p,A##n) +#define CMVIEW(A) gsl_matrix_complex_view A = gsl_matrix_complex_view_array((double*)A##p,A##r,A##c) +#define KDVVIEW(A) gsl_vector_const_view A = gsl_vector_const_view_array(A##p,A##n) +#define KDMVIEW(A) gsl_matrix_const_view A = gsl_matrix_const_view_array(A##p,A##r,A##c) +#define KCVVIEW(A) gsl_vector_complex_const_view A = gsl_vector_complex_const_view_array((double*)A##p,A##n) +#define KCMVIEW(A) gsl_matrix_complex_const_view A = gsl_matrix_complex_const_view_array((double*)A##p,A##r,A##c) + +#define V(a) (&a.vector) +#define M(a) (&a.matrix) + +#define GCVEC(A) int A##n, gsl_complex*A##p +#define KGCVEC(A) int A##n, const gsl_complex*A##p + +#define BAD_SIZE 2000 +#define BAD_CODE 2001 +#define MEM 2002 +#define BAD_FILE 2003 + + +void no_abort_on_error() { + gsl_set_error_handler_off(); +} + + +int toScalarR(int code, KRVEC(x), RVEC(r)) { + REQUIRES(rn==1,BAD_SIZE); + DEBUGMSG("toScalarR"); + KDVVIEW(x); + double res; + switch(code) { + case 0: { res = gsl_blas_dnrm2(V(x)); break; } + case 1: { res = gsl_blas_dasum(V(x)); break; } + case 2: { res = gsl_vector_max_index(V(x)); break; } + case 3: { res = gsl_vector_max(V(x)); break; } + case 4: { res = gsl_vector_min_index(V(x)); break; } + case 5: { res = gsl_vector_min(V(x)); break; } + default: ERROR(BAD_CODE); + } + rp[0] = res; + OK +} + + +inline double sign(double x) { + if(x>0) { + return +1.0; + } else if (x<0) { + return -1.0; + } else { + return 0.0; + } +} + + +#define OP(C,F) case C: { for(k=0;k1,BAD_SIZE); + gsl_poly_complex_workspace * w = gsl_poly_complex_workspace_alloc (an); + int res = gsl_poly_complex_solve ((double*)ap, an, w, (double*)zp); + CHECK(res,res); + gsl_poly_complex_workspace_free (w); + OK; +} + +int matrix_fscanf(char*filename, RMAT(a)) { + DEBUGMSG("gsl_matrix_fscanf"); + //printf(filename); printf("\n"); + DMVIEW(a); + FILE * f = fopen(filename,"r"); + CHECK(!f,BAD_FILE); + int res = gsl_matrix_fscanf(f, M(a)); + CHECK(res,res); + fclose (f); + OK +} + +//--------------------------------------------------------------- + +typedef double Trawfun(int, double*); + +double only_f_aux_min(const gsl_vector*x, void *pars) { + Trawfun * f = (Trawfun*) pars; + double* p = (double*)calloc(x->size,sizeof(double)); + int k; + for(k=0;ksize;k++) { + p[k] = gsl_vector_get(x,k); + } + double res = f(x->size,p); + free(p); + return res; +} + +// this version returns info about intermediate steps +int minimize(double f(int, double*), double tolsize, int maxit, + KRVEC(xi), KRVEC(sz), RMAT(sol)) { + REQUIRES(xin==szn && solr == maxit && solc == 3+xin,BAD_SIZE); + DEBUGMSG("minimizeList (nmsimplex)"); + gsl_multimin_function my_func; + // extract function from pars + my_func.f = only_f_aux_min; + my_func.n = xin; + my_func.params = f; + size_t iter = 0; + int status; + double size; + const gsl_multimin_fminimizer_type *T; + gsl_multimin_fminimizer *s = NULL; + // Initial vertex size vector + KDVVIEW(sz); + // Starting point + KDVVIEW(xi); + // Minimizer nmsimplex, without derivatives + T = gsl_multimin_fminimizer_nmsimplex; + s = gsl_multimin_fminimizer_alloc (T, my_func.n); + gsl_multimin_fminimizer_set (s, &my_func, V(xi), V(sz)); + do { + status = gsl_multimin_fminimizer_iterate (s); + size = gsl_multimin_fminimizer_size (s); + + solp[iter*solc+0] = iter; + solp[iter*solc+1] = s->fval; + solp[iter*solc+2] = size; + + int k; + for(k=0;kx,k); + } + status = gsl_multimin_test_size (size, tolsize); + iter++; + } while (status == GSL_CONTINUE && iter < maxit); + int i,j; + for (i=iter; isize,sizeof(double)); + int k; + for(k=0;ksize;k++) { + p[k] = gsl_vector_get(x,k); + } + double res = fdf->f(x->size,p); + free(p); + return res; +} + + +void df_aux_min(const gsl_vector * x, void * pars, gsl_vector * g) { + Tfdf * fdf = ((Tfdf*) pars); + double* p = (double*)calloc(x->size,sizeof(double)); + double* q = (double*)calloc(x->size,sizeof(double)); + int k; + for(k=0;ksize;k++) { + p[k] = gsl_vector_get(x,k); + } + + fdf->df(x->size,p,q); + + for(k=0;ksize;k++) { + gsl_vector_set(g,k,q[k]); + } + free(p); + free(q); +} + +void fdf_aux_min(const gsl_vector * x, void * pars, double * f, gsl_vector * g) { + *f = f_aux_min(x,pars); + df_aux_min(x,pars,g); +} + +// conjugate gradient +int minimizeWithDeriv(double f(int, double*), void df(int, double*, double*), + double initstep, double minimpar, double tolgrad, int maxit, + KRVEC(xi), RMAT(sol)) { + REQUIRES(solr == maxit && solc == 2+xin,BAD_SIZE); + DEBUGMSG("minimizeWithDeriv (conjugate_fr)"); + gsl_multimin_function_fdf my_func; + // extract function from pars + my_func.f = f_aux_min; + my_func.df = df_aux_min; + my_func.fdf = fdf_aux_min; + my_func.n = xin; + Tfdf stfdf; + stfdf.f = f; + stfdf.df = df; + my_func.params = &stfdf; + size_t iter = 0; + int status; + const gsl_multimin_fdfminimizer_type *T; + gsl_multimin_fdfminimizer *s = NULL; + // Starting point + KDVVIEW(xi); + // conjugate gradient fr + T = gsl_multimin_fdfminimizer_conjugate_fr; + s = gsl_multimin_fdfminimizer_alloc (T, my_func.n); + gsl_multimin_fdfminimizer_set (s, &my_func, V(xi), initstep, minimpar); + do { + status = gsl_multimin_fdfminimizer_iterate (s); + solp[iter*solc+0] = iter; + solp[iter*solc+1] = s->f; + int k; + for(k=0;kx,k); + } + status = gsl_multimin_test_gradient (s->gradient, tolgrad); + iter++; + } while (status == GSL_CONTINUE && iter < maxit); + int i,j; + for (i=iter; i + +#define RVEC(A) int A##n, double*A##p +#define RMAT(A) int A##r, int A##c, double* A##p +#define KRVEC(A) int A##n, const double*A##p +#define KRMAT(A) int A##r, int A##c, const double* A##p + +#define CVEC(A) int A##n, gsl_complex*A##p +#define CMAT(A) int A##r, int A##c, gsl_complex* A##p +#define KCVEC(A) int A##n, const gsl_complex*A##p +#define KCMAT(A) int A##r, int A##c, const gsl_complex* A##p + +void no_abort_on_error(); + +int toScalarR(int code, KRVEC(x), RVEC(r)); +/* norm2, absdif, maximum, posmax, etc. */ + +int mapR(int code, KRVEC(x), RVEC(r)); +int mapC(int code, KCVEC(x), CVEC(r)); +/* sin cos tan etc. */ + +int mapValR(int code, double*, KRVEC(x), RVEC(r)); +int mapValC(int code, gsl_complex*, KCVEC(x), CVEC(r)); + +int zipR(int code, KRVEC(a), KRVEC(b), RVEC(r)); +int zipC(int code, KCVEC(a), KCVEC(b), CVEC(r)); + + +int luSolveR(KRMAT(a),KRMAT(b),RMAT(r)); +int luSolveC(KCMAT(a),KCMAT(b),CMAT(r)); +int luRaux(KRMAT(a),RVEC(b)); +int luCaux(KCMAT(a),CVEC(b)); + +int svd(KRMAT(x),RMAT(u), RVEC(s),RMAT(v)); + +int eigensystemR(KRMAT(x),RVEC(l),RMAT(v)); +int eigensystemC(KCMAT(x),RVEC(l),CMAT(v)); + +int QR(KRMAT(x),RMAT(q),RMAT(r)); + +int cholR(KRMAT(x),RMAT(l)); + +int cholC(KCMAT(x),CMAT(l)); + +int fft(int code, KCVEC(a), CVEC(b)); + +int integrate_qng(double f(double, void*), double a, double b, double prec, + double *result, double*error); + +int integrate_qags(double f(double,void*), double a, double b, double prec, int w, + double *result, double* error); + +int polySolve(KRVEC(a), CVEC(z)); + +int minimize(double f(int, double*), double tolsize, int maxit, + KRVEC(xi), KRVEC(sz), RMAT(sol)); + +int minimizeWithDeriv(double f(int, double*), void df(int, double*, double*), + double initstep, double minimpar, double tolgrad, int maxit, + KRVEC(xi), RMAT(sol)); + +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 @@ +----------------------------------------------------------------------------- +{- | +Module : Numeric.LinearAlgebra +Copyright : (c) Alberto Ruiz 2006-7 +License : GPL-style + +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Basic matrix computations implemented by BLAS, LAPACK and GSL. + +-} +----------------------------------------------------------------------------- +module Numeric.LinearAlgebra ( + module Data.Packed, + module Numeric.LinearAlgebra.Linear, + module Numeric.LinearAlgebra.Algorithms, + module Numeric.LinearAlgebra.Instances, + module Numeric.LinearAlgebra.Interface +) where + +import Data.Packed +import Numeric.LinearAlgebra.Linear +import Numeric.LinearAlgebra.Algorithms +import Numeric.LinearAlgebra.Instances +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 @@ +{-# OPTIONS_GHC -fglasgow-exts #-} +----------------------------------------------------------------------------- +{- | +Module : Numeric.LinearAlgebra.Algorithms +Copyright : (c) Alberto Ruiz 2006-7 +License : GPL-style + +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +A generic interface for a number of essential functions. Using it some higher level algorithms +and testing properties can be written for both real and complex matrices. + +In any case, the specific functions for particular base types can also be explicitly +imported from the LAPACK and GSL.Matrix modules. + +-} +----------------------------------------------------------------------------- + +module Numeric.LinearAlgebra.Algorithms ( +-- * Linear Systems + linearSolve, + inv, pinv, + pinvTol, det, +-- * Matrix factorizations +-- ** Singular value decomposition + svd, + full, economy, +-- ** Eigensystems + eig, eigSH, +-- ** Other + Numeric.LinearAlgebra.Algorithms.qr, chol, +-- * Nullspace + nullspacePrec, + nullVector, +-- * Misc + eps, i, + ctrans, + Normed(..), NormType(..), + GenMat(linearSolveSVD,lu,eigSH') +) where + + +import Data.Packed.Internal hiding (fromComplex, toComplex, comp, conj) +import Data.Packed +import Numeric.GSL.Matrix(luR,luC,qr) +import Numeric.GSL.Vector +import Numeric.LinearAlgebra.LAPACK as LAPACK +import Complex +import Numeric.LinearAlgebra.Linear + +-- | Auxiliary typeclass used to define generic computations for both real and complex matrices. +class (Linear Matrix t) => GenMat t where + svd :: Matrix t -> (Matrix t, Vector Double, Matrix t) + lu :: Matrix t -> (Matrix t, Matrix t, [Int], t) + linearSolve :: Matrix t -> Matrix t -> Matrix t + linearSolveSVD :: Matrix t -> Matrix t -> Matrix t + eig :: Matrix t -> (Vector (Complex Double), Matrix (Complex Double)) + eigSH' :: Matrix t -> (Vector Double, Matrix t) + cholSH :: Matrix t -> Matrix t + -- | conjugate transpose + ctrans :: Matrix t -> Matrix t + +instance GenMat Double where + svd = svdR + lu = luR + linearSolve = linearSolveR + linearSolveSVD = linearSolveSVDR Nothing + ctrans = trans + eig = eigR + eigSH' = eigS + cholSH = cholS + +instance GenMat (Complex Double) where + svd = svdC + lu = luC + linearSolve = linearSolveC + linearSolveSVD = linearSolveSVDC Nothing + ctrans = conjTrans + eig = eigC + eigSH' = eigH + cholSH = cholH + +-- | eigensystem of complex hermitian or real symmetric matrix +eigSH :: GenMat t => Matrix t -> (Vector Double, Matrix t) +eigSH m | m `equal` ctrans m = eigSH' m + | otherwise = error "eigSH requires complex hermitian or real symmetric matrix" + +-- | Cholesky factorization of a positive definite hermitian or symmetric matrix +chol :: GenMat t => Matrix t -> Matrix t +chol m | m `equal` ctrans m = cholSH m + | otherwise = error "chol requires positive definite complex hermitian or real symmetric matrix" + +qr :: Matrix Double -> (Matrix Double, Matrix Double) +qr = Numeric.GSL.Matrix.qr + +square m = rows m == cols m + +det :: GenMat t => Matrix t -> t +det m | square m = s * (product $ toList $ takeDiag $ u) + | otherwise = error "det of nonsquare matrix" + where (_,u,_,s) = lu m + +inv :: GenMat t => Matrix t -> Matrix t +inv m | square m = m `linearSolve` ident (rows m) + | otherwise = error "inv of nonsquare matrix" + +pinv :: GenMat t => Matrix t -> Matrix t +pinv m = linearSolveSVD m (ident (rows m)) + +full :: Field t + => (Matrix t -> (Matrix t, Vector Double, Matrix t)) -> Matrix t -> (Matrix t, Matrix Double, Matrix t) +full svd m = (u, d ,v) where + (u,s,v) = svd m + d = diagRect s r c + r = rows m + c = cols m + +economy :: Field t + => (Matrix t -> (Matrix t, Vector Double, Matrix t)) -> Matrix t -> (Matrix t, Vector Double, Matrix t) +economy svd m = (u', subVector 0 d s, v') where + (u,s,v) = svd m + sl@(g:_) = toList (complex s) + s' = fromList . filter rec $ sl + rec x = magnitude x > magnitude g*tol + t = 1 + tol = (fromIntegral (max (rows m) (cols m)) * magnitude g * t * eps) + r = rows m + c = cols m + d = dim s' + u' = takeColumns d u + v' = takeColumns d v + + +-- | The machine precision of a Double: @eps == 2.22044604925031e-16@ (the value used by GNU-Octave). +eps :: Double +eps = 2.22044604925031e-16 + +-- | The imaginary unit: @i == 0.0 :+ 1.0@ +i :: Complex Double +i = 0:+1 + + +-- | matrix product +mXm :: (Num t, GenMat t) => Matrix t -> Matrix t -> Matrix t +mXm = multiply + +-- | matrix - vector product +mXv :: (Num t, GenMat t) => Matrix t -> Vector t -> Vector t +mXv m v = flatten $ m `mXm` (asColumn v) + +-- | vector - matrix product +vXm :: (Num t, GenMat t) => Vector t -> Matrix t -> Vector t +vXm v m = flatten $ (asRow v) `mXm` m + + +--------------------------------------------------------------------------- + +norm2 :: Vector Double -> Double +norm2 = toScalarR Norm2 + +norm1 :: Vector Double -> Double +norm1 = toScalarR AbsSum + +data NormType = Infinity | PNorm1 | PNorm2 -- PNorm Int + +pnormRV PNorm2 = norm2 +pnormRV PNorm1 = norm1 +pnormRV Infinity = vectorMax . vectorMapR Abs +--pnormRV _ = error "pnormRV not yet defined" + +pnormCV PNorm2 = norm2 . asReal +pnormCV PNorm1 = norm1 . liftVector magnitude +pnormCV Infinity = vectorMax . liftVector magnitude +--pnormCV _ = error "pnormCV not yet defined" + +pnormRM PNorm2 m = head (toList s) where (_,s,_) = svdR m +pnormRM PNorm1 m = vectorMax $ constant 1 (rows m) `vXm` liftMatrix (vectorMapR Abs) m +pnormRM Infinity m = vectorMax $ liftMatrix (vectorMapR Abs) m `mXv` constant 1 (cols m) +--pnormRM _ _ = error "p norm not yet defined" + +pnormCM PNorm2 m = head (toList s) where (_,s,_) = svdC m +pnormCM PNorm1 m = vectorMax $ constant 1 (rows m) `vXm` liftMatrix (liftVector magnitude) m +pnormCM Infinity m = vectorMax $ liftMatrix (liftVector magnitude) m `mXv` constant 1 (cols m) +--pnormCM _ _ = error "p norm not yet defined" + +-- -- | computes the p-norm of a matrix or vector (with the same definitions as GNU-octave). pnorm 0 denotes \\inf-norm. See also 'norm'. +--pnorm :: (Container t, GenMat a) => Int -> t a -> Double +--pnorm = pnormG + +class Normed t where + pnorm :: NormType -> t -> Double + norm :: t -> Double + norm = pnorm PNorm2 + +instance Normed (Vector Double) where + pnorm = pnormRV + +instance Normed (Vector (Complex Double)) where + pnorm = pnormCV + +instance Normed (Matrix Double) where + pnorm = pnormRM + +instance Normed (Matrix (Complex Double)) where + pnorm = pnormCM + +----------------------------------------------------------------------- + +-- | The nullspace of a matrix from its SVD decomposition. +nullspacePrec :: GenMat t + => Double -- ^ relative tolerance in 'eps' units + -> Matrix t -- ^ input matrix + -> [Vector t] -- ^ list of unitary vectors spanning the nullspace +nullspacePrec t m = ns where + (_,s,v) = svd m + sl@(g:_) = toList s + tol = (fromIntegral (max (rows m) (cols m)) * g * t * eps) + rank = length (filter (> g*tol) sl) +-- ns = drop rank (toColumns v) + ns = drop rank $ toRows $ ctrans v + +-- | The nullspace of a matrix, assumed to be one-dimensional, with default tolerance (shortcut for @last . nullspacePrec 1@). +nullVector :: GenMat t => Matrix t -> Vector t +nullVector = last . nullspacePrec 1 + +------------------------------------------------------------------------ + +{- Pseudoinverse of a real matrix with the desired tolerance, expressed as a +multiplicative factor of the default tolerance used by GNU-Octave (see 'pinv'). + +@\> let m = 'fromLists' [[1,0, 0] + ,[0,1, 0] + ,[0,0,1e-10]] +\ +\> 'pinv' m +1. 0. 0. +0. 1. 0. +0. 0. 10000000000. +\ +\> pinvTol 1E8 m +1. 0. 0. +0. 1. 0. +0. 0. 1.@ + +-} +--pinvTol :: Double -> Matrix Double -> Matrix Double +pinvTol t m = v' `mXm` diag s' `mXm` trans u' where + (u,s,v) = svdR m + sl@(g:_) = toList s + s' = fromList . map rec $ sl + rec x = if x < g*tol then 1 else 1/x + tol = (fromIntegral (max (rows m) (cols m)) * g * t * eps) + r = rows m + c = cols m + d = dim s + u' = takeColumns d u + 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 @@ +{-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances #-} +----------------------------------------------------------------------------- +{- | +Module : Numeric.LinearAlgebra.Instances +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style + +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : portable + +Numeric instances for Vector and Matrix. + +In the context of the standard numeric operators, one-component vectors and matrices automatically expand to match the dimensions of the other operand. + +-} +----------------------------------------------------------------------------- + +module Numeric.LinearAlgebra.Instances( +) where + +import Numeric.LinearAlgebra.Linear +import Numeric.GSL.Vector +import Data.Packed.Matrix +import Data.Packed.Vector +import Complex + +adaptScalar f1 f2 f3 x y + | dim x == 1 = f1 (x@>0) y + | dim y == 1 = f3 x (y@>0) + | otherwise = f2 x y + +liftMatrix2' :: (Field t, Field a, Field b) => (Vector a -> Vector b -> Vector t) -> Matrix a -> Matrix b -> Matrix t +liftMatrix2' f m1 m2 | compat' m1 m2 = reshape (max (cols m1) (cols m2)) (f (flatten m1) (flatten m2)) + | otherwise = error "nonconformant matrices in liftMatrix2'" + +compat' :: Matrix a -> Matrix b -> Bool +compat' m1 m2 = rows m1 == 1 && cols m1 == 1 + || rows m2 == 1 && cols m2 == 1 + || rows m1 == rows m2 && cols m1 == cols m2 + +instance (Eq a, Field a) => Eq (Vector a) where + a == b = dim a == dim b && toList a == toList b + +instance (Linear Vector a) => Num (Vector a) where + (+) = adaptScalar addConstant add (flip addConstant) + negate = scale (-1) + (*) = adaptScalar scale mul (flip scale) + signum = liftVector signum + abs = liftVector abs + fromInteger = fromList . return . fromInteger + +instance (Eq a, Field a) => Eq (Matrix a) where + a == b = cols a == cols b && flatten a == flatten b + +instance (Linear Vector a) => Num (Matrix a) where + (+) = liftMatrix2' (+) + (-) = liftMatrix2' (-) + negate = liftMatrix negate + (*) = liftMatrix2' (*) + signum = liftMatrix signum + abs = liftMatrix abs + fromInteger = (1><1) . return . fromInteger + +--------------------------------------------------- + +instance (Linear Vector a) => Fractional (Vector a) where + fromRational n = fromList [fromRational n] + (/) = adaptScalar f divide g where + r `f` v = scaleRecip r v + v `g` r = scale (recip r) v + +------------------------------------------------------- + +instance (Linear Vector a, Fractional (Vector a)) => Fractional (Matrix a) where + fromRational n = (1><1) [fromRational n] + (/) = liftMatrix2' (/) + +--------------------------------------------------------- + +instance Floating (Vector Double) where + sin = vectorMapR Sin + cos = vectorMapR Cos + tan = vectorMapR Tan + asin = vectorMapR ASin + acos = vectorMapR ACos + atan = vectorMapR ATan + sinh = vectorMapR Sinh + cosh = vectorMapR Cosh + tanh = vectorMapR Tanh + asinh = vectorMapR ASinh + acosh = vectorMapR ACosh + atanh = vectorMapR ATanh + exp = vectorMapR Exp + log = vectorMapR Log + sqrt = vectorMapR Sqrt + (**) = adaptScalar (vectorMapValR PowSV) (vectorZipR Pow) (flip (vectorMapValR PowVS)) + pi = fromList [pi] + +------------------------------------------------------------- + +instance Floating (Vector (Complex Double)) where + sin = vectorMapC Sin + cos = vectorMapC Cos + tan = vectorMapC Tan + asin = vectorMapC ASin + acos = vectorMapC ACos + atan = vectorMapC ATan + sinh = vectorMapC Sinh + cosh = vectorMapC Cosh + tanh = vectorMapC Tanh + asinh = vectorMapC ASinh + acosh = vectorMapC ACosh + atanh = vectorMapC ATanh + exp = vectorMapC Exp + log = vectorMapC Log + sqrt = vectorMapC Sqrt + (**) = adaptScalar (vectorMapValC PowSV) (vectorZipC Pow) (flip (vectorMapValC PowVS)) + pi = fromList [pi] + +----------------------------------------------------------- + +instance (Linear Vector a, Floating (Vector a)) => Floating (Matrix a) where + sin = liftMatrix sin + cos = liftMatrix cos + tan = liftMatrix tan + asin = liftMatrix asin + acos = liftMatrix acos + atan = liftMatrix atan + sinh = liftMatrix sinh + cosh = liftMatrix cosh + tanh = liftMatrix tanh + asinh = liftMatrix asinh + acosh = liftMatrix acosh + atanh = liftMatrix atanh + exp = liftMatrix exp + log = liftMatrix log + (**) = liftMatrix2' (**) + sqrt = liftMatrix sqrt + 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 @@ +{-# OPTIONS_GHC -fglasgow-exts #-} +----------------------------------------------------------------------------- +{- | +Module : Numeric.LinearAlgebra.Interface +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style + +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : portable + +Operators for frequent operations. + +-} +----------------------------------------------------------------------------- + +module Numeric.LinearAlgebra.Interface( + (<>),(<.>), + (<\>), + (.*),(*/), + (<|>),(<->), +) where + +import Numeric.LinearAlgebra.Linear +import Data.Packed.Vector +import Data.Packed.Matrix +import Numeric.LinearAlgebra.Algorithms + +class Mul a b c | a b -> c where + infixl 7 <> + -- | matrix product + (<>) :: Field t => a t -> b t -> c t + +instance Mul Matrix Matrix Matrix where + (<>) = multiply + +instance Mul Matrix Vector Vector where + (<>) m v = flatten $ m <> (asColumn v) + +instance Mul Vector Matrix Vector where + (<>) v m = flatten $ (asRow v) <> m + +--------------------------------------------------- + +-- | @u \<.\> v = dot u v@ +(<.>) :: (Field t) => Vector t -> Vector t -> t +infixl 7 <.> +(<.>) = dot + +---------------------------------------------------- + +-- | @x .* a = scale x a@ +(.*) :: (Linear c a) => a -> c a -> c a +infixl 7 .* +a .* x = scale a x + +---------------------------------------------------- + +-- | @a *\/ x = scale (recip x) a@ +(*/) :: (Linear c a) => c a -> a -> c a +infixl 7 */ +v */ x = scale (recip x) v + +-- | least squares solution of a linear system, similar to the \\ operator of Matlab\/Octave (based on linearSolveSVD). +(<\>) :: (GenMat a) => Matrix a -> Vector a -> Vector a +infixl 7 <\> +m <\> v = flatten (linearSolveSVD m (reshape 1 v)) + +------------------------------------------------ + +class Joinable a b where + joinH :: Field t => a t -> b t -> Matrix t + joinV :: Field t => a t -> b t -> Matrix t + +instance Joinable Matrix Matrix where + joinH m1 m2 = fromBlocks [[m1,m2]] + joinV m1 m2 = fromBlocks [[m1],[m2]] + +instance Joinable Matrix Vector where + joinH m v = joinH m (asColumn v) + joinV m v = joinV m (asRow v) + +instance Joinable Vector Matrix where + joinH v m = joinH (asColumn v) m + joinV v m = joinV (asRow v) m + +infixl 4 <|> +infixl 3 <-> + +{- | Horizontal concatenation of matrices and vectors: + +@> (ident 3 \<-\> 3 * ident 3) \<|\> fromList [1..6.0] +(6><4) + [ 1.0, 0.0, 0.0, 1.0 + , 0.0, 1.0, 0.0, 2.0 + , 0.0, 0.0, 1.0, 3.0 + , 3.0, 0.0, 0.0, 4.0 + , 0.0, 3.0, 0.0, 5.0 + , 0.0, 0.0, 3.0, 6.0 ]@ +-} +(<|>) :: (Field t, Joinable a b) => a t -> b t -> Matrix t +a <|> b = joinH a b + +-- | Vertical concatenation of matrices and vectors. +(<->) :: (Field t, Joinable a b) => a t -> b t -> Matrix t +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 @@ +{-# OPTIONS_GHC -fglasgow-exts #-} +----------------------------------------------------------------------------- +-- | +-- Module : Numeric.LinearAlgebra.LAPACK +-- Copyright : (c) Alberto Ruiz 2006-7 +-- License : GPL-style +-- +-- Maintainer : Alberto Ruiz (aruiz at um dot es) +-- Stability : provisional +-- Portability : portable (uses FFI) +-- +-- Wrappers for a few LAPACK functions (). +-- +----------------------------------------------------------------------------- + +module Numeric.LinearAlgebra.LAPACK ( + svdR, svdRdd, svdC, + eigC, eigR, eigS, eigH, eigS', eigH', + linearSolveR, linearSolveC, + linearSolveLSR, linearSolveLSC, + linearSolveSVDR, linearSolveSVDC, + cholS, cholH, + qrR, qrC +) where + +import Data.Packed.Internal +import Data.Packed.Internal.Vector +import Data.Packed.Internal.Matrix +import Data.Packed.Vector +import Data.Packed.Matrix +import Numeric.GSL.Vector(vectorMapValR, FunCodeSV(Scale)) +import Complex +import Foreign + +----------------------------------------------------------------------------- +foreign import ccall "LAPACK/lapack-aux.h svd_l_R" dgesvd :: TMMVM + +-- | Wrapper for LAPACK's /dgesvd/, which computes the full svd decomposition of a real matrix. +-- +-- @(u,s,v)=full svdR m@ so that @m=u \<\> s \<\> 'trans' v@. +svdR :: Matrix Double -> (Matrix Double, Vector Double, Matrix Double) +svdR x = unsafePerformIO $ do + u <- createMatrix ColumnMajor r r + s <- createVector (min r c) + v <- createMatrix ColumnMajor c c + dgesvd // mat fdat x // mat dat u // vec s // mat dat v // check "svdR" [fdat x] + return (u,s,trans v) + where r = rows x + c = cols x +----------------------------------------------------------------------------- +foreign import ccall "LAPACK/lapack-aux.h svd_l_Rdd" dgesdd :: TMMVM + +-- | Wrapper for LAPACK's /dgesvd/, which computes the full svd decomposition of a real matrix. +-- +-- @(u,s,v)=full svdRdd m@ so that @m=u \<\> s \<\> 'trans' v@. +svdRdd :: Matrix Double -> (Matrix Double, Vector Double, Matrix Double) +svdRdd x = unsafePerformIO $ do + u <- createMatrix ColumnMajor r r + s <- createVector (min r c) + v <- createMatrix ColumnMajor c c + dgesdd // mat fdat x // mat dat u // vec s // mat dat v // check "svdRdd" [fdat x] + return (u,s,trans v) + where r = rows x + c = cols x + +----------------------------------------------------------------------------- +foreign import ccall "LAPACK/lapack-aux.h svd_l_C" zgesvd :: TCMCMVCM + +-- | Wrapper for LAPACK's /zgesvd/, which computes the full svd decomposition of a complex matrix. +-- +-- @(u,s,v)=full svdC m@ so that @m=u \<\> comp s \<\> 'trans' v@. +svdC :: Matrix (Complex Double) -> (Matrix (Complex Double), Vector Double, Matrix (Complex Double)) +svdC x = unsafePerformIO $ do + u <- createMatrix ColumnMajor r r + s <- createVector (min r c) + v <- createMatrix ColumnMajor c c + zgesvd // mat fdat x // mat dat u // vec s // mat dat v // check "svdC" [fdat x] + return (u,s,trans v) + where r = rows x + c = cols x + + +----------------------------------------------------------------------------- +foreign import ccall "LAPACK/lapack-aux.h eig_l_C" zgeev :: TCMCMCVCM + +-- | Wrapper for LAPACK's /zgeev/, which computes the eigenvalues and right eigenvectors of a general complex matrix: +-- +-- if @(l,v)=eigC m@ then @m \<\> v = v \<\> diag l@. +-- +-- The eigenvectors are the columns of v. +-- The eigenvalues are not sorted. +eigC :: Matrix (Complex Double) -> (Vector (Complex Double), Matrix (Complex Double)) +eigC m + | r == 1 = (fromList [cdat m `at` 0], singleton 1) + | otherwise = unsafePerformIO $ do + l <- createVector r + v <- createMatrix ColumnMajor r r + dummy <- createMatrix ColumnMajor 1 1 + zgeev // mat fdat m // mat dat dummy // vec l // mat dat v // check "eigC" [fdat m] + return (l,v) + where r = rows m + +----------------------------------------------------------------------------- +foreign import ccall "LAPACK/lapack-aux.h eig_l_R" dgeev :: TMMCVM + +-- | Wrapper for LAPACK's /dgeev/, which computes the eigenvalues and right eigenvectors of a general real matrix: +-- +-- if @(l,v)=eigR m@ then @m \<\> v = v \<\> diag l@. +-- +-- The eigenvectors are the columns of v. +-- The eigenvalues are not sorted. +eigR :: Matrix Double -> (Vector (Complex Double), Matrix (Complex Double)) +eigR m = (s', v'') + where (s,v) = eigRaux m + s' = toComplex (subVector 0 r (asReal s), subVector r r (asReal s)) + v' = toRows $ trans v + v'' = fromColumns $ fixeig (toList s') v' + r = rows m + +eigRaux :: Matrix Double -> (Vector (Complex Double), Matrix Double) +eigRaux m + | r == 1 = (fromList [(cdat m `at` 0):+0], singleton 1) + | otherwise = unsafePerformIO $ do + l <- createVector r + v <- createMatrix ColumnMajor r r + dummy <- createMatrix ColumnMajor 1 1 + dgeev // mat fdat m // mat dat dummy // vec l // mat dat v // check "eigR" [fdat m] + return (l,v) + where r = rows m + +fixeig [] _ = [] +fixeig [r] [v] = [comp v] +fixeig ((r1:+i1):(r2:+i2):r) (v1:v2:vs) + | r1 == r2 && i1 == (-i2) = toComplex (v1,v2) : toComplex (v1,scale (-1) v2) : fixeig r vs + | otherwise = comp v1 : fixeig ((r2:+i2):r) (v2:vs) + where scale = vectorMapValR Scale + +----------------------------------------------------------------------------- +foreign import ccall "LAPACK/lapack-aux.h eig_l_S" dsyev :: TMVM + +-- | Wrapper for LAPACK's /dsyev/, which computes the eigenvalues and right eigenvectors of a symmetric real matrix: +-- +-- if @(l,v)=eigSl m@ then @m \<\> v = v \<\> diag l@. +-- +-- The eigenvectors are the columns of v. +-- The eigenvalues are sorted in descending order (use eigS' for ascending order). +eigS :: Matrix Double -> (Vector Double, Matrix Double) +eigS m = (s', fliprl v) + where (s,v) = eigS' m + s' = fromList . reverse . toList $ s + +eigS' m + | r == 1 = (fromList [cdat m `at` 0], singleton 1) + | otherwise = unsafePerformIO $ do + l <- createVector r + v <- createMatrix ColumnMajor r r + dsyev // mat fdat m // vec l // mat dat v // check "eigS" [fdat m] + return (l,v) + where r = rows m + +----------------------------------------------------------------------------- +foreign import ccall "LAPACK/lapack-aux.h eig_l_H" zheev :: TCMVCM + +-- | Wrapper for LAPACK's /zheev/, which computes the eigenvalues and right eigenvectors of a hermitian complex matrix: +-- +-- if @(l,v)=eigH m@ then @m \<\> s v = v \<\> diag l@. +-- +-- The eigenvectors are the columns of v. +-- The eigenvalues are sorted in descending order (use eigH' for ascending order). +eigH :: Matrix (Complex Double) -> (Vector Double, Matrix (Complex Double)) +eigH m = (s', fliprl v) + where (s,v) = eigH' m + s' = fromList . reverse . toList $ s + +eigH' m + | r == 1 = (fromList [realPart (cdat m `at` 0)], singleton 1) + | otherwise = unsafePerformIO $ do + l <- createVector r + v <- createMatrix ColumnMajor r r + zheev // mat fdat m // vec l // mat dat v // check "eigH" [fdat m] + return (l,v) + where r = rows m + +----------------------------------------------------------------------------- +foreign import ccall "LAPACK/lapack-aux.h linearSolveR_l" dgesv :: TMMM + +-- | Wrapper for LAPACK's /dgesv/, which solves a general real linear system (for several right-hand sides) internally using the lu decomposition. +linearSolveR :: Matrix Double -> Matrix Double -> Matrix Double +linearSolveR a b + | n1==n2 && n1==r = unsafePerformIO $ do + s <- createMatrix ColumnMajor r c + dgesv // mat fdat a // mat fdat b // mat dat s // check "linearSolveR" [fdat a, fdat b] + return s + | otherwise = error "linearSolveR of nonsquare matrix" + where n1 = rows a + n2 = cols a + r = rows b + c = cols b + +----------------------------------------------------------------------------- +foreign import ccall "LAPACK/lapack-aux.h linearSolveC_l" zgesv :: TCMCMCM + +-- | Wrapper for LAPACK's /zgesv/, which solves a general complex linear system (for several right-hand sides) internally using the lu decomposition. +linearSolveC :: Matrix (Complex Double) -> Matrix (Complex Double) -> Matrix (Complex Double) +linearSolveC a b + | n1==n2 && n1==r = unsafePerformIO $ do + s <- createMatrix ColumnMajor r c + zgesv // mat fdat a // mat fdat b // mat dat s // check "linearSolveC" [fdat a, fdat b] + return s + | otherwise = error "linearSolveC of nonsquare matrix" + where n1 = rows a + n2 = cols a + r = rows b + c = cols b + +----------------------------------------------------------------------------------- +foreign import ccall "LAPACK/lapack-aux.h linearSolveLSR_l" dgels :: TMMM + +-- | 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'. +linearSolveLSR :: Matrix Double -> Matrix Double -> Matrix Double +linearSolveLSR a b = subMatrix (0,0) (cols a, cols b) $ linearSolveLSR_l a b + +linearSolveLSR_l a b = unsafePerformIO $ do + r <- createMatrix ColumnMajor (max m n) nrhs + dgels // mat fdat a // mat fdat b // mat dat r // check "linearSolveLSR" [fdat a, fdat b] + return r + where m = rows a + n = cols a + nrhs = cols b + +----------------------------------------------------------------------------------- +foreign import ccall "LAPACK/lapack-aux.h linearSolveLSC_l" zgels :: TCMCMCM + +-- | 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'. +linearSolveLSC :: Matrix (Complex Double) -> Matrix (Complex Double) -> Matrix (Complex Double) +linearSolveLSC a b = subMatrix (0,0) (cols a, cols b) $ linearSolveLSC_l a b + +linearSolveLSC_l a b = unsafePerformIO $ do + r <- createMatrix ColumnMajor (max m n) nrhs + zgels // mat fdat a // mat fdat b // mat dat r // check "linearSolveLSC" [fdat a, fdat b] + return r + where m = rows a + n = cols a + nrhs = cols b + +----------------------------------------------------------------------------------- +foreign import ccall "LAPACK/lapack-aux.h linearSolveSVDR_l" dgelss :: Double -> TMMM + +-- | 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. +linearSolveSVDR :: Maybe Double -- ^ rcond + -> Matrix Double -- ^ coefficient matrix + -> Matrix Double -- ^ right hand sides (as columns) + -> Matrix Double -- ^ solution vectors (as columns) +linearSolveSVDR (Just rcond) a b = subMatrix (0,0) (cols a, cols b) $ linearSolveSVDR_l rcond a b +linearSolveSVDR Nothing a b = linearSolveSVDR (Just (-1)) a b + +linearSolveSVDR_l rcond a b = unsafePerformIO $ do + r <- createMatrix ColumnMajor (max m n) nrhs + dgelss rcond // mat fdat a // mat fdat b // mat dat r // check "linearSolveSVDR" [fdat a, fdat b] + return r + where m = rows a + n = cols a + nrhs = cols b + +----------------------------------------------------------------------------------- +foreign import ccall "LAPACK/lapack-aux.h linearSolveSVDC_l" zgelss :: Double -> TCMCMCM + +-- | 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. +linearSolveSVDC :: Maybe Double -- ^ rcond + -> Matrix (Complex Double) -- ^ coefficient matrix + -> Matrix (Complex Double) -- ^ right hand sides (as columns) + -> Matrix (Complex Double) -- ^ solution vectors (as columns) +linearSolveSVDC (Just rcond) a b = subMatrix (0,0) (cols a, cols b) $ linearSolveSVDC_l rcond a b +linearSolveSVDC Nothing a b = linearSolveSVDC (Just (-1)) a b + +linearSolveSVDC_l rcond a b = unsafePerformIO $ do + r <- createMatrix ColumnMajor (max m n) nrhs + zgelss rcond // mat fdat a // mat fdat b // mat dat r // check "linearSolveSVDC" [fdat a, fdat b] + return r + where m = rows a + n = cols a + nrhs = cols b + +----------------------------------------------------------------------------------- +foreign import ccall "LAPACK/lapack-aux.h chol_l_H" zpotrf :: TCMCM + +-- | Wrapper for LAPACK's /zpotrf/,which computes the Cholesky factorization of a +-- complex Hermitian positive definite matrix. +cholH :: Matrix (Complex Double) -> Matrix (Complex Double) +cholH a = unsafePerformIO $ do + r <- createMatrix ColumnMajor n n + zpotrf // mat fdat a // mat dat r // check "cholH" [fdat a] + return r + where n = rows a + +----------------------------------------------------------------------------------- +foreign import ccall "LAPACK/lapack-aux.h chol_l_S" dpotrf :: TMM + +-- | Wrapper for LAPACK's /dpotrf/,which computes the Cholesky factorization of a +-- real symmetric positive definite matrix. +cholS :: Matrix Double -> Matrix Double +cholS a = unsafePerformIO $ do + r <- createMatrix ColumnMajor n n + dpotrf // mat fdat a // mat dat r // check "cholS" [fdat a] + return r + where n = rows a + +----------------------------------------------------------------------------------- +foreign import ccall "LAPACK/lapack-aux.h qr_l_R" dgeqr2 :: TMVM + +-- | Wrapper for LAPACK's /dgeqr2/,which computes a QR factorization of a real matrix. +qrR :: Matrix Double -> (Matrix Double, Vector Double) +qrR a = unsafePerformIO $ do + r <- createMatrix ColumnMajor m n + tau <- createVector mn + dgeqr2 // mat fdat a // vec tau // mat dat r // check "qrR" [fdat a] + return (r,tau) + where m = rows a + n = cols a + mn = min m n + +----------------------------------------------------------------------------------- +foreign import ccall "LAPACK/lapack-aux.h qr_l_C" zgeqr2 :: TCMCVCM + +-- | Wrapper for LAPACK's /zgeqr2/,which computes a QR factorization of a complex matrix. +qrC :: Matrix (Complex Double) -> (Matrix (Complex Double), Vector (Complex Double)) +qrC a = unsafePerformIO $ do + r <- createMatrix ColumnMajor m n + tau <- createVector mn + zgeqr2 // mat fdat a // vec tau // mat dat r // check "qrC" [fdat a] + return (r,tau) + where m = rows a + n = cols a + mn = min m n + 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 @@ +#ifndef __CLAPACK_H +#define __CLAPACK_H + +/* Subroutine */ int cbdsqr_(char *uplo, integer *n, integer *ncvt, integer * + nru, integer *ncc, real *d__, real *e, complex *vt, integer *ldvt, + complex *u, integer *ldu, complex *c__, integer *ldc, real *rwork, + integer *info); + +/* Subroutine */ int cgbbrd_(char *vect, integer *m, integer *n, integer *ncc, + integer *kl, integer *ku, complex *ab, integer *ldab, real *d__, + real *e, complex *q, integer *ldq, complex *pt, integer *ldpt, + complex *c__, integer *ldc, complex *work, real *rwork, integer *info); + +/* Subroutine */ int cgbcon_(char *norm, integer *n, integer *kl, integer *ku, + complex *ab, integer *ldab, integer *ipiv, real *anorm, real *rcond, + complex *work, real *rwork, integer *info); + +/* Subroutine */ int cgbequ_(integer *m, integer *n, integer *kl, integer *ku, + complex *ab, integer *ldab, real *r__, real *c__, real *rowcnd, real + *colcnd, real *amax, integer *info); + +/* Subroutine */ int cgbrfs_(char *trans, integer *n, integer *kl, integer * + ku, integer *nrhs, complex *ab, integer *ldab, complex *afb, integer * + ldafb, integer *ipiv, complex *b, integer *ldb, complex *x, integer * + ldx, real *ferr, real *berr, complex *work, real *rwork, integer * + info); + +/* Subroutine */ int cgbsv_(integer *n, integer *kl, integer *ku, integer * + nrhs, complex *ab, integer *ldab, integer *ipiv, complex *b, integer * + ldb, integer *info); + +/* Subroutine */ int cgbsvx_(char *fact, char *trans, integer *n, integer *kl, + integer *ku, integer *nrhs, complex *ab, integer *ldab, complex *afb, + integer *ldafb, integer *ipiv, char *equed, real *r__, real *c__, + complex *b, integer *ldb, complex *x, integer *ldx, real *rcond, real + *ferr, real *berr, complex *work, real *rwork, integer *info); + +/* Subroutine */ int cgbtf2_(integer *m, integer *n, integer *kl, integer *ku, + complex *ab, integer *ldab, integer *ipiv, integer *info); + +/* Subroutine */ int cgbtrf_(integer *m, integer *n, integer *kl, integer *ku, + complex *ab, integer *ldab, integer *ipiv, integer *info); + +/* Subroutine */ int cgbtrs_(char *trans, integer *n, integer *kl, integer * + ku, integer *nrhs, complex *ab, integer *ldab, integer *ipiv, complex + *b, integer *ldb, integer *info); + +/* Subroutine */ int cgebak_(char *job, char *side, integer *n, integer *ilo, + integer *ihi, real *scale, integer *m, complex *v, integer *ldv, + integer *info); + +/* Subroutine */ int cgebal_(char *job, integer *n, complex *a, integer *lda, + integer *ilo, integer *ihi, real *scale, integer *info); + +/* Subroutine */ int cgebd2_(integer *m, integer *n, complex *a, integer *lda, + real *d__, real *e, complex *tauq, complex *taup, complex *work, + integer *info); + +/* Subroutine */ int cgebrd_(integer *m, integer *n, complex *a, integer *lda, + real *d__, real *e, complex *tauq, complex *taup, complex *work, + integer *lwork, integer *info); + +/* Subroutine */ int cgecon_(char *norm, integer *n, complex *a, integer *lda, + real *anorm, real *rcond, complex *work, real *rwork, integer *info); + +/* Subroutine */ int cgeequ_(integer *m, integer *n, complex *a, integer *lda, + real *r__, real *c__, real *rowcnd, real *colcnd, real *amax, + integer *info); + +/* Subroutine */ int cgees_(char *jobvs, char *sort, L_fp select, integer *n, + complex *a, integer *lda, integer *sdim, complex *w, complex *vs, + integer *ldvs, complex *work, integer *lwork, real *rwork, logical * + bwork, integer *info); + +/* Subroutine */ int cgeesx_(char *jobvs, char *sort, L_fp select, char * + sense, integer *n, complex *a, integer *lda, integer *sdim, complex * + w, complex *vs, integer *ldvs, real *rconde, real *rcondv, complex * + work, integer *lwork, real *rwork, logical *bwork, integer *info); + +/* Subroutine */ int cgeev_(char *jobvl, char *jobvr, integer *n, complex *a, + integer *lda, complex *w, complex *vl, integer *ldvl, complex *vr, + integer *ldvr, complex *work, integer *lwork, real *rwork, integer * + info); + +/* Subroutine */ int cgeevx_(char *balanc, char *jobvl, char *jobvr, char * + sense, integer *n, complex *a, integer *lda, complex *w, complex *vl, + integer *ldvl, complex *vr, integer *ldvr, integer *ilo, integer *ihi, + real *scale, real *abnrm, real *rconde, real *rcondv, complex *work, + integer *lwork, real *rwork, integer *info); + +/* Subroutine */ int cgegs_(char *jobvsl, char *jobvsr, integer *n, complex * + a, integer *lda, complex *b, integer *ldb, complex *alpha, complex * + beta, complex *vsl, integer *ldvsl, complex *vsr, integer *ldvsr, + complex *work, integer *lwork, real *rwork, integer *info); + +/* Subroutine */ int cgegv_(char *jobvl, char *jobvr, integer *n, complex *a, + integer *lda, complex *b, integer *ldb, complex *alpha, complex *beta, + complex *vl, integer *ldvl, complex *vr, integer *ldvr, complex * + work, integer *lwork, real *rwork, integer *info); + +/* Subroutine */ int cgehd2_(integer *n, integer *ilo, integer *ihi, complex * + a, integer *lda, complex *tau, complex *work, integer *info); + +/* Subroutine */ int cgehrd_(integer *n, integer *ilo, integer *ihi, complex * + a, integer *lda, complex *tau, complex *work, integer *lwork, integer + *info); + +/* Subroutine */ int cgelq2_(integer *m, integer *n, complex *a, integer *lda, + complex *tau, complex *work, integer *info); + +/* Subroutine */ int cgelqf_(integer *m, integer *n, complex *a, integer *lda, + complex *tau, complex *work, integer *lwork, integer *info); + +/* Subroutine */ int cgels_(char *trans, integer *m, integer *n, integer * + nrhs, complex *a, integer *lda, complex *b, integer *ldb, complex * + work, integer *lwork, integer *info); + +/* Subroutine */ int cgelsx_(integer *m, integer *n, integer *nrhs, complex * + a, integer *lda, complex *b, integer *ldb, integer *jpvt, real *rcond, + integer *rank, complex *work, real *rwork, integer *info); + +/* Subroutine */ int cgelsy_(integer *m, integer *n, integer *nrhs, complex * + a, integer *lda, complex *b, integer *ldb, integer *jpvt, real *rcond, + integer *rank, complex *work, integer *lwork, real *rwork, integer * + info); + +/* Subroutine */ int cgeql2_(integer *m, integer *n, complex *a, integer *lda, + complex *tau, complex *work, integer *info); + +/* Subroutine */ int cgeqlf_(integer *m, integer *n, complex *a, integer *lda, + complex *tau, complex *work, integer *lwork, integer *info); + +/* Subroutine */ int cgeqp3_(integer *m, integer *n, complex *a, integer *lda, + integer *jpvt, complex *tau, complex *work, integer *lwork, real * + rwork, integer *info); + +/* Subroutine */ int cgeqpf_(integer *m, integer *n, complex *a, integer *lda, + integer *jpvt, complex *tau, complex *work, real *rwork, integer * + info); + +/* Subroutine */ int cgeqr2_(integer *m, integer *n, complex *a, integer *lda, + complex *tau, complex *work, integer *info); + +/* Subroutine */ int cgeqrf_(integer *m, integer *n, complex *a, integer *lda, + complex *tau, complex *work, integer *lwork, integer *info); + +/* Subroutine */ int cgerfs_(char *trans, integer *n, integer *nrhs, complex * + a, integer *lda, complex *af, integer *ldaf, integer *ipiv, complex * + b, integer *ldb, complex *x, integer *ldx, real *ferr, real *berr, + complex *work, real *rwork, integer *info); + +/* Subroutine */ int cgerq2_(integer *m, integer *n, complex *a, integer *lda, + complex *tau, complex *work, integer *info); + +/* Subroutine */ int cgerqf_(integer *m, integer *n, complex *a, integer *lda, + complex *tau, complex *work, integer *lwork, integer *info); + +/* Subroutine */ int cgesc2_(integer *n, complex *a, integer *lda, complex * + rhs, integer *ipiv, integer *jpiv, real *scale); + +/* Subroutine */ int cgesv_(integer *n, integer *nrhs, complex *a, integer * + lda, integer *ipiv, complex *b, integer *ldb, integer *info); + +/* Subroutine */ int cgesvx_(char *fact, char *trans, integer *n, integer * + nrhs, complex *a, integer *lda, complex *af, integer *ldaf, integer * + ipiv, char *equed, real *r__, real *c__, complex *b, integer *ldb, + complex *x, integer *ldx, real *rcond, real *ferr, real *berr, + complex *work, real *rwork, integer *info); + +/* Subroutine */ int cgetc2_(integer *n, complex *a, integer *lda, integer * + ipiv, integer *jpiv, integer *info); + +/* Subroutine */ int cgetf2_(integer *m, integer *n, complex *a, integer *lda, + integer *ipiv, integer *info); + +/* Subroutine */ int cgetrf_(integer *m, integer *n, complex *a, integer *lda, + integer *ipiv, integer *info); + +/* Subroutine */ int cgetri_(integer *n, complex *a, integer *lda, integer * + ipiv, complex *work, integer *lwork, integer *info); + +/* Subroutine */ int cgetrs_(char *trans, integer *n, integer *nrhs, complex * + a, integer *lda, integer *ipiv, complex *b, integer *ldb, integer * + info); + +/* Subroutine */ int cggbak_(char *job, char *side, integer *n, integer *ilo, + integer *ihi, real *lscale, real *rscale, integer *m, complex *v, + integer *ldv, integer *info); + +/* Subroutine */ int cggbal_(char *job, integer *n, complex *a, integer *lda, + complex *b, integer *ldb, integer *ilo, integer *ihi, real *lscale, + real *rscale, real *work, integer *info); + +/* Subroutine */ int cgges_(char *jobvsl, char *jobvsr, char *sort, L_fp + selctg, integer *n, complex *a, integer *lda, complex *b, integer * + ldb, integer *sdim, complex *alpha, complex *beta, complex *vsl, + integer *ldvsl, complex *vsr, integer *ldvsr, complex *work, integer * + lwork, real *rwork, logical *bwork, integer *info); + +/* Subroutine */ int cggesx_(char *jobvsl, char *jobvsr, char *sort, L_fp + selctg, char *sense, integer *n, complex *a, integer *lda, complex *b, + integer *ldb, integer *sdim, complex *alpha, complex *beta, complex * + vsl, integer *ldvsl, complex *vsr, integer *ldvsr, real *rconde, real + *rcondv, complex *work, integer *lwork, real *rwork, integer *iwork, + integer *liwork, logical *bwork, integer *info); + +/* Subroutine */ int cggev_(char *jobvl, char *jobvr, integer *n, complex *a, + integer *lda, complex *b, integer *ldb, complex *alpha, complex *beta, + complex *vl, integer *ldvl, complex *vr, integer *ldvr, complex * + work, integer *lwork, real *rwork, integer *info); + +/* Subroutine */ int cggevx_(char *balanc, char *jobvl, char *jobvr, char * + sense, integer *n, complex *a, integer *lda, complex *b, integer *ldb, + complex *alpha, complex *beta, complex *vl, integer *ldvl, complex * + vr, integer *ldvr, integer *ilo, integer *ihi, real *lscale, real * + rscale, real *abnrm, real *bbnrm, real *rconde, real *rcondv, complex + *work, integer *lwork, real *rwork, integer *iwork, logical *bwork, + integer *info); + +/* Subroutine */ int cggglm_(integer *n, integer *m, integer *p, complex *a, + integer *lda, complex *b, integer *ldb, complex *d__, complex *x, + complex *y, complex *work, integer *lwork, integer *info); + +/* Subroutine */ int cgghrd_(char *compq, char *compz, integer *n, integer * + ilo, integer *ihi, complex *a, integer *lda, complex *b, integer *ldb, + complex *q, integer *ldq, complex *z__, integer *ldz, integer *info); + +/* Subroutine */ int cgglse_(integer *m, integer *n, integer *p, complex *a, + integer *lda, complex *b, integer *ldb, complex *c__, complex *d__, + complex *x, complex *work, integer *lwork, integer *info); + +/* Subroutine */ int cggqrf_(integer *n, integer *m, integer *p, complex *a, + integer *lda, complex *taua, complex *b, integer *ldb, complex *taub, + complex *work, integer *lwork, integer *info); + +/* Subroutine */ int cggrqf_(integer *m, integer *p, integer *n, complex *a, + integer *lda, complex *taua, complex *b, integer *ldb, complex *taub, + complex *work, integer *lwork, integer *info); + +/* Subroutine */ int cggsvd_(char *jobu, char *jobv, char *jobq, integer *m, + integer *n, integer *p, integer *k, integer *l, complex *a, integer * + lda, complex *b, integer *ldb, real *alpha, real *beta, complex *u, + integer *ldu, complex *v, integer *ldv, complex *q, integer *ldq, + complex *work, real *rwork, integer *iwork, integer *info); + +/* Subroutine */ int cggsvp_(char *jobu, char *jobv, char *jobq, integer *m, + integer *p, integer *n, complex *a, integer *lda, complex *b, integer + *ldb, real *tola, real *tolb, integer *k, integer *l, complex *u, + integer *ldu, complex *v, integer *ldv, complex *q, integer *ldq, + integer *iwork, real *rwork, complex *tau, complex *work, integer * + info); + +/* Subroutine */ int cgtcon_(char *norm, integer *n, complex *dl, complex * + d__, complex *du, complex *du2, integer *ipiv, real *anorm, real * + rcond, complex *work, integer *info); + +/* Subroutine */ int cgtrfs_(char *trans, integer *n, integer *nrhs, complex * + dl, complex *d__, complex *du, complex *dlf, complex *df, complex * + duf, complex *du2, integer *ipiv, complex *b, integer *ldb, complex * + x, integer *ldx, real *ferr, real *berr, complex *work, real *rwork, + integer *info); + +/* Subroutine */ int cgtsv_(integer *n, integer *nrhs, complex *dl, complex * + d__, complex *du, complex *b, integer *ldb, integer *info); + +/* Subroutine */ int cgtsvx_(char *fact, char *trans, integer *n, integer * + nrhs, complex *dl, complex *d__, complex *du, complex *dlf, complex * + df, complex *duf, complex *du2, integer *ipiv, complex *b, integer * + ldb, complex *x, integer *ldx, real *rcond, real *ferr, real *berr, + complex *work, real *rwork, integer *info); + +/* Subroutine */ int cgttrf_(integer *n, complex *dl, complex *d__, complex * + du, complex *du2, integer *ipiv, integer *info); + +/* Subroutine */ int cgttrs_(char *trans, integer *n, integer *nrhs, complex * + dl, complex *d__, complex *du, complex *du2, integer *ipiv, complex * + b, integer *ldb, integer *info); + +/* Subroutine */ int cgtts2_(integer *itrans, integer *n, integer *nrhs, + complex *dl, complex *d__, complex *du, complex *du2, integer *ipiv, + complex *b, integer *ldb); + +/* Subroutine */ int chbev_(char *jobz, char *uplo, integer *n, integer *kd, + complex *ab, integer *ldab, real *w, complex *z__, integer *ldz, + complex *work, real *rwork, integer *info); + +/* Subroutine */ int chbevd_(char *jobz, char *uplo, integer *n, integer *kd, + complex *ab, integer *ldab, real *w, complex *z__, integer *ldz, + complex *work, integer *lwork, real *rwork, integer *lrwork, integer * + iwork, integer *liwork, integer *info); + +/* Subroutine */ int chbevx_(char *jobz, char *range, char *uplo, integer *n, + integer *kd, complex *ab, integer *ldab, complex *q, integer *ldq, + real *vl, real *vu, integer *il, integer *iu, real *abstol, integer * + m, real *w, complex *z__, integer *ldz, complex *work, real *rwork, + integer *iwork, integer *ifail, integer *info); + +/* Subroutine */ int chbgst_(char *vect, char *uplo, integer *n, integer *ka, + integer *kb, complex *ab, integer *ldab, complex *bb, integer *ldbb, + complex *x, integer *ldx, complex *work, real *rwork, integer *info); + +/* Subroutine */ int chbgv_(char *jobz, char *uplo, integer *n, integer *ka, + integer *kb, complex *ab, integer *ldab, complex *bb, integer *ldbb, + real *w, complex *z__, integer *ldz, complex *work, real *rwork, + integer *info); + +/* Subroutine */ int chbgvx_(char *jobz, char *range, char *uplo, integer *n, + integer *ka, integer *kb, complex *ab, integer *ldab, complex *bb, + integer *ldbb, complex *q, integer *ldq, real *vl, real *vu, integer * + il, integer *iu, real *abstol, integer *m, real *w, complex *z__, + integer *ldz, complex *work, real *rwork, integer *iwork, integer * + ifail, integer *info); + +/* Subroutine */ int chbtrd_(char *vect, char *uplo, integer *n, integer *kd, + complex *ab, integer *ldab, real *d__, real *e, complex *q, integer * + ldq, complex *work, integer *info); + +/* Subroutine */ int checon_(char *uplo, integer *n, complex *a, integer *lda, + integer *ipiv, real *anorm, real *rcond, complex *work, integer * + info); + +/* Subroutine */ int cheev_(char *jobz, char *uplo, integer *n, complex *a, + integer *lda, real *w, complex *work, integer *lwork, real *rwork, + integer *info); + +/* Subroutine */ int cheevd_(char *jobz, char *uplo, integer *n, complex *a, + integer *lda, real *w, complex *work, integer *lwork, real *rwork, + integer *lrwork, integer *iwork, integer *liwork, integer *info); + +/* Subroutine */ int cheevr_(char *jobz, char *range, char *uplo, integer *n, + complex *a, integer *lda, real *vl, real *vu, integer *il, integer * + iu, real *abstol, integer *m, real *w, complex *z__, integer *ldz, + integer *isuppz, complex *work, integer *lwork, real *rwork, integer * + lrwork, integer *iwork, integer *liwork, integer *info); + +/* Subroutine */ int cheevx_(char *jobz, char *range, char *uplo, integer *n, + complex *a, integer *lda, real *vl, real *vu, integer *il, integer * + iu, real *abstol, integer *m, real *w, complex *z__, integer *ldz, + complex *work, integer *lwork, real *rwork, integer *iwork, integer * + ifail, integer *info); + +/* Subroutine */ int chegs2_(integer *itype, char *uplo, integer *n, complex * + a, integer *lda, complex *b, integer *ldb, integer *info); + +/* Subroutine */ int chegst_(integer *itype, char *uplo, integer *n, complex * + a, integer *lda, complex *b, integer *ldb, integer *info); + +/* Subroutine */ int chegv_(integer *itype, char *jobz, char *uplo, integer * + n, complex *a, integer *lda, complex *b, integer *ldb, real *w, + complex *work, integer *lwork, real *rwork, integer *info); + +/* Subroutine */ int chegvd_(integer *itype, char *jobz, char *uplo, integer * + n, complex *a, integer *lda, complex *b, integer *ldb, real *w, + complex *work, integer *lwork, real *rwork, integer *lrwork, integer * + iwork, integer *liwork, integer *info); + +/* Subroutine */ int chegvx_(integer *itype, char *jobz, char *range, char * + uplo, integer *n, complex *a, integer *lda, complex *b, integer *ldb, + real *vl, real *vu, integer *il, integer *iu, real *abstol, integer * + m, real *w, complex *z__, integer *ldz, complex *work, integer *lwork, + real *rwork, integer *iwork, integer *ifail, integer *info); + +/* Subroutine */ int cherfs_(char *uplo, integer *n, integer *nrhs, complex * + a, integer *lda, complex *af, integer *ldaf, integer *ipiv, complex * + b, integer *ldb, complex *x, integer *ldx, real *ferr, real *berr, + complex *work, real *rwork, integer *info); + +/* Subroutine */ int chesv_(char *uplo, integer *n, integer *nrhs, complex *a, + integer *lda, integer *ipiv, complex *b, integer *ldb, complex *work, + integer *lwork, integer *info); + +/* Subroutine */ int chesvx_(char *fact, char *uplo, integer *n, integer * + nrhs, complex *a, integer *lda, complex *af, integer *ldaf, integer * + ipiv, complex *b, integer *ldb, complex *x, integer *ldx, real *rcond, + real *ferr, real *berr, complex *work, integer *lwork, real *rwork, + integer *info); + +/* Subroutine */ int chetf2_(char *uplo, integer *n, complex *a, integer *lda, + integer *ipiv, integer *info); + +/* Subroutine */ int chetrd_(char *uplo, integer *n, complex *a, integer *lda, + real *d__, real *e, complex *tau, complex *work, integer *lwork, + integer *info); + +/* Subroutine */ int chetrf_(char *uplo, integer *n, complex *a, integer *lda, + integer *ipiv, complex *work, integer *lwork, integer *info); + +/* Subroutine */ int chetri_(char *uplo, integer *n, complex *a, integer *lda, + integer *ipiv, complex *work, integer *info); + +/* Subroutine */ int chetrs_(char *uplo, integer *n, integer *nrhs, complex * + a, integer *lda, integer *ipiv, complex *b, integer *ldb, integer * + info); + +/* Subroutine */ int chgeqz_(char *job, char *compq, char *compz, integer *n, + integer *ilo, integer *ihi, complex *a, integer *lda, complex *b, + integer *ldb, complex *alpha, complex *beta, complex *q, integer *ldq, + complex *z__, integer *ldz, complex *work, integer *lwork, real * + rwork, integer *info); + +/* Subroutine */ int chpcon_(char *uplo, integer *n, complex *ap, integer * + ipiv, real *anorm, real *rcond, complex *work, integer *info); + +/* Subroutine */ int chpev_(char *jobz, char *uplo, integer *n, complex *ap, + real *w, complex *z__, integer *ldz, complex *work, real *rwork, + integer *info); + +/* Subroutine */ int chpevd_(char *jobz, char *uplo, integer *n, complex *ap, + real *w, complex *z__, integer *ldz, complex *work, integer *lwork, + real *rwork, integer *lrwork, integer *iwork, integer *liwork, + integer *info); + +/* Subroutine */ int chpevx_(char *jobz, char *range, char *uplo, integer *n, + complex *ap, real *vl, real *vu, integer *il, integer *iu, real * + abstol, integer *m, real *w, complex *z__, integer *ldz, complex * + work, real *rwork, integer *iwork, integer *ifail, integer *info); + +/* Subroutine */ int chpgst_(integer *itype, char *uplo, integer *n, complex * + ap, complex *bp, integer *info); + +/* Subroutine */ int chpgv_(integer *itype, char *jobz, char *uplo, integer * + n, complex *ap, complex *bp, real *w, complex *z__, integer *ldz, + complex *work, real *rwork, integer *info); + +/* Subroutine */ int chpgvd_(integer *itype, char *jobz, char *uplo, integer * + n, complex *ap, complex *bp, real *w, complex *z__, integer *ldz, + complex *work, integer *lwork, real *rwork, integer *lrwork, integer * + iwork, integer *liwork, integer *info); + +/* Subroutine */ int chpgvx_(integer *itype, char *jobz, char *range, char * + uplo, integer *n, complex *ap, complex *bp, real *vl, real *vu, + integer *il, integer *iu, real *abstol, integer *m, real *w, complex * + z__, integer *ldz, complex *work, real *rwork, integer *iwork, + integer *ifail, integer *info); + +/* Subroutine */ int chprfs_(char *uplo, integer *n, integer *nrhs, complex * + ap, complex *afp, integer *ipiv, complex *b, integer *ldb, complex *x, + integer *ldx, real *ferr, real *berr, complex *work, real *rwork, + integer *info); + +/* Subroutine */ int chpsv_(char *uplo, integer *n, integer *nrhs, complex * + ap, integer *ipiv, complex *b, integer *ldb, integer *info); + +/* Subroutine */ int chpsvx_(char *fact, char *uplo, integer *n, integer * + nrhs, complex *ap, complex *afp, integer *ipiv, complex *b, integer * + ldb, complex *x, integer *ldx, real *rcond, real *ferr, real *berr, + complex *work, real *rwork, integer *info); + +/* Subroutine */ int chptrd_(char *uplo, integer *n, complex *ap, real *d__, + real *e, complex *tau, integer *info); + +/* Subroutine */ int chptrf_(char *uplo, integer *n, complex *ap, integer * + ipiv, integer *info); + +/* Subroutine */ int chptri_(char *uplo, integer *n, complex *ap, integer * + ipiv, complex *work, integer *info); + +/* Subroutine */ int chptrs_(char *uplo, integer *n, integer *nrhs, complex * + ap, integer *ipiv, complex *b, integer *ldb, integer *info); + +/* Subroutine */ int chsein_(char *side, char *eigsrc, char *initv, logical * + select, integer *n, complex *h__, integer *ldh, complex *w, complex * + vl, integer *ldvl, complex *vr, integer *ldvr, integer *mm, integer * + m, complex *work, real *rwork, integer *ifaill, integer *ifailr, + integer *info); + +/* Subroutine */ int chseqr_(char *job, char *compz, integer *n, integer *ilo, + integer *ihi, complex *h__, integer *ldh, complex *w, complex *z__, + integer *ldz, complex *work, integer *lwork, integer *info); + +/* Subroutine */ int clabrd_(integer *m, integer *n, integer *nb, complex *a, + integer *lda, real *d__, real *e, complex *tauq, complex *taup, + complex *x, integer *ldx, complex *y, integer *ldy); + +/* Subroutine */ int clacgv_(integer *n, complex *x, integer *incx); + +/* Subroutine */ int clacon_(integer *n, complex *v, complex *x, real *est, + integer *kase); + +/* Subroutine */ int clacp2_(char *uplo, integer *m, integer *n, real *a, + integer *lda, complex *b, integer *ldb); + +/* Subroutine */ int clacpy_(char *uplo, integer *m, integer *n, complex *a, + integer *lda, complex *b, integer *ldb); + +/* Subroutine */ int clacrm_(integer *m, integer *n, complex *a, integer *lda, + real *b, integer *ldb, complex *c__, integer *ldc, real *rwork); + +/* Subroutine */ int clacrt_(integer *n, complex *cx, integer *incx, complex * + cy, integer *incy, complex *c__, complex *s); + +/* Subroutine */ int claed0_(integer *qsiz, integer *n, real *d__, real *e, + complex *q, integer *ldq, complex *qstore, integer *ldqs, real *rwork, + integer *iwork, integer *info); + +/* Subroutine */ int claed7_(integer *n, integer *cutpnt, integer *qsiz, + integer *tlvls, integer *curlvl, integer *curpbm, real *d__, complex * + q, integer *ldq, real *rho, integer *indxq, real *qstore, integer * + qptr, integer *prmptr, integer *perm, integer *givptr, integer * + givcol, real *givnum, complex *work, real *rwork, integer *iwork, + integer *info); + +/* Subroutine */ int claed8_(integer *k, integer *n, integer *qsiz, complex * + q, integer *ldq, real *d__, real *rho, integer *cutpnt, real *z__, + real *dlamda, complex *q2, integer *ldq2, real *w, integer *indxp, + integer *indx, integer *indxq, integer *perm, integer *givptr, + integer *givcol, real *givnum, integer *info); + +/* Subroutine */ int claein_(logical *rightv, logical *noinit, integer *n, + complex *h__, integer *ldh, complex *w, complex *v, complex *b, + integer *ldb, real *rwork, real *eps3, real *smlnum, integer *info); + +/* Subroutine */ int claesy_(complex *a, complex *b, complex *c__, complex * + rt1, complex *rt2, complex *evscal, complex *cs1, complex *sn1); + +/* Subroutine */ int claev2_(complex *a, complex *b, complex *c__, real *rt1, + real *rt2, real *cs1, complex *sn1); + +/* Subroutine */ int clags2_(logical *upper, real *a1, complex *a2, real *a3, + real *b1, complex *b2, real *b3, real *csu, complex *snu, real *csv, + complex *snv, real *csq, complex *snq); + +/* Subroutine */ int clagtm_(char *trans, integer *n, integer *nrhs, real * + alpha, complex *dl, complex *d__, complex *du, complex *x, integer * + ldx, real *beta, complex *b, integer *ldb); + +/* Subroutine */ int clahef_(char *uplo, integer *n, integer *nb, integer *kb, + complex *a, integer *lda, integer *ipiv, complex *w, integer *ldw, + integer *info); + +/* Subroutine */ int clahqr_(logical *wantt, logical *wantz, integer *n, + integer *ilo, integer *ihi, complex *h__, integer *ldh, complex *w, + integer *iloz, integer *ihiz, complex *z__, integer *ldz, integer * + info); + +/* Subroutine */ int clahrd_(integer *n, integer *k, integer *nb, complex *a, + integer *lda, complex *tau, complex *t, integer *ldt, complex *y, + integer *ldy); + +/* Subroutine */ int claic1_(integer *job, integer *j, complex *x, real *sest, + complex *w, complex *gamma, real *sestpr, complex *s, complex *c__); + +/* Subroutine */ int clals0_(integer *icompq, integer *nl, integer *nr, + integer *sqre, integer *nrhs, complex *b, integer *ldb, complex *bx, + integer *ldbx, integer *perm, integer *givptr, integer *givcol, + integer *ldgcol, real *givnum, integer *ldgnum, real *poles, real * + difl, real *difr, real *z__, integer *k, real *c__, real *s, real * + rwork, integer *info); + +/* Subroutine */ int clalsa_(integer *icompq, integer *smlsiz, integer *n, + integer *nrhs, complex *b, integer *ldb, complex *bx, integer *ldbx, + real *u, integer *ldu, real *vt, integer *k, real *difl, real *difr, + real *z__, real *poles, integer *givptr, integer *givcol, integer * + ldgcol, integer *perm, real *givnum, real *c__, real *s, real *rwork, + integer *iwork, integer *info); + +/* Subroutine */ int clapll_(integer *n, complex *x, integer *incx, complex * + y, integer *incy, real *ssmin); + +/* Subroutine */ int clapmt_(logical *forwrd, integer *m, integer *n, complex + *x, integer *ldx, integer *k); + +/* Subroutine */ int claqgb_(integer *m, integer *n, integer *kl, integer *ku, + complex *ab, integer *ldab, real *r__, real *c__, real *rowcnd, real + *colcnd, real *amax, char *equed); + +/* Subroutine */ int claqge_(integer *m, integer *n, complex *a, integer *lda, + real *r__, real *c__, real *rowcnd, real *colcnd, real *amax, char * + equed); + +/* Subroutine */ int claqhb_(char *uplo, integer *n, integer *kd, complex *ab, + integer *ldab, real *s, real *scond, real *amax, char *equed); + +/* Subroutine */ int claqhe_(char *uplo, integer *n, complex *a, integer *lda, + real *s, real *scond, real *amax, char *equed); + +/* Subroutine */ int claqhp_(char *uplo, integer *n, complex *ap, real *s, + real *scond, real *amax, char *equed); + +/* Subroutine */ int claqp2_(integer *m, integer *n, integer *offset, complex + *a, integer *lda, integer *jpvt, complex *tau, real *vn1, real *vn2, + complex *work); + +/* Subroutine */ int claqps_(integer *m, integer *n, integer *offset, integer + *nb, integer *kb, complex *a, integer *lda, integer *jpvt, complex * + tau, real *vn1, real *vn2, complex *auxv, complex *f, integer *ldf); + +/* Subroutine */ int claqsb_(char *uplo, integer *n, integer *kd, complex *ab, + integer *ldab, real *s, real *scond, real *amax, char *equed); + +/* Subroutine */ int claqsp_(char *uplo, integer *n, complex *ap, real *s, + real *scond, real *amax, char *equed); + +/* Subroutine */ int claqsy_(char *uplo, integer *n, complex *a, integer *lda, + real *s, real *scond, real *amax, char *equed); + +/* Subroutine */ int clar1v_(integer *n, integer *b1, integer *bn, real * + sigma, real *d__, real *l, real *ld, real *lld, real *gersch, complex + *z__, real *ztz, real *mingma, integer *r__, integer *isuppz, real * + work); + +/* Subroutine */ int clar2v_(integer *n, complex *x, complex *y, complex *z__, + integer *incx, real *c__, complex *s, integer *incc); + +/* Subroutine */ int clarcm_(integer *m, integer *n, real *a, integer *lda, + complex *b, integer *ldb, complex *c__, integer *ldc, real *rwork); + +/* Subroutine */ int clarf_(char *side, integer *m, integer *n, complex *v, + integer *incv, complex *tau, complex *c__, integer *ldc, complex * + work); + +/* Subroutine */ int clarfb_(char *side, char *trans, char *direct, char * + storev, integer *m, integer *n, integer *k, complex *v, integer *ldv, + complex *t, integer *ldt, complex *c__, integer *ldc, complex *work, + integer *ldwork); + +/* Subroutine */ int clarfg_(integer *n, complex *alpha, complex *x, integer * + incx, complex *tau); + +/* Subroutine */ int clarft_(char *direct, char *storev, integer *n, integer * + k, complex *v, integer *ldv, complex *tau, complex *t, integer *ldt); + +/* Subroutine */ int clarfx_(char *side, integer *m, integer *n, complex *v, + complex *tau, complex *c__, integer *ldc, complex *work); + +/* Subroutine */ int clargv_(integer *n, complex *x, integer *incx, complex * + y, integer *incy, real *c__, integer *incc); + +/* Subroutine */ int clarnv_(integer *idist, integer *iseed, integer *n, + complex *x); + +/* Subroutine */ int clarrv_(integer *n, real *d__, real *l, integer *isplit, + integer *m, real *w, integer *iblock, real *gersch, real *tol, + complex *z__, integer *ldz, integer *isuppz, real *work, integer * + iwork, integer *info); + +/* Subroutine */ int clartg_(complex *f, complex *g, real *cs, complex *sn, + complex *r__); + +/* Subroutine */ int clartv_(integer *n, complex *x, integer *incx, complex * + y, integer *incy, real *c__, complex *s, integer *incc); + +/* Subroutine */ int clarz_(char *side, integer *m, integer *n, integer *l, + complex *v, integer *incv, complex *tau, complex *c__, integer *ldc, + complex *work); + +/* Subroutine */ int clarzb_(char *side, char *trans, char *direct, char * + storev, integer *m, integer *n, integer *k, integer *l, complex *v, + integer *ldv, complex *t, integer *ldt, complex *c__, integer *ldc, + complex *work, integer *ldwork); + +/* Subroutine */ int clarzt_(char *direct, char *storev, integer *n, integer * + k, complex *v, integer *ldv, complex *tau, complex *t, integer *ldt); + +/* Subroutine */ int clascl_(char *type__, integer *kl, integer *ku, real * + cfrom, real *cto, integer *m, integer *n, complex *a, integer *lda, + integer *info); + +/* Subroutine */ int claset_(char *uplo, integer *m, integer *n, complex * + alpha, complex *beta, complex *a, integer *lda); + +/* Subroutine */ int clasr_(char *side, char *pivot, char *direct, integer *m, + integer *n, real *c__, real *s, complex *a, integer *lda); + +/* Subroutine */ int classq_(integer *n, complex *x, integer *incx, real * + scale, real *sumsq); + +/* Subroutine */ int claswp_(integer *n, complex *a, integer *lda, integer * + k1, integer *k2, integer *ipiv, integer *incx); + +/* Subroutine */ int clasyf_(char *uplo, integer *n, integer *nb, integer *kb, + complex *a, integer *lda, integer *ipiv, complex *w, integer *ldw, + integer *info); + +/* Subroutine */ int clatbs_(char *uplo, char *trans, char *diag, char * + normin, integer *n, integer *kd, complex *ab, integer *ldab, complex * + x, real *scale, real *cnorm, integer *info); + +/* Subroutine */ int clatdf_(integer *ijob, integer *n, complex *z__, integer + *ldz, complex *rhs, real *rdsum, real *rdscal, integer *ipiv, integer + *jpiv); + +/* Subroutine */ int clatps_(char *uplo, char *trans, char *diag, char * + normin, integer *n, complex *ap, complex *x, real *scale, real *cnorm, + integer *info); + +/* Subroutine */ int clatrd_(char *uplo, integer *n, integer *nb, complex *a, + integer *lda, real *e, complex *tau, complex *w, integer *ldw); + +/* Subroutine */ int clatrs_(char *uplo, char *trans, char *diag, char * + normin, integer *n, complex *a, integer *lda, complex *x, real *scale, + real *cnorm, integer *info); + +/* Subroutine */ int clatrz_(integer *m, integer *n, integer *l, complex *a, + integer *lda, complex *tau, complex *work); + +/* Subroutine */ int clatzm_(char *side, integer *m, integer *n, complex *v, + integer *incv, complex *tau, complex *c1, complex *c2, integer *ldc, + complex *work); + +/* Subroutine */ int clauu2_(char *uplo, integer *n, complex *a, integer *lda, + integer *info); + +/* Subroutine */ int clauum_(char *uplo, integer *n, complex *a, integer *lda, + integer *info); + +/* Subroutine */ int cpbcon_(char *uplo, integer *n, integer *kd, complex *ab, + integer *ldab, real *anorm, real *rcond, complex *work, real *rwork, + integer *info); + +/* Subroutine */ int cpbequ_(char *uplo, integer *n, integer *kd, complex *ab, + integer *ldab, real *s, real *scond, real *amax, integer *info); + +/* Subroutine */ int cpbrfs_(char *uplo, integer *n, integer *kd, integer * + nrhs, complex *ab, integer *ldab, complex *afb, integer *ldafb, + complex *b, integer *ldb, complex *x, integer *ldx, real *ferr, real * + berr, complex *work, real *rwork, integer *info); + +/* Subroutine */ int cpbstf_(char *uplo, integer *n, integer *kd, complex *ab, + integer *ldab, integer *info); + +/* Subroutine */ int cpbsv_(char *uplo, integer *n, integer *kd, integer * + nrhs, complex *ab, integer *ldab, complex *b, integer *ldb, integer * + info); + +/* Subroutine */ int cpbsvx_(char *fact, char *uplo, integer *n, integer *kd, + integer *nrhs, complex *ab, integer *ldab, complex *afb, integer * + ldafb, char *equed, real *s, complex *b, integer *ldb, complex *x, + integer *ldx, real *rcond, real *ferr, real *berr, complex *work, + real *rwork, integer *info); + +/* Subroutine */ int cpbtf2_(char *uplo, integer *n, integer *kd, complex *ab, + integer *ldab, integer *info); + +/* Subroutine */ int cpbtrf_(char *uplo, integer *n, integer *kd, complex *ab, + integer *ldab, integer *info); + +/* Subroutine */ int cpbtrs_(char *uplo, integer *n, integer *kd, integer * + nrhs, complex *ab, integer *ldab, complex *b, integer *ldb, integer * + info); + +/* Subroutine */ int cpocon_(char *uplo, integer *n, complex *a, integer *lda, + real *anorm, real *rcond, complex *work, real *rwork, integer *info); + +/* Subroutine */ int cpoequ_(integer *n, complex *a, integer *lda, real *s, + real *scond, real *amax, integer *info); + +/* Subroutine */ int cporfs_(char *uplo, integer *n, integer *nrhs, complex * + a, integer *lda, complex *af, integer *ldaf, complex *b, integer *ldb, + complex *x, integer *ldx, real *ferr, real *berr, complex *work, + real *rwork, integer *info); + +/* Subroutine */ int cposv_(char *uplo, integer *n, integer *nrhs, complex *a, + integer *lda, complex *b, integer *ldb, integer *info); + +/* Subroutine */ int cposvx_(char *fact, char *uplo, integer *n, integer * + nrhs, complex *a, integer *lda, complex *af, integer *ldaf, char * + equed, real *s, complex *b, integer *ldb, complex *x, integer *ldx, + real *rcond, real *ferr, real *berr, complex *work, real *rwork, + integer *info); + +/* Subroutine */ int cpotf2_(char *uplo, integer *n, complex *a, integer *lda, + integer *info); + +/* Subroutine */ int cpotrf_(char *uplo, integer *n, complex *a, integer *lda, + integer *info); + +/* Subroutine */ int cpotri_(char *uplo, integer *n, complex *a, integer *lda, + integer *info); + +/* Subroutine */ int cpotrs_(char *uplo, integer *n, integer *nrhs, complex * + a, integer *lda, complex *b, integer *ldb, integer *info); + +/* Subroutine */ int cppcon_(char *uplo, integer *n, complex *ap, real *anorm, + real *rcond, complex *work, real *rwork, integer *info); + +/* Subroutine */ int cppequ_(char *uplo, integer *n, complex *ap, real *s, + real *scond, real *amax, integer *info); + +/* Subroutine */ int cpprfs_(char *uplo, integer *n, integer *nrhs, complex * + ap, complex *afp, complex *b, integer *ldb, complex *x, integer *ldx, + real *ferr, real *berr, complex *work, real *rwork, integer *info); + +/* Subroutine */ int cppsv_(char *uplo, integer *n, integer *nrhs, complex * + ap, complex *b, integer *ldb, integer *info); + +/* Subroutine */ int cppsvx_(char *fact, char *uplo, integer *n, integer * + nrhs, complex *ap, complex *afp, char *equed, real *s, complex *b, + integer *ldb, complex *x, integer *ldx, real *rcond, real *ferr, real + *berr, complex *work, real *rwork, integer *info); + +/* Subroutine */ int cpptrf_(char *uplo, integer *n, complex *ap, integer * + info); + +/* Subroutine */ int cpptri_(char *uplo, integer *n, complex *ap, integer * + info); + +/* Subroutine */ int cpptrs_(char *uplo, integer *n, integer *nrhs, complex * + ap, complex *b, integer *ldb, integer *info); + +/* Subroutine */ int cptcon_(integer *n, real *d__, complex *e, real *anorm, + real *rcond, real *rwork, integer *info); + +/* Subroutine */ int cptrfs_(char *uplo, integer *n, integer *nrhs, real *d__, + complex *e, real *df, complex *ef, complex *b, integer *ldb, complex + *x, integer *ldx, real *ferr, real *berr, complex *work, real *rwork, + integer *info); + +/* Subroutine */ int cptsv_(integer *n, integer *nrhs, real *d__, complex *e, + complex *b, integer *ldb, integer *info); + +/* Subroutine */ int cptsvx_(char *fact, integer *n, integer *nrhs, real *d__, + complex *e, real *df, complex *ef, complex *b, integer *ldb, complex + *x, integer *ldx, real *rcond, real *ferr, real *berr, complex *work, + real *rwork, integer *info); + +/* Subroutine */ int cpttrf_(integer *n, real *d__, complex *e, integer *info); + +/* Subroutine */ int cpttrs_(char *uplo, integer *n, integer *nrhs, real *d__, + complex *e, complex *b, integer *ldb, integer *info); + +/* Subroutine */ int cptts2_(integer *iuplo, integer *n, integer *nrhs, real * + d__, complex *e, complex *b, integer *ldb); + +/* Subroutine */ int crot_(integer *n, complex *cx, integer *incx, complex * + cy, integer *incy, real *c__, complex *s); + +/* Subroutine */ int cspcon_(char *uplo, integer *n, complex *ap, integer * + ipiv, real *anorm, real *rcond, complex *work, integer *info); + +/* Subroutine */ int cspmv_(char *uplo, integer *n, complex *alpha, complex * + ap, complex *x, integer *incx, complex *beta, complex *y, integer * + incy); + +/* Subroutine */ int cspr_(char *uplo, integer *n, complex *alpha, complex *x, + integer *incx, complex *ap); + +/* Subroutine */ int csprfs_(char *uplo, integer *n, integer *nrhs, complex * + ap, complex *afp, integer *ipiv, complex *b, integer *ldb, complex *x, + integer *ldx, real *ferr, real *berr, complex *work, real *rwork, + integer *info); + +/* Subroutine */ int cspsv_(char *uplo, integer *n, integer *nrhs, complex * + ap, integer *ipiv, complex *b, integer *ldb, integer *info); + +/* Subroutine */ int cspsvx_(char *fact, char *uplo, integer *n, integer * + nrhs, complex *ap, complex *afp, integer *ipiv, complex *b, integer * + ldb, complex *x, integer *ldx, real *rcond, real *ferr, real *berr, + complex *work, real *rwork, integer *info); + +/* Subroutine */ int csptrf_(char *uplo, integer *n, complex *ap, integer * + ipiv, integer *info); + +/* Subroutine */ int csptri_(char *uplo, integer *n, complex *ap, integer * + ipiv, complex *work, integer *info); + +/* Subroutine */ int csptrs_(char *uplo, integer *n, integer *nrhs, complex * + ap, integer *ipiv, complex *b, integer *ldb, integer *info); + +/* Subroutine */ int csrot_(integer *n, complex *cx, integer *incx, complex * + cy, integer *incy, real *c__, real *s); + +/* Subroutine */ int csrscl_(integer *n, real *sa, complex *sx, integer *incx); + +/* Subroutine */ int cstedc_(char *compz, integer *n, real *d__, real *e, + complex *z__, integer *ldz, complex *work, integer *lwork, real * + rwork, integer *lrwork, integer *iwork, integer *liwork, integer * + info); + +/* Subroutine */ int cstein_(integer *n, real *d__, real *e, integer *m, real + *w, integer *iblock, integer *isplit, complex *z__, integer *ldz, + real *work, integer *iwork, integer *ifail, integer *info); + +/* Subroutine */ int csteqr_(char *compz, integer *n, real *d__, real *e, + complex *z__, integer *ldz, real *work, integer *info); + +/* Subroutine */ int csycon_(char *uplo, integer *n, complex *a, integer *lda, + integer *ipiv, real *anorm, real *rcond, complex *work, integer * + info); + +/* Subroutine */ int csymv_(char *uplo, integer *n, complex *alpha, complex * + a, integer *lda, complex *x, integer *incx, complex *beta, complex *y, + integer *incy); + +/* Subroutine */ int csyr_(char *uplo, integer *n, complex *alpha, complex *x, + integer *incx, complex *a, integer *lda); + +/* Subroutine */ int csyrfs_(char *uplo, integer *n, integer *nrhs, complex * + a, integer *lda, complex *af, integer *ldaf, integer *ipiv, complex * + b, integer *ldb, complex *x, integer *ldx, real *ferr, real *berr, + complex *work, real *rwork, integer *info); + +/* Subroutine */ int csysv_(char *uplo, integer *n, integer *nrhs, complex *a, + integer *lda, integer *ipiv, complex *b, integer *ldb, complex *work, + integer *lwork, integer *info); + +/* Subroutine */ int csysvx_(char *fact, char *uplo, integer *n, integer * + nrhs, complex *a, integer *lda, complex *af, integer *ldaf, integer * + ipiv, complex *b, integer *ldb, complex *x, integer *ldx, real *rcond, + real *ferr, real *berr, complex *work, integer *lwork, real *rwork, + integer *info); + +/* Subroutine */ int csytf2_(char *uplo, integer *n, complex *a, integer *lda, + integer *ipiv, integer *info); + +/* Subroutine */ int csytrf_(char *uplo, integer *n, complex *a, integer *lda, + integer *ipiv, complex *work, integer *lwork, integer *info); + +/* Subroutine */ int csytri_(char *uplo, integer *n, complex *a, integer *lda, + integer *ipiv, complex *work, integer *info); + +/* Subroutine */ int csytrs_(char *uplo, integer *n, integer *nrhs, complex * + a, integer *lda, integer *ipiv, complex *b, integer *ldb, integer * + info); + +/* Subroutine */ int ctbcon_(char *norm, char *uplo, char *diag, integer *n, + integer *kd, complex *ab, integer *ldab, real *rcond, complex *work, + real *rwork, integer *info); + +/* Subroutine */ int ctbrfs_(char *uplo, char *trans, char *diag, integer *n, + integer *kd, integer *nrhs, complex *ab, integer *ldab, complex *b, + integer *ldb, complex *x, integer *ldx, real *ferr, real *berr, + complex *work, real *rwork, integer *info); + +/* Subroutine */ int ctbtrs_(char *uplo, char *trans, char *diag, integer *n, + integer *kd, integer *nrhs, complex *ab, integer *ldab, complex *b, + integer *ldb, integer *info); + +/* Subroutine */ int ctgevc_(char *side, char *howmny, logical *select, + integer *n, complex *a, integer *lda, complex *b, integer *ldb, + complex *vl, integer *ldvl, complex *vr, integer *ldvr, integer *mm, + integer *m, complex *work, real *rwork, integer *info); + +/* Subroutine */ int ctgex2_(logical *wantq, logical *wantz, integer *n, + complex *a, integer *lda, complex *b, integer *ldb, complex *q, + integer *ldq, complex *z__, integer *ldz, integer *j1, integer *info); + +/* Subroutine */ int ctgexc_(logical *wantq, logical *wantz, integer *n, + complex *a, integer *lda, complex *b, integer *ldb, complex *q, + integer *ldq, complex *z__, integer *ldz, integer *ifst, integer * + ilst, integer *info); + +/* Subroutine */ int ctgsen_(integer *ijob, logical *wantq, logical *wantz, + logical *select, integer *n, complex *a, integer *lda, complex *b, + integer *ldb, complex *alpha, complex *beta, complex *q, integer *ldq, + complex *z__, integer *ldz, integer *m, real *pl, real *pr, real * + dif, complex *work, integer *lwork, integer *iwork, integer *liwork, + integer *info); + +/* Subroutine */ int ctgsja_(char *jobu, char *jobv, char *jobq, integer *m, + integer *p, integer *n, integer *k, integer *l, complex *a, integer * + lda, complex *b, integer *ldb, real *tola, real *tolb, real *alpha, + real *beta, complex *u, integer *ldu, complex *v, integer *ldv, + complex *q, integer *ldq, complex *work, integer *ncycle, integer * + info); + +/* Subroutine */ int ctgsna_(char *job, char *howmny, logical *select, + integer *n, complex *a, integer *lda, complex *b, integer *ldb, + complex *vl, integer *ldvl, complex *vr, integer *ldvr, real *s, real + *dif, integer *mm, integer *m, complex *work, integer *lwork, integer + *iwork, integer *info); + +/* Subroutine */ int ctgsy2_(char *trans, integer *ijob, integer *m, integer * + n, complex *a, integer *lda, complex *b, integer *ldb, complex *c__, + integer *ldc, complex *d__, integer *ldd, complex *e, integer *lde, + complex *f, integer *ldf, real *scale, real *rdsum, real *rdscal, + integer *info); + +/* Subroutine */ int ctgsyl_(char *trans, integer *ijob, integer *m, integer * + n, complex *a, integer *lda, complex *b, integer *ldb, complex *c__, + integer *ldc, complex *d__, integer *ldd, complex *e, integer *lde, + complex *f, integer *ldf, real *scale, real *dif, complex *work, + integer *lwork, integer *iwork, integer *info); + +/* Subroutine */ int ctpcon_(char *norm, char *uplo, char *diag, integer *n, + complex *ap, real *rcond, complex *work, real *rwork, integer *info); + +/* Subroutine */ int ctprfs_(char *uplo, char *trans, char *diag, integer *n, + integer *nrhs, complex *ap, complex *b, integer *ldb, complex *x, + integer *ldx, real *ferr, real *berr, complex *work, real *rwork, + integer *info); + +/* Subroutine */ int ctptri_(char *uplo, char *diag, integer *n, complex *ap, + integer *info); + +/* Subroutine */ int ctptrs_(char *uplo, char *trans, char *diag, integer *n, + integer *nrhs, complex *ap, complex *b, integer *ldb, integer *info); + +/* Subroutine */ int ctrcon_(char *norm, char *uplo, char *diag, integer *n, + complex *a, integer *lda, real *rcond, complex *work, real *rwork, + integer *info); + +/* Subroutine */ int ctrevc_(char *side, char *howmny, logical *select, + integer *n, complex *t, integer *ldt, complex *vl, integer *ldvl, + complex *vr, integer *ldvr, integer *mm, integer *m, complex *work, + real *rwork, integer *info); + +/* Subroutine */ int ctrexc_(char *compq, integer *n, complex *t, integer * + ldt, complex *q, integer *ldq, integer *ifst, integer *ilst, integer * + info); + +/* Subroutine */ int ctrrfs_(char *uplo, char *trans, char *diag, integer *n, + integer *nrhs, complex *a, integer *lda, complex *b, integer *ldb, + complex *x, integer *ldx, real *ferr, real *berr, complex *work, real + *rwork, integer *info); + +/* Subroutine */ int ctrsen_(char *job, char *compq, logical *select, integer + *n, complex *t, integer *ldt, complex *q, integer *ldq, complex *w, + integer *m, real *s, real *sep, complex *work, integer *lwork, + integer *info); + +/* Subroutine */ int ctrsna_(char *job, char *howmny, logical *select, + integer *n, complex *t, integer *ldt, complex *vl, integer *ldvl, + complex *vr, integer *ldvr, real *s, real *sep, integer *mm, integer * + m, complex *work, integer *ldwork, real *rwork, integer *info); + +/* Subroutine */ int ctrsyl_(char *trana, char *tranb, integer *isgn, integer + *m, integer *n, complex *a, integer *lda, complex *b, integer *ldb, + complex *c__, integer *ldc, real *scale, integer *info); + +/* Subroutine */ int ctrti2_(char *uplo, char *diag, integer *n, complex *a, + integer *lda, integer *info); + +/* Subroutine */ int ctrtri_(char *uplo, char *diag, integer *n, complex *a, + integer *lda, integer *info); + +/* Subroutine */ int ctrtrs_(char *uplo, char *trans, char *diag, integer *n, + integer *nrhs, complex *a, integer *lda, complex *b, integer *ldb, + integer *info); + +/* Subroutine */ int ctzrqf_(integer *m, integer *n, complex *a, integer *lda, + complex *tau, integer *info); + +/* Subroutine */ int ctzrzf_(integer *m, integer *n, complex *a, integer *lda, + complex *tau, complex *work, integer *lwork, integer *info); + +/* Subroutine */ int cung2l_(integer *m, integer *n, integer *k, complex *a, + integer *lda, complex *tau, complex *work, integer *info); + +/* Subroutine */ int cung2r_(integer *m, integer *n, integer *k, complex *a, + integer *lda, complex *tau, complex *work, integer *info); + +/* Subroutine */ int cungbr_(char *vect, integer *m, integer *n, integer *k, + complex *a, integer *lda, complex *tau, complex *work, integer *lwork, + integer *info); + +/* Subroutine */ int cunghr_(integer *n, integer *ilo, integer *ihi, complex * + a, integer *lda, complex *tau, complex *work, integer *lwork, integer + *info); + +/* Subroutine */ int cungl2_(integer *m, integer *n, integer *k, complex *a, + integer *lda, complex *tau, complex *work, integer *info); + +/* Subroutine */ int cunglq_(integer *m, integer *n, integer *k, complex *a, + integer *lda, complex *tau, complex *work, integer *lwork, integer * + info); + +/* Subroutine */ int cungql_(integer *m, integer *n, integer *k, complex *a, + integer *lda, complex *tau, complex *work, integer *lwork, integer * + info); + +/* Subroutine */ int cungqr_(integer *m, integer *n, integer *k, complex *a, + integer *lda, complex *tau, complex *work, integer *lwork, integer * + info); + +/* Subroutine */ int cungr2_(integer *m, integer *n, integer *k, complex *a, + integer *lda, complex *tau, complex *work, integer *info); + +/* Subroutine */ int cungrq_(integer *m, integer *n, integer *k, complex *a, + integer *lda, complex *tau, complex *work, integer *lwork, integer * + info); + +/* Subroutine */ int cungtr_(char *uplo, integer *n, complex *a, integer *lda, + complex *tau, complex *work, integer *lwork, integer *info); + +/* Subroutine */ int cunm2l_(char *side, char *trans, integer *m, integer *n, + integer *k, complex *a, integer *lda, complex *tau, complex *c__, + integer *ldc, complex *work, integer *info); + +/* Subroutine */ int cunm2r_(char *side, char *trans, integer *m, integer *n, + integer *k, complex *a, integer *lda, complex *tau, complex *c__, + integer *ldc, complex *work, integer *info); + +/* Subroutine */ int cunmbr_(char *vect, char *side, char *trans, integer *m, + integer *n, integer *k, complex *a, integer *lda, complex *tau, + complex *c__, integer *ldc, complex *work, integer *lwork, integer * + info); + +/* Subroutine */ int cunmhr_(char *side, char *trans, integer *m, integer *n, + integer *ilo, integer *ihi, complex *a, integer *lda, complex *tau, + complex *c__, integer *ldc, complex *work, integer *lwork, integer * + info); + +/* Subroutine */ int cunml2_(char *side, char *trans, integer *m, integer *n, + integer *k, complex *a, integer *lda, complex *tau, complex *c__, + integer *ldc, complex *work, integer *info); + +/* Subroutine */ int cunmlq_(char *side, char *trans, integer *m, integer *n, + integer *k, complex *a, integer *lda, complex *tau, complex *c__, + integer *ldc, complex *work, integer *lwork, integer *info); + +/* Subroutine */ int cunmql_(char *side, char *trans, integer *m, integer *n, + integer *k, complex *a, integer *lda, complex *tau, complex *c__, + integer *ldc, complex *work, integer *lwork, integer *info); + +/* Subroutine */ int cunmqr_(char *side, char *trans, integer *m, integer *n, + integer *k, complex *a, integer *lda, complex *tau, complex *c__, + integer *ldc, complex *work, integer *lwork, integer *info); + +/* Subroutine */ int cunmr2_(char *side, char *trans, integer *m, integer *n, + integer *k, complex *a, integer *lda, complex *tau, complex *c__, + integer *ldc, complex *work, integer *info); + +/* Subroutine */ int cunmr3_(char *side, char *trans, integer *m, integer *n, + integer *k, integer *l, complex *a, integer *lda, complex *tau, + complex *c__, integer *ldc, complex *work, integer *info); + +/* Subroutine */ int cunmrq_(char *side, char *trans, integer *m, integer *n, + integer *k, complex *a, integer *lda, complex *tau, complex *c__, + integer *ldc, complex *work, integer *lwork, integer *info); + +/* Subroutine */ int cunmrz_(char *side, char *trans, integer *m, integer *n, + integer *k, integer *l, complex *a, integer *lda, complex *tau, + complex *c__, integer *ldc, complex *work, integer *lwork, integer * + info); + +/* Subroutine */ int cunmtr_(char *side, char *uplo, char *trans, integer *m, + integer *n, complex *a, integer *lda, complex *tau, complex *c__, + integer *ldc, complex *work, integer *lwork, integer *info); + +/* Subroutine */ int cupgtr_(char *uplo, integer *n, complex *ap, complex * + tau, complex *q, integer *ldq, complex *work, integer *info); + +/* Subroutine */ int cupmtr_(char *side, char *uplo, char *trans, integer *m, + integer *n, complex *ap, complex *tau, complex *c__, integer *ldc, + complex *work, integer *info); + +/* Subroutine */ int dbdsdc_(char *uplo, char *compq, integer *n, doublereal * + d__, doublereal *e, doublereal *u, integer *ldu, doublereal *vt, + integer *ldvt, doublereal *q, integer *iq, doublereal *work, integer * + iwork, integer *info); + +/* Subroutine */ int dbdsqr_(char *uplo, integer *n, integer *ncvt, integer * + nru, integer *ncc, doublereal *d__, doublereal *e, doublereal *vt, + integer *ldvt, doublereal *u, integer *ldu, doublereal *c__, integer * + ldc, doublereal *work, integer *info); + +/* Subroutine */ int ddisna_(char *job, integer *m, integer *n, doublereal * + d__, doublereal *sep, integer *info); + +/* Subroutine */ int dgbbrd_(char *vect, integer *m, integer *n, integer *ncc, + integer *kl, integer *ku, doublereal *ab, integer *ldab, doublereal * + d__, doublereal *e, doublereal *q, integer *ldq, doublereal *pt, + integer *ldpt, doublereal *c__, integer *ldc, doublereal *work, + integer *info); + +/* Subroutine */ int dgbcon_(char *norm, integer *n, integer *kl, integer *ku, + doublereal *ab, integer *ldab, integer *ipiv, doublereal *anorm, + doublereal *rcond, doublereal *work, integer *iwork, integer *info); + +/* Subroutine */ int dgbequ_(integer *m, integer *n, integer *kl, integer *ku, + doublereal *ab, integer *ldab, doublereal *r__, doublereal *c__, + doublereal *rowcnd, doublereal *colcnd, doublereal *amax, integer * + info); + +/* Subroutine */ int dgbrfs_(char *trans, integer *n, integer *kl, integer * + ku, integer *nrhs, doublereal *ab, integer *ldab, doublereal *afb, + integer *ldafb, integer *ipiv, doublereal *b, integer *ldb, + doublereal *x, integer *ldx, doublereal *ferr, doublereal *berr, + doublereal *work, integer *iwork, integer *info); + +/* Subroutine */ int dgbsv_(integer *n, integer *kl, integer *ku, integer * + nrhs, doublereal *ab, integer *ldab, integer *ipiv, doublereal *b, + integer *ldb, integer *info); + +/* Subroutine */ int dgbsvx_(char *fact, char *trans, integer *n, integer *kl, + integer *ku, integer *nrhs, doublereal *ab, integer *ldab, + doublereal *afb, integer *ldafb, integer *ipiv, char *equed, + doublereal *r__, doublereal *c__, doublereal *b, integer *ldb, + doublereal *x, integer *ldx, doublereal *rcond, doublereal *ferr, + doublereal *berr, doublereal *work, integer *iwork, integer *info); + +/* Subroutine */ int dgbtf2_(integer *m, integer *n, integer *kl, integer *ku, + doublereal *ab, integer *ldab, integer *ipiv, integer *info); + +/* Subroutine */ int dgbtrf_(integer *m, integer *n, integer *kl, integer *ku, + doublereal *ab, integer *ldab, integer *ipiv, integer *info); + +/* Subroutine */ int dgbtrs_(char *trans, integer *n, integer *kl, integer * + ku, integer *nrhs, doublereal *ab, integer *ldab, integer *ipiv, + doublereal *b, integer *ldb, integer *info); + +/* Subroutine */ int dgebak_(char *job, char *side, integer *n, integer *ilo, + integer *ihi, doublereal *scale, integer *m, doublereal *v, integer * + ldv, integer *info); + +/* Subroutine */ int dgebal_(char *job, integer *n, doublereal *a, integer * + lda, integer *ilo, integer *ihi, doublereal *scale, integer *info); + +/* Subroutine */ int dgebd2_(integer *m, integer *n, doublereal *a, integer * + lda, doublereal *d__, doublereal *e, doublereal *tauq, doublereal * + taup, doublereal *work, integer *info); + +/* Subroutine */ int dgebrd_(integer *m, integer *n, doublereal *a, integer * + lda, doublereal *d__, doublereal *e, doublereal *tauq, doublereal * + taup, doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dgecon_(char *norm, integer *n, doublereal *a, integer * + lda, doublereal *anorm, doublereal *rcond, doublereal *work, integer * + iwork, integer *info); + +/* Subroutine */ int dgeequ_(integer *m, integer *n, doublereal *a, integer * + lda, doublereal *r__, doublereal *c__, doublereal *rowcnd, doublereal + *colcnd, doublereal *amax, integer *info); + +/* Subroutine */ int dgees_(char *jobvs, char *sort, L_fp select, integer *n, + doublereal *a, integer *lda, integer *sdim, doublereal *wr, + doublereal *wi, doublereal *vs, integer *ldvs, doublereal *work, + integer *lwork, logical *bwork, integer *info); + +/* Subroutine */ int dgeesx_(char *jobvs, char *sort, L_fp select, char * + sense, integer *n, doublereal *a, integer *lda, integer *sdim, + doublereal *wr, doublereal *wi, doublereal *vs, integer *ldvs, + doublereal *rconde, doublereal *rcondv, doublereal *work, integer * + lwork, integer *iwork, integer *liwork, logical *bwork, integer *info); + +/* Subroutine */ int dgeev_(char *jobvl, char *jobvr, integer *n, doublereal * + a, integer *lda, doublereal *wr, doublereal *wi, doublereal *vl, + integer *ldvl, doublereal *vr, integer *ldvr, doublereal *work, + integer *lwork, integer *info); + +/* Subroutine */ int dgeevx_(char *balanc, char *jobvl, char *jobvr, char * + sense, integer *n, doublereal *a, integer *lda, doublereal *wr, + doublereal *wi, doublereal *vl, integer *ldvl, doublereal *vr, + integer *ldvr, integer *ilo, integer *ihi, doublereal *scale, + doublereal *abnrm, doublereal *rconde, doublereal *rcondv, doublereal + *work, integer *lwork, integer *iwork, integer *info); + +/* Subroutine */ int dgegs_(char *jobvsl, char *jobvsr, integer *n, + doublereal *a, integer *lda, doublereal *b, integer *ldb, doublereal * + alphar, doublereal *alphai, doublereal *beta, doublereal *vsl, + integer *ldvsl, doublereal *vsr, integer *ldvsr, doublereal *work, + integer *lwork, integer *info); + +/* Subroutine */ int dgegv_(char *jobvl, char *jobvr, integer *n, doublereal * + a, integer *lda, doublereal *b, integer *ldb, doublereal *alphar, + doublereal *alphai, doublereal *beta, doublereal *vl, integer *ldvl, + doublereal *vr, integer *ldvr, doublereal *work, integer *lwork, + integer *info); + +/* Subroutine */ int dgehd2_(integer *n, integer *ilo, integer *ihi, + doublereal *a, integer *lda, doublereal *tau, doublereal *work, + integer *info); + +/* Subroutine */ int dgehrd_(integer *n, integer *ilo, integer *ihi, + doublereal *a, integer *lda, doublereal *tau, doublereal *work, + integer *lwork, integer *info); + +/* Subroutine */ int dgelq2_(integer *m, integer *n, doublereal *a, integer * + lda, doublereal *tau, doublereal *work, integer *info); + +/* Subroutine */ int dgelqf_(integer *m, integer *n, doublereal *a, integer * + lda, doublereal *tau, doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dgels_(char *trans, integer *m, integer *n, integer * + nrhs, doublereal *a, integer *lda, doublereal *b, integer *ldb, + doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dgelsd_(integer *m, integer *n, integer *nrhs, + doublereal *a, integer *lda, doublereal *b, integer *ldb, doublereal * + s, doublereal *rcond, integer *rank, doublereal *work, integer *lwork, + integer *iwork, integer *info); + +/* Subroutine */ int dgelss_(integer *m, integer *n, integer *nrhs, + doublereal *a, integer *lda, doublereal *b, integer *ldb, doublereal * + s, doublereal *rcond, integer *rank, doublereal *work, integer *lwork, + integer *info); + +/* Subroutine */ int dgelsx_(integer *m, integer *n, integer *nrhs, + doublereal *a, integer *lda, doublereal *b, integer *ldb, integer * + jpvt, doublereal *rcond, integer *rank, doublereal *work, integer * + info); + +/* Subroutine */ int dgelsy_(integer *m, integer *n, integer *nrhs, + doublereal *a, integer *lda, doublereal *b, integer *ldb, integer * + jpvt, doublereal *rcond, integer *rank, doublereal *work, integer * + lwork, integer *info); + +/* Subroutine */ int dgeql2_(integer *m, integer *n, doublereal *a, integer * + lda, doublereal *tau, doublereal *work, integer *info); + +/* Subroutine */ int dgeqlf_(integer *m, integer *n, doublereal *a, integer * + lda, doublereal *tau, doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dgeqp3_(integer *m, integer *n, doublereal *a, integer * + lda, integer *jpvt, doublereal *tau, doublereal *work, integer *lwork, + integer *info); + +/* Subroutine */ int dgeqpf_(integer *m, integer *n, doublereal *a, integer * + lda, integer *jpvt, doublereal *tau, doublereal *work, integer *info); + +/* Subroutine */ int dgeqr2_(integer *m, integer *n, doublereal *a, integer * + lda, doublereal *tau, doublereal *work, integer *info); + +/* Subroutine */ int dgeqrf_(integer *m, integer *n, doublereal *a, integer * + lda, doublereal *tau, doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dgerfs_(char *trans, integer *n, integer *nrhs, + doublereal *a, integer *lda, doublereal *af, integer *ldaf, integer * + ipiv, doublereal *b, integer *ldb, doublereal *x, integer *ldx, + doublereal *ferr, doublereal *berr, doublereal *work, integer *iwork, + integer *info); + +/* Subroutine */ int dgerq2_(integer *m, integer *n, doublereal *a, integer * + lda, doublereal *tau, doublereal *work, integer *info); + +/* Subroutine */ int dgerqf_(integer *m, integer *n, doublereal *a, integer * + lda, doublereal *tau, doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dgesc2_(integer *n, doublereal *a, integer *lda, + doublereal *rhs, integer *ipiv, integer *jpiv, doublereal *scale); + +/* Subroutine */ int dgesdd_(char *jobz, integer *m, integer *n, doublereal * + a, integer *lda, doublereal *s, doublereal *u, integer *ldu, + doublereal *vt, integer *ldvt, doublereal *work, integer *lwork, + integer *iwork, integer *info); + +/* Subroutine */ int dgesv_(integer *n, integer *nrhs, doublereal *a, integer + *lda, integer *ipiv, doublereal *b, integer *ldb, integer *info); + +/* Subroutine */ int dgesvd_(char *jobu, char *jobvt, integer *m, integer *n, + doublereal *a, integer *lda, doublereal *s, doublereal *u, integer * + ldu, doublereal *vt, integer *ldvt, doublereal *work, integer *lwork, + integer *info); + +/* Subroutine */ int dgesvx_(char *fact, char *trans, integer *n, integer * + nrhs, doublereal *a, integer *lda, doublereal *af, integer *ldaf, + integer *ipiv, char *equed, doublereal *r__, doublereal *c__, + doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * + rcond, doublereal *ferr, doublereal *berr, doublereal *work, integer * + iwork, integer *info); + +/* Subroutine */ int dgetc2_(integer *n, doublereal *a, integer *lda, integer + *ipiv, integer *jpiv, integer *info); + +/* Subroutine */ int dgetf2_(integer *m, integer *n, doublereal *a, integer * + lda, integer *ipiv, integer *info); + +/* Subroutine */ int dgetrf_(integer *m, integer *n, doublereal *a, integer * + lda, integer *ipiv, integer *info); + +/* Subroutine */ int dgetri_(integer *n, doublereal *a, integer *lda, integer + *ipiv, doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dgetrs_(char *trans, integer *n, integer *nrhs, + doublereal *a, integer *lda, integer *ipiv, doublereal *b, integer * + ldb, integer *info); + +/* Subroutine */ int dggbak_(char *job, char *side, integer *n, integer *ilo, + integer *ihi, doublereal *lscale, doublereal *rscale, integer *m, + doublereal *v, integer *ldv, integer *info); + +/* Subroutine */ int dggbal_(char *job, integer *n, doublereal *a, integer * + lda, doublereal *b, integer *ldb, integer *ilo, integer *ihi, + doublereal *lscale, doublereal *rscale, doublereal *work, integer * + info); + +/* Subroutine */ int dgges_(char *jobvsl, char *jobvsr, char *sort, L_fp + delctg, integer *n, doublereal *a, integer *lda, doublereal *b, + integer *ldb, integer *sdim, doublereal *alphar, doublereal *alphai, + doublereal *beta, doublereal *vsl, integer *ldvsl, doublereal *vsr, + integer *ldvsr, doublereal *work, integer *lwork, logical *bwork, + integer *info); + +/* Subroutine */ int dggesx_(char *jobvsl, char *jobvsr, char *sort, L_fp + delctg, char *sense, integer *n, doublereal *a, integer *lda, + doublereal *b, integer *ldb, integer *sdim, doublereal *alphar, + doublereal *alphai, doublereal *beta, doublereal *vsl, integer *ldvsl, + doublereal *vsr, integer *ldvsr, doublereal *rconde, doublereal * + rcondv, doublereal *work, integer *lwork, integer *iwork, integer * + liwork, logical *bwork, integer *info); + +/* Subroutine */ int dggev_(char *jobvl, char *jobvr, integer *n, doublereal * + a, integer *lda, doublereal *b, integer *ldb, doublereal *alphar, + doublereal *alphai, doublereal *beta, doublereal *vl, integer *ldvl, + doublereal *vr, integer *ldvr, doublereal *work, integer *lwork, + integer *info); + +/* Subroutine */ int dggevx_(char *balanc, char *jobvl, char *jobvr, char * + sense, integer *n, doublereal *a, integer *lda, doublereal *b, + integer *ldb, doublereal *alphar, doublereal *alphai, doublereal * + beta, doublereal *vl, integer *ldvl, doublereal *vr, integer *ldvr, + integer *ilo, integer *ihi, doublereal *lscale, doublereal *rscale, + doublereal *abnrm, doublereal *bbnrm, doublereal *rconde, doublereal * + rcondv, doublereal *work, integer *lwork, integer *iwork, logical * + bwork, integer *info); + +/* Subroutine */ int dggglm_(integer *n, integer *m, integer *p, doublereal * + a, integer *lda, doublereal *b, integer *ldb, doublereal *d__, + doublereal *x, doublereal *y, doublereal *work, integer *lwork, + integer *info); + +/* Subroutine */ int dgghrd_(char *compq, char *compz, integer *n, integer * + ilo, integer *ihi, doublereal *a, integer *lda, doublereal *b, + integer *ldb, doublereal *q, integer *ldq, doublereal *z__, integer * + ldz, integer *info); + +/* Subroutine */ int dgglse_(integer *m, integer *n, integer *p, doublereal * + a, integer *lda, doublereal *b, integer *ldb, doublereal *c__, + doublereal *d__, doublereal *x, doublereal *work, integer *lwork, + integer *info); + +/* Subroutine */ int dggqrf_(integer *n, integer *m, integer *p, doublereal * + a, integer *lda, doublereal *taua, doublereal *b, integer *ldb, + doublereal *taub, doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dggrqf_(integer *m, integer *p, integer *n, doublereal * + a, integer *lda, doublereal *taua, doublereal *b, integer *ldb, + doublereal *taub, doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dggsvd_(char *jobu, char *jobv, char *jobq, integer *m, + integer *n, integer *p, integer *k, integer *l, doublereal *a, + integer *lda, doublereal *b, integer *ldb, doublereal *alpha, + doublereal *beta, doublereal *u, integer *ldu, doublereal *v, integer + *ldv, doublereal *q, integer *ldq, doublereal *work, integer *iwork, + integer *info); + +/* Subroutine */ int dggsvp_(char *jobu, char *jobv, char *jobq, integer *m, + integer *p, integer *n, doublereal *a, integer *lda, doublereal *b, + integer *ldb, doublereal *tola, doublereal *tolb, integer *k, integer + *l, doublereal *u, integer *ldu, doublereal *v, integer *ldv, + doublereal *q, integer *ldq, integer *iwork, doublereal *tau, + doublereal *work, integer *info); + +/* Subroutine */ int dgtcon_(char *norm, integer *n, doublereal *dl, + doublereal *d__, doublereal *du, doublereal *du2, integer *ipiv, + doublereal *anorm, doublereal *rcond, doublereal *work, integer * + iwork, integer *info); + +/* Subroutine */ int dgtrfs_(char *trans, integer *n, integer *nrhs, + doublereal *dl, doublereal *d__, doublereal *du, doublereal *dlf, + doublereal *df, doublereal *duf, doublereal *du2, integer *ipiv, + doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * + ferr, doublereal *berr, doublereal *work, integer *iwork, integer * + info); + +/* Subroutine */ int dgtsv_(integer *n, integer *nrhs, doublereal *dl, + doublereal *d__, doublereal *du, doublereal *b, integer *ldb, integer + *info); + +/* Subroutine */ int dgtsvx_(char *fact, char *trans, integer *n, integer * + nrhs, doublereal *dl, doublereal *d__, doublereal *du, doublereal * + dlf, doublereal *df, doublereal *duf, doublereal *du2, integer *ipiv, + doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * + rcond, doublereal *ferr, doublereal *berr, doublereal *work, integer * + iwork, integer *info); + +/* Subroutine */ int dgttrf_(integer *n, doublereal *dl, doublereal *d__, + doublereal *du, doublereal *du2, integer *ipiv, integer *info); + +/* Subroutine */ int dgttrs_(char *trans, integer *n, integer *nrhs, + doublereal *dl, doublereal *d__, doublereal *du, doublereal *du2, + integer *ipiv, doublereal *b, integer *ldb, integer *info); + +/* Subroutine */ int dgtts2_(integer *itrans, integer *n, integer *nrhs, + doublereal *dl, doublereal *d__, doublereal *du, doublereal *du2, + integer *ipiv, doublereal *b, integer *ldb); + +/* Subroutine */ int dhgeqz_(char *job, char *compq, char *compz, integer *n, + integer *ilo, integer *ihi, doublereal *a, integer *lda, doublereal * + b, integer *ldb, doublereal *alphar, doublereal *alphai, doublereal * + beta, doublereal *q, integer *ldq, doublereal *z__, integer *ldz, + doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dhsein_(char *side, char *eigsrc, char *initv, logical * + select, integer *n, doublereal *h__, integer *ldh, doublereal *wr, + doublereal *wi, doublereal *vl, integer *ldvl, doublereal *vr, + integer *ldvr, integer *mm, integer *m, doublereal *work, integer * + ifaill, integer *ifailr, integer *info); + +/* Subroutine */ int dhseqr_(char *job, char *compz, integer *n, integer *ilo, + integer *ihi, doublereal *h__, integer *ldh, doublereal *wr, + doublereal *wi, doublereal *z__, integer *ldz, doublereal *work, + integer *lwork, integer *info); + +/* Subroutine */ int dlabad_(doublereal *small, doublereal *large); + +/* Subroutine */ int dlabrd_(integer *m, integer *n, integer *nb, doublereal * + a, integer *lda, doublereal *d__, doublereal *e, doublereal *tauq, + doublereal *taup, doublereal *x, integer *ldx, doublereal *y, integer + *ldy); + +/* Subroutine */ int dlacon_(integer *n, doublereal *v, doublereal *x, + integer *isgn, doublereal *est, integer *kase); + +/* Subroutine */ int dlacpy_(char *uplo, integer *m, integer *n, doublereal * + a, integer *lda, doublereal *b, integer *ldb); + +/* Subroutine */ int dladiv_(doublereal *a, doublereal *b, doublereal *c__, + doublereal *d__, doublereal *p, doublereal *q); + +/* Subroutine */ int dlae2_(doublereal *a, doublereal *b, doublereal *c__, + doublereal *rt1, doublereal *rt2); + +/* Subroutine */ int dlaebz_(integer *ijob, integer *nitmax, integer *n, + integer *mmax, integer *minp, integer *nbmin, doublereal *abstol, + doublereal *reltol, doublereal *pivmin, doublereal *d__, doublereal * + e, doublereal *e2, integer *nval, doublereal *ab, doublereal *c__, + integer *mout, integer *nab, doublereal *work, integer *iwork, + integer *info); + +/* Subroutine */ int dlaed0_(integer *icompq, integer *qsiz, integer *n, + doublereal *d__, doublereal *e, doublereal *q, integer *ldq, + doublereal *qstore, integer *ldqs, doublereal *work, integer *iwork, + integer *info); + +/* Subroutine */ int dlaed1_(integer *n, doublereal *d__, doublereal *q, + integer *ldq, integer *indxq, doublereal *rho, integer *cutpnt, + doublereal *work, integer *iwork, integer *info); + +/* Subroutine */ int dlaed2_(integer *k, integer *n, integer *n1, doublereal * + d__, doublereal *q, integer *ldq, integer *indxq, doublereal *rho, + doublereal *z__, doublereal *dlamda, doublereal *w, doublereal *q2, + integer *indx, integer *indxc, integer *indxp, integer *coltyp, + integer *info); + +/* Subroutine */ int dlaed3_(integer *k, integer *n, integer *n1, doublereal * + d__, doublereal *q, integer *ldq, doublereal *rho, doublereal *dlamda, + doublereal *q2, integer *indx, integer *ctot, doublereal *w, + doublereal *s, integer *info); + +/* Subroutine */ int dlaed4_(integer *n, integer *i__, doublereal *d__, + doublereal *z__, doublereal *delta, doublereal *rho, doublereal *dlam, + integer *info); + +/* Subroutine */ int dlaed5_(integer *i__, doublereal *d__, doublereal *z__, + doublereal *delta, doublereal *rho, doublereal *dlam); + +/* Subroutine */ int dlaed6_(integer *kniter, logical *orgati, doublereal * + rho, doublereal *d__, doublereal *z__, doublereal *finit, doublereal * + tau, integer *info); + +/* Subroutine */ int dlaed7_(integer *icompq, integer *n, integer *qsiz, + integer *tlvls, integer *curlvl, integer *curpbm, doublereal *d__, + doublereal *q, integer *ldq, integer *indxq, doublereal *rho, integer + *cutpnt, doublereal *qstore, integer *qptr, integer *prmptr, integer * + perm, integer *givptr, integer *givcol, doublereal *givnum, + doublereal *work, integer *iwork, integer *info); + +/* Subroutine */ int dlaed8_(integer *icompq, integer *k, integer *n, integer + *qsiz, doublereal *d__, doublereal *q, integer *ldq, integer *indxq, + doublereal *rho, integer *cutpnt, doublereal *z__, doublereal *dlamda, + doublereal *q2, integer *ldq2, doublereal *w, integer *perm, integer + *givptr, integer *givcol, doublereal *givnum, integer *indxp, integer + *indx, integer *info); + +/* Subroutine */ int dlaed9_(integer *k, integer *kstart, integer *kstop, + integer *n, doublereal *d__, doublereal *q, integer *ldq, doublereal * + rho, doublereal *dlamda, doublereal *w, doublereal *s, integer *lds, + integer *info); + +/* Subroutine */ int dlaeda_(integer *n, integer *tlvls, integer *curlvl, + integer *curpbm, integer *prmptr, integer *perm, integer *givptr, + integer *givcol, doublereal *givnum, doublereal *q, integer *qptr, + doublereal *z__, doublereal *ztemp, integer *info); + +/* Subroutine */ int dlaein_(logical *rightv, logical *noinit, integer *n, + doublereal *h__, integer *ldh, doublereal *wr, doublereal *wi, + doublereal *vr, doublereal *vi, doublereal *b, integer *ldb, + doublereal *work, doublereal *eps3, doublereal *smlnum, doublereal * + bignum, integer *info); + +/* Subroutine */ int dlaev2_(doublereal *a, doublereal *b, doublereal *c__, + doublereal *rt1, doublereal *rt2, doublereal *cs1, doublereal *sn1); + +/* Subroutine */ int dlaexc_(logical *wantq, integer *n, doublereal *t, + integer *ldt, doublereal *q, integer *ldq, integer *j1, integer *n1, + integer *n2, doublereal *work, integer *info); + +/* Subroutine */ int dlag2_(doublereal *a, integer *lda, doublereal *b, + integer *ldb, doublereal *safmin, doublereal *scale1, doublereal * + scale2, doublereal *wr1, doublereal *wr2, doublereal *wi); + +/* Subroutine */ int dlags2_(logical *upper, doublereal *a1, doublereal *a2, + doublereal *a3, doublereal *b1, doublereal *b2, doublereal *b3, + doublereal *csu, doublereal *snu, doublereal *csv, doublereal *snv, + doublereal *csq, doublereal *snq); + +/* Subroutine */ int dlagtf_(integer *n, doublereal *a, doublereal *lambda, + doublereal *b, doublereal *c__, doublereal *tol, doublereal *d__, + integer *in, integer *info); + +/* Subroutine */ int dlagtm_(char *trans, integer *n, integer *nrhs, + doublereal *alpha, doublereal *dl, doublereal *d__, doublereal *du, + doublereal *x, integer *ldx, doublereal *beta, doublereal *b, integer + *ldb); + +/* Subroutine */ int dlagts_(integer *job, integer *n, doublereal *a, + doublereal *b, doublereal *c__, doublereal *d__, integer *in, + doublereal *y, doublereal *tol, integer *info); + +/* Subroutine */ int dlagv2_(doublereal *a, integer *lda, doublereal *b, + integer *ldb, doublereal *alphar, doublereal *alphai, doublereal * + beta, doublereal *csl, doublereal *snl, doublereal *csr, doublereal * + snr); + +/* Subroutine */ int dlahqr_(logical *wantt, logical *wantz, integer *n, + integer *ilo, integer *ihi, doublereal *h__, integer *ldh, doublereal + *wr, doublereal *wi, integer *iloz, integer *ihiz, doublereal *z__, + integer *ldz, integer *info); + +/* Subroutine */ int dlahrd_(integer *n, integer *k, integer *nb, doublereal * + a, integer *lda, doublereal *tau, doublereal *t, integer *ldt, + doublereal *y, integer *ldy); + +/* Subroutine */ int dlaic1_(integer *job, integer *j, doublereal *x, + doublereal *sest, doublereal *w, doublereal *gamma, doublereal * + sestpr, doublereal *s, doublereal *c__); + +/* Subroutine */ int dlaln2_(logical *ltrans, integer *na, integer *nw, + doublereal *smin, doublereal *ca, doublereal *a, integer *lda, + doublereal *d1, doublereal *d2, doublereal *b, integer *ldb, + doublereal *wr, doublereal *wi, doublereal *x, integer *ldx, + doublereal *scale, doublereal *xnorm, integer *info); + +/* Subroutine */ int dlals0_(integer *icompq, integer *nl, integer *nr, + integer *sqre, integer *nrhs, doublereal *b, integer *ldb, doublereal + *bx, integer *ldbx, integer *perm, integer *givptr, integer *givcol, + integer *ldgcol, doublereal *givnum, integer *ldgnum, doublereal * + poles, doublereal *difl, doublereal *difr, doublereal *z__, integer * + k, doublereal *c__, doublereal *s, doublereal *work, integer *info); + +/* Subroutine */ int dlalsa_(integer *icompq, integer *smlsiz, integer *n, + integer *nrhs, doublereal *b, integer *ldb, doublereal *bx, integer * + ldbx, doublereal *u, integer *ldu, doublereal *vt, integer *k, + doublereal *difl, doublereal *difr, doublereal *z__, doublereal * + poles, integer *givptr, integer *givcol, integer *ldgcol, integer * + perm, doublereal *givnum, doublereal *c__, doublereal *s, doublereal * + work, integer *iwork, integer *info); + +/* Subroutine */ int dlalsd_(char *uplo, integer *smlsiz, integer *n, integer + *nrhs, doublereal *d__, doublereal *e, doublereal *b, integer *ldb, + doublereal *rcond, integer *rank, doublereal *work, integer *iwork, + integer *info); + +/* Subroutine */ int dlamc1_(integer *beta, integer *t, logical *rnd, logical + *ieee1); + +/* Subroutine */ int dlamc2_(integer *beta, integer *t, logical *rnd, + doublereal *eps, integer *emin, doublereal *rmin, integer *emax, + doublereal *rmax); + +/* Subroutine */ int dlamc4_(integer *emin, doublereal *start, integer *base); + +/* Subroutine */ int dlamc5_(integer *beta, integer *p, integer *emin, + logical *ieee, integer *emax, doublereal *rmax); + +/* Subroutine */ int dlamrg_(integer *n1, integer *n2, doublereal *a, integer + *dtrd1, integer *dtrd2, integer *index); + +/* Subroutine */ int dlanv2_(doublereal *a, doublereal *b, doublereal *c__, + doublereal *d__, doublereal *rt1r, doublereal *rt1i, doublereal *rt2r, + doublereal *rt2i, doublereal *cs, doublereal *sn); + +/* Subroutine */ int dlapll_(integer *n, doublereal *x, integer *incx, + doublereal *y, integer *incy, doublereal *ssmin); + +/* Subroutine */ int dlapmt_(logical *forwrd, integer *m, integer *n, + doublereal *x, integer *ldx, integer *k); + +/* Subroutine */ int dlaqgb_(integer *m, integer *n, integer *kl, integer *ku, + doublereal *ab, integer *ldab, doublereal *r__, doublereal *c__, + doublereal *rowcnd, doublereal *colcnd, doublereal *amax, char *equed); + +/* Subroutine */ int dlaqge_(integer *m, integer *n, doublereal *a, integer * + lda, doublereal *r__, doublereal *c__, doublereal *rowcnd, doublereal + *colcnd, doublereal *amax, char *equed); + +/* Subroutine */ int dlaqp2_(integer *m, integer *n, integer *offset, + doublereal *a, integer *lda, integer *jpvt, doublereal *tau, + doublereal *vn1, doublereal *vn2, doublereal *work); + +/* Subroutine */ int dlaqps_(integer *m, integer *n, integer *offset, integer + *nb, integer *kb, doublereal *a, integer *lda, integer *jpvt, + doublereal *tau, doublereal *vn1, doublereal *vn2, doublereal *auxv, + doublereal *f, integer *ldf); + +/* Subroutine */ int dlaqsb_(char *uplo, integer *n, integer *kd, doublereal * + ab, integer *ldab, doublereal *s, doublereal *scond, doublereal *amax, + char *equed); + +/* Subroutine */ int dlaqsp_(char *uplo, integer *n, doublereal *ap, + doublereal *s, doublereal *scond, doublereal *amax, char *equed); + +/* Subroutine */ int dlaqsy_(char *uplo, integer *n, doublereal *a, integer * + lda, doublereal *s, doublereal *scond, doublereal *amax, char *equed); + +/* Subroutine */ int dlaqtr_(logical *ltran, logical *lreal, integer *n, + doublereal *t, integer *ldt, doublereal *b, doublereal *w, doublereal + *scale, doublereal *x, doublereal *work, integer *info); + +/* Subroutine */ int dlar1v_(integer *n, integer *b1, integer *bn, doublereal + *sigma, doublereal *d__, doublereal *l, doublereal *ld, doublereal * + lld, doublereal *gersch, doublereal *z__, doublereal *ztz, doublereal + *mingma, integer *r__, integer *isuppz, doublereal *work); + +/* Subroutine */ int dlar2v_(integer *n, doublereal *x, doublereal *y, + doublereal *z__, integer *incx, doublereal *c__, doublereal *s, + integer *incc); + +/* Subroutine */ int dlarf_(char *side, integer *m, integer *n, doublereal *v, + integer *incv, doublereal *tau, doublereal *c__, integer *ldc, + doublereal *work); + +/* Subroutine */ int dlarfb_(char *side, char *trans, char *direct, char * + storev, integer *m, integer *n, integer *k, doublereal *v, integer * + ldv, doublereal *t, integer *ldt, doublereal *c__, integer *ldc, + doublereal *work, integer *ldwork); + +/* Subroutine */ int dlarfg_(integer *n, doublereal *alpha, doublereal *x, + integer *incx, doublereal *tau); + +/* Subroutine */ int dlarft_(char *direct, char *storev, integer *n, integer * + k, doublereal *v, integer *ldv, doublereal *tau, doublereal *t, + integer *ldt); + +/* Subroutine */ int dlarfx_(char *side, integer *m, integer *n, doublereal * + v, doublereal *tau, doublereal *c__, integer *ldc, doublereal *work); + +/* Subroutine */ int dlargv_(integer *n, doublereal *x, integer *incx, + doublereal *y, integer *incy, doublereal *c__, integer *incc); + +/* Subroutine */ int dlarnv_(integer *idist, integer *iseed, integer *n, + doublereal *x); + +/* Subroutine */ int dlarrb_(integer *n, doublereal *d__, doublereal *l, + doublereal *ld, doublereal *lld, integer *ifirst, integer *ilast, + doublereal *sigma, doublereal *reltol, doublereal *w, doublereal * + wgap, doublereal *werr, doublereal *work, integer *iwork, integer * + info); + +/* Subroutine */ int dlarre_(integer *n, doublereal *d__, doublereal *e, + doublereal *tol, integer *nsplit, integer *isplit, integer *m, + doublereal *w, doublereal *woff, doublereal *gersch, doublereal *work, + integer *info); + +/* Subroutine */ int dlarrf_(integer *n, doublereal *d__, doublereal *l, + doublereal *ld, doublereal *lld, integer *ifirst, integer *ilast, + doublereal *w, doublereal *dplus, doublereal *lplus, doublereal *work, + integer *iwork, integer *info); + +/* Subroutine */ int dlarrv_(integer *n, doublereal *d__, doublereal *l, + integer *isplit, integer *m, doublereal *w, integer *iblock, + doublereal *gersch, doublereal *tol, doublereal *z__, integer *ldz, + integer *isuppz, doublereal *work, integer *iwork, integer *info); + +/* Subroutine */ int dlartg_(doublereal *f, doublereal *g, doublereal *cs, + doublereal *sn, doublereal *r__); + +/* Subroutine */ int dlartv_(integer *n, doublereal *x, integer *incx, + doublereal *y, integer *incy, doublereal *c__, doublereal *s, integer + *incc); + +/* Subroutine */ int dlaruv_(integer *iseed, integer *n, doublereal *x); + +/* Subroutine */ int dlarz_(char *side, integer *m, integer *n, integer *l, + doublereal *v, integer *incv, doublereal *tau, doublereal *c__, + integer *ldc, doublereal *work); + +/* Subroutine */ int dlarzb_(char *side, char *trans, char *direct, char * + storev, integer *m, integer *n, integer *k, integer *l, doublereal *v, + integer *ldv, doublereal *t, integer *ldt, doublereal *c__, integer * + ldc, doublereal *work, integer *ldwork); + +/* Subroutine */ int dlarzt_(char *direct, char *storev, integer *n, integer * + k, doublereal *v, integer *ldv, doublereal *tau, doublereal *t, + integer *ldt); + +/* Subroutine */ int dlas2_(doublereal *f, doublereal *g, doublereal *h__, + doublereal *ssmin, doublereal *ssmax); + +/* Subroutine */ int dlascl_(char *type__, integer *kl, integer *ku, + doublereal *cfrom, doublereal *cto, integer *m, integer *n, + doublereal *a, integer *lda, integer *info); + +/* Subroutine */ int dlasd0_(integer *n, integer *sqre, doublereal *d__, + doublereal *e, doublereal *u, integer *ldu, doublereal *vt, integer * + ldvt, integer *smlsiz, integer *iwork, doublereal *work, integer * + info); + +/* Subroutine */ int dlasd1_(integer *nl, integer *nr, integer *sqre, + doublereal *d__, doublereal *alpha, doublereal *beta, doublereal *u, + integer *ldu, doublereal *vt, integer *ldvt, integer *idxq, integer * + iwork, doublereal *work, integer *info); + +/* Subroutine */ int dlasd2_(integer *nl, integer *nr, integer *sqre, integer + *k, doublereal *d__, doublereal *z__, doublereal *alpha, doublereal * + beta, doublereal *u, integer *ldu, doublereal *vt, integer *ldvt, + doublereal *dsigma, doublereal *u2, integer *ldu2, doublereal *vt2, + integer *ldvt2, integer *idxp, integer *idx, integer *idxc, integer * + idxq, integer *coltyp, integer *info); + +/* Subroutine */ int dlasd3_(integer *nl, integer *nr, integer *sqre, integer + *k, doublereal *d__, doublereal *q, integer *ldq, doublereal *dsigma, + doublereal *u, integer *ldu, doublereal *u2, integer *ldu2, + doublereal *vt, integer *ldvt, doublereal *vt2, integer *ldvt2, + integer *idxc, integer *ctot, doublereal *z__, integer *info); + +/* Subroutine */ int dlasd4_(integer *n, integer *i__, doublereal *d__, + doublereal *z__, doublereal *delta, doublereal *rho, doublereal * + sigma, doublereal *work, integer *info); + +/* Subroutine */ int dlasd5_(integer *i__, doublereal *d__, doublereal *z__, + doublereal *delta, doublereal *rho, doublereal *dsigma, doublereal * + work); + +/* Subroutine */ int dlasd6_(integer *icompq, integer *nl, integer *nr, + integer *sqre, doublereal *d__, doublereal *vf, doublereal *vl, + doublereal *alpha, doublereal *beta, integer *idxq, integer *perm, + integer *givptr, integer *givcol, integer *ldgcol, doublereal *givnum, + integer *ldgnum, doublereal *poles, doublereal *difl, doublereal * + difr, doublereal *z__, integer *k, doublereal *c__, doublereal *s, + doublereal *work, integer *iwork, integer *info); + +/* Subroutine */ int dlasd7_(integer *icompq, integer *nl, integer *nr, + integer *sqre, integer *k, doublereal *d__, doublereal *z__, + doublereal *zw, doublereal *vf, doublereal *vfw, doublereal *vl, + doublereal *vlw, doublereal *alpha, doublereal *beta, doublereal * + dsigma, integer *idx, integer *idxp, integer *idxq, integer *perm, + integer *givptr, integer *givcol, integer *ldgcol, doublereal *givnum, + integer *ldgnum, doublereal *c__, doublereal *s, integer *info); + +/* Subroutine */ int dlasd8_(integer *icompq, integer *k, doublereal *d__, + doublereal *z__, doublereal *vf, doublereal *vl, doublereal *difl, + doublereal *difr, integer *lddifr, doublereal *dsigma, doublereal * + work, integer *info); + +/* Subroutine */ int dlasd9_(integer *icompq, integer *ldu, integer *k, + doublereal *d__, doublereal *z__, doublereal *vf, doublereal *vl, + doublereal *difl, doublereal *difr, doublereal *dsigma, doublereal * + work, integer *info); + +/* Subroutine */ int dlasda_(integer *icompq, integer *smlsiz, integer *n, + integer *sqre, doublereal *d__, doublereal *e, doublereal *u, integer + *ldu, doublereal *vt, integer *k, doublereal *difl, doublereal *difr, + doublereal *z__, doublereal *poles, integer *givptr, integer *givcol, + integer *ldgcol, integer *perm, doublereal *givnum, doublereal *c__, + doublereal *s, doublereal *work, integer *iwork, integer *info); + +/* Subroutine */ int dlasdq_(char *uplo, integer *sqre, integer *n, integer * + ncvt, integer *nru, integer *ncc, doublereal *d__, doublereal *e, + doublereal *vt, integer *ldvt, doublereal *u, integer *ldu, + doublereal *c__, integer *ldc, doublereal *work, integer *info); + +/* Subroutine */ int dlasdt_(integer *n, integer *lvl, integer *nd, integer * + inode, integer *ndiml, integer *ndimr, integer *msub); + +/* Subroutine */ int dlaset_(char *uplo, integer *m, integer *n, doublereal * + alpha, doublereal *beta, doublereal *a, integer *lda); + +/* Subroutine */ int dlasq1_(integer *n, doublereal *d__, doublereal *e, + doublereal *work, integer *info); + +/* Subroutine */ int dlasq2_(integer *n, doublereal *z__, integer *info); + +/* Subroutine */ int dlasq3_(integer *i0, integer *n0, doublereal *z__, + integer *pp, doublereal *dmin__, doublereal *sigma, doublereal *desig, + doublereal *qmax, integer *nfail, integer *iter, integer *ndiv, + logical *ieee); + +/* Subroutine */ int dlasq4_(integer *i0, integer *n0, doublereal *z__, + integer *pp, integer *n0in, doublereal *dmin__, doublereal *dmin1, + doublereal *dmin2, doublereal *dn, doublereal *dn1, doublereal *dn2, + doublereal *tau, integer *ttype); + +/* Subroutine */ int dlasq5_(integer *i0, integer *n0, doublereal *z__, + integer *pp, doublereal *tau, doublereal *dmin__, doublereal *dmin1, + doublereal *dmin2, doublereal *dn, doublereal *dnm1, doublereal *dnm2, + logical *ieee); + +/* Subroutine */ int dlasq6_(integer *i0, integer *n0, doublereal *z__, + integer *pp, doublereal *dmin__, doublereal *dmin1, doublereal *dmin2, + doublereal *dn, doublereal *dnm1, doublereal *dnm2); + +/* Subroutine */ int dlasr_(char *side, char *pivot, char *direct, integer *m, + integer *n, doublereal *c__, doublereal *s, doublereal *a, integer * + lda); + +/* Subroutine */ int dlasrt_(char *id, integer *n, doublereal *d__, integer * + info); + +/* Subroutine */ int dlassq_(integer *n, doublereal *x, integer *incx, + doublereal *scale, doublereal *sumsq); + +/* Subroutine */ int dlasv2_(doublereal *f, doublereal *g, doublereal *h__, + doublereal *ssmin, doublereal *ssmax, doublereal *snr, doublereal * + csr, doublereal *snl, doublereal *csl); + +/* Subroutine */ int dlaswp_(integer *n, doublereal *a, integer *lda, integer + *k1, integer *k2, integer *ipiv, integer *incx); + +/* Subroutine */ int dlasy2_(logical *ltranl, logical *ltranr, integer *isgn, + integer *n1, integer *n2, doublereal *tl, integer *ldtl, doublereal * + tr, integer *ldtr, doublereal *b, integer *ldb, doublereal *scale, + doublereal *x, integer *ldx, doublereal *xnorm, integer *info); + +/* Subroutine */ int dlasyf_(char *uplo, integer *n, integer *nb, integer *kb, + doublereal *a, integer *lda, integer *ipiv, doublereal *w, integer * + ldw, integer *info); + +/* Subroutine */ int dlatbs_(char *uplo, char *trans, char *diag, char * + normin, integer *n, integer *kd, doublereal *ab, integer *ldab, + doublereal *x, doublereal *scale, doublereal *cnorm, integer *info); + +/* Subroutine */ int dlatdf_(integer *ijob, integer *n, doublereal *z__, + integer *ldz, doublereal *rhs, doublereal *rdsum, doublereal *rdscal, + integer *ipiv, integer *jpiv); + +/* Subroutine */ int dlatps_(char *uplo, char *trans, char *diag, char * + normin, integer *n, doublereal *ap, doublereal *x, doublereal *scale, + doublereal *cnorm, integer *info); + +/* Subroutine */ int dlatrd_(char *uplo, integer *n, integer *nb, doublereal * + a, integer *lda, doublereal *e, doublereal *tau, doublereal *w, + integer *ldw); + +/* Subroutine */ int dlatrs_(char *uplo, char *trans, char *diag, char * + normin, integer *n, doublereal *a, integer *lda, doublereal *x, + doublereal *scale, doublereal *cnorm, integer *info); + +/* Subroutine */ int dlatrz_(integer *m, integer *n, integer *l, doublereal * + a, integer *lda, doublereal *tau, doublereal *work); + +/* Subroutine */ int dlatzm_(char *side, integer *m, integer *n, doublereal * + v, integer *incv, doublereal *tau, doublereal *c1, doublereal *c2, + integer *ldc, doublereal *work); + +/* Subroutine */ int dlauu2_(char *uplo, integer *n, doublereal *a, integer * + lda, integer *info); + +/* Subroutine */ int dlauum_(char *uplo, integer *n, doublereal *a, integer * + lda, integer *info); + +/* Subroutine */ int dopgtr_(char *uplo, integer *n, doublereal *ap, + doublereal *tau, doublereal *q, integer *ldq, doublereal *work, + integer *info); + +/* Subroutine */ int dopmtr_(char *side, char *uplo, char *trans, integer *m, + integer *n, doublereal *ap, doublereal *tau, doublereal *c__, integer + *ldc, doublereal *work, integer *info); + +/* Subroutine */ int dorg2l_(integer *m, integer *n, integer *k, doublereal * + a, integer *lda, doublereal *tau, doublereal *work, integer *info); + +/* Subroutine */ int dorg2r_(integer *m, integer *n, integer *k, doublereal * + a, integer *lda, doublereal *tau, doublereal *work, integer *info); + +/* Subroutine */ int dorgbr_(char *vect, integer *m, integer *n, integer *k, + doublereal *a, integer *lda, doublereal *tau, doublereal *work, + integer *lwork, integer *info); + +/* Subroutine */ int dorghr_(integer *n, integer *ilo, integer *ihi, + doublereal *a, integer *lda, doublereal *tau, doublereal *work, + integer *lwork, integer *info); + +/* Subroutine */ int dorgl2_(integer *m, integer *n, integer *k, doublereal * + a, integer *lda, doublereal *tau, doublereal *work, integer *info); + +/* Subroutine */ int dorglq_(integer *m, integer *n, integer *k, doublereal * + a, integer *lda, doublereal *tau, doublereal *work, integer *lwork, + integer *info); + +/* Subroutine */ int dorgql_(integer *m, integer *n, integer *k, doublereal * + a, integer *lda, doublereal *tau, doublereal *work, integer *lwork, + integer *info); + +/* Subroutine */ int dorgqr_(integer *m, integer *n, integer *k, doublereal * + a, integer *lda, doublereal *tau, doublereal *work, integer *lwork, + integer *info); + +/* Subroutine */ int dorgr2_(integer *m, integer *n, integer *k, doublereal * + a, integer *lda, doublereal *tau, doublereal *work, integer *info); + +/* Subroutine */ int dorgrq_(integer *m, integer *n, integer *k, doublereal * + a, integer *lda, doublereal *tau, doublereal *work, integer *lwork, + integer *info); + +/* Subroutine */ int dorgtr_(char *uplo, integer *n, doublereal *a, integer * + lda, doublereal *tau, doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dorm2l_(char *side, char *trans, integer *m, integer *n, + integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * + c__, integer *ldc, doublereal *work, integer *info); + +/* Subroutine */ int dorm2r_(char *side, char *trans, integer *m, integer *n, + integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * + c__, integer *ldc, doublereal *work, integer *info); + +/* Subroutine */ int dormbr_(char *vect, char *side, char *trans, integer *m, + integer *n, integer *k, doublereal *a, integer *lda, doublereal *tau, + doublereal *c__, integer *ldc, doublereal *work, integer *lwork, + integer *info); + +/* Subroutine */ int dormhr_(char *side, char *trans, integer *m, integer *n, + integer *ilo, integer *ihi, doublereal *a, integer *lda, doublereal * + tau, doublereal *c__, integer *ldc, doublereal *work, integer *lwork, + integer *info); + +/* Subroutine */ int dorml2_(char *side, char *trans, integer *m, integer *n, + integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * + c__, integer *ldc, doublereal *work, integer *info); + +/* Subroutine */ int dormlq_(char *side, char *trans, integer *m, integer *n, + integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * + c__, integer *ldc, doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dormql_(char *side, char *trans, integer *m, integer *n, + integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * + c__, integer *ldc, doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dormqr_(char *side, char *trans, integer *m, integer *n, + integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * + c__, integer *ldc, doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dormr2_(char *side, char *trans, integer *m, integer *n, + integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * + c__, integer *ldc, doublereal *work, integer *info); + +/* Subroutine */ int dormr3_(char *side, char *trans, integer *m, integer *n, + integer *k, integer *l, doublereal *a, integer *lda, doublereal *tau, + doublereal *c__, integer *ldc, doublereal *work, integer *info); + +/* Subroutine */ int dormrq_(char *side, char *trans, integer *m, integer *n, + integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal * + c__, integer *ldc, doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dormrz_(char *side, char *trans, integer *m, integer *n, + integer *k, integer *l, doublereal *a, integer *lda, doublereal *tau, + doublereal *c__, integer *ldc, doublereal *work, integer *lwork, + integer *info); + +/* Subroutine */ int dormtr_(char *side, char *uplo, char *trans, integer *m, + integer *n, doublereal *a, integer *lda, doublereal *tau, doublereal * + c__, integer *ldc, doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dpbcon_(char *uplo, integer *n, integer *kd, doublereal * + ab, integer *ldab, doublereal *anorm, doublereal *rcond, doublereal * + work, integer *iwork, integer *info); + +/* Subroutine */ int dpbequ_(char *uplo, integer *n, integer *kd, doublereal * + ab, integer *ldab, doublereal *s, doublereal *scond, doublereal *amax, + integer *info); + +/* Subroutine */ int dpbrfs_(char *uplo, integer *n, integer *kd, integer * + nrhs, doublereal *ab, integer *ldab, doublereal *afb, integer *ldafb, + doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * + ferr, doublereal *berr, doublereal *work, integer *iwork, integer * + info); + +/* Subroutine */ int dpbstf_(char *uplo, integer *n, integer *kd, doublereal * + ab, integer *ldab, integer *info); + +/* Subroutine */ int dpbsv_(char *uplo, integer *n, integer *kd, integer * + nrhs, doublereal *ab, integer *ldab, doublereal *b, integer *ldb, + integer *info); + +/* Subroutine */ int dpbsvx_(char *fact, char *uplo, integer *n, integer *kd, + integer *nrhs, doublereal *ab, integer *ldab, doublereal *afb, + integer *ldafb, char *equed, doublereal *s, doublereal *b, integer * + ldb, doublereal *x, integer *ldx, doublereal *rcond, doublereal *ferr, + doublereal *berr, doublereal *work, integer *iwork, integer *info); + +/* Subroutine */ int dpbtf2_(char *uplo, integer *n, integer *kd, doublereal * + ab, integer *ldab, integer *info); + +/* Subroutine */ int dpbtrf_(char *uplo, integer *n, integer *kd, doublereal * + ab, integer *ldab, integer *info); + +/* Subroutine */ int dpbtrs_(char *uplo, integer *n, integer *kd, integer * + nrhs, doublereal *ab, integer *ldab, doublereal *b, integer *ldb, + integer *info); + +/* Subroutine */ int dpocon_(char *uplo, integer *n, doublereal *a, integer * + lda, doublereal *anorm, doublereal *rcond, doublereal *work, integer * + iwork, integer *info); + +/* Subroutine */ int dpoequ_(integer *n, doublereal *a, integer *lda, + doublereal *s, doublereal *scond, doublereal *amax, integer *info); + +/* Subroutine */ int dporfs_(char *uplo, integer *n, integer *nrhs, + doublereal *a, integer *lda, doublereal *af, integer *ldaf, + doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * + ferr, doublereal *berr, doublereal *work, integer *iwork, integer * + info); + +/* Subroutine */ int dposv_(char *uplo, integer *n, integer *nrhs, doublereal + *a, integer *lda, doublereal *b, integer *ldb, integer *info); + +/* Subroutine */ int dposvx_(char *fact, char *uplo, integer *n, integer * + nrhs, doublereal *a, integer *lda, doublereal *af, integer *ldaf, + char *equed, doublereal *s, doublereal *b, integer *ldb, doublereal * + x, integer *ldx, doublereal *rcond, doublereal *ferr, doublereal * + berr, doublereal *work, integer *iwork, integer *info); + +/* Subroutine */ int dpotf2_(char *uplo, integer *n, doublereal *a, integer * + lda, integer *info); + +/* Subroutine */ int dpotrf_(char *uplo, integer *n, doublereal *a, integer * + lda, integer *info); + +/* Subroutine */ int dpotri_(char *uplo, integer *n, doublereal *a, integer * + lda, integer *info); + +/* Subroutine */ int dpotrs_(char *uplo, integer *n, integer *nrhs, + doublereal *a, integer *lda, doublereal *b, integer *ldb, integer * + info); + +/* Subroutine */ int dppcon_(char *uplo, integer *n, doublereal *ap, + doublereal *anorm, doublereal *rcond, doublereal *work, integer * + iwork, integer *info); + +/* Subroutine */ int dppequ_(char *uplo, integer *n, doublereal *ap, + doublereal *s, doublereal *scond, doublereal *amax, integer *info); + +/* Subroutine */ int dpprfs_(char *uplo, integer *n, integer *nrhs, + doublereal *ap, doublereal *afp, doublereal *b, integer *ldb, + doublereal *x, integer *ldx, doublereal *ferr, doublereal *berr, + doublereal *work, integer *iwork, integer *info); + +/* Subroutine */ int dppsv_(char *uplo, integer *n, integer *nrhs, doublereal + *ap, doublereal *b, integer *ldb, integer *info); + +/* Subroutine */ int dppsvx_(char *fact, char *uplo, integer *n, integer * + nrhs, doublereal *ap, doublereal *afp, char *equed, doublereal *s, + doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * + rcond, doublereal *ferr, doublereal *berr, doublereal *work, integer * + iwork, integer *info); + +/* Subroutine */ int dpptrf_(char *uplo, integer *n, doublereal *ap, integer * + info); + +/* Subroutine */ int dpptri_(char *uplo, integer *n, doublereal *ap, integer * + info); + +/* Subroutine */ int dpptrs_(char *uplo, integer *n, integer *nrhs, + doublereal *ap, doublereal *b, integer *ldb, integer *info); + +/* Subroutine */ int dptcon_(integer *n, doublereal *d__, doublereal *e, + doublereal *anorm, doublereal *rcond, doublereal *work, integer *info); + +/* Subroutine */ int dpteqr_(char *compz, integer *n, doublereal *d__, + doublereal *e, doublereal *z__, integer *ldz, doublereal *work, + integer *info); + +/* Subroutine */ int dptrfs_(integer *n, integer *nrhs, doublereal *d__, + doublereal *e, doublereal *df, doublereal *ef, doublereal *b, integer + *ldb, doublereal *x, integer *ldx, doublereal *ferr, doublereal *berr, + doublereal *work, integer *info); + +/* Subroutine */ int dptsv_(integer *n, integer *nrhs, doublereal *d__, + doublereal *e, doublereal *b, integer *ldb, integer *info); + +/* Subroutine */ int dptsvx_(char *fact, integer *n, integer *nrhs, + doublereal *d__, doublereal *e, doublereal *df, doublereal *ef, + doublereal *b, integer *ldb, doublereal *x, integer *ldx, doublereal * + rcond, doublereal *ferr, doublereal *berr, doublereal *work, integer * + info); + +/* Subroutine */ int dpttrf_(integer *n, doublereal *d__, doublereal *e, + integer *info); + +/* Subroutine */ int dpttrs_(integer *n, integer *nrhs, doublereal *d__, + doublereal *e, doublereal *b, integer *ldb, integer *info); + +/* Subroutine */ int dptts2_(integer *n, integer *nrhs, doublereal *d__, + doublereal *e, doublereal *b, integer *ldb); + +/* Subroutine */ int drscl_(integer *n, doublereal *sa, doublereal *sx, + integer *incx); + +/* Subroutine */ int dsbev_(char *jobz, char *uplo, integer *n, integer *kd, + doublereal *ab, integer *ldab, doublereal *w, doublereal *z__, + integer *ldz, doublereal *work, integer *info); + +/* Subroutine */ int dsbevd_(char *jobz, char *uplo, integer *n, integer *kd, + doublereal *ab, integer *ldab, doublereal *w, doublereal *z__, + integer *ldz, doublereal *work, integer *lwork, integer *iwork, + integer *liwork, integer *info); + +/* Subroutine */ int dsbevx_(char *jobz, char *range, char *uplo, integer *n, + integer *kd, doublereal *ab, integer *ldab, doublereal *q, integer * + ldq, doublereal *vl, doublereal *vu, integer *il, integer *iu, + doublereal *abstol, integer *m, doublereal *w, doublereal *z__, + integer *ldz, doublereal *work, integer *iwork, integer *ifail, + integer *info); + +/* Subroutine */ int dsbgst_(char *vect, char *uplo, integer *n, integer *ka, + integer *kb, doublereal *ab, integer *ldab, doublereal *bb, integer * + ldbb, doublereal *x, integer *ldx, doublereal *work, integer *info); + +/* Subroutine */ int dsbgv_(char *jobz, char *uplo, integer *n, integer *ka, + integer *kb, doublereal *ab, integer *ldab, doublereal *bb, integer * + ldbb, doublereal *w, doublereal *z__, integer *ldz, doublereal *work, + integer *info); + +/* Subroutine */ int dsbgvd_(char *jobz, char *uplo, integer *n, integer *ka, + integer *kb, doublereal *ab, integer *ldab, doublereal *bb, integer * + ldbb, doublereal *w, doublereal *z__, integer *ldz, doublereal *work, + integer *lwork, integer *iwork, integer *liwork, integer *info); + +/* Subroutine */ int dsbgvx_(char *jobz, char *range, char *uplo, integer *n, + integer *ka, integer *kb, doublereal *ab, integer *ldab, doublereal * + bb, integer *ldbb, doublereal *q, integer *ldq, doublereal *vl, + doublereal *vu, integer *il, integer *iu, doublereal *abstol, integer + *m, doublereal *w, doublereal *z__, integer *ldz, doublereal *work, + integer *iwork, integer *ifail, integer *info); + +/* Subroutine */ int dsbtrd_(char *vect, char *uplo, integer *n, integer *kd, + doublereal *ab, integer *ldab, doublereal *d__, doublereal *e, + doublereal *q, integer *ldq, doublereal *work, integer *info); + +/* Subroutine */ int dspcon_(char *uplo, integer *n, doublereal *ap, integer * + ipiv, doublereal *anorm, doublereal *rcond, doublereal *work, integer + *iwork, integer *info); + +/* Subroutine */ int dspev_(char *jobz, char *uplo, integer *n, doublereal * + ap, doublereal *w, doublereal *z__, integer *ldz, doublereal *work, + integer *info); + +/* Subroutine */ int dspevd_(char *jobz, char *uplo, integer *n, doublereal * + ap, doublereal *w, doublereal *z__, integer *ldz, doublereal *work, + integer *lwork, integer *iwork, integer *liwork, integer *info); + +/* Subroutine */ int dspevx_(char *jobz, char *range, char *uplo, integer *n, + doublereal *ap, doublereal *vl, doublereal *vu, integer *il, integer * + iu, doublereal *abstol, integer *m, doublereal *w, doublereal *z__, + integer *ldz, doublereal *work, integer *iwork, integer *ifail, + integer *info); + +/* Subroutine */ int dspgst_(integer *itype, char *uplo, integer *n, + doublereal *ap, doublereal *bp, integer *info); + +/* Subroutine */ int dspgv_(integer *itype, char *jobz, char *uplo, integer * + n, doublereal *ap, doublereal *bp, doublereal *w, doublereal *z__, + integer *ldz, doublereal *work, integer *info); + +/* Subroutine */ int dspgvd_(integer *itype, char *jobz, char *uplo, integer * + n, doublereal *ap, doublereal *bp, doublereal *w, doublereal *z__, + integer *ldz, doublereal *work, integer *lwork, integer *iwork, + integer *liwork, integer *info); + +/* Subroutine */ int dspgvx_(integer *itype, char *jobz, char *range, char * + uplo, integer *n, doublereal *ap, doublereal *bp, doublereal *vl, + doublereal *vu, integer *il, integer *iu, doublereal *abstol, integer + *m, doublereal *w, doublereal *z__, integer *ldz, doublereal *work, + integer *iwork, integer *ifail, integer *info); + +/* Subroutine */ int dsprfs_(char *uplo, integer *n, integer *nrhs, + doublereal *ap, doublereal *afp, integer *ipiv, doublereal *b, + integer *ldb, doublereal *x, integer *ldx, doublereal *ferr, + doublereal *berr, doublereal *work, integer *iwork, integer *info); + +/* Subroutine */ int dspsv_(char *uplo, integer *n, integer *nrhs, doublereal + *ap, integer *ipiv, doublereal *b, integer *ldb, integer *info); + +/* Subroutine */ int dspsvx_(char *fact, char *uplo, integer *n, integer * + nrhs, doublereal *ap, doublereal *afp, integer *ipiv, doublereal *b, + integer *ldb, doublereal *x, integer *ldx, doublereal *rcond, + doublereal *ferr, doublereal *berr, doublereal *work, integer *iwork, + integer *info); + +/* Subroutine */ int dsptrd_(char *uplo, integer *n, doublereal *ap, + doublereal *d__, doublereal *e, doublereal *tau, integer *info); + +/* Subroutine */ int dsptrf_(char *uplo, integer *n, doublereal *ap, integer * + ipiv, integer *info); + +/* Subroutine */ int dsptri_(char *uplo, integer *n, doublereal *ap, integer * + ipiv, doublereal *work, integer *info); + +/* Subroutine */ int dsptrs_(char *uplo, integer *n, integer *nrhs, + doublereal *ap, integer *ipiv, doublereal *b, integer *ldb, integer * + info); + +/* Subroutine */ int dstebz_(char *range, char *order, integer *n, doublereal + *vl, doublereal *vu, integer *il, integer *iu, doublereal *abstol, + doublereal *d__, doublereal *e, integer *m, integer *nsplit, + doublereal *w, integer *iblock, integer *isplit, doublereal *work, + integer *iwork, integer *info); + +/* Subroutine */ int dstedc_(char *compz, integer *n, doublereal *d__, + doublereal *e, doublereal *z__, integer *ldz, doublereal *work, + integer *lwork, integer *iwork, integer *liwork, integer *info); + +/* Subroutine */ int dstegr_(char *jobz, char *range, integer *n, doublereal * + d__, doublereal *e, doublereal *vl, doublereal *vu, integer *il, + integer *iu, doublereal *abstol, integer *m, doublereal *w, + doublereal *z__, integer *ldz, integer *isuppz, doublereal *work, + integer *lwork, integer *iwork, integer *liwork, integer *info); + +/* Subroutine */ int dstein_(integer *n, doublereal *d__, doublereal *e, + integer *m, doublereal *w, integer *iblock, integer *isplit, + doublereal *z__, integer *ldz, doublereal *work, integer *iwork, + integer *ifail, integer *info); + +/* Subroutine */ int dsteqr_(char *compz, integer *n, doublereal *d__, + doublereal *e, doublereal *z__, integer *ldz, doublereal *work, + integer *info); + +/* Subroutine */ int dsterf_(integer *n, doublereal *d__, doublereal *e, + integer *info); + +/* Subroutine */ int dstev_(char *jobz, integer *n, doublereal *d__, + doublereal *e, doublereal *z__, integer *ldz, doublereal *work, + integer *info); + +/* Subroutine */ int dstevd_(char *jobz, integer *n, doublereal *d__, + doublereal *e, doublereal *z__, integer *ldz, doublereal *work, + integer *lwork, integer *iwork, integer *liwork, integer *info); + +/* Subroutine */ int dstevr_(char *jobz, char *range, integer *n, doublereal * + d__, doublereal *e, doublereal *vl, doublereal *vu, integer *il, + integer *iu, doublereal *abstol, integer *m, doublereal *w, + doublereal *z__, integer *ldz, integer *isuppz, doublereal *work, + integer *lwork, integer *iwork, integer *liwork, integer *info); + +/* Subroutine */ int dstevx_(char *jobz, char *range, integer *n, doublereal * + d__, doublereal *e, doublereal *vl, doublereal *vu, integer *il, + integer *iu, doublereal *abstol, integer *m, doublereal *w, + doublereal *z__, integer *ldz, doublereal *work, integer *iwork, + integer *ifail, integer *info); + +/* Subroutine */ int dsycon_(char *uplo, integer *n, doublereal *a, integer * + lda, integer *ipiv, doublereal *anorm, doublereal *rcond, doublereal * + work, integer *iwork, integer *info); + +/* Subroutine */ int dsyev_(char *jobz, char *uplo, integer *n, doublereal *a, + integer *lda, doublereal *w, doublereal *work, integer *lwork, + integer *info); + +/* Subroutine */ int dsyevd_(char *jobz, char *uplo, integer *n, doublereal * + a, integer *lda, doublereal *w, doublereal *work, integer *lwork, + integer *iwork, integer *liwork, integer *info); + +/* Subroutine */ int dsyevr_(char *jobz, char *range, char *uplo, integer *n, + doublereal *a, integer *lda, doublereal *vl, doublereal *vu, integer * + il, integer *iu, doublereal *abstol, integer *m, doublereal *w, + doublereal *z__, integer *ldz, integer *isuppz, doublereal *work, + integer *lwork, integer *iwork, integer *liwork, integer *info); + +/* Subroutine */ int dsyevx_(char *jobz, char *range, char *uplo, integer *n, + doublereal *a, integer *lda, doublereal *vl, doublereal *vu, integer * + il, integer *iu, doublereal *abstol, integer *m, doublereal *w, + doublereal *z__, integer *ldz, doublereal *work, integer *lwork, + integer *iwork, integer *ifail, integer *info); + +/* Subroutine */ int dsygs2_(integer *itype, char *uplo, integer *n, + doublereal *a, integer *lda, doublereal *b, integer *ldb, integer * + info); + +/* Subroutine */ int dsygst_(integer *itype, char *uplo, integer *n, + doublereal *a, integer *lda, doublereal *b, integer *ldb, integer * + info); + +/* Subroutine */ int dsygv_(integer *itype, char *jobz, char *uplo, integer * + n, doublereal *a, integer *lda, doublereal *b, integer *ldb, + doublereal *w, doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dsygvd_(integer *itype, char *jobz, char *uplo, integer * + n, doublereal *a, integer *lda, doublereal *b, integer *ldb, + doublereal *w, doublereal *work, integer *lwork, integer *iwork, + integer *liwork, integer *info); + +/* Subroutine */ int dsygvx_(integer *itype, char *jobz, char *range, char * + uplo, integer *n, doublereal *a, integer *lda, doublereal *b, integer + *ldb, doublereal *vl, doublereal *vu, integer *il, integer *iu, + doublereal *abstol, integer *m, doublereal *w, doublereal *z__, + integer *ldz, doublereal *work, integer *lwork, integer *iwork, + integer *ifail, integer *info); + +/* Subroutine */ int dsyrfs_(char *uplo, integer *n, integer *nrhs, + doublereal *a, integer *lda, doublereal *af, integer *ldaf, integer * + ipiv, doublereal *b, integer *ldb, doublereal *x, integer *ldx, + doublereal *ferr, doublereal *berr, doublereal *work, integer *iwork, + integer *info); + +/* Subroutine */ int dsysv_(char *uplo, integer *n, integer *nrhs, doublereal + *a, integer *lda, integer *ipiv, doublereal *b, integer *ldb, + doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dsysvx_(char *fact, char *uplo, integer *n, integer * + nrhs, doublereal *a, integer *lda, doublereal *af, integer *ldaf, + integer *ipiv, doublereal *b, integer *ldb, doublereal *x, integer * + ldx, doublereal *rcond, doublereal *ferr, doublereal *berr, + doublereal *work, integer *lwork, integer *iwork, integer *info); + +/* Subroutine */ int dsytd2_(char *uplo, integer *n, doublereal *a, integer * + lda, doublereal *d__, doublereal *e, doublereal *tau, integer *info); + +/* Subroutine */ int dsytf2_(char *uplo, integer *n, doublereal *a, integer * + lda, integer *ipiv, integer *info); + +/* Subroutine */ int dsytrd_(char *uplo, integer *n, doublereal *a, integer * + lda, doublereal *d__, doublereal *e, doublereal *tau, doublereal * + work, integer *lwork, integer *info); + +/* Subroutine */ int dsytrf_(char *uplo, integer *n, doublereal *a, integer * + lda, integer *ipiv, doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dsytri_(char *uplo, integer *n, doublereal *a, integer * + lda, integer *ipiv, doublereal *work, integer *info); + +/* Subroutine */ int dsytrs_(char *uplo, integer *n, integer *nrhs, + doublereal *a, integer *lda, integer *ipiv, doublereal *b, integer * + ldb, integer *info); + +/* Subroutine */ int dtbcon_(char *norm, char *uplo, char *diag, integer *n, + integer *kd, doublereal *ab, integer *ldab, doublereal *rcond, + doublereal *work, integer *iwork, integer *info); + +/* Subroutine */ int dtbrfs_(char *uplo, char *trans, char *diag, integer *n, + integer *kd, integer *nrhs, doublereal *ab, integer *ldab, doublereal + *b, integer *ldb, doublereal *x, integer *ldx, doublereal *ferr, + doublereal *berr, doublereal *work, integer *iwork, integer *info); + +/* Subroutine */ int dtbtrs_(char *uplo, char *trans, char *diag, integer *n, + integer *kd, integer *nrhs, doublereal *ab, integer *ldab, doublereal + *b, integer *ldb, integer *info); + +/* Subroutine */ int dtgevc_(char *side, char *howmny, logical *select, + integer *n, doublereal *a, integer *lda, doublereal *b, integer *ldb, + doublereal *vl, integer *ldvl, doublereal *vr, integer *ldvr, integer + *mm, integer *m, doublereal *work, integer *info); + +/* Subroutine */ int dtgex2_(logical *wantq, logical *wantz, integer *n, + doublereal *a, integer *lda, doublereal *b, integer *ldb, doublereal * + q, integer *ldq, doublereal *z__, integer *ldz, integer *j1, integer * + n1, integer *n2, doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dtgexc_(logical *wantq, logical *wantz, integer *n, + doublereal *a, integer *lda, doublereal *b, integer *ldb, doublereal * + q, integer *ldq, doublereal *z__, integer *ldz, integer *ifst, + integer *ilst, doublereal *work, integer *lwork, integer *info); + +/* Subroutine */ int dtgsen_(integer *ijob, logical *wantq, logical *wantz, + logical *select, integer *n, doublereal *a, integer *lda, doublereal * + b, integer *ldb, doublereal *alphar, doublereal *alphai, doublereal * + beta, doublereal *q, integer *ldq, doublereal *z__, integer *ldz, + integer *m, doublereal *pl, doublereal *pr, doublereal *dif, + doublereal *work, integer *lwork, integer *iwork, integer *liwork, + integer *info); + +/* Subroutine */ int dtgsja_(char *jobu, char *jobv, char *jobq, integer *m, + integer *p, integer *n, integer *k, integer *l, doublereal *a, + integer *lda, doublereal *b, integer *ldb, doublereal *tola, + doublereal *tolb, doublereal *alpha, doublereal *beta, doublereal *u, + integer *ldu, doublereal *v, integer *ldv, doublereal *q, integer * + ldq, doublereal *work, integer *ncycle, integer *info); + +/* Subroutine */ int dtgsna_(char *job, char *howmny, logical *select, + integer *n, doublereal *a, integer *lda, doublereal *b, integer *ldb, + doublereal *vl, integer *ldvl, doublereal *vr, integer *ldvr, + doublereal *s, doublereal *dif, integer *mm, integer *m, doublereal * + work, integer *lwork, integer *iwork, integer *info); + +/* Subroutine */ int dtgsy2_(char *trans, integer *ijob, integer *m, integer * + n, doublereal *a, integer *lda, doublereal *b, integer *ldb, + doublereal *c__, integer *ldc, doublereal *d__, integer *ldd, + doublereal *e, integer *lde, doublereal *f, integer *ldf, doublereal * + scale, doublereal *rdsum, doublereal *rdscal, integer *iwork, integer + *pq, integer *info); + +/* Subroutine */ int dtgsyl_(char *trans, integer *ijob, integer *m, integer * + n, doublereal *a, integer *lda, doublereal *b, integer *ldb, + doublereal *c__, integer *ldc, doublereal *d__, integer *ldd, + doublereal *e, integer *lde, doublereal *f, integer *ldf, doublereal * + scale, doublereal *dif, doublereal *work, integer *lwork, integer * + iwork, integer *info); + +/* Subroutine */ int dtpcon_(char *norm, char *uplo, char *diag, integer *n, + doublereal *ap, doublereal *rcond, doublereal *work, integer *iwork, + integer *info); + +/* Subroutine */ int dtprfs_(char *uplo, char *trans, char *diag, integer *n, + integer *nrhs, doublereal *ap, doublereal *b, integer *ldb, + doublereal *x, integer *ldx, doublereal *ferr, doublereal *berr, + doublereal *work, integer *iwork, integer *info); + +/* Subroutine */ int dtptri_(char *uplo, char *diag, integer *n, doublereal * + ap, integer *info); + +/* Subroutine */ int dtptrs_(char *uplo, char *trans, char *diag, integer *n, + integer *nrhs, doublereal *ap, doublereal *b, integer *ldb, integer * + info); + +/* Subroutine */ int dtrcon_(char *norm, char *uplo, char *diag, integer *n, + doublereal *a, integer *lda, doublereal *rcond, doublereal *work, + integer *iwork, integer *info); + +/* Subroutine */ int dtrevc_(char *side, char *howmny, logical *select, + integer *n, doublereal *t, integer *ldt, doublereal *vl, integer * + ldvl, doublereal *vr, integer *ldvr, integer *mm, integer *m, + doublereal *work, integer *info); + +/* Subroutine */ int dtrexc_(char *compq, integer *n, doublereal *t, integer * + ldt, doublereal *q, integer *ldq, integer *ifst, integer *ilst, + doublereal *work, integer *info); + +/* Subroutine */ int dtrrfs_(char *uplo, char *trans, char *diag, integer *n, + integer *nrhs, doublereal *a, integer *lda, doublereal *b, integer * + ldb, doublereal *x, integer *ldx, doublereal *ferr, doublereal *berr, + doublereal *work, integer *iwork, integer *info); + +/* Subroutine */ int dtrsen_(char *job, char *compq, logical *select, integer + *n, doublereal *t, integer *ldt, doublereal *q, integer *ldq, + doublereal *wr, doublereal *wi, integer *m, doublereal *s, doublereal + *sep, doublereal *work, integer *lwork, integer *iwork, integer * + liwork, integer *info); + +/* Subroutine */ int dtrsna_(char *job, char *howmny, logical *select, + integer *n, doublereal *t, integer *ldt, doublereal *vl, integer * + ldvl, doublereal *vr, integer *ldvr, doublereal *s, doublereal *sep, + integer *mm, integer *m, doublereal *work, integer *ldwork, integer * + iwork, integer *info); + +/* Subroutine */ int dtrsyl_(char *trana, char *tranb, integer *isgn, integer + *m, integer *n, doublereal *a, integer *lda, doublereal *b, integer * + ldb, doublereal *c__, integer *ldc, doublereal *scale, integer *info); + +/* Subroutine */ int dtrti2_(char *uplo, char *diag, integer *n, doublereal * + a, integer *lda, integer *info); + +/* Subroutine */ int dtrtri_(char *uplo, char *diag, integer *n, doublereal * + a, integer *lda, integer *info); + +/* Subroutine */ int dtrtrs_(char *uplo, char *trans, char *diag, integer *n, + integer *nrhs, doublereal *a, integer *lda, doublereal *b, integer * + ldb, integer *info); + +/* Subroutine */ int dtzrqf_(integer *m, integer *n, doublereal *a, integer * + lda, doublereal *tau, integer *info); + +/* Subroutine */ int dtzrzf_(integer *m, integer *n, doublereal *a, integer * + lda, doublereal *tau, doublereal *work, integer *lwork, integer *info); + +integer icmax1_(integer *n, complex *cx, integer *incx); + +integer ieeeck_(integer *ispec, real *zero, real *one); + +integer ilaenv_(integer *ispec, char *name__, char *opts, integer *n1, + integer *n2, integer *n3, integer *n4, ftnlen name_len, ftnlen + opts_len); + +integer izmax1_(integer *n, doublecomplex *cx, integer *incx); + +/* Subroutine */ int sbdsdc_(char *uplo, char *compq, integer *n, real *d__, + real *e, real *u, integer *ldu, real *vt, integer *ldvt, real *q, + integer *iq, real *work, integer *iwork, integer *info); + +/* Subroutine */ int sbdsqr_(char *uplo, integer *n, integer *ncvt, integer * + nru, integer *ncc, real *d__, real *e, real *vt, integer *ldvt, real * + u, integer *ldu, real *c__, integer *ldc, real *work, integer *info); + +/* Subroutine */ int sdisna_(char *job, integer *m, integer *n, real *d__, + real *sep, integer *info); + +/* Subroutine */ int sgbbrd_(char *vect, integer *m, integer *n, integer *ncc, + integer *kl, integer *ku, real *ab, integer *ldab, real *d__, real * + e, real *q, integer *ldq, real *pt, integer *ldpt, real *c__, integer + *ldc, real *work, integer *info); + +/* Subroutine */ int sgbcon_(char *norm, integer *n, integer *kl, integer *ku, + real *ab, integer *ldab, integer *ipiv, real *anorm, real *rcond, + real *work, integer *iwork, integer *info); + +/* Subroutine */ int sgbequ_(integer *m, integer *n, integer *kl, integer *ku, + real *ab, integer *ldab, real *r__, real *c__, real *rowcnd, real * + colcnd, real *amax, integer *info); + +/* Subroutine */ int sgbrfs_(char *trans, integer *n, integer *kl, integer * + ku, integer *nrhs, real *ab, integer *ldab, real *afb, integer *ldafb, + integer *ipiv, real *b, integer *ldb, real *x, integer *ldx, real * + ferr, real *berr, real *work, integer *iwork, integer *info); + +/* Subroutine */ int sgbsv_(integer *n, integer *kl, integer *ku, integer * + nrhs, real *ab, integer *ldab, integer *ipiv, real *b, integer *ldb, + integer *info); + +/* Subroutine */ int sgbsvx_(char *fact, char *trans, integer *n, integer *kl, + integer *ku, integer *nrhs, real *ab, integer *ldab, real *afb, + integer *ldafb, integer *ipiv, char *equed, real *r__, real *c__, + real *b, integer *ldb, real *x, integer *ldx, real *rcond, real *ferr, + real *berr, real *work, integer *iwork, integer *info); + +/* Subroutine */ int sgbtf2_(integer *m, integer *n, integer *kl, integer *ku, + real *ab, integer *ldab, integer *ipiv, integer *info); + +/* Subroutine */ int sgbtrf_(integer *m, integer *n, integer *kl, integer *ku, + real *ab, integer *ldab, integer *ipiv, integer *info); + +/* Subroutine */ int sgbtrs_(char *trans, integer *n, integer *kl, integer * + ku, integer *nrhs, real *ab, integer *ldab, integer *ipiv, real *b, + integer *ldb, integer *info); + +/* Subroutine */ int sgebak_(char *job, char *side, integer *n, integer *ilo, + integer *ihi, real *scale, integer *m, real *v, integer *ldv, integer + *info); + +/* Subroutine */ int sgebal_(char *job, integer *n, real *a, integer *lda, + integer *ilo, integer *ihi, real *scale, integer *info); + +/* Subroutine */ int sgebd2_(integer *m, integer *n, real *a, integer *lda, + real *d__, real *e, real *tauq, real *taup, real *work, integer *info); + +/* Subroutine */ int sgebrd_(integer *m, integer *n, real *a, integer *lda, + real *d__, real *e, real *tauq, real *taup, real *work, integer * + lwork, integer *info); + +/* Subroutine */ int sgecon_(char *norm, integer *n, real *a, integer *lda, + real *anorm, real *rcond, real *work, integer *iwork, integer *info); + +/* Subroutine */ int sgeequ_(integer *m, integer *n, real *a, integer *lda, + real *r__, real *c__, real *rowcnd, real *colcnd, real *amax, integer + *info); + +/* Subroutine */ int sgees_(char *jobvs, char *sort, L_fp select, integer *n, + real *a, integer *lda, integer *sdim, real *wr, real *wi, real *vs, + integer *ldvs, real *work, integer *lwork, logical *bwork, integer * + info); + +/* Subroutine */ int sgeesx_(char *jobvs, char *sort, L_fp select, char * + sense, integer *n, real *a, integer *lda, integer *sdim, real *wr, + real *wi, real *vs, integer *ldvs, real *rconde, real *rcondv, real * + work, integer *lwork, integer *iwork, integer *liwork, logical *bwork, + integer *info); + +/* Subroutine */ int sgeev_(char *jobvl, char *jobvr, integer *n, real *a, + integer *lda, real *wr, real *wi, real *vl, integer *ldvl, real *vr, + integer *ldvr, real *work, integer *lwork, integer *info); + +/* Subroutine */ int sgeevx_(char *balanc, char *jobvl, char *jobvr, char * + sense, integer *n, real *a, integer *lda, real *wr, real *wi, real * + vl, integer *ldvl, real *vr, integer *ldvr, integer *ilo, integer * + ihi, real *scale, real *abnrm, real *rconde, real *rcondv, real *work, + integer *lwork, integer *iwork, integer *info); + +/* Subroutine */ int sgegs_(char *jobvsl, char *jobvsr, integer *n, real *a, + integer *lda, real *b, integer *ldb, real *alphar, real *alphai, real + *beta, real *vsl, integer *ldvsl, real *vsr, integer *ldvsr, real * + work, integer *lwork, integer *info); + +/* Subroutine */ int sgegv_(char *jobvl, char *jobvr, integer *n, real *a, + integer *lda, real *b, integer *ldb, real *alphar, real *alphai, real + *beta, real *vl, integer *ldvl, real *vr, integer *ldvr, real *work, + integer *lwork, integer *info); + +/* Subroutine */ int sgehd2_(integer *n, integer *ilo, integer *ihi, real *a, + integer *lda, real *tau, real *work, integer *info); + +/* Subroutine */ int sgehrd_(integer *n, integer *ilo, integer *ihi, real *a, + integer *lda, real *tau, real *work, integer *lwork, integer *info); + +/* Subroutine */ int sgelq2_(integer *m, integer *n, real *a, integer *lda, + real *tau, real *work, integer *info); + +/* Subroutine */ int sgelqf_(integer *m, integer *n, real *a, integer *lda, + real *tau, real *work, integer *lwork, integer *info); + +/* Subroutine */ int sgels_(char *trans, integer *m, integer *n, integer * + nrhs, real *a, integer *lda, real *b, integer *ldb, real *work, + integer *lwork, integer *info); + +/* Subroutine */ int sgelsd_(integer *m, integer *n, integer *nrhs, real *a, + integer *lda, real *b, integer *ldb, real *s, real *rcond, integer * + rank, real *work, integer *lwork, integer *iwork, integer *info); + +/* Subroutine */ int sgelss_(integer *m, integer *n, integer *nrhs, real *a, + integer *lda, real *b, integer *ldb, real *s, real *rcond, integer * + rank, real *work, integer *lwork, integer *info); + +/* Subroutine */ int sgelsx_(integer *m, integer *n, integer *nrhs, real *a, + integer *lda, real *b, integer *ldb, integer *jpvt, real *rcond, + integer *rank, real *work, integer *info); + +/* Subroutine */ int sgelsy_(integer *m, integer *n, integer *nrhs, real *a, + integer *lda, real *b, integer *ldb, integer *jpvt, real *rcond, + integer *rank, real *work, integer *lwork, integer *info); + +/* Subroutine */ int sgeql2_(integer *m, integer *n, real *a, integer *lda, + real *tau, real *work, integer *info); + +/* Subroutine */ int sgeqlf_(integer *m, integer *n, real *a, integer *lda, + real *tau, real *work, integer *lwork, integer *info); + +/* Subroutine */ int sgeqp3_(integer *m, integer *n, real *a, integer *lda, + integer *jpvt, real *tau, real *work, integer *lwork, integer *info); + +/* Subroutine */ int sgeqpf_(integer *m, integer *n, real *a, integer *lda, + integer *jpvt, real *tau, real *work, integer *info); + +/* Subroutine */ int sgeqr2_(integer *m, integer *n, real *a, integer *lda, + real *tau, real *work, integer *info); + +/* Subroutine */ int sgeqrf_(integer *m, integer *n, real *a, integer *lda, + real *tau, real *work, integer *lwork, integer *info); + +/* Subroutine */ int sgerfs_(char *trans, integer *n, integer *nrhs, real *a, + integer *lda, real *af, integer *ldaf, integer *ipiv, real *b, + integer *ldb, real *x, integer *ldx, real *ferr, real *berr, real * + work, integer *iwork, integer *info); + +/* Subroutine */ int sgerq2_(integer *m, integer *n, real *a, integer *lda, + real *tau, real *work, integer *info); + +/* Subroutine */ int sgerqf_(integer *m, integer *n, real *a, integer *lda, + real *tau, real *work, integer *lwork, integer *info); + +/* Subroutine */ int sgesc2_(integer *n, real *a, integer *lda, real *rhs, + integer *ipiv, integer *jpiv, real *scale); + +/* Subroutine */ int sgesdd_(char *jobz, integer *m, integer *n, real *a, + integer *lda, real *s, real *u, integer *ldu, real *vt, integer *ldvt, + real *work, integer *lwork, integer *iwork, integer *info); + +/* Subroutine */ int sgesv_(integer *n, integer *nrhs, real *a, integer *lda, + integer *ipiv, real *b, integer *ldb, integer *info); + +/* Subroutine */ int sgesvd_(char *jobu, char *jobvt, integer *m, integer *n, + real *a, integer *lda, real *s, real *u, integer *ldu, real *vt, + integer *ldvt, real *work, integer *lwork, integer *info); + +/* Subroutine */ int sgesvx_(char *fact, char *trans, integer *n, integer * + nrhs, real *a, integer *lda, real *af, integer *ldaf, integer *ipiv, + char *equed, real *r__, real *c__, real *b, integer *ldb, real *x, + integer *ldx, real *rcond, real *ferr, real *berr, real *work, + integer *iwork, integer *info); + +/* Subroutine */ int sgetc2_(integer *n, real *a, integer *lda, integer *ipiv, + integer *jpiv, integer *info); + +/* Subroutine */ int sgetf2_(integer *m, integer *n, real *a, integer *lda, + integer *ipiv, integer *info); + +/* Subroutine */ int sgetrf_(integer *m, integer *n, real *a, integer *lda, + integer *ipiv, integer *info); + +/* Subroutine */ int sgetri_(integer *n, real *a, integer *lda, integer *ipiv, + real *work, integer *lwork, integer *info); + +/* Subroutine */ int sgetrs_(char *trans, integer *n, integer *nrhs, real *a, + integer *lda, integer *ipiv, real *b, integer *ldb, integer *info); + +/* Subroutine */ int sggbak_(char *job, char *side, integer *n, integer *ilo, + integer *ihi, real *lscale, real *rscale, integer *m, real *v, + integer *ldv, integer *info); + +/* Subroutine */ int sggbal_(char *job, integer *n, real *a, integer *lda, + real *b, integer *ldb, integer *ilo, integer *ihi, real *lscale, real + *rscale, real *work, integer *info); + +/* Subroutine */ int sgges_(char *jobvsl, char *jobvsr, char *sort, L_fp + selctg, integer *n, real *a, integer *lda, real *b, integer *ldb, + integer *sdim, real *alphar, real *alphai, real *beta, real *vsl, + integer *ldvsl, real *vsr, integer *ldvsr, real *work, integer *lwork, + logical *bwork, integer *info); + +/* Subroutine */ int sggesx_(char *jobvsl, char *jobvsr, char *sort, L_fp + selctg, char *sense, integer *n, real *a, integer *lda, real *b, + integer *ldb, integer *sdim, real *alphar, real *alphai, real *beta, + real *vsl, integer *ldvsl, real *vsr, integer *ldvsr, real *rconde, + real *rcondv, real *work, integer *lwork, integer *iwork, integer * + liwork, logical *bwork, integer *info); + +/* Subroutine */ int sggev_(char *jobvl, char *jobvr, integer *n, real *a, + integer *lda, real *b, integer *ldb, real *alphar, real *alphai, real + *beta, real *vl, integer *ldvl, real *vr, integer *ldvr, real *work, + integer *lwork, integer *info); + +/* Subroutine */ int sggevx_(char *balanc, char *jobvl, char *jobvr, char * + sense, integer *n, real *a, integer *lda, real *b, integer *ldb, real + *alphar, real *alphai, real *beta, real *vl, integer *ldvl, real *vr, + integer *ldvr, integer *ilo, integer *ihi, real *lscale, real *rscale, + real *abnrm, real *bbnrm, real *rconde, real *rcondv, real *work, + integer *lwork, integer *iwork, logical *bwork, integer *info); + +/* Subroutine */ int sggglm_(integer *n, integer *m, integer *p, real *a, + integer *lda, real *b, integer *ldb, real *d__, real *x, real *y, + real *work, integer *lwork, integer *info); + +/* Subroutine */ int sgghrd_(char *compq, char *compz, integer *n, integer * + ilo, integer *ihi, real *a, integer *lda, real *b, integer *ldb, real + *q, integer *ldq, real *z__, integer *ldz, integer *info); + +/* Subroutine */ int sgglse_(integer *m, integer *n, integer *p, real *a, + integer *lda, real *b, integer *ldb, real *c__, real *d__, real *x, + real *work, integer *lwork, integer *info); + +/* Subroutine */ int sggqrf_(integer *n, integer *m, integer *p, real *a, + integer *lda, real *taua, real *b, integer *ldb, real *taub, real * + work, integer *lwork, integer *info); + +/* Subroutine */ int sggrqf_(integer *m, integer *p, integer *n, real *a, + integer *lda, real *taua, real *b, integer *ldb, real *taub, real * + work, integer *lwork, integer *info); + +/* Subroutine */ int sggsvd_(char *jobu, char *jobv, char *jobq, integer *m, + integer *n, integer *p, integer *k, integer *l, real *a, integer *lda, + real *b, integer *ldb, real *alpha, real *beta, real *u, integer * + ldu, real *v, integer *ldv, real *q, integer *ldq, real *work, + integer *iwork, integer *info); + +/* Subroutine */ int sggsvp_(char *jobu, char *jobv, char *jobq, integer *m, + integer *p, integer *n, real *a, integer *lda, real *b, integer *ldb, + real *tola, real *tolb, integer *k, integer *l, real *u, integer *ldu, + real *v, integer *ldv, real *q, integer *ldq, integer *iwork, real * + tau, real *work, integer *info); + +/* Subroutine */ int sgtcon_(char *norm, integer *n, real *dl, real *d__, + real *du, real *du2, integer *ipiv, real *anorm, real *rcond, real * + work, integer *iwork, integer *info); + +/* Subroutine */ int sgtrfs_(char *trans, integer *n, integer *nrhs, real *dl, + real *d__, real *du, real *dlf, real *df, real *duf, real *du2, + integer *ipiv, real *b, integer *ldb, real *x, integer *ldx, real * + ferr, real *berr, real *work, integer *iwork, integer *info); + +/* Subroutine */ int sgtsv_(integer *n, integer *nrhs, real *dl, real *d__, + real *du, real *b, integer *ldb, integer *info); + +/* Subroutine */ int sgtsvx_(char *fact, char *trans, integer *n, integer * + nrhs, real *dl, real *d__, real *du, real *dlf, real *df, real *duf, + real *du2, integer *ipiv, real *b, integer *ldb, real *x, integer * + ldx, real *rcond, real *ferr, real *berr, real *work, integer *iwork, + integer *info); + +/* Subroutine */ int sgttrf_(integer *n, real *dl, real *d__, real *du, real * + du2, integer *ipiv, integer *info); + +/* Subroutine */ int sgttrs_(char *trans, integer *n, integer *nrhs, real *dl, + real *d__, real *du, real *du2, integer *ipiv, real *b, integer *ldb, + integer *info); + +/* Subroutine */ int sgtts2_(integer *itrans, integer *n, integer *nrhs, real + *dl, real *d__, real *du, real *du2, integer *ipiv, real *b, integer * + ldb); + +/* Subroutine */ int shgeqz_(char *job, char *compq, char *compz, integer *n, + integer *ilo, integer *ihi, real *a, integer *lda, real *b, integer * + ldb, real *alphar, real *alphai, real *beta, real *q, integer *ldq, + real *z__, integer *ldz, real *work, integer *lwork, integer *info); + +/* Subroutine */ int shsein_(char *side, char *eigsrc, char *initv, logical * + select, integer *n, real *h__, integer *ldh, real *wr, real *wi, real + *vl, integer *ldvl, real *vr, integer *ldvr, integer *mm, integer *m, + real *work, integer *ifaill, integer *ifailr, integer *info); + +/* Subroutine */ int shseqr_(char *job, char *compz, integer *n, integer *ilo, + integer *ihi, real *h__, integer *ldh, real *wr, real *wi, real *z__, + integer *ldz, real *work, integer *lwork, integer *info); + +/* Subroutine */ int slabad_(real *small, real *large); + +/* Subroutine */ int slabrd_(integer *m, integer *n, integer *nb, real *a, + integer *lda, real *d__, real *e, real *tauq, real *taup, real *x, + integer *ldx, real *y, integer *ldy); + +/* Subroutine */ int slacon_(integer *n, real *v, real *x, integer *isgn, + real *est, integer *kase); + +/* Subroutine */ int slacpy_(char *uplo, integer *m, integer *n, real *a, + integer *lda, real *b, integer *ldb); + +/* Subroutine */ int sladiv_(real *a, real *b, real *c__, real *d__, real *p, + real *q); + +/* Subroutine */ int slae2_(real *a, real *b, real *c__, real *rt1, real *rt2); + +/* Subroutine */ int slaebz_(integer *ijob, integer *nitmax, integer *n, + integer *mmax, integer *minp, integer *nbmin, real *abstol, real * + reltol, real *pivmin, real *d__, real *e, real *e2, integer *nval, + real *ab, real *c__, integer *mout, integer *nab, real *work, integer + *iwork, integer *info); + +/* Subroutine */ int slaed0_(integer *icompq, integer *qsiz, integer *n, real + *d__, real *e, real *q, integer *ldq, real *qstore, integer *ldqs, + real *work, integer *iwork, integer *info); + +/* Subroutine */ int slaed1_(integer *n, real *d__, real *q, integer *ldq, + integer *indxq, real *rho, integer *cutpnt, real *work, integer * + iwork, integer *info); + +/* Subroutine */ int slaed2_(integer *k, integer *n, integer *n1, real *d__, + real *q, integer *ldq, integer *indxq, real *rho, real *z__, real * + dlamda, real *w, real *q2, integer *indx, integer *indxc, integer * + indxp, integer *coltyp, integer *info); + +/* Subroutine */ int slaed3_(integer *k, integer *n, integer *n1, real *d__, + real *q, integer *ldq, real *rho, real *dlamda, real *q2, integer * + indx, integer *ctot, real *w, real *s, integer *info); + +/* Subroutine */ int slaed4_(integer *n, integer *i__, real *d__, real *z__, + real *delta, real *rho, real *dlam, integer *info); + +/* Subroutine */ int slaed5_(integer *i__, real *d__, real *z__, real *delta, + real *rho, real *dlam); + +/* Subroutine */ int slaed6_(integer *kniter, logical *orgati, real *rho, + real *d__, real *z__, real *finit, real *tau, integer *info); + +/* Subroutine */ int slaed7_(integer *icompq, integer *n, integer *qsiz, + integer *tlvls, integer *curlvl, integer *curpbm, real *d__, real *q, + integer *ldq, integer *indxq, real *rho, integer *cutpnt, real * + qstore, integer *qptr, integer *prmptr, integer *perm, integer * + givptr, integer *givcol, real *givnum, real *work, integer *iwork, + integer *info); + +/* Subroutine */ int slaed8_(integer *icompq, integer *k, integer *n, integer + *qsiz, real *d__, real *q, integer *ldq, integer *indxq, real *rho, + integer *cutpnt, real *z__, real *dlamda, real *q2, integer *ldq2, + real *w, integer *perm, integer *givptr, integer *givcol, real * + givnum, integer *indxp, integer *indx, integer *info); + +/* Subroutine */ int slaed9_(integer *k, integer *kstart, integer *kstop, + integer *n, real *d__, real *q, integer *ldq, real *rho, real *dlamda, + real *w, real *s, integer *lds, integer *info); + +/* Subroutine */ int slaeda_(integer *n, integer *tlvls, integer *curlvl, + integer *curpbm, integer *prmptr, integer *perm, integer *givptr, + integer *givcol, real *givnum, real *q, integer *qptr, real *z__, + real *ztemp, integer *info); + +/* Subroutine */ int slaein_(logical *rightv, logical *noinit, integer *n, + real *h__, integer *ldh, real *wr, real *wi, real *vr, real *vi, real + *b, integer *ldb, real *work, real *eps3, real *smlnum, real *bignum, + integer *info); + +/* Subroutine */ int slaev2_(real *a, real *b, real *c__, real *rt1, real * + rt2, real *cs1, real *sn1); + +/* Subroutine */ int slaexc_(logical *wantq, integer *n, real *t, integer * + ldt, real *q, integer *ldq, integer *j1, integer *n1, integer *n2, + real *work, integer *info); + +/* Subroutine */ int slag2_(real *a, integer *lda, real *b, integer *ldb, + real *safmin, real *scale1, real *scale2, real *wr1, real *wr2, real * + wi); + +/* Subroutine */ int slags2_(logical *upper, real *a1, real *a2, real *a3, + real *b1, real *b2, real *b3, real *csu, real *snu, real *csv, real * + snv, real *csq, real *snq); + +/* Subroutine */ int slagtf_(integer *n, real *a, real *lambda, real *b, real + *c__, real *tol, real *d__, integer *in, integer *info); + +/* Subroutine */ int slagtm_(char *trans, integer *n, integer *nrhs, real * + alpha, real *dl, real *d__, real *du, real *x, integer *ldx, real * + beta, real *b, integer *ldb); + +/* Subroutine */ int slagts_(integer *job, integer *n, real *a, real *b, real + *c__, real *d__, integer *in, real *y, real *tol, integer *info); + +/* Subroutine */ int slagv2_(real *a, integer *lda, real *b, integer *ldb, + real *alphar, real *alphai, real *beta, real *csl, real *snl, real * + csr, real *snr); + +/* Subroutine */ int slahqr_(logical *wantt, logical *wantz, integer *n, + integer *ilo, integer *ihi, real *h__, integer *ldh, real *wr, real * + wi, integer *iloz, integer *ihiz, real *z__, integer *ldz, integer * + info); + +/* Subroutine */ int slahrd_(integer *n, integer *k, integer *nb, real *a, + integer *lda, real *tau, real *t, integer *ldt, real *y, integer *ldy); + +/* Subroutine */ int slaic1_(integer *job, integer *j, real *x, real *sest, + real *w, real *gamma, real *sestpr, real *s, real *c__); + +/* Subroutine */ int slaln2_(logical *ltrans, integer *na, integer *nw, real * + smin, real *ca, real *a, integer *lda, real *d1, real *d2, real *b, + integer *ldb, real *wr, real *wi, real *x, integer *ldx, real *scale, + real *xnorm, integer *info); + +/* Subroutine */ int slals0_(integer *icompq, integer *nl, integer *nr, + integer *sqre, integer *nrhs, real *b, integer *ldb, real *bx, + integer *ldbx, integer *perm, integer *givptr, integer *givcol, + integer *ldgcol, real *givnum, integer *ldgnum, real *poles, real * + difl, real *difr, real *z__, integer *k, real *c__, real *s, real * + work, integer *info); + +/* Subroutine */ int slalsa_(integer *icompq, integer *smlsiz, integer *n, + integer *nrhs, real *b, integer *ldb, real *bx, integer *ldbx, real * + u, integer *ldu, real *vt, integer *k, real *difl, real *difr, real * + z__, real *poles, integer *givptr, integer *givcol, integer *ldgcol, + integer *perm, real *givnum, real *c__, real *s, real *work, integer * + iwork, integer *info); + +/* Subroutine */ int slalsd_(char *uplo, integer *smlsiz, integer *n, integer + *nrhs, real *d__, real *e, real *b, integer *ldb, real *rcond, + integer *rank, real *work, integer *iwork, integer *info); + +/* Subroutine */ int slamc1_(integer *beta, integer *t, logical *rnd, logical + *ieee1); + +/* Subroutine */ int slamc2_(integer *beta, integer *t, logical *rnd, real * + eps, integer *emin, real *rmin, integer *emax, real *rmax); + +/* Subroutine */ int slamc4_(integer *emin, real *start, integer *base); + +/* Subroutine */ int slamc5_(integer *beta, integer *p, integer *emin, + logical *ieee, integer *emax, real *rmax); + +/* Subroutine */ int slamrg_(integer *n1, integer *n2, real *a, integer * + strd1, integer *strd2, integer *index); + +/* Subroutine */ int slanv2_(real *a, real *b, real *c__, real *d__, real * + rt1r, real *rt1i, real *rt2r, real *rt2i, real *cs, real *sn); + +/* Subroutine */ int slapll_(integer *n, real *x, integer *incx, real *y, + integer *incy, real *ssmin); + +/* Subroutine */ int slapmt_(logical *forwrd, integer *m, integer *n, real *x, + integer *ldx, integer *k); + +/* Subroutine */ int slaqgb_(integer *m, integer *n, integer *kl, integer *ku, + real *ab, integer *ldab, real *r__, real *c__, real *rowcnd, real * + colcnd, real *amax, char *equed); + +/* Subroutine */ int slaqge_(integer *m, integer *n, real *a, integer *lda, + real *r__, real *c__, real *rowcnd, real *colcnd, real *amax, char * + equed); + +/* Subroutine */ int slaqp2_(integer *m, integer *n, integer *offset, real *a, + integer *lda, integer *jpvt, real *tau, real *vn1, real *vn2, real * + work); + +/* Subroutine */ int slaqps_(integer *m, integer *n, integer *offset, integer + *nb, integer *kb, real *a, integer *lda, integer *jpvt, real *tau, + real *vn1, real *vn2, real *auxv, real *f, integer *ldf); + +/* Subroutine */ int slaqsb_(char *uplo, integer *n, integer *kd, real *ab, + integer *ldab, real *s, real *scond, real *amax, char *equed); + +/* Subroutine */ int slaqsp_(char *uplo, integer *n, real *ap, real *s, real * + scond, real *amax, char *equed); + +/* Subroutine */ int slaqsy_(char *uplo, integer *n, real *a, integer *lda, + real *s, real *scond, real *amax, char *equed); + +/* Subroutine */ int slaqtr_(logical *ltran, logical *lreal, integer *n, real + *t, integer *ldt, real *b, real *w, real *scale, real *x, real *work, + integer *info); + +/* Subroutine */ int slar1v_(integer *n, integer *b1, integer *bn, real * + sigma, real *d__, real *l, real *ld, real *lld, real *gersch, real * + z__, real *ztz, real *mingma, integer *r__, integer *isuppz, real * + work); + +/* Subroutine */ int slar2v_(integer *n, real *x, real *y, real *z__, integer + *incx, real *c__, real *s, integer *incc); + +/* Subroutine */ int slarf_(char *side, integer *m, integer *n, real *v, + integer *incv, real *tau, real *c__, integer *ldc, real *work); + +/* Subroutine */ int slarfb_(char *side, char *trans, char *direct, char * + storev, integer *m, integer *n, integer *k, real *v, integer *ldv, + real *t, integer *ldt, real *c__, integer *ldc, real *work, integer * + ldwork); + +/* Subroutine */ int slarfg_(integer *n, real *alpha, real *x, integer *incx, + real *tau); + +/* Subroutine */ int slarft_(char *direct, char *storev, integer *n, integer * + k, real *v, integer *ldv, real *tau, real *t, integer *ldt); + +/* Subroutine */ int slarfx_(char *side, integer *m, integer *n, real *v, + real *tau, real *c__, integer *ldc, real *work); + +/* Subroutine */ int slargv_(integer *n, real *x, integer *incx, real *y, + integer *incy, real *c__, integer *incc); + +/* Subroutine */ int slarnv_(integer *idist, integer *iseed, integer *n, real + *x); + +/* Subroutine */ int slarrb_(integer *n, real *d__, real *l, real *ld, real * + lld, integer *ifirst, integer *ilast, real *sigma, real *reltol, real + *w, real *wgap, real *werr, real *work, integer *iwork, integer *info); + +/* Subroutine */ int slarre_(integer *n, real *d__, real *e, real *tol, + integer *nsplit, integer *isplit, integer *m, real *w, real *woff, + real *gersch, real *work, integer *info); + +/* Subroutine */ int slarrf_(integer *n, real *d__, real *l, real *ld, real * + lld, integer *ifirst, integer *ilast, real *w, real *dplus, real * + lplus, real *work, integer *iwork, integer *info); + +/* Subroutine */ int slarrv_(integer *n, real *d__, real *l, integer *isplit, + integer *m, real *w, integer *iblock, real *gersch, real *tol, real * + z__, integer *ldz, integer *isuppz, real *work, integer *iwork, + integer *info); + +/* Subroutine */ int slartg_(real *f, real *g, real *cs, real *sn, real *r__); + +/* Subroutine */ int slartv_(integer *n, real *x, integer *incx, real *y, + integer *incy, real *c__, real *s, integer *incc); + +/* Subroutine */ int slaruv_(integer *iseed, integer *n, real *x); + +/* Subroutine */ int slarz_(char *side, integer *m, integer *n, integer *l, + real *v, integer *incv, real *tau, real *c__, integer *ldc, real * + work); + +/* Subroutine */ int slarzb_(char *side, char *trans, char *direct, char * + storev, integer *m, integer *n, integer *k, integer *l, real *v, + integer *ldv, real *t, integer *ldt, real *c__, integer *ldc, real * + work, integer *ldwork); + +/* Subroutine */ int slarzt_(char *direct, char *storev, integer *n, integer * + k, real *v, integer *ldv, real *tau, real *t, integer *ldt); + +/* Subroutine */ int slas2_(real *f, real *g, real *h__, real *ssmin, real * + ssmax); + +/* Subroutine */ int slascl_(char *type__, integer *kl, integer *ku, real * + cfrom, real *cto, integer *m, integer *n, real *a, integer *lda, + integer *info); + +/* Subroutine */ int slasd0_(integer *n, integer *sqre, real *d__, real *e, + real *u, integer *ldu, real *vt, integer *ldvt, integer *smlsiz, + integer *iwork, real *work, integer *info); + +/* Subroutine */ int slasd1_(integer *nl, integer *nr, integer *sqre, real * + d__, real *alpha, real *beta, real *u, integer *ldu, real *vt, + integer *ldvt, integer *idxq, integer *iwork, real *work, integer * + info); + +/* Subroutine */ int slasd2_(integer *nl, integer *nr, integer *sqre, integer + *k, real *d__, real *z__, real *alpha, real *beta, real *u, integer * + ldu, real *vt, integer *ldvt, real *dsigma, real *u2, integer *ldu2, + real *vt2, integer *ldvt2, integer *idxp, integer *idx, integer *idxc, + integer *idxq, integer *coltyp, integer *info); + +/* Subroutine */ int slasd3_(integer *nl, integer *nr, integer *sqre, integer + *k, real *d__, real *q, integer *ldq, real *dsigma, real *u, integer * + ldu, real *u2, integer *ldu2, real *vt, integer *ldvt, real *vt2, + integer *ldvt2, integer *idxc, integer *ctot, real *z__, integer * + info); + +/* Subroutine */ int slasd4_(integer *n, integer *i__, real *d__, real *z__, + real *delta, real *rho, real *sigma, real *work, integer *info); + +/* Subroutine */ int slasd5_(integer *i__, real *d__, real *z__, real *delta, + real *rho, real *dsigma, real *work); + +/* Subroutine */ int slasd6_(integer *icompq, integer *nl, integer *nr, + integer *sqre, real *d__, real *vf, real *vl, real *alpha, real *beta, + integer *idxq, integer *perm, integer *givptr, integer *givcol, + integer *ldgcol, real *givnum, integer *ldgnum, real *poles, real * + difl, real *difr, real *z__, integer *k, real *c__, real *s, real * + work, integer *iwork, integer *info); + +/* Subroutine */ int slasd7_(integer *icompq, integer *nl, integer *nr, + integer *sqre, integer *k, real *d__, real *z__, real *zw, real *vf, + real *vfw, real *vl, real *vlw, real *alpha, real *beta, real *dsigma, + integer *idx, integer *idxp, integer *idxq, integer *perm, integer * + givptr, integer *givcol, integer *ldgcol, real *givnum, integer * + ldgnum, real *c__, real *s, integer *info); + +/* Subroutine */ int slasd8_(integer *icompq, integer *k, real *d__, real * + z__, real *vf, real *vl, real *difl, real *difr, integer *lddifr, + real *dsigma, real *work, integer *info); + +/* Subroutine */ int slasd9_(integer *icompq, integer *ldu, integer *k, real * + d__, real *z__, real *vf, real *vl, real *difl, real *difr, real * + dsigma, real *work, integer *info); + +/* Subroutine */ int slasda_(integer *icompq, integer *smlsiz, integer *n, + integer *sqre, real *d__, real *e, real *u, integer *ldu, real *vt, + integer *k, real *difl, real *difr, real *z__, real *poles, integer * + givptr, integer *givcol, integer *ldgcol, integer *perm, real *givnum, + real *c__, real *s, real *work, integer *iwork, integer *info); + +/* Subroutine */ int slasdq_(char *uplo, integer *sqre, integer *n, integer * + ncvt, integer *nru, integer *ncc, real *d__, real *e, real *vt, + integer *ldvt, real *u, integer *ldu, real *c__, integer *ldc, real * + work, integer *info); + +/* Subroutine */ int slasdt_(integer *n, integer *lvl, integer *nd, integer * + inode, integer *ndiml, integer *ndimr, integer *msub); + +/* Subroutine */ int slaset_(char *uplo, integer *m, integer *n, real *alpha, + real *beta, real *a, integer *lda); + +/* Subroutine */ int slasq1_(integer *n, real *d__, real *e, real *work, + integer *info); + +/* Subroutine */ int slasq2_(integer *n, real *z__, integer *info); + +/* Subroutine */ int slasq3_(integer *i0, integer *n0, real *z__, integer *pp, + real *dmin__, real *sigma, real *desig, real *qmax, integer *nfail, + integer *iter, integer *ndiv, logical *ieee); + +/* Subroutine */ int slasq4_(integer *i0, integer *n0, real *z__, integer *pp, + integer *n0in, real *dmin__, real *dmin1, real *dmin2, real *dn, + real *dn1, real *dn2, real *tau, integer *ttype); + +/* Subroutine */ int slasq5_(integer *i0, integer *n0, real *z__, integer *pp, + real *tau, real *dmin__, real *dmin1, real *dmin2, real *dn, real * + dnm1, real *dnm2, logical *ieee); + +/* Subroutine */ int slasq6_(integer *i0, integer *n0, real *z__, integer *pp, + real *dmin__, real *dmin1, real *dmin2, real *dn, real *dnm1, real * + dnm2); + +/* Subroutine */ int slasr_(char *side, char *pivot, char *direct, integer *m, + integer *n, real *c__, real *s, real *a, integer *lda); + +/* Subroutine */ int slasrt_(char *id, integer *n, real *d__, integer *info); + +/* Subroutine */ int slassq_(integer *n, real *x, integer *incx, real *scale, + real *sumsq); + +/* Subroutine */ int slasv2_(real *f, real *g, real *h__, real *ssmin, real * + ssmax, real *snr, real *csr, real *snl, real *csl); + +/* Subroutine */ int slaswp_(integer *n, real *a, integer *lda, integer *k1, + integer *k2, integer *ipiv, integer *incx); + +/* Subroutine */ int slasy2_(logical *ltranl, logical *ltranr, integer *isgn, + integer *n1, integer *n2, real *tl, integer *ldtl, real *tr, integer * + ldtr, real *b, integer *ldb, real *scale, real *x, integer *ldx, real + *xnorm, integer *info); + +/* Subroutine */ int slasyf_(char *uplo, integer *n, integer *nb, integer *kb, + real *a, integer *lda, integer *ipiv, real *w, integer *ldw, integer + *info); + +/* Subroutine */ int slatbs_(char *uplo, char *trans, char *diag, char * + normin, integer *n, integer *kd, real *ab, integer *ldab, real *x, + real *scale, real *cnorm, integer *info); + +/* Subroutine */ int slatdf_(integer *ijob, integer *n, real *z__, integer * + ldz, real *rhs, real *rdsum, real *rdscal, integer *ipiv, integer * + jpiv); + +/* Subroutine */ int slatps_(char *uplo, char *trans, char *diag, char * + normin, integer *n, real *ap, real *x, real *scale, real *cnorm, + integer *info); + +/* Subroutine */ int slatrd_(char *uplo, integer *n, integer *nb, real *a, + integer *lda, real *e, real *tau, real *w, integer *ldw); + +/* Subroutine */ int slatrs_(char *uplo, char *trans, char *diag, char * + normin, integer *n, real *a, integer *lda, real *x, real *scale, real + *cnorm, integer *info); + +/* Subroutine */ int slatrz_(integer *m, integer *n, integer *l, real *a, + integer *lda, real *tau, real *work); + +/* Subroutine */ int slatzm_(char *side, integer *m, integer *n, real *v, + integer *incv, real *tau, real *c1, real *c2, integer *ldc, real * + work); + +/* Subroutine */ int slauu2_(char *uplo, integer *n, real *a, integer *lda, + integer *info); + +/* Subroutine */ int slauum_(char *uplo, integer *n, real *a, integer *lda, + integer *info); + +/* Subroutine */ int sopgtr_(char *uplo, integer *n, real *ap, real *tau, + real *q, integer *ldq, real *work, integer *info); + +/* Subroutine */ int sopmtr_(char *side, char *uplo, char *trans, integer *m, + integer *n, real *ap, real *tau, real *c__, integer *ldc, real *work, + integer *info); + +/* Subroutine */ int sorg2l_(integer *m, integer *n, integer *k, real *a, + integer *lda, real *tau, real *work, integer *info); + +/* Subroutine */ int sorg2r_(integer *m, integer *n, integer *k, real *a, + integer *lda, real *tau, real *work, integer *info); + +/* Subroutine */ int sorgbr_(char *vect, integer *m, integer *n, integer *k, + real *a, integer *lda, real *tau, real *work, integer *lwork, integer + *info); + +/* Subroutine */ int sorghr_(integer *n, integer *ilo, integer *ihi, real *a, + integer *lda, real *tau, real *work, integer *lwork, integer *info); + +/* Subroutine */ int sorgl2_(integer *m, integer *n, integer *k, real *a, + integer *lda, real *tau, real *work, integer *info); + +/* Subroutine */ int sorglq_(integer *m, integer *n, integer *k, real *a, + integer *lda, real *tau, real *work, integer *lwork, integer *info); + +/* Subroutine */ int sorgql_(integer *m, integer *n, integer *k, real *a, + integer *lda, real *tau, real *work, integer *lwork, integer *info); + +/* Subroutine */ int sorgqr_(integer *m, integer *n, integer *k, real *a, + integer *lda, real *tau, real *work, integer *lwork, integer *info); + +/* Subroutine */ int sorgr2_(integer *m, integer *n, integer *k, real *a, + integer *lda, real *tau, real *work, integer *info); + +/* Subroutine */ int sorgrq_(integer *m, integer *n, integer *k, real *a, + integer *lda, real *tau, real *work, integer *lwork, integer *info); + +/* Subroutine */ int sorgtr_(char *uplo, integer *n, real *a, integer *lda, + real *tau, real *work, integer *lwork, integer *info); + +/* Subroutine */ int sorm2l_(char *side, char *trans, integer *m, integer *n, + integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, + real *work, integer *info); + +/* Subroutine */ int sorm2r_(char *side, char *trans, integer *m, integer *n, + integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, + real *work, integer *info); + +/* Subroutine */ int sormbr_(char *vect, char *side, char *trans, integer *m, + integer *n, integer *k, real *a, integer *lda, real *tau, real *c__, + integer *ldc, real *work, integer *lwork, integer *info); + +/* Subroutine */ int sormhr_(char *side, char *trans, integer *m, integer *n, + integer *ilo, integer *ihi, real *a, integer *lda, real *tau, real * + c__, integer *ldc, real *work, integer *lwork, integer *info); + +/* Subroutine */ int sorml2_(char *side, char *trans, integer *m, integer *n, + integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, + real *work, integer *info); + +/* Subroutine */ int sormlq_(char *side, char *trans, integer *m, integer *n, + integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, + real *work, integer *lwork, integer *info); + +/* Subroutine */ int sormql_(char *side, char *trans, integer *m, integer *n, + integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, + real *work, integer *lwork, integer *info); + +/* Subroutine */ int sormqr_(char *side, char *trans, integer *m, integer *n, + integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, + real *work, integer *lwork, integer *info); + +/* Subroutine */ int sormr2_(char *side, char *trans, integer *m, integer *n, + integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, + real *work, integer *info); + +/* Subroutine */ int sormr3_(char *side, char *trans, integer *m, integer *n, + integer *k, integer *l, real *a, integer *lda, real *tau, real *c__, + integer *ldc, real *work, integer *info); + +/* Subroutine */ int sormrq_(char *side, char *trans, integer *m, integer *n, + integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc, + real *work, integer *lwork, integer *info); + +/* Subroutine */ int sormrz_(char *side, char *trans, integer *m, integer *n, + integer *k, integer *l, real *a, integer *lda, real *tau, real *c__, + integer *ldc, real *work, integer *lwork, integer *info); + +/* Subroutine */ int sormtr_(char *side, char *uplo, char *trans, integer *m, + integer *n, real *a, integer *lda, real *tau, real *c__, integer *ldc, + real *work, integer *lwork, integer *info); + +/* Subroutine */ int spbcon_(char *uplo, integer *n, integer *kd, real *ab, + integer *ldab, real *anorm, real *rcond, real *work, integer *iwork, + integer *info); + +/* Subroutine */ int spbequ_(char *uplo, integer *n, integer *kd, real *ab, + integer *ldab, real *s, real *scond, real *amax, integer *info); + +/* Subroutine */ int spbrfs_(char *uplo, integer *n, integer *kd, integer * + nrhs, real *ab, integer *ldab, real *afb, integer *ldafb, real *b, + integer *ldb, real *x, integer *ldx, real *ferr, real *berr, real * + work, integer *iwork, integer *info); + +/* Subroutine */ int spbstf_(char *uplo, integer *n, integer *kd, real *ab, + integer *ldab, integer *info); + +/* Subroutine */ int spbsv_(char *uplo, integer *n, integer *kd, integer * + nrhs, real *ab, integer *ldab, real *b, integer *ldb, integer *info); + +/* Subroutine */ int spbsvx_(char *fact, char *uplo, integer *n, integer *kd, + integer *nrhs, real *ab, integer *ldab, real *afb, integer *ldafb, + char *equed, real *s, real *b, integer *ldb, real *x, integer *ldx, + real *rcond, real *ferr, real *berr, real *work, integer *iwork, + integer *info); + +/* Subroutine */ int spbtf2_(char *uplo, integer *n, integer *kd, real *ab, + integer *ldab, integer *info); + +/* Subroutine */ int spbtrf_(char *uplo, integer *n, integer *kd, real *ab, + integer *ldab, integer *info); + +/* Subroutine */ int spbtrs_(char *uplo, integer *n, integer *kd, integer * + nrhs, real *ab, integer *ldab, real *b, integer *ldb, integer *info); + +/* Subroutine */ int spocon_(char *uplo, integer *n, real *a, integer *lda, + real *anorm, real *rcond, real *work, integer *iwork, integer *info); + +/* Subroutine */ int spoequ_(integer *n, real *a, integer *lda, real *s, real + *scond, real *amax, integer *info); + +/* Subroutine */ int sporfs_(char *uplo, integer *n, integer *nrhs, real *a, + integer *lda, real *af, integer *ldaf, real *b, integer *ldb, real *x, + integer *ldx, real *ferr, real *berr, real *work, integer *iwork, + integer *info); + +/* Subroutine */ int sposv_(char *uplo, integer *n, integer *nrhs, real *a, + integer *lda, real *b, integer *ldb, integer *info); + +/* Subroutine */ int sposvx_(char *fact, char *uplo, integer *n, integer * + nrhs, real *a, integer *lda, real *af, integer *ldaf, char *equed, + real *s, real *b, integer *ldb, real *x, integer *ldx, real *rcond, + real *ferr, real *berr, real *work, integer *iwork, integer *info); + +/* Subroutine */ int spotf2_(char *uplo, integer *n, real *a, integer *lda, + integer *info); + +/* Subroutine */ int spotrf_(char *uplo, integer *n, real *a, integer *lda, + integer *info); + +/* Subroutine */ int spotri_(char *uplo, integer *n, real *a, integer *lda, + integer *info); + +/* Subroutine */ int spotrs_(char *uplo, integer *n, integer *nrhs, real *a, + integer *lda, real *b, integer *ldb, integer *info); + +/* Subroutine */ int sppcon_(char *uplo, integer *n, real *ap, real *anorm, + real *rcond, real *work, integer *iwork, integer *info); + +/* Subroutine */ int sppequ_(char *uplo, integer *n, real *ap, real *s, real * + scond, real *amax, integer *info); + +/* Subroutine */ int spprfs_(char *uplo, integer *n, integer *nrhs, real *ap, + real *afp, real *b, integer *ldb, real *x, integer *ldx, real *ferr, + real *berr, real *work, integer *iwork, integer *info); + +/* Subroutine */ int sppsv_(char *uplo, integer *n, integer *nrhs, real *ap, + real *b, integer *ldb, integer *info); + +/* Subroutine */ int sppsvx_(char *fact, char *uplo, integer *n, integer * + nrhs, real *ap, real *afp, char *equed, real *s, real *b, integer * + ldb, real *x, integer *ldx, real *rcond, real *ferr, real *berr, real + *work, integer *iwork, integer *info); + +/* Subroutine */ int spptrf_(char *uplo, integer *n, real *ap, integer *info); + +/* Subroutine */ int spptri_(char *uplo, integer *n, real *ap, integer *info); + +/* Subroutine */ int spptrs_(char *uplo, integer *n, integer *nrhs, real *ap, + real *b, integer *ldb, integer *info); + +/* Subroutine */ int sptcon_(integer *n, real *d__, real *e, real *anorm, + real *rcond, real *work, integer *info); + +/* Subroutine */ int spteqr_(char *compz, integer *n, real *d__, real *e, + real *z__, integer *ldz, real *work, integer *info); + +/* Subroutine */ int sptrfs_(integer *n, integer *nrhs, real *d__, real *e, + real *df, real *ef, real *b, integer *ldb, real *x, integer *ldx, + real *ferr, real *berr, real *work, integer *info); + +/* Subroutine */ int sptsv_(integer *n, integer *nrhs, real *d__, real *e, + real *b, integer *ldb, integer *info); + +/* Subroutine */ int sptsvx_(char *fact, integer *n, integer *nrhs, real *d__, + real *e, real *df, real *ef, real *b, integer *ldb, real *x, integer + *ldx, real *rcond, real *ferr, real *berr, real *work, integer *info); + +/* Subroutine */ int spttrf_(integer *n, real *d__, real *e, integer *info); + +/* Subroutine */ int spttrs_(integer *n, integer *nrhs, real *d__, real *e, + real *b, integer *ldb, integer *info); + +/* Subroutine */ int sptts2_(integer *n, integer *nrhs, real *d__, real *e, + real *b, integer *ldb); + +/* Subroutine */ int srscl_(integer *n, real *sa, real *sx, integer *incx); + +/* Subroutine */ int ssbev_(char *jobz, char *uplo, integer *n, integer *kd, + real *ab, integer *ldab, real *w, real *z__, integer *ldz, real *work, + integer *info); + +/* Subroutine */ int ssbevd_(char *jobz, char *uplo, integer *n, integer *kd, + real *ab, integer *ldab, real *w, real *z__, integer *ldz, real *work, + integer *lwork, integer *iwork, integer *liwork, integer *info); + +/* Subroutine */ int ssbevx_(char *jobz, char *range, char *uplo, integer *n, + integer *kd, real *ab, integer *ldab, real *q, integer *ldq, real *vl, + real *vu, integer *il, integer *iu, real *abstol, integer *m, real * + w, real *z__, integer *ldz, real *work, integer *iwork, integer * + ifail, integer *info); + +/* Subroutine */ int ssbgst_(char *vect, char *uplo, integer *n, integer *ka, + integer *kb, real *ab, integer *ldab, real *bb, integer *ldbb, real * + x, integer *ldx, real *work, integer *info); + +/* Subroutine */ int ssbgv_(char *jobz, char *uplo, integer *n, integer *ka, + integer *kb, real *ab, integer *ldab, real *bb, integer *ldbb, real * + w, real *z__, integer *ldz, real *work, integer *info); + +/* Subroutine */ int ssbgvd_(char *jobz, char *uplo, integer *n, integer *ka, + integer *kb, real *ab, integer *ldab, real *bb, integer *ldbb, real * + w, real *z__, integer *ldz, real *work, integer *lwork, integer * + iwork, integer *liwork, integer *info); + +/* Subroutine */ int ssbgvx_(char *jobz, char *range, char *uplo, integer *n, + integer *ka, integer *kb, real *ab, integer *ldab, real *bb, integer * + ldbb, real *q, integer *ldq, real *vl, real *vu, integer *il, integer + *iu, real *abstol, integer *m, real *w, real *z__, integer *ldz, real + *work, integer *iwork, integer *ifail, integer *info); + +/* Subroutine */ int ssbtrd_(char *vect, char *uplo, integer *n, integer *kd, + real *ab, integer *ldab, real *d__, real *e, real *q, integer *ldq, + real *work, integer *info); + +/* Subroutine */ int sspcon_(char *uplo, integer *n, real *ap, integer *ipiv, + real *anorm, real *rcond, real *work, integer *iwork, integer *info); + +/* Subroutine */ int sspev_(char *jobz, char *uplo, integer *n, real *ap, + real *w, real *z__, integer *ldz, real *work, integer *info); + +/* Subroutine */ int sspevd_(char *jobz, char *uplo, integer *n, real *ap, + real *w, real *z__, integer *ldz, real *work, integer *lwork, integer + *iwork, integer *liwork, integer *info); + +/* Subroutine */ int sspevx_(char *jobz, char *range, char *uplo, integer *n, + real *ap, real *vl, real *vu, integer *il, integer *iu, real *abstol, + integer *m, real *w, real *z__, integer *ldz, real *work, integer * + iwork, integer *ifail, integer *info); + +/* Subroutine */ int sspgst_(integer *itype, char *uplo, integer *n, real *ap, + real *bp, integer *info); + +/* Subroutine */ int sspgv_(integer *itype, char *jobz, char *uplo, integer * + n, real *ap, real *bp, real *w, real *z__, integer *ldz, real *work, + integer *info); + +/* Subroutine */ int sspgvd_(integer *itype, char *jobz, char *uplo, integer * + n, real *ap, real *bp, real *w, real *z__, integer *ldz, real *work, + integer *lwork, integer *iwork, integer *liwork, integer *info); + +/* Subroutine */ int sspgvx_(integer *itype, char *jobz, char *range, char * + uplo, integer *n, real *ap, real *bp, real *vl, real *vu, integer *il, + integer *iu, real *abstol, integer *m, real *w, real *z__, integer * + ldz, real *work, integer *iwork, integer *ifail, integer *info); + +/* Subroutine */ int ssprfs_(char *uplo, integer *n, integer *nrhs, real *ap, + real *afp, integer *ipiv, real *b, integer *ldb, real *x, integer * + ldx, real *ferr, real *berr, real *work, integer *iwork, integer * + info); + +/* Subroutine */ int sspsv_(char *uplo, integer *n, integer *nrhs, real *ap, + integer *ipiv, real *b, integer *ldb, integer *info); + +/* Subroutine */ int sspsvx_(char *fact, char *uplo, integer *n, integer * + nrhs, real *ap, real *afp, integer *ipiv, real *b, integer *ldb, real + *x, integer *ldx, real *rcond, real *ferr, real *berr, real *work, + integer *iwork, integer *info); + +/* Subroutine */ int ssptrd_(char *uplo, integer *n, real *ap, real *d__, + real *e, real *tau, integer *info); + +/* Subroutine */ int ssptrf_(char *uplo, integer *n, real *ap, integer *ipiv, + integer *info); + +/* Subroutine */ int ssptri_(char *uplo, integer *n, real *ap, integer *ipiv, + real *work, integer *info); + +/* Subroutine */ int ssptrs_(char *uplo, integer *n, integer *nrhs, real *ap, + integer *ipiv, real *b, integer *ldb, integer *info); + +/* Subroutine */ int sstebz_(char *range, char *order, integer *n, real *vl, + real *vu, integer *il, integer *iu, real *abstol, real *d__, real *e, + integer *m, integer *nsplit, real *w, integer *iblock, integer * + isplit, real *work, integer *iwork, integer *info); + +/* Subroutine */ int sstedc_(char *compz, integer *n, real *d__, real *e, + real *z__, integer *ldz, real *work, integer *lwork, integer *iwork, + integer *liwork, integer *info); + +/* Subroutine */ int sstegr_(char *jobz, char *range, integer *n, real *d__, + real *e, real *vl, real *vu, integer *il, integer *iu, real *abstol, + integer *m, real *w, real *z__, integer *ldz, integer *isuppz, real * + work, integer *lwork, integer *iwork, integer *liwork, integer *info); + +/* Subroutine */ int sstein_(integer *n, real *d__, real *e, integer *m, real + *w, integer *iblock, integer *isplit, real *z__, integer *ldz, real * + work, integer *iwork, integer *ifail, integer *info); + +/* Subroutine */ int ssteqr_(char *compz, integer *n, real *d__, real *e, + real *z__, integer *ldz, real *work, integer *info); + +/* Subroutine */ int ssterf_(integer *n, real *d__, real *e, integer *info); + +/* Subroutine */ int sstev_(char *jobz, integer *n, real *d__, real *e, real * + z__, integer *ldz, real *work, integer *info); + +/* Subroutine */ int sstevd_(char *jobz, integer *n, real *d__, real *e, real + *z__, integer *ldz, real *work, integer *lwork, integer *iwork, + integer *liwork, integer *info); + +/* Subroutine */ int sstevr_(char *jobz, char *range, integer *n, real *d__, + real *e, real *vl, real *vu, integer *il, integer *iu, real *abstol, + integer *m, real *w, real *z__, integer *ldz, integer *isuppz, real * + work, integer *lwork, integer *iwork, integer *liwork, integer *info); + +/* Subroutine */ int sstevx_(char *jobz, char *range, integer *n, real *d__, + real *e, real *vl, real *vu, integer *il, integer *iu, real *abstol, + integer *m, real *w, real *z__, integer *ldz, real *work, integer * + iwork, integer *ifail, integer *info); + +/* Subroutine */ int ssycon_(char *uplo, integer *n, real *a, integer *lda, + integer *ipiv, real *anorm, real *rcond, real *work, integer *iwork, + integer *info); + +/* Subroutine */ int ssyev_(char *jobz, char *uplo, integer *n, real *a, + integer *lda, real *w, real *work, integer *lwork, integer *info); + +/* Subroutine */ int ssyevd_(char *jobz, char *uplo, integer *n, real *a, + integer *lda, real *w, real *work, integer *lwork, integer *iwork, + integer *liwork, integer *info); + +/* Subroutine */ int ssyevr_(char *jobz, char *range, char *uplo, integer *n, + real *a, integer *lda, real *vl, real *vu, integer *il, integer *iu, + real *abstol, integer *m, real *w, real *z__, integer *ldz, integer * + isuppz, real *work, integer *lwork, integer *iwork, integer *liwork, + integer *info); + +/* Subroutine */ int ssyevx_(char *jobz, char *range, char *uplo, integer *n, + real *a, integer *lda, real *vl, real *vu, integer *il, integer *iu, + real *abstol, integer *m, real *w, real *z__, integer *ldz, real * + work, integer *lwork, integer *iwork, integer *ifail, integer *info); + +/* Subroutine */ int ssygs2_(integer *itype, char *uplo, integer *n, real *a, + integer *lda, real *b, integer *ldb, integer *info); + +/* Subroutine */ int ssygst_(integer *itype, char *uplo, integer *n, real *a, + integer *lda, real *b, integer *ldb, integer *info); + +/* Subroutine */ int ssygv_(integer *itype, char *jobz, char *uplo, integer * + n, real *a, integer *lda, real *b, integer *ldb, real *w, real *work, + integer *lwork, integer *info); + +/* Subroutine */ int ssygvd_(integer *itype, char *jobz, char *uplo, integer * + n, real *a, integer *lda, real *b, integer *ldb, real *w, real *work, + integer *lwork, integer *iwork, integer *liwork, integer *info); + +/* Subroutine */ int ssygvx_(integer *itype, char *jobz, char *range, char * + uplo, integer *n, real *a, integer *lda, real *b, integer *ldb, real * + vl, real *vu, integer *il, integer *iu, real *abstol, integer *m, + real *w, real *z__, integer *ldz, real *work, integer *lwork, integer + *iwork, integer *ifail, integer *info); + +/* Subroutine */ int ssyrfs_(char *uplo, integer *n, integer *nrhs, real *a, + integer *lda, real *af, integer *ldaf, integer *ipiv, real *b, + integer *ldb, real *x, integer *ldx, real *ferr, real *berr, real * + work, integer *iwork, integer *info); + +/* Subroutine */ int ssysv_(char *uplo, integer *n, integer *nrhs, real *a, + integer *lda, integer *ipiv, real *b, integer *ldb, real *work, + integer *lwork, integer *info); + +/* Subroutine */ int ssysvx_(char *fact, char *uplo, integer *n, integer * + nrhs, real *a, integer *lda, real *af, integer *ldaf, integer *ipiv, + real *b, integer *ldb, real *x, integer *ldx, real *rcond, real *ferr, + real *berr, real *work, integer *lwork, integer *iwork, integer * + info); + +/* Subroutine */ int ssytd2_(char *uplo, integer *n, real *a, integer *lda, + real *d__, real *e, real *tau, integer *info); + +/* Subroutine */ int ssytf2_(char *uplo, integer *n, real *a, integer *lda, + integer *ipiv, integer *info); + +/* Subroutine */ int ssytrd_(char *uplo, integer *n, real *a, integer *lda, + real *d__, real *e, real *tau, real *work, integer *lwork, integer * + info); + +/* Subroutine */ int ssytrf_(char *uplo, integer *n, real *a, integer *lda, + integer *ipiv, real *work, integer *lwork, integer *info); + +/* Subroutine */ int ssytri_(char *uplo, integer *n, real *a, integer *lda, + integer *ipiv, real *work, integer *info); + +/* Subroutine */ int ssytrs_(char *uplo, integer *n, integer *nrhs, real *a, + integer *lda, integer *ipiv, real *b, integer *ldb, integer *info); + +/* Subroutine */ int stbcon_(char *norm, char *uplo, char *diag, integer *n, + integer *kd, real *ab, integer *ldab, real *rcond, real *work, + integer *iwork, integer *info); + +/* Subroutine */ int stbrfs_(char *uplo, char *trans, char *diag, integer *n, + integer *kd, integer *nrhs, real *ab, integer *ldab, real *b, integer + *ldb, real *x, integer *ldx, real *ferr, real *berr, real *work, + integer *iwork, integer *info); + +/* Subroutine */ int stbtrs_(char *uplo, char *trans, char *diag, integer *n, + integer *kd, integer *nrhs, real *ab, integer *ldab, real *b, integer + *ldb, integer *info); + +/* Subroutine */ int stgevc_(char *side, char *howmny, logical *select, + integer *n, real *a, integer *lda, real *b, integer *ldb, real *vl, + integer *ldvl, real *vr, integer *ldvr, integer *mm, integer *m, real + *work, integer *info); + +/* Subroutine */ int stgex2_(logical *wantq, logical *wantz, integer *n, real + *a, integer *lda, real *b, integer *ldb, real *q, integer *ldq, real * + z__, integer *ldz, integer *j1, integer *n1, integer *n2, real *work, + integer *lwork, integer *info); + +/* Subroutine */ int stgexc_(logical *wantq, logical *wantz, integer *n, real + *a, integer *lda, real *b, integer *ldb, real *q, integer *ldq, real * + z__, integer *ldz, integer *ifst, integer *ilst, real *work, integer * + lwork, integer *info); + +/* Subroutine */ int stgsen_(integer *ijob, logical *wantq, logical *wantz, + logical *select, integer *n, real *a, integer *lda, real *b, integer * + ldb, real *alphar, real *alphai, real *beta, real *q, integer *ldq, + real *z__, integer *ldz, integer *m, real *pl, real *pr, real *dif, + real *work, integer *lwork, integer *iwork, integer *liwork, integer * + info); + +/* Subroutine */ int stgsja_(char *jobu, char *jobv, char *jobq, integer *m, + integer *p, integer *n, integer *k, integer *l, real *a, integer *lda, + real *b, integer *ldb, real *tola, real *tolb, real *alpha, real * + beta, real *u, integer *ldu, real *v, integer *ldv, real *q, integer * + ldq, real *work, integer *ncycle, integer *info); + +/* Subroutine */ int stgsna_(char *job, char *howmny, logical *select, + integer *n, real *a, integer *lda, real *b, integer *ldb, real *vl, + integer *ldvl, real *vr, integer *ldvr, real *s, real *dif, integer * + mm, integer *m, real *work, integer *lwork, integer *iwork, integer * + info); + +/* Subroutine */ int stgsy2_(char *trans, integer *ijob, integer *m, integer * + n, real *a, integer *lda, real *b, integer *ldb, real *c__, integer * + ldc, real *d__, integer *ldd, real *e, integer *lde, real *f, integer + *ldf, real *scale, real *rdsum, real *rdscal, integer *iwork, integer + *pq, integer *info); + +/* Subroutine */ int stgsyl_(char *trans, integer *ijob, integer *m, integer * + n, real *a, integer *lda, real *b, integer *ldb, real *c__, integer * + ldc, real *d__, integer *ldd, real *e, integer *lde, real *f, integer + *ldf, real *scale, real *dif, real *work, integer *lwork, integer * + iwork, integer *info); + +/* Subroutine */ int stpcon_(char *norm, char *uplo, char *diag, integer *n, + real *ap, real *rcond, real *work, integer *iwork, integer *info); + +/* Subroutine */ int stprfs_(char *uplo, char *trans, char *diag, integer *n, + integer *nrhs, real *ap, real *b, integer *ldb, real *x, integer *ldx, + real *ferr, real *berr, real *work, integer *iwork, integer *info); + +/* Subroutine */ int stptri_(char *uplo, char *diag, integer *n, real *ap, + integer *info); + +/* Subroutine */ int stptrs_(char *uplo, char *trans, char *diag, integer *n, + integer *nrhs, real *ap, real *b, integer *ldb, integer *info); + +/* Subroutine */ int strcon_(char *norm, char *uplo, char *diag, integer *n, + real *a, integer *lda, real *rcond, real *work, integer *iwork, + integer *info); + +/* Subroutine */ int strevc_(char *side, char *howmny, logical *select, + integer *n, real *t, integer *ldt, real *vl, integer *ldvl, real *vr, + integer *ldvr, integer *mm, integer *m, real *work, integer *info); + +/* Subroutine */ int strexc_(char *compq, integer *n, real *t, integer *ldt, + real *q, integer *ldq, integer *ifst, integer *ilst, real *work, + integer *info); + +/* Subroutine */ int strrfs_(char *uplo, char *trans, char *diag, integer *n, + integer *nrhs, real *a, integer *lda, real *b, integer *ldb, real *x, + integer *ldx, real *ferr, real *berr, real *work, integer *iwork, + integer *info); + +/* Subroutine */ int strsen_(char *job, char *compq, logical *select, integer + *n, real *t, integer *ldt, real *q, integer *ldq, real *wr, real *wi, + integer *m, real *s, real *sep, real *work, integer *lwork, integer * + iwork, integer *liwork, integer *info); + +/* Subroutine */ int strsna_(char *job, char *howmny, logical *select, + integer *n, real *t, integer *ldt, real *vl, integer *ldvl, real *vr, + integer *ldvr, real *s, real *sep, integer *mm, integer *m, real * + work, integer *ldwork, integer *iwork, integer *info); + +/* Subroutine */ int strsyl_(char *trana, char *tranb, integer *isgn, integer + *m, integer *n, real *a, integer *lda, real *b, integer *ldb, real * + c__, integer *ldc, real *scale, integer *info); + +/* Subroutine */ int strti2_(char *uplo, char *diag, integer *n, real *a, + integer *lda, integer *info); + +/* Subroutine */ int strtri_(char *uplo, char *diag, integer *n, real *a, + integer *lda, integer *info); + +/* Subroutine */ int strtrs_(char *uplo, char *trans, char *diag, integer *n, + integer *nrhs, real *a, integer *lda, real *b, integer *ldb, integer * + info); + +/* Subroutine */ int stzrqf_(integer *m, integer *n, real *a, integer *lda, + real *tau, integer *info); + +/* Subroutine */ int stzrzf_(integer *m, integer *n, real *a, integer *lda, + real *tau, real *work, integer *lwork, integer *info); + +/* Subroutine */ int xerbla_(char *srname, integer *info); + +/* Subroutine */ int zbdsqr_(char *uplo, integer *n, integer *ncvt, integer * + nru, integer *ncc, doublereal *d__, doublereal *e, doublecomplex *vt, + integer *ldvt, doublecomplex *u, integer *ldu, doublecomplex *c__, + integer *ldc, doublereal *rwork, integer *info); + +/* Subroutine */ int zdrot_(integer *n, doublecomplex *cx, integer *incx, + doublecomplex *cy, integer *incy, doublereal *c__, doublereal *s); + +/* Subroutine */ int zdrscl_(integer *n, doublereal *sa, doublecomplex *sx, + integer *incx); + +/* Subroutine */ int zgbbrd_(char *vect, integer *m, integer *n, integer *ncc, + integer *kl, integer *ku, doublecomplex *ab, integer *ldab, + doublereal *d__, doublereal *e, doublecomplex *q, integer *ldq, + doublecomplex *pt, integer *ldpt, doublecomplex *c__, integer *ldc, + doublecomplex *work, doublereal *rwork, integer *info); + +/* Subroutine */ int zgbcon_(char *norm, integer *n, integer *kl, integer *ku, + doublecomplex *ab, integer *ldab, integer *ipiv, doublereal *anorm, + doublereal *rcond, doublecomplex *work, doublereal *rwork, integer * + info); + +/* Subroutine */ int zgbequ_(integer *m, integer *n, integer *kl, integer *ku, + doublecomplex *ab, integer *ldab, doublereal *r__, doublereal *c__, + doublereal *rowcnd, doublereal *colcnd, doublereal *amax, integer * + info); + +/* Subroutine */ int zgbrfs_(char *trans, integer *n, integer *kl, integer * + ku, integer *nrhs, doublecomplex *ab, integer *ldab, doublecomplex * + afb, integer *ldafb, integer *ipiv, doublecomplex *b, integer *ldb, + doublecomplex *x, integer *ldx, doublereal *ferr, doublereal *berr, + doublecomplex *work, doublereal *rwork, integer *info); + +/* Subroutine */ int zgbsv_(integer *n, integer *kl, integer *ku, integer * + nrhs, doublecomplex *ab, integer *ldab, integer *ipiv, doublecomplex * + b, integer *ldb, integer *info); + +/* Subroutine */ int zgbsvx_(char *fact, char *trans, integer *n, integer *kl, + integer *ku, integer *nrhs, doublecomplex *ab, integer *ldab, + doublecomplex *afb, integer *ldafb, integer *ipiv, char *equed, + doublereal *r__, doublereal *c__, doublecomplex *b, integer *ldb, + doublecomplex *x, integer *ldx, doublereal *rcond, doublereal *ferr, + doublereal *berr, doublecomplex *work, doublereal *rwork, integer * + info); + +/* Subroutine */ int zgbtf2_(integer *m, integer *n, integer *kl, integer *ku, + doublecomplex *ab, integer *ldab, integer *ipiv, integer *info); + +/* Subroutine */ int zgbtrf_(integer *m, integer *n, integer *kl, integer *ku, + doublecomplex *ab, integer *ldab, integer *ipiv, integer *info); + +/* Subroutine */ int zgbtrs_(char *trans, integer *n, integer *kl, integer * + ku, integer *nrhs, doublecomplex *ab, integer *ldab, integer *ipiv, + doublecomplex *b, integer *ldb, integer *info); + +/* Subroutine */ int zgebak_(char *job, char *side, integer *n, integer *ilo, + integer *ihi, doublereal *scale, integer *m, doublecomplex *v, + integer *ldv, integer *info); + +/* Subroutine */ int zgebal_(char *job, integer *n, doublecomplex *a, integer + *lda, integer *ilo, integer *ihi, doublereal *scale, integer *info); + +/* Subroutine */ int zgebd2_(integer *m, integer *n, doublecomplex *a, + integer *lda, doublereal *d__, doublereal *e, doublecomplex *tauq, + doublecomplex *taup, doublecomplex *work, integer *info); + +/* Subroutine */ int zgebrd_(integer *m, integer *n, doublecomplex *a, + integer *lda, doublereal *d__, doublereal *e, doublecomplex *tauq, + doublecomplex *taup, doublecomplex *work, integer *lwork, integer * + info); + +/* Subroutine */ int zgecon_(char *norm, integer *n, doublecomplex *a, + integer *lda, doublereal *anorm, doublereal *rcond, doublecomplex * + work, doublereal *rwork, integer *info); + +/* Subroutine */ int zgeequ_(integer *m, integer *n, doublecomplex *a, + integer *lda, doublereal *r__, doublereal *c__, doublereal *rowcnd, + doublereal *colcnd, doublereal *amax, integer *info); + +/* Subroutine */ int zgees_(char *jobvs, char *sort, L_fp select, integer *n, + doublecomplex *a, integer *lda, integer *sdim, doublecomplex *w, + doublecomplex *vs, integer *ldvs, doublecomplex *work, integer *lwork, + doublereal *rwork, logical *bwork, integer *info); + +/* Subroutine */ int zgeesx_(char *jobvs, char *sort, L_fp select, char * + sense, integer *n, doublecomplex *a, integer *lda, integer *sdim, + doublecomplex *w, doublecomplex *vs, integer *ldvs, doublereal * + rconde, doublereal *rcondv, doublecomplex *work, integer *lwork, + doublereal *rwork, logical *bwork, integer *info); + +/* Subroutine */ int zgeev_(char *jobvl, char *jobvr, integer *n, + doublecomplex *a, integer *lda, doublecomplex *w, doublecomplex *vl, + integer *ldvl, doublecomplex *vr, integer *ldvr, doublecomplex *work, + integer *lwork, doublereal *rwork, integer *info); + +/* Subroutine */ int zgeevx_(char *balanc, char *jobvl, char *jobvr, char * + sense, integer *n, doublecomplex *a, integer *lda, doublecomplex *w, + doublecomplex *vl, integer *ldvl, doublecomplex *vr, integer *ldvr, + integer *ilo, integer *ihi, doublereal *scale, doublereal *abnrm, + doublereal *rconde, doublereal *rcondv, doublecomplex *work, integer * + lwork, doublereal *rwork, integer *info); + +/* Subroutine */ int zgegs_(char *jobvsl, char *jobvsr, integer *n, + doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, + doublecomplex *alpha, doublecomplex *beta, doublecomplex *vsl, + integer *ldvsl, doublecomplex *vsr, integer *ldvsr, doublecomplex * + work, integer *lwork, doublereal *rwork, integer *info); + +/* Subroutine */ int zgegv_(char *jobvl, char *jobvr, integer *n, + doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, + doublecomplex *alpha, doublecomplex *beta, doublecomplex *vl, integer + *ldvl, doublecomplex *vr, integer *ldvr, doublecomplex *work, integer + *lwork, doublereal *rwork, integer *info); + +/* Subroutine */ int zgehd2_(integer *n, integer *ilo, integer *ihi, + doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * + work, integer *info); + +/* Subroutine */ int zgehrd_(integer *n, integer *ilo, integer *ihi, + doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * + work, integer *lwork, integer *info); + +/* Subroutine */ int zgelq2_(integer *m, integer *n, doublecomplex *a, + integer *lda, doublecomplex *tau, doublecomplex *work, integer *info); + +/* Subroutine */ int zgelqf_(integer *m, integer *n, doublecomplex *a, + integer *lda, doublecomplex *tau, doublecomplex *work, integer *lwork, + integer *info); + +/* Subroutine */ int zgels_(char *trans, integer *m, integer *n, integer * + nrhs, doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, + doublecomplex *work, integer *lwork, integer *info); + +/* Subroutine */ int zgelsx_(integer *m, integer *n, integer *nrhs, + doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, + integer *jpvt, doublereal *rcond, integer *rank, doublecomplex *work, + doublereal *rwork, integer *info); + +/* Subroutine */ int zgelsy_(integer *m, integer *n, integer *nrhs, + doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, + integer *jpvt, doublereal *rcond, integer *rank, doublecomplex *work, + integer *lwork, doublereal *rwork, integer *info); + +/* Subroutine */ int zgeql2_(integer *m, integer *n, doublecomplex *a, + integer *lda, doublecomplex *tau, doublecomplex *work, integer *info); + +/* Subroutine */ int zgeqlf_(integer *m, integer *n, doublecomplex *a, + integer *lda, doublecomplex *tau, doublecomplex *work, integer *lwork, + integer *info); + +/* Subroutine */ int zgeqp3_(integer *m, integer *n, doublecomplex *a, + integer *lda, integer *jpvt, doublecomplex *tau, doublecomplex *work, + integer *lwork, doublereal *rwork, integer *info); + +/* Subroutine */ int zgeqpf_(integer *m, integer *n, doublecomplex *a, + integer *lda, integer *jpvt, doublecomplex *tau, doublecomplex *work, + doublereal *rwork, integer *info); + +/* Subroutine */ int zgeqr2_(integer *m, integer *n, doublecomplex *a, + integer *lda, doublecomplex *tau, doublecomplex *work, integer *info); + +/* Subroutine */ int zgeqrf_(integer *m, integer *n, doublecomplex *a, + integer *lda, doublecomplex *tau, doublecomplex *work, integer *lwork, + integer *info); + +/* Subroutine */ int zgerfs_(char *trans, integer *n, integer *nrhs, + doublecomplex *a, integer *lda, doublecomplex *af, integer *ldaf, + integer *ipiv, doublecomplex *b, integer *ldb, doublecomplex *x, + integer *ldx, doublereal *ferr, doublereal *berr, doublecomplex *work, + doublereal *rwork, integer *info); + +/* Subroutine */ int zgerq2_(integer *m, integer *n, doublecomplex *a, + integer *lda, doublecomplex *tau, doublecomplex *work, integer *info); + +/* Subroutine */ int zgerqf_(integer *m, integer *n, doublecomplex *a, + integer *lda, doublecomplex *tau, doublecomplex *work, integer *lwork, + integer *info); + +/* Subroutine */ int zgesc2_(integer *n, doublecomplex *a, integer *lda, + doublecomplex *rhs, integer *ipiv, integer *jpiv, doublereal *scale); + +/* Subroutine */ int zgesv_(integer *n, integer *nrhs, doublecomplex *a, + integer *lda, integer *ipiv, doublecomplex *b, integer *ldb, integer * + info); + +/* Subroutine */ int zgesvx_(char *fact, char *trans, integer *n, integer * + nrhs, doublecomplex *a, integer *lda, doublecomplex *af, integer * + ldaf, integer *ipiv, char *equed, doublereal *r__, doublereal *c__, + doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, + doublereal *rcond, doublereal *ferr, doublereal *berr, doublecomplex * + work, doublereal *rwork, integer *info); + +/* Subroutine */ int zgetc2_(integer *n, doublecomplex *a, integer *lda, + integer *ipiv, integer *jpiv, integer *info); + +/* Subroutine */ int zgetf2_(integer *m, integer *n, doublecomplex *a, + integer *lda, integer *ipiv, integer *info); + +/* Subroutine */ int zgetrf_(integer *m, integer *n, doublecomplex *a, + integer *lda, integer *ipiv, integer *info); + +/* Subroutine */ int zgetri_(integer *n, doublecomplex *a, integer *lda, + integer *ipiv, doublecomplex *work, integer *lwork, integer *info); + +/* Subroutine */ int zgetrs_(char *trans, integer *n, integer *nrhs, + doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *b, + integer *ldb, integer *info); + +/* Subroutine */ int zggbak_(char *job, char *side, integer *n, integer *ilo, + integer *ihi, doublereal *lscale, doublereal *rscale, integer *m, + doublecomplex *v, integer *ldv, integer *info); + +/* Subroutine */ int zggbal_(char *job, integer *n, doublecomplex *a, integer + *lda, doublecomplex *b, integer *ldb, integer *ilo, integer *ihi, + doublereal *lscale, doublereal *rscale, doublereal *work, integer * + info); + +/* Subroutine */ int zgges_(char *jobvsl, char *jobvsr, char *sort, L_fp + delctg, integer *n, doublecomplex *a, integer *lda, doublecomplex *b, + integer *ldb, integer *sdim, doublecomplex *alpha, doublecomplex * + beta, doublecomplex *vsl, integer *ldvsl, doublecomplex *vsr, integer + *ldvsr, doublecomplex *work, integer *lwork, doublereal *rwork, + logical *bwork, integer *info); + +/* Subroutine */ int zggesx_(char *jobvsl, char *jobvsr, char *sort, L_fp + delctg, char *sense, integer *n, doublecomplex *a, integer *lda, + doublecomplex *b, integer *ldb, integer *sdim, doublecomplex *alpha, + doublecomplex *beta, doublecomplex *vsl, integer *ldvsl, + doublecomplex *vsr, integer *ldvsr, doublereal *rconde, doublereal * + rcondv, doublecomplex *work, integer *lwork, doublereal *rwork, + integer *iwork, integer *liwork, logical *bwork, integer *info); + +/* Subroutine */ int zggev_(char *jobvl, char *jobvr, integer *n, + doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, + doublecomplex *alpha, doublecomplex *beta, doublecomplex *vl, integer + *ldvl, doublecomplex *vr, integer *ldvr, doublecomplex *work, integer + *lwork, doublereal *rwork, integer *info); + +/* Subroutine */ int zggevx_(char *balanc, char *jobvl, char *jobvr, char * + sense, integer *n, doublecomplex *a, integer *lda, doublecomplex *b, + integer *ldb, doublecomplex *alpha, doublecomplex *beta, + doublecomplex *vl, integer *ldvl, doublecomplex *vr, integer *ldvr, + integer *ilo, integer *ihi, doublereal *lscale, doublereal *rscale, + doublereal *abnrm, doublereal *bbnrm, doublereal *rconde, doublereal * + rcondv, doublecomplex *work, integer *lwork, doublereal *rwork, + integer *iwork, logical *bwork, integer *info); + +/* Subroutine */ int zggglm_(integer *n, integer *m, integer *p, + doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, + doublecomplex *d__, doublecomplex *x, doublecomplex *y, doublecomplex + *work, integer *lwork, integer *info); + +/* Subroutine */ int zgghrd_(char *compq, char *compz, integer *n, integer * + ilo, integer *ihi, doublecomplex *a, integer *lda, doublecomplex *b, + integer *ldb, doublecomplex *q, integer *ldq, doublecomplex *z__, + integer *ldz, integer *info); + +/* Subroutine */ int zgglse_(integer *m, integer *n, integer *p, + doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, + doublecomplex *c__, doublecomplex *d__, doublecomplex *x, + doublecomplex *work, integer *lwork, integer *info); + +/* Subroutine */ int zggqrf_(integer *n, integer *m, integer *p, + doublecomplex *a, integer *lda, doublecomplex *taua, doublecomplex *b, + integer *ldb, doublecomplex *taub, doublecomplex *work, integer * + lwork, integer *info); + +/* Subroutine */ int zggrqf_(integer *m, integer *p, integer *n, + doublecomplex *a, integer *lda, doublecomplex *taua, doublecomplex *b, + integer *ldb, doublecomplex *taub, doublecomplex *work, integer * + lwork, integer *info); + +/* Subroutine */ int zggsvd_(char *jobu, char *jobv, char *jobq, integer *m, + integer *n, integer *p, integer *k, integer *l, doublecomplex *a, + integer *lda, doublecomplex *b, integer *ldb, doublereal *alpha, + doublereal *beta, doublecomplex *u, integer *ldu, doublecomplex *v, + integer *ldv, doublecomplex *q, integer *ldq, doublecomplex *work, + doublereal *rwork, integer *iwork, integer *info); + +/* Subroutine */ int zggsvp_(char *jobu, char *jobv, char *jobq, integer *m, + integer *p, integer *n, doublecomplex *a, integer *lda, doublecomplex + *b, integer *ldb, doublereal *tola, doublereal *tolb, integer *k, + integer *l, doublecomplex *u, integer *ldu, doublecomplex *v, integer + *ldv, doublecomplex *q, integer *ldq, integer *iwork, doublereal * + rwork, doublecomplex *tau, doublecomplex *work, integer *info); + +/* Subroutine */ int zgtcon_(char *norm, integer *n, doublecomplex *dl, + doublecomplex *d__, doublecomplex *du, doublecomplex *du2, integer * + ipiv, doublereal *anorm, doublereal *rcond, doublecomplex *work, + integer *info); + +/* Subroutine */ int zgtrfs_(char *trans, integer *n, integer *nrhs, + doublecomplex *dl, doublecomplex *d__, doublecomplex *du, + doublecomplex *dlf, doublecomplex *df, doublecomplex *duf, + doublecomplex *du2, integer *ipiv, doublecomplex *b, integer *ldb, + doublecomplex *x, integer *ldx, doublereal *ferr, doublereal *berr, + doublecomplex *work, doublereal *rwork, integer *info); + +/* Subroutine */ int zgtsv_(integer *n, integer *nrhs, doublecomplex *dl, + doublecomplex *d__, doublecomplex *du, doublecomplex *b, integer *ldb, + integer *info); + +/* Subroutine */ int zgtsvx_(char *fact, char *trans, integer *n, integer * + nrhs, doublecomplex *dl, doublecomplex *d__, doublecomplex *du, + doublecomplex *dlf, doublecomplex *df, doublecomplex *duf, + doublecomplex *du2, integer *ipiv, doublecomplex *b, integer *ldb, + doublecomplex *x, integer *ldx, doublereal *rcond, doublereal *ferr, + doublereal *berr, doublecomplex *work, doublereal *rwork, integer * + info); + +/* Subroutine */ int zgttrf_(integer *n, doublecomplex *dl, doublecomplex * + d__, doublecomplex *du, doublecomplex *du2, integer *ipiv, integer * + info); + +/* Subroutine */ int zgttrs_(char *trans, integer *n, integer *nrhs, + doublecomplex *dl, doublecomplex *d__, doublecomplex *du, + doublecomplex *du2, integer *ipiv, doublecomplex *b, integer *ldb, + integer *info); + +/* Subroutine */ int zgtts2_(integer *itrans, integer *n, integer *nrhs, + doublecomplex *dl, doublecomplex *d__, doublecomplex *du, + doublecomplex *du2, integer *ipiv, doublecomplex *b, integer *ldb); + +/* Subroutine */ int zhbev_(char *jobz, char *uplo, integer *n, integer *kd, + doublecomplex *ab, integer *ldab, doublereal *w, doublecomplex *z__, + integer *ldz, doublecomplex *work, doublereal *rwork, integer *info); + +/* Subroutine */ int zhbevd_(char *jobz, char *uplo, integer *n, integer *kd, + doublecomplex *ab, integer *ldab, doublereal *w, doublecomplex *z__, + integer *ldz, doublecomplex *work, integer *lwork, doublereal *rwork, + integer *lrwork, integer *iwork, integer *liwork, integer *info); + +/* Subroutine */ int zhbevx_(char *jobz, char *range, char *uplo, integer *n, + integer *kd, doublecomplex *ab, integer *ldab, doublecomplex *q, + integer *ldq, doublereal *vl, doublereal *vu, integer *il, integer * + iu, doublereal *abstol, integer *m, doublereal *w, doublecomplex *z__, + integer *ldz, doublecomplex *work, doublereal *rwork, integer *iwork, + integer *ifail, integer *info); + +/* Subroutine */ int zhbgst_(char *vect, char *uplo, integer *n, integer *ka, + integer *kb, doublecomplex *ab, integer *ldab, doublecomplex *bb, + integer *ldbb, doublecomplex *x, integer *ldx, doublecomplex *work, + doublereal *rwork, integer *info); + +/* Subroutine */ int zhbgv_(char *jobz, char *uplo, integer *n, integer *ka, + integer *kb, doublecomplex *ab, integer *ldab, doublecomplex *bb, + integer *ldbb, doublereal *w, doublecomplex *z__, integer *ldz, + doublecomplex *work, doublereal *rwork, integer *info); + +/* Subroutine */ int zhbgvx_(char *jobz, char *range, char *uplo, integer *n, + integer *ka, integer *kb, doublecomplex *ab, integer *ldab, + doublecomplex *bb, integer *ldbb, doublecomplex *q, integer *ldq, + doublereal *vl, doublereal *vu, integer *il, integer *iu, doublereal * + abstol, integer *m, doublereal *w, doublecomplex *z__, integer *ldz, + doublecomplex *work, doublereal *rwork, integer *iwork, integer * + ifail, integer *info); + +/* Subroutine */ int zhbtrd_(char *vect, char *uplo, integer *n, integer *kd, + doublecomplex *ab, integer *ldab, doublereal *d__, doublereal *e, + doublecomplex *q, integer *ldq, doublecomplex *work, integer *info); + +/* Subroutine */ int zhecon_(char *uplo, integer *n, doublecomplex *a, + integer *lda, integer *ipiv, doublereal *anorm, doublereal *rcond, + doublecomplex *work, integer *info); + +/* Subroutine */ int zheev_(char *jobz, char *uplo, integer *n, doublecomplex + *a, integer *lda, doublereal *w, doublecomplex *work, integer *lwork, + doublereal *rwork, integer *info); + +/* Subroutine */ int zheevd_(char *jobz, char *uplo, integer *n, + doublecomplex *a, integer *lda, doublereal *w, doublecomplex *work, + integer *lwork, doublereal *rwork, integer *lrwork, integer *iwork, + integer *liwork, integer *info); + +/* Subroutine */ int zheevr_(char *jobz, char *range, char *uplo, integer *n, + doublecomplex *a, integer *lda, doublereal *vl, doublereal *vu, + integer *il, integer *iu, doublereal *abstol, integer *m, doublereal * + w, doublecomplex *z__, integer *ldz, integer *isuppz, doublecomplex * + work, integer *lwork, doublereal *rwork, integer *lrwork, integer * + iwork, integer *liwork, integer *info); + +/* Subroutine */ int zheevx_(char *jobz, char *range, char *uplo, integer *n, + doublecomplex *a, integer *lda, doublereal *vl, doublereal *vu, + integer *il, integer *iu, doublereal *abstol, integer *m, doublereal * + w, doublecomplex *z__, integer *ldz, doublecomplex *work, integer * + lwork, doublereal *rwork, integer *iwork, integer *ifail, integer * + info); + +/* Subroutine */ int zhegs2_(integer *itype, char *uplo, integer *n, + doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, + integer *info); + +/* Subroutine */ int zhegst_(integer *itype, char *uplo, integer *n, + doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, + integer *info); + +/* Subroutine */ int zhegv_(integer *itype, char *jobz, char *uplo, integer * + n, doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, + doublereal *w, doublecomplex *work, integer *lwork, doublereal *rwork, + integer *info); + +/* Subroutine */ int zhegvd_(integer *itype, char *jobz, char *uplo, integer * + n, doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, + doublereal *w, doublecomplex *work, integer *lwork, doublereal *rwork, + integer *lrwork, integer *iwork, integer *liwork, integer *info); + +/* Subroutine */ int zhegvx_(integer *itype, char *jobz, char *range, char * + uplo, integer *n, doublecomplex *a, integer *lda, doublecomplex *b, + integer *ldb, doublereal *vl, doublereal *vu, integer *il, integer * + iu, doublereal *abstol, integer *m, doublereal *w, doublecomplex *z__, + integer *ldz, doublecomplex *work, integer *lwork, doublereal *rwork, + integer *iwork, integer *ifail, integer *info); + +/* Subroutine */ int zherfs_(char *uplo, integer *n, integer *nrhs, + doublecomplex *a, integer *lda, doublecomplex *af, integer *ldaf, + integer *ipiv, doublecomplex *b, integer *ldb, doublecomplex *x, + integer *ldx, doublereal *ferr, doublereal *berr, doublecomplex *work, + doublereal *rwork, integer *info); + +/* Subroutine */ int zhesv_(char *uplo, integer *n, integer *nrhs, + doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *b, + integer *ldb, doublecomplex *work, integer *lwork, integer *info); + +/* Subroutine */ int zhesvx_(char *fact, char *uplo, integer *n, integer * + nrhs, doublecomplex *a, integer *lda, doublecomplex *af, integer * + ldaf, integer *ipiv, doublecomplex *b, integer *ldb, doublecomplex *x, + integer *ldx, doublereal *rcond, doublereal *ferr, doublereal *berr, + doublecomplex *work, integer *lwork, doublereal *rwork, integer *info); + +/* Subroutine */ int zhetf2_(char *uplo, integer *n, doublecomplex *a, + integer *lda, integer *ipiv, integer *info); + +/* Subroutine */ int zhetrd_(char *uplo, integer *n, doublecomplex *a, + integer *lda, doublereal *d__, doublereal *e, doublecomplex *tau, + doublecomplex *work, integer *lwork, integer *info); + +/* Subroutine */ int zhetrf_(char *uplo, integer *n, doublecomplex *a, + integer *lda, integer *ipiv, doublecomplex *work, integer *lwork, + integer *info); + +/* Subroutine */ int zhetri_(char *uplo, integer *n, doublecomplex *a, + integer *lda, integer *ipiv, doublecomplex *work, integer *info); + +/* Subroutine */ int zhetrs_(char *uplo, integer *n, integer *nrhs, + doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *b, + integer *ldb, integer *info); + +/* Subroutine */ int zhgeqz_(char *job, char *compq, char *compz, integer *n, + integer *ilo, integer *ihi, doublecomplex *a, integer *lda, + doublecomplex *b, integer *ldb, doublecomplex *alpha, doublecomplex * + beta, doublecomplex *q, integer *ldq, doublecomplex *z__, integer * + ldz, doublecomplex *work, integer *lwork, doublereal *rwork, integer * + info); + +/* Subroutine */ int zhpcon_(char *uplo, integer *n, doublecomplex *ap, + integer *ipiv, doublereal *anorm, doublereal *rcond, doublecomplex * + work, integer *info); + +/* Subroutine */ int zhpev_(char *jobz, char *uplo, integer *n, doublecomplex + *ap, doublereal *w, doublecomplex *z__, integer *ldz, doublecomplex * + work, doublereal *rwork, integer *info); + +/* Subroutine */ int zhpevd_(char *jobz, char *uplo, integer *n, + doublecomplex *ap, doublereal *w, doublecomplex *z__, integer *ldz, + doublecomplex *work, integer *lwork, doublereal *rwork, integer * + lrwork, integer *iwork, integer *liwork, integer *info); + +/* Subroutine */ int zhpevx_(char *jobz, char *range, char *uplo, integer *n, + doublecomplex *ap, doublereal *vl, doublereal *vu, integer *il, + integer *iu, doublereal *abstol, integer *m, doublereal *w, + doublecomplex *z__, integer *ldz, doublecomplex *work, doublereal * + rwork, integer *iwork, integer *ifail, integer *info); + +/* Subroutine */ int zhpgst_(integer *itype, char *uplo, integer *n, + doublecomplex *ap, doublecomplex *bp, integer *info); + +/* Subroutine */ int zhpgv_(integer *itype, char *jobz, char *uplo, integer * + n, doublecomplex *ap, doublecomplex *bp, doublereal *w, doublecomplex + *z__, integer *ldz, doublecomplex *work, doublereal *rwork, integer * + info); + +/* Subroutine */ int zhpgvd_(integer *itype, char *jobz, char *uplo, integer * + n, doublecomplex *ap, doublecomplex *bp, doublereal *w, doublecomplex + *z__, integer *ldz, doublecomplex *work, integer *lwork, doublereal * + rwork, integer *lrwork, integer *iwork, integer *liwork, integer * + info); + +/* Subroutine */ int zhpgvx_(integer *itype, char *jobz, char *range, char * + uplo, integer *n, doublecomplex *ap, doublecomplex *bp, doublereal * + vl, doublereal *vu, integer *il, integer *iu, doublereal *abstol, + integer *m, doublereal *w, doublecomplex *z__, integer *ldz, + doublecomplex *work, doublereal *rwork, integer *iwork, integer * + ifail, integer *info); + +/* Subroutine */ int zhprfs_(char *uplo, integer *n, integer *nrhs, + doublecomplex *ap, doublecomplex *afp, integer *ipiv, doublecomplex * + b, integer *ldb, doublecomplex *x, integer *ldx, doublereal *ferr, + doublereal *berr, doublecomplex *work, doublereal *rwork, integer * + info); + +/* Subroutine */ int zhpsv_(char *uplo, integer *n, integer *nrhs, + doublecomplex *ap, integer *ipiv, doublecomplex *b, integer *ldb, + integer *info); + +/* Subroutine */ int zhpsvx_(char *fact, char *uplo, integer *n, integer * + nrhs, doublecomplex *ap, doublecomplex *afp, integer *ipiv, + doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, + doublereal *rcond, doublereal *ferr, doublereal *berr, doublecomplex * + work, doublereal *rwork, integer *info); + +/* Subroutine */ int zhptrd_(char *uplo, integer *n, doublecomplex *ap, + doublereal *d__, doublereal *e, doublecomplex *tau, integer *info); + +/* Subroutine */ int zhptrf_(char *uplo, integer *n, doublecomplex *ap, + integer *ipiv, integer *info); + +/* Subroutine */ int zhptri_(char *uplo, integer *n, doublecomplex *ap, + integer *ipiv, doublecomplex *work, integer *info); + +/* Subroutine */ int zhptrs_(char *uplo, integer *n, integer *nrhs, + doublecomplex *ap, integer *ipiv, doublecomplex *b, integer *ldb, + integer *info); + +/* Subroutine */ int zhsein_(char *side, char *eigsrc, char *initv, logical * + select, integer *n, doublecomplex *h__, integer *ldh, doublecomplex * + w, doublecomplex *vl, integer *ldvl, doublecomplex *vr, integer *ldvr, + integer *mm, integer *m, doublecomplex *work, doublereal *rwork, + integer *ifaill, integer *ifailr, integer *info); + +/* Subroutine */ int zhseqr_(char *job, char *compz, integer *n, integer *ilo, + integer *ihi, doublecomplex *h__, integer *ldh, doublecomplex *w, + doublecomplex *z__, integer *ldz, doublecomplex *work, integer *lwork, + integer *info); + +/* Subroutine */ int zlabrd_(integer *m, integer *n, integer *nb, + doublecomplex *a, integer *lda, doublereal *d__, doublereal *e, + doublecomplex *tauq, doublecomplex *taup, doublecomplex *x, integer * + ldx, doublecomplex *y, integer *ldy); + +/* Subroutine */ int zlacgv_(integer *n, doublecomplex *x, integer *incx); + +/* Subroutine */ int zlacon_(integer *n, doublecomplex *v, doublecomplex *x, + doublereal *est, integer *kase); + +/* Subroutine */ int zlacp2_(char *uplo, integer *m, integer *n, doublereal * + a, integer *lda, doublecomplex *b, integer *ldb); + +/* Subroutine */ int zlacpy_(char *uplo, integer *m, integer *n, + doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb); + +/* Subroutine */ int zlacrm_(integer *m, integer *n, doublecomplex *a, + integer *lda, doublereal *b, integer *ldb, doublecomplex *c__, + integer *ldc, doublereal *rwork); + +/* Subroutine */ int zlacrt_(integer *n, doublecomplex *cx, integer *incx, + doublecomplex *cy, integer *incy, doublecomplex *c__, doublecomplex * + s); + +/* Subroutine */ int zlaed0_(integer *qsiz, integer *n, doublereal *d__, + doublereal *e, doublecomplex *q, integer *ldq, doublecomplex *qstore, + integer *ldqs, doublereal *rwork, integer *iwork, integer *info); + +/* Subroutine */ int zlaed7_(integer *n, integer *cutpnt, integer *qsiz, + integer *tlvls, integer *curlvl, integer *curpbm, doublereal *d__, + doublecomplex *q, integer *ldq, doublereal *rho, integer *indxq, + doublereal *qstore, integer *qptr, integer *prmptr, integer *perm, + integer *givptr, integer *givcol, doublereal *givnum, doublecomplex * + work, doublereal *rwork, integer *iwork, integer *info); + +/* Subroutine */ int zlaed8_(integer *k, integer *n, integer *qsiz, + doublecomplex *q, integer *ldq, doublereal *d__, doublereal *rho, + integer *cutpnt, doublereal *z__, doublereal *dlamda, doublecomplex * + q2, integer *ldq2, doublereal *w, integer *indxp, integer *indx, + integer *indxq, integer *perm, integer *givptr, integer *givcol, + doublereal *givnum, integer *info); + +/* Subroutine */ int zlaein_(logical *rightv, logical *noinit, integer *n, + doublecomplex *h__, integer *ldh, doublecomplex *w, doublecomplex *v, + doublecomplex *b, integer *ldb, doublereal *rwork, doublereal *eps3, + doublereal *smlnum, integer *info); + +/* Subroutine */ int zlaesy_(doublecomplex *a, doublecomplex *b, + doublecomplex *c__, doublecomplex *rt1, doublecomplex *rt2, + doublecomplex *evscal, doublecomplex *cs1, doublecomplex *sn1); + +/* Subroutine */ int zlaev2_(doublecomplex *a, doublecomplex *b, + doublecomplex *c__, doublereal *rt1, doublereal *rt2, doublereal *cs1, + doublecomplex *sn1); + +/* Subroutine */ int zlags2_(logical *upper, doublereal *a1, doublecomplex * + a2, doublereal *a3, doublereal *b1, doublecomplex *b2, doublereal *b3, + doublereal *csu, doublecomplex *snu, doublereal *csv, doublecomplex * + snv, doublereal *csq, doublecomplex *snq); + +/* Subroutine */ int zlagtm_(char *trans, integer *n, integer *nrhs, + doublereal *alpha, doublecomplex *dl, doublecomplex *d__, + doublecomplex *du, doublecomplex *x, integer *ldx, doublereal *beta, + doublecomplex *b, integer *ldb); + +/* Subroutine */ int zlahef_(char *uplo, integer *n, integer *nb, integer *kb, + doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *w, + integer *ldw, integer *info); + +/* Subroutine */ int zlahqr_(logical *wantt, logical *wantz, integer *n, + integer *ilo, integer *ihi, doublecomplex *h__, integer *ldh, + doublecomplex *w, integer *iloz, integer *ihiz, doublecomplex *z__, + integer *ldz, integer *info); + +/* Subroutine */ int zlahrd_(integer *n, integer *k, integer *nb, + doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex *t, + integer *ldt, doublecomplex *y, integer *ldy); + +/* Subroutine */ int zlaic1_(integer *job, integer *j, doublecomplex *x, + doublereal *sest, doublecomplex *w, doublecomplex *gamma, doublereal * + sestpr, doublecomplex *s, doublecomplex *c__); + +/* Subroutine */ int zlals0_(integer *icompq, integer *nl, integer *nr, + integer *sqre, integer *nrhs, doublecomplex *b, integer *ldb, + doublecomplex *bx, integer *ldbx, integer *perm, integer *givptr, + integer *givcol, integer *ldgcol, doublereal *givnum, integer *ldgnum, + doublereal *poles, doublereal *difl, doublereal *difr, doublereal * + z__, integer *k, doublereal *c__, doublereal *s, doublereal *rwork, + integer *info); + +/* Subroutine */ int zlalsa_(integer *icompq, integer *smlsiz, integer *n, + integer *nrhs, doublecomplex *b, integer *ldb, doublecomplex *bx, + integer *ldbx, doublereal *u, integer *ldu, doublereal *vt, integer * + k, doublereal *difl, doublereal *difr, doublereal *z__, doublereal * + poles, integer *givptr, integer *givcol, integer *ldgcol, integer * + perm, doublereal *givnum, doublereal *c__, doublereal *s, doublereal * + rwork, integer *iwork, integer *info); + +/* Subroutine */ int zlapll_(integer *n, doublecomplex *x, integer *incx, + doublecomplex *y, integer *incy, doublereal *ssmin); + +/* Subroutine */ int zlapmt_(logical *forwrd, integer *m, integer *n, + doublecomplex *x, integer *ldx, integer *k); + +/* Subroutine */ int zlaqgb_(integer *m, integer *n, integer *kl, integer *ku, + doublecomplex *ab, integer *ldab, doublereal *r__, doublereal *c__, + doublereal *rowcnd, doublereal *colcnd, doublereal *amax, char *equed); + +/* Subroutine */ int zlaqge_(integer *m, integer *n, doublecomplex *a, + integer *lda, doublereal *r__, doublereal *c__, doublereal *rowcnd, + doublereal *colcnd, doublereal *amax, char *equed); + +/* Subroutine */ int zlaqhb_(char *uplo, integer *n, integer *kd, + doublecomplex *ab, integer *ldab, doublereal *s, doublereal *scond, + doublereal *amax, char *equed); + +/* Subroutine */ int zlaqhe_(char *uplo, integer *n, doublecomplex *a, + integer *lda, doublereal *s, doublereal *scond, doublereal *amax, + char *equed); + +/* Subroutine */ int zlaqhp_(char *uplo, integer *n, doublecomplex *ap, + doublereal *s, doublereal *scond, doublereal *amax, char *equed); + +/* Subroutine */ int zlaqp2_(integer *m, integer *n, integer *offset, + doublecomplex *a, integer *lda, integer *jpvt, doublecomplex *tau, + doublereal *vn1, doublereal *vn2, doublecomplex *work); + +/* Subroutine */ int zlaqps_(integer *m, integer *n, integer *offset, integer + *nb, integer *kb, doublecomplex *a, integer *lda, integer *jpvt, + doublecomplex *tau, doublereal *vn1, doublereal *vn2, doublecomplex * + auxv, doublecomplex *f, integer *ldf); + +/* Subroutine */ int zlaqsb_(char *uplo, integer *n, integer *kd, + doublecomplex *ab, integer *ldab, doublereal *s, doublereal *scond, + doublereal *amax, char *equed); + +/* Subroutine */ int zlaqsp_(char *uplo, integer *n, doublecomplex *ap, + doublereal *s, doublereal *scond, doublereal *amax, char *equed); + +/* Subroutine */ int zlaqsy_(char *uplo, integer *n, doublecomplex *a, + integer *lda, doublereal *s, doublereal *scond, doublereal *amax, + char *equed); + +/* Subroutine */ int zlar1v_(integer *n, integer *b1, integer *bn, doublereal + *sigma, doublereal *d__, doublereal *l, doublereal *ld, doublereal * + lld, doublereal *gersch, doublecomplex *z__, doublereal *ztz, + doublereal *mingma, integer *r__, integer *isuppz, doublereal *work); + +/* Subroutine */ int zlar2v_(integer *n, doublecomplex *x, doublecomplex *y, + doublecomplex *z__, integer *incx, doublereal *c__, doublecomplex *s, + integer *incc); + +/* Subroutine */ int zlarcm_(integer *m, integer *n, doublereal *a, integer * + lda, doublecomplex *b, integer *ldb, doublecomplex *c__, integer *ldc, + doublereal *rwork); + +/* Subroutine */ int zlarf_(char *side, integer *m, integer *n, doublecomplex + *v, integer *incv, doublecomplex *tau, doublecomplex *c__, integer * + ldc, doublecomplex *work); + +/* Subroutine */ int zlarfb_(char *side, char *trans, char *direct, char * + storev, integer *m, integer *n, integer *k, doublecomplex *v, integer + *ldv, doublecomplex *t, integer *ldt, doublecomplex *c__, integer * + ldc, doublecomplex *work, integer *ldwork); + +/* Subroutine */ int zlarfg_(integer *n, doublecomplex *alpha, doublecomplex * + x, integer *incx, doublecomplex *tau); + +/* Subroutine */ int zlarft_(char *direct, char *storev, integer *n, integer * + k, doublecomplex *v, integer *ldv, doublecomplex *tau, doublecomplex * + t, integer *ldt); + +/* Subroutine */ int zlarfx_(char *side, integer *m, integer *n, + doublecomplex *v, doublecomplex *tau, doublecomplex *c__, integer * + ldc, doublecomplex *work); + +/* Subroutine */ int zlargv_(integer *n, doublecomplex *x, integer *incx, + doublecomplex *y, integer *incy, doublereal *c__, integer *incc); + +/* Subroutine */ int zlarnv_(integer *idist, integer *iseed, integer *n, + doublecomplex *x); + +/* Subroutine */ int zlarrv_(integer *n, doublereal *d__, doublereal *l, + integer *isplit, integer *m, doublereal *w, integer *iblock, + doublereal *gersch, doublereal *tol, doublecomplex *z__, integer *ldz, + integer *isuppz, doublereal *work, integer *iwork, integer *info); + +/* Subroutine */ int zlartg_(doublecomplex *f, doublecomplex *g, doublereal * + cs, doublecomplex *sn, doublecomplex *r__); + +/* Subroutine */ int zlartv_(integer *n, doublecomplex *x, integer *incx, + doublecomplex *y, integer *incy, doublereal *c__, doublecomplex *s, + integer *incc); + +/* Subroutine */ int zlarz_(char *side, integer *m, integer *n, integer *l, + doublecomplex *v, integer *incv, doublecomplex *tau, doublecomplex * + c__, integer *ldc, doublecomplex *work); + +/* Subroutine */ int zlarzb_(char *side, char *trans, char *direct, char * + storev, integer *m, integer *n, integer *k, integer *l, doublecomplex + *v, integer *ldv, doublecomplex *t, integer *ldt, doublecomplex *c__, + integer *ldc, doublecomplex *work, integer *ldwork); + +/* Subroutine */ int zlarzt_(char *direct, char *storev, integer *n, integer * + k, doublecomplex *v, integer *ldv, doublecomplex *tau, doublecomplex * + t, integer *ldt); + +/* Subroutine */ int zlascl_(char *type__, integer *kl, integer *ku, + doublereal *cfrom, doublereal *cto, integer *m, integer *n, + doublecomplex *a, integer *lda, integer *info); + +/* Subroutine */ int zlaset_(char *uplo, integer *m, integer *n, + doublecomplex *alpha, doublecomplex *beta, doublecomplex *a, integer * + lda); + +/* Subroutine */ int zlasr_(char *side, char *pivot, char *direct, integer *m, + integer *n, doublereal *c__, doublereal *s, doublecomplex *a, + integer *lda); + +/* Subroutine */ int zlassq_(integer *n, doublecomplex *x, integer *incx, + doublereal *scale, doublereal *sumsq); + +/* Subroutine */ int zlaswp_(integer *n, doublecomplex *a, integer *lda, + integer *k1, integer *k2, integer *ipiv, integer *incx); + +/* Subroutine */ int zlasyf_(char *uplo, integer *n, integer *nb, integer *kb, + doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *w, + integer *ldw, integer *info); + +/* Subroutine */ int zlatbs_(char *uplo, char *trans, char *diag, char * + normin, integer *n, integer *kd, doublecomplex *ab, integer *ldab, + doublecomplex *x, doublereal *scale, doublereal *cnorm, integer *info); + +/* Subroutine */ int zlatdf_(integer *ijob, integer *n, doublecomplex *z__, + integer *ldz, doublecomplex *rhs, doublereal *rdsum, doublereal * + rdscal, integer *ipiv, integer *jpiv); + +/* Subroutine */ int zlatps_(char *uplo, char *trans, char *diag, char * + normin, integer *n, doublecomplex *ap, doublecomplex *x, doublereal * + scale, doublereal *cnorm, integer *info); + +/* Subroutine */ int zlatrd_(char *uplo, integer *n, integer *nb, + doublecomplex *a, integer *lda, doublereal *e, doublecomplex *tau, + doublecomplex *w, integer *ldw); + +/* Subroutine */ int zlatrs_(char *uplo, char *trans, char *diag, char * + normin, integer *n, doublecomplex *a, integer *lda, doublecomplex *x, + doublereal *scale, doublereal *cnorm, integer *info); + +/* Subroutine */ int zlatrz_(integer *m, integer *n, integer *l, + doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * + work); + +/* Subroutine */ int zlatzm_(char *side, integer *m, integer *n, + doublecomplex *v, integer *incv, doublecomplex *tau, doublecomplex * + c1, doublecomplex *c2, integer *ldc, doublecomplex *work); + +/* Subroutine */ int zlauu2_(char *uplo, integer *n, doublecomplex *a, + integer *lda, integer *info); + +/* Subroutine */ int zlauum_(char *uplo, integer *n, doublecomplex *a, + integer *lda, integer *info); + +/* Subroutine */ int zpbcon_(char *uplo, integer *n, integer *kd, + doublecomplex *ab, integer *ldab, doublereal *anorm, doublereal * + rcond, doublecomplex *work, doublereal *rwork, integer *info); + +/* Subroutine */ int zpbequ_(char *uplo, integer *n, integer *kd, + doublecomplex *ab, integer *ldab, doublereal *s, doublereal *scond, + doublereal *amax, integer *info); + +/* Subroutine */ int zpbrfs_(char *uplo, integer *n, integer *kd, integer * + nrhs, doublecomplex *ab, integer *ldab, doublecomplex *afb, integer * + ldafb, doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, + doublereal *ferr, doublereal *berr, doublecomplex *work, doublereal * + rwork, integer *info); + +/* Subroutine */ int zpbstf_(char *uplo, integer *n, integer *kd, + doublecomplex *ab, integer *ldab, integer *info); + +/* Subroutine */ int zpbsv_(char *uplo, integer *n, integer *kd, integer * + nrhs, doublecomplex *ab, integer *ldab, doublecomplex *b, integer * + ldb, integer *info); + +/* Subroutine */ int zpbsvx_(char *fact, char *uplo, integer *n, integer *kd, + integer *nrhs, doublecomplex *ab, integer *ldab, doublecomplex *afb, + integer *ldafb, char *equed, doublereal *s, doublecomplex *b, integer + *ldb, doublecomplex *x, integer *ldx, doublereal *rcond, doublereal * + ferr, doublereal *berr, doublecomplex *work, doublereal *rwork, + integer *info); + +/* Subroutine */ int zpbtf2_(char *uplo, integer *n, integer *kd, + doublecomplex *ab, integer *ldab, integer *info); + +/* Subroutine */ int zpbtrf_(char *uplo, integer *n, integer *kd, + doublecomplex *ab, integer *ldab, integer *info); + +/* Subroutine */ int zpbtrs_(char *uplo, integer *n, integer *kd, integer * + nrhs, doublecomplex *ab, integer *ldab, doublecomplex *b, integer * + ldb, integer *info); + +/* Subroutine */ int zpocon_(char *uplo, integer *n, doublecomplex *a, + integer *lda, doublereal *anorm, doublereal *rcond, doublecomplex * + work, doublereal *rwork, integer *info); + +/* Subroutine */ int zpoequ_(integer *n, doublecomplex *a, integer *lda, + doublereal *s, doublereal *scond, doublereal *amax, integer *info); + +/* Subroutine */ int zporfs_(char *uplo, integer *n, integer *nrhs, + doublecomplex *a, integer *lda, doublecomplex *af, integer *ldaf, + doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, + doublereal *ferr, doublereal *berr, doublecomplex *work, doublereal * + rwork, integer *info); + +/* Subroutine */ int zposv_(char *uplo, integer *n, integer *nrhs, + doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, + integer *info); + +/* Subroutine */ int zposvx_(char *fact, char *uplo, integer *n, integer * + nrhs, doublecomplex *a, integer *lda, doublecomplex *af, integer * + ldaf, char *equed, doublereal *s, doublecomplex *b, integer *ldb, + doublecomplex *x, integer *ldx, doublereal *rcond, doublereal *ferr, + doublereal *berr, doublecomplex *work, doublereal *rwork, integer * + info); + +/* Subroutine */ int zpotf2_(char *uplo, integer *n, doublecomplex *a, + integer *lda, integer *info); + +/* Subroutine */ int zpotrf_(char *uplo, integer *n, doublecomplex *a, + integer *lda, integer *info); + +/* Subroutine */ int zpotri_(char *uplo, integer *n, doublecomplex *a, + integer *lda, integer *info); + +/* Subroutine */ int zpotrs_(char *uplo, integer *n, integer *nrhs, + doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, + integer *info); + +/* Subroutine */ int zppcon_(char *uplo, integer *n, doublecomplex *ap, + doublereal *anorm, doublereal *rcond, doublecomplex *work, doublereal + *rwork, integer *info); + +/* Subroutine */ int zppequ_(char *uplo, integer *n, doublecomplex *ap, + doublereal *s, doublereal *scond, doublereal *amax, integer *info); + +/* Subroutine */ int zpprfs_(char *uplo, integer *n, integer *nrhs, + doublecomplex *ap, doublecomplex *afp, doublecomplex *b, integer *ldb, + doublecomplex *x, integer *ldx, doublereal *ferr, doublereal *berr, + doublecomplex *work, doublereal *rwork, integer *info); + +/* Subroutine */ int zppsv_(char *uplo, integer *n, integer *nrhs, + doublecomplex *ap, doublecomplex *b, integer *ldb, integer *info); + +/* Subroutine */ int zppsvx_(char *fact, char *uplo, integer *n, integer * + nrhs, doublecomplex *ap, doublecomplex *afp, char *equed, doublereal * + s, doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, + doublereal *rcond, doublereal *ferr, doublereal *berr, doublecomplex * + work, doublereal *rwork, integer *info); + +/* Subroutine */ int zpptrf_(char *uplo, integer *n, doublecomplex *ap, + integer *info); + +/* Subroutine */ int zpptri_(char *uplo, integer *n, doublecomplex *ap, + integer *info); + +/* Subroutine */ int zpptrs_(char *uplo, integer *n, integer *nrhs, + doublecomplex *ap, doublecomplex *b, integer *ldb, integer *info); + +/* Subroutine */ int zptcon_(integer *n, doublereal *d__, doublecomplex *e, + doublereal *anorm, doublereal *rcond, doublereal *rwork, integer * + info); + +/* Subroutine */ int zptrfs_(char *uplo, integer *n, integer *nrhs, + doublereal *d__, doublecomplex *e, doublereal *df, doublecomplex *ef, + doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, + doublereal *ferr, doublereal *berr, doublecomplex *work, doublereal * + rwork, integer *info); + +/* Subroutine */ int zptsv_(integer *n, integer *nrhs, doublereal *d__, + doublecomplex *e, doublecomplex *b, integer *ldb, integer *info); + +/* Subroutine */ int zptsvx_(char *fact, integer *n, integer *nrhs, + doublereal *d__, doublecomplex *e, doublereal *df, doublecomplex *ef, + doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, + doublereal *rcond, doublereal *ferr, doublereal *berr, doublecomplex * + work, doublereal *rwork, integer *info); + +/* Subroutine */ int zpttrf_(integer *n, doublereal *d__, doublecomplex *e, + integer *info); + +/* Subroutine */ int zpttrs_(char *uplo, integer *n, integer *nrhs, + doublereal *d__, doublecomplex *e, doublecomplex *b, integer *ldb, + integer *info); + +/* Subroutine */ int zptts2_(integer *iuplo, integer *n, integer *nrhs, + doublereal *d__, doublecomplex *e, doublecomplex *b, integer *ldb); + +/* Subroutine */ int zrot_(integer *n, doublecomplex *cx, integer *incx, + doublecomplex *cy, integer *incy, doublereal *c__, doublecomplex *s); + +/* Subroutine */ int zspcon_(char *uplo, integer *n, doublecomplex *ap, + integer *ipiv, doublereal *anorm, doublereal *rcond, doublecomplex * + work, integer *info); + +/* Subroutine */ int zspmv_(char *uplo, integer *n, doublecomplex *alpha, + doublecomplex *ap, doublecomplex *x, integer *incx, doublecomplex * + beta, doublecomplex *y, integer *incy); + +/* Subroutine */ int zspr_(char *uplo, integer *n, doublecomplex *alpha, + doublecomplex *x, integer *incx, doublecomplex *ap); + +/* Subroutine */ int zsprfs_(char *uplo, integer *n, integer *nrhs, + doublecomplex *ap, doublecomplex *afp, integer *ipiv, doublecomplex * + b, integer *ldb, doublecomplex *x, integer *ldx, doublereal *ferr, + doublereal *berr, doublecomplex *work, doublereal *rwork, integer * + info); + +/* Subroutine */ int zspsv_(char *uplo, integer *n, integer *nrhs, + doublecomplex *ap, integer *ipiv, doublecomplex *b, integer *ldb, + integer *info); + +/* Subroutine */ int zspsvx_(char *fact, char *uplo, integer *n, integer * + nrhs, doublecomplex *ap, doublecomplex *afp, integer *ipiv, + doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, + doublereal *rcond, doublereal *ferr, doublereal *berr, doublecomplex * + work, doublereal *rwork, integer *info); + +/* Subroutine */ int zsptrf_(char *uplo, integer *n, doublecomplex *ap, + integer *ipiv, integer *info); + +/* Subroutine */ int zsptri_(char *uplo, integer *n, doublecomplex *ap, + integer *ipiv, doublecomplex *work, integer *info); + +/* Subroutine */ int zsptrs_(char *uplo, integer *n, integer *nrhs, + doublecomplex *ap, integer *ipiv, doublecomplex *b, integer *ldb, + integer *info); + +/* Subroutine */ int zstedc_(char *compz, integer *n, doublereal *d__, + doublereal *e, doublecomplex *z__, integer *ldz, doublecomplex *work, + integer *lwork, doublereal *rwork, integer *lrwork, integer *iwork, + integer *liwork, integer *info); + +/* Subroutine */ int zstein_(integer *n, doublereal *d__, doublereal *e, + integer *m, doublereal *w, integer *iblock, integer *isplit, + doublecomplex *z__, integer *ldz, doublereal *work, integer *iwork, + integer *ifail, integer *info); + +/* Subroutine */ int zsteqr_(char *compz, integer *n, doublereal *d__, + doublereal *e, doublecomplex *z__, integer *ldz, doublereal *work, + integer *info); + +/* Subroutine */ int zsycon_(char *uplo, integer *n, doublecomplex *a, + integer *lda, integer *ipiv, doublereal *anorm, doublereal *rcond, + doublecomplex *work, integer *info); + +/* Subroutine */ int zsymv_(char *uplo, integer *n, doublecomplex *alpha, + doublecomplex *a, integer *lda, doublecomplex *x, integer *incx, + doublecomplex *beta, doublecomplex *y, integer *incy); + +/* Subroutine */ int zsyr_(char *uplo, integer *n, doublecomplex *alpha, + doublecomplex *x, integer *incx, doublecomplex *a, integer *lda); + +/* Subroutine */ int zsyrfs_(char *uplo, integer *n, integer *nrhs, + doublecomplex *a, integer *lda, doublecomplex *af, integer *ldaf, + integer *ipiv, doublecomplex *b, integer *ldb, doublecomplex *x, + integer *ldx, doublereal *ferr, doublereal *berr, doublecomplex *work, + doublereal *rwork, integer *info); + +/* Subroutine */ int zsysv_(char *uplo, integer *n, integer *nrhs, + doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *b, + integer *ldb, doublecomplex *work, integer *lwork, integer *info); + +/* Subroutine */ int zsysvx_(char *fact, char *uplo, integer *n, integer * + nrhs, doublecomplex *a, integer *lda, doublecomplex *af, integer * + ldaf, integer *ipiv, doublecomplex *b, integer *ldb, doublecomplex *x, + integer *ldx, doublereal *rcond, doublereal *ferr, doublereal *berr, + doublecomplex *work, integer *lwork, doublereal *rwork, integer *info); + +/* Subroutine */ int zsytf2_(char *uplo, integer *n, doublecomplex *a, + integer *lda, integer *ipiv, integer *info); + +/* Subroutine */ int zsytrf_(char *uplo, integer *n, doublecomplex *a, + integer *lda, integer *ipiv, doublecomplex *work, integer *lwork, + integer *info); + +/* Subroutine */ int zsytri_(char *uplo, integer *n, doublecomplex *a, + integer *lda, integer *ipiv, doublecomplex *work, integer *info); + +/* Subroutine */ int zsytrs_(char *uplo, integer *n, integer *nrhs, + doublecomplex *a, integer *lda, integer *ipiv, doublecomplex *b, + integer *ldb, integer *info); + +/* Subroutine */ int ztbcon_(char *norm, char *uplo, char *diag, integer *n, + integer *kd, doublecomplex *ab, integer *ldab, doublereal *rcond, + doublecomplex *work, doublereal *rwork, integer *info); + +/* Subroutine */ int ztbrfs_(char *uplo, char *trans, char *diag, integer *n, + integer *kd, integer *nrhs, doublecomplex *ab, integer *ldab, + doublecomplex *b, integer *ldb, doublecomplex *x, integer *ldx, + doublereal *ferr, doublereal *berr, doublecomplex *work, doublereal * + rwork, integer *info); + +/* Subroutine */ int ztbtrs_(char *uplo, char *trans, char *diag, integer *n, + integer *kd, integer *nrhs, doublecomplex *ab, integer *ldab, + doublecomplex *b, integer *ldb, integer *info); + +/* Subroutine */ int ztgevc_(char *side, char *howmny, logical *select, + integer *n, doublecomplex *a, integer *lda, doublecomplex *b, integer + *ldb, doublecomplex *vl, integer *ldvl, doublecomplex *vr, integer * + ldvr, integer *mm, integer *m, doublecomplex *work, doublereal *rwork, + integer *info); + +/* Subroutine */ int ztgex2_(logical *wantq, logical *wantz, integer *n, + doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, + doublecomplex *q, integer *ldq, doublecomplex *z__, integer *ldz, + integer *j1, integer *info); + +/* Subroutine */ int ztgexc_(logical *wantq, logical *wantz, integer *n, + doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, + doublecomplex *q, integer *ldq, doublecomplex *z__, integer *ldz, + integer *ifst, integer *ilst, integer *info); + +/* Subroutine */ int ztgsen_(integer *ijob, logical *wantq, logical *wantz, + logical *select, integer *n, doublecomplex *a, integer *lda, + doublecomplex *b, integer *ldb, doublecomplex *alpha, doublecomplex * + beta, doublecomplex *q, integer *ldq, doublecomplex *z__, integer * + ldz, integer *m, doublereal *pl, doublereal *pr, doublereal *dif, + doublecomplex *work, integer *lwork, integer *iwork, integer *liwork, + integer *info); + +/* Subroutine */ int ztgsja_(char *jobu, char *jobv, char *jobq, integer *m, + integer *p, integer *n, integer *k, integer *l, doublecomplex *a, + integer *lda, doublecomplex *b, integer *ldb, doublereal *tola, + doublereal *tolb, doublereal *alpha, doublereal *beta, doublecomplex * + u, integer *ldu, doublecomplex *v, integer *ldv, doublecomplex *q, + integer *ldq, doublecomplex *work, integer *ncycle, integer *info); + +/* Subroutine */ int ztgsna_(char *job, char *howmny, logical *select, + integer *n, doublecomplex *a, integer *lda, doublecomplex *b, integer + *ldb, doublecomplex *vl, integer *ldvl, doublecomplex *vr, integer * + ldvr, doublereal *s, doublereal *dif, integer *mm, integer *m, + doublecomplex *work, integer *lwork, integer *iwork, integer *info); + +/* Subroutine */ int ztgsy2_(char *trans, integer *ijob, integer *m, integer * + n, doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, + doublecomplex *c__, integer *ldc, doublecomplex *d__, integer *ldd, + doublecomplex *e, integer *lde, doublecomplex *f, integer *ldf, + doublereal *scale, doublereal *rdsum, doublereal *rdscal, integer * + info); + +/* Subroutine */ int ztgsyl_(char *trans, integer *ijob, integer *m, integer * + n, doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, + doublecomplex *c__, integer *ldc, doublecomplex *d__, integer *ldd, + doublecomplex *e, integer *lde, doublecomplex *f, integer *ldf, + doublereal *scale, doublereal *dif, doublecomplex *work, integer * + lwork, integer *iwork, integer *info); + +/* Subroutine */ int ztpcon_(char *norm, char *uplo, char *diag, integer *n, + doublecomplex *ap, doublereal *rcond, doublecomplex *work, doublereal + *rwork, integer *info); + +/* Subroutine */ int ztprfs_(char *uplo, char *trans, char *diag, integer *n, + integer *nrhs, doublecomplex *ap, doublecomplex *b, integer *ldb, + doublecomplex *x, integer *ldx, doublereal *ferr, doublereal *berr, + doublecomplex *work, doublereal *rwork, integer *info); + +/* Subroutine */ int ztptri_(char *uplo, char *diag, integer *n, + doublecomplex *ap, integer *info); + +/* Subroutine */ int ztptrs_(char *uplo, char *trans, char *diag, integer *n, + integer *nrhs, doublecomplex *ap, doublecomplex *b, integer *ldb, + integer *info); + +/* Subroutine */ int ztrcon_(char *norm, char *uplo, char *diag, integer *n, + doublecomplex *a, integer *lda, doublereal *rcond, doublecomplex * + work, doublereal *rwork, integer *info); + +/* Subroutine */ int ztrevc_(char *side, char *howmny, logical *select, + integer *n, doublecomplex *t, integer *ldt, doublecomplex *vl, + integer *ldvl, doublecomplex *vr, integer *ldvr, integer *mm, integer + *m, doublecomplex *work, doublereal *rwork, integer *info); + +/* Subroutine */ int ztrexc_(char *compq, integer *n, doublecomplex *t, + integer *ldt, doublecomplex *q, integer *ldq, integer *ifst, integer * + ilst, integer *info); + +/* Subroutine */ int ztrrfs_(char *uplo, char *trans, char *diag, integer *n, + integer *nrhs, doublecomplex *a, integer *lda, doublecomplex *b, + integer *ldb, doublecomplex *x, integer *ldx, doublereal *ferr, + doublereal *berr, doublecomplex *work, doublereal *rwork, integer * + info); + +/* Subroutine */ int ztrsen_(char *job, char *compq, logical *select, integer + *n, doublecomplex *t, integer *ldt, doublecomplex *q, integer *ldq, + doublecomplex *w, integer *m, doublereal *s, doublereal *sep, + doublecomplex *work, integer *lwork, integer *info); + +/* Subroutine */ int ztrsna_(char *job, char *howmny, logical *select, + integer *n, doublecomplex *t, integer *ldt, doublecomplex *vl, + integer *ldvl, doublecomplex *vr, integer *ldvr, doublereal *s, + doublereal *sep, integer *mm, integer *m, doublecomplex *work, + integer *ldwork, doublereal *rwork, integer *info); + +/* Subroutine */ int ztrsyl_(char *trana, char *tranb, integer *isgn, integer + *m, integer *n, doublecomplex *a, integer *lda, doublecomplex *b, + integer *ldb, doublecomplex *c__, integer *ldc, doublereal *scale, + integer *info); + +/* Subroutine */ int ztrti2_(char *uplo, char *diag, integer *n, + doublecomplex *a, integer *lda, integer *info); + +/* Subroutine */ int ztrtri_(char *uplo, char *diag, integer *n, + doublecomplex *a, integer *lda, integer *info); + +/* Subroutine */ int ztrtrs_(char *uplo, char *trans, char *diag, integer *n, + integer *nrhs, doublecomplex *a, integer *lda, doublecomplex *b, + integer *ldb, integer *info); + +/* Subroutine */ int ztzrqf_(integer *m, integer *n, doublecomplex *a, + integer *lda, doublecomplex *tau, integer *info); + +/* Subroutine */ int ztzrzf_(integer *m, integer *n, doublecomplex *a, + integer *lda, doublecomplex *tau, doublecomplex *work, integer *lwork, + integer *info); + +/* Subroutine */ int zung2l_(integer *m, integer *n, integer *k, + doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * + work, integer *info); + +/* Subroutine */ int zung2r_(integer *m, integer *n, integer *k, + doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * + work, integer *info); + +/* Subroutine */ int zungbr_(char *vect, integer *m, integer *n, integer *k, + doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * + work, integer *lwork, integer *info); + +/* Subroutine */ int zunghr_(integer *n, integer *ilo, integer *ihi, + doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * + work, integer *lwork, integer *info); + +/* Subroutine */ int zungl2_(integer *m, integer *n, integer *k, + doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * + work, integer *info); + +/* Subroutine */ int zunglq_(integer *m, integer *n, integer *k, + doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * + work, integer *lwork, integer *info); + +/* Subroutine */ int zungql_(integer *m, integer *n, integer *k, + doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * + work, integer *lwork, integer *info); + +/* Subroutine */ int zungqr_(integer *m, integer *n, integer *k, + doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * + work, integer *lwork, integer *info); + +/* Subroutine */ int zungr2_(integer *m, integer *n, integer *k, + doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * + work, integer *info); + +/* Subroutine */ int zungrq_(integer *m, integer *n, integer *k, + doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex * + work, integer *lwork, integer *info); + +/* Subroutine */ int zungtr_(char *uplo, integer *n, doublecomplex *a, + integer *lda, doublecomplex *tau, doublecomplex *work, integer *lwork, + integer *info); + +/* Subroutine */ int zunm2l_(char *side, char *trans, integer *m, integer *n, + integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, + doublecomplex *c__, integer *ldc, doublecomplex *work, integer *info); + +/* Subroutine */ int zunm2r_(char *side, char *trans, integer *m, integer *n, + integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, + doublecomplex *c__, integer *ldc, doublecomplex *work, integer *info); + +/* Subroutine */ int zunmbr_(char *vect, char *side, char *trans, integer *m, + integer *n, integer *k, doublecomplex *a, integer *lda, doublecomplex + *tau, doublecomplex *c__, integer *ldc, doublecomplex *work, integer * + lwork, integer *info); + +/* Subroutine */ int zunmhr_(char *side, char *trans, integer *m, integer *n, + integer *ilo, integer *ihi, doublecomplex *a, integer *lda, + doublecomplex *tau, doublecomplex *c__, integer *ldc, doublecomplex * + work, integer *lwork, integer *info); + +/* Subroutine */ int zunml2_(char *side, char *trans, integer *m, integer *n, + integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, + doublecomplex *c__, integer *ldc, doublecomplex *work, integer *info); + +/* Subroutine */ int zunmlq_(char *side, char *trans, integer *m, integer *n, + integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, + doublecomplex *c__, integer *ldc, doublecomplex *work, integer *lwork, + integer *info); + +/* Subroutine */ int zunmql_(char *side, char *trans, integer *m, integer *n, + integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, + doublecomplex *c__, integer *ldc, doublecomplex *work, integer *lwork, + integer *info); + +/* Subroutine */ int zunmqr_(char *side, char *trans, integer *m, integer *n, + integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, + doublecomplex *c__, integer *ldc, doublecomplex *work, integer *lwork, + integer *info); + +/* Subroutine */ int zunmr2_(char *side, char *trans, integer *m, integer *n, + integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, + doublecomplex *c__, integer *ldc, doublecomplex *work, integer *info); + +/* Subroutine */ int zunmr3_(char *side, char *trans, integer *m, integer *n, + integer *k, integer *l, doublecomplex *a, integer *lda, doublecomplex + *tau, doublecomplex *c__, integer *ldc, doublecomplex *work, integer * + info); + +/* Subroutine */ int zunmrq_(char *side, char *trans, integer *m, integer *n, + integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, + doublecomplex *c__, integer *ldc, doublecomplex *work, integer *lwork, + integer *info); + +/* Subroutine */ int zunmrz_(char *side, char *trans, integer *m, integer *n, + integer *k, integer *l, doublecomplex *a, integer *lda, doublecomplex + *tau, doublecomplex *c__, integer *ldc, doublecomplex *work, integer * + lwork, integer *info); + +/* Subroutine */ int zunmtr_(char *side, char *uplo, char *trans, integer *m, + integer *n, doublecomplex *a, integer *lda, doublecomplex *tau, + doublecomplex *c__, integer *ldc, doublecomplex *work, integer *lwork, + integer *info); + +/* Subroutine */ int zupgtr_(char *uplo, integer *n, doublecomplex *ap, + doublecomplex *tau, doublecomplex *q, integer *ldq, doublecomplex * + work, integer *info); + +/* Subroutine */ int zupmtr_(char *side, char *uplo, char *trans, integer *m, + integer *n, doublecomplex *ap, doublecomplex *tau, doublecomplex *c__, + integer *ldc, doublecomplex *work, integer *info); + +#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 @@ +/* f2c.h -- Standard Fortran to C header file */ + +/** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed." + + - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */ + +#ifndef F2C_INCLUDE +#define F2C_INCLUDE + +typedef long int integer; +typedef unsigned long int uinteger; +typedef char *address; +typedef short int shortint; +typedef float real; +typedef double doublereal; +typedef struct { real r, i; } complex; +typedef struct { doublereal r, i; } doublecomplex; +typedef long int logical; +typedef short int shortlogical; +typedef char logical1; +typedef char integer1; +#ifdef INTEGER_STAR_8 /* Adjust for integer*8. */ +typedef long long longint; /* system-dependent */ +typedef unsigned long long ulongint; /* system-dependent */ +#define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b))) +#define qbit_set(a,b) ((a) | ((ulongint)1 << (b))) +#endif + +#define TRUE_ (1) +#define FALSE_ (0) + +/* Extern is for use with -E */ +#ifndef Extern +#define Extern extern +#endif + +/* I/O stuff */ + +#ifdef f2c_i2 +/* for -i2 */ +typedef short flag; +typedef short ftnlen; +typedef short ftnint; +#else +typedef long int flag; +typedef long int ftnlen; +typedef long int ftnint; +#endif + +/*external read, write*/ +typedef struct +{ flag cierr; + ftnint ciunit; + flag ciend; + char *cifmt; + ftnint cirec; +} cilist; + +/*internal read, write*/ +typedef struct +{ flag icierr; + char *iciunit; + flag iciend; + char *icifmt; + ftnint icirlen; + ftnint icirnum; +} icilist; + +/*open*/ +typedef struct +{ flag oerr; + ftnint ounit; + char *ofnm; + ftnlen ofnmlen; + char *osta; + char *oacc; + char *ofm; + ftnint orl; + char *oblnk; +} olist; + +/*close*/ +typedef struct +{ flag cerr; + ftnint cunit; + char *csta; +} cllist; + +/*rewind, backspace, endfile*/ +typedef struct +{ flag aerr; + ftnint aunit; +} alist; + +/* inquire */ +typedef struct +{ flag inerr; + ftnint inunit; + char *infile; + ftnlen infilen; + ftnint *inex; /*parameters in standard's order*/ + ftnint *inopen; + ftnint *innum; + ftnint *innamed; + char *inname; + ftnlen innamlen; + char *inacc; + ftnlen inacclen; + char *inseq; + ftnlen inseqlen; + char *indir; + ftnlen indirlen; + char *infmt; + ftnlen infmtlen; + char *inform; + ftnint informlen; + char *inunf; + ftnlen inunflen; + ftnint *inrecl; + ftnint *innrec; + char *inblank; + ftnlen inblanklen; +} inlist; + +#define VOID void + +union Multitype { /* for multiple entry points */ + integer1 g; + shortint h; + integer i; + /* longint j; */ + real r; + doublereal d; + complex c; + doublecomplex z; + }; + +typedef union Multitype Multitype; + +/*typedef long int Long;*/ /* No longer used; formerly in Namelist */ + +struct Vardesc { /* for Namelist */ + char *name; + char *addr; + ftnlen *dims; + int type; + }; +typedef struct Vardesc Vardesc; + +struct Namelist { + char *name; + Vardesc **vars; + int nvars; + }; +typedef struct Namelist Namelist; + +#define abs(x) ((x) >= 0 ? (x) : -(x)) +#define dabs(x) (doublereal)abs(x) +#define min(a,b) ((a) <= (b) ? (a) : (b)) +#define max(a,b) ((a) >= (b) ? (a) : (b)) +#define dmin(a,b) (doublereal)min(a,b) +#define dmax(a,b) (doublereal)max(a,b) +#define bit_test(a,b) ((a) >> (b) & 1) +#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b))) +#define bit_set(a,b) ((a) | ((uinteger)1 << (b))) + +/* procedure parameter types for -A and -C++ */ + +#define F2C_proc_par_types 1 +#ifdef __cplusplus +typedef int /* Unknown procedure type */ (*U_fp)(...); +typedef shortint (*J_fp)(...); +typedef integer (*I_fp)(...); +typedef real (*R_fp)(...); +typedef doublereal (*D_fp)(...), (*E_fp)(...); +typedef /* Complex */ VOID (*C_fp)(...); +typedef /* Double Complex */ VOID (*Z_fp)(...); +typedef logical (*L_fp)(...); +typedef shortlogical (*K_fp)(...); +typedef /* Character */ VOID (*H_fp)(...); +typedef /* Subroutine */ int (*S_fp)(...); +#else +typedef int /* Unknown procedure type */ (*U_fp)(); +typedef shortint (*J_fp)(); +typedef integer (*I_fp)(); +typedef real (*R_fp)(); +typedef doublereal (*D_fp)(), (*E_fp)(); +typedef /* Complex */ VOID (*C_fp)(); +typedef /* Double Complex */ VOID (*Z_fp)(); +typedef logical (*L_fp)(); +typedef shortlogical (*K_fp)(); +typedef /* Character */ VOID (*H_fp)(); +typedef /* Subroutine */ int (*S_fp)(); +#endif +/* E_fp is for real functions when -R is not specified */ +typedef VOID C_f; /* complex function */ +typedef VOID H_f; /* character function */ +typedef VOID Z_f; /* double complex function */ +typedef doublereal E_f; /* real function with -R not specified */ + +/* undef any lower-case symbols that your C compiler predefines, e.g.: */ + +#ifndef Skip_f2c_Undefs +#undef cray +#undef gcos +#undef mc68010 +#undef mc68020 +#undef mips +#undef pdp11 +#undef sgi +#undef sparc +#undef sun +#undef sun2 +#undef sun3 +#undef sun4 +#undef u370 +#undef u3b +#undef u3b2 +#undef u3b5 +#undef unix +#undef vax +#endif +#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 @@ +#include +#include +#include +#include +#include +#include "lapack-aux.h" + +#define MACRO(B) do {B} while (0) +#define ERROR(CODE) MACRO(return CODE;) +#define REQUIRES(COND, CODE) MACRO(if(!(COND)) {ERROR(CODE);}) + +#define MIN(A,B) ((A)<(B)?(A):(B)) +#define MAX(A,B) ((A)>(B)?(A):(B)) + +#ifdef DBGL +#define DEBUGMSG(M) printf("LAPACK Wrapper "M"\n: "); size_t t0 = time(NULL); +#define OK MACRO(printf("%ld s\n",time(0)-t0); return 0;); +#else +#define DEBUGMSG(M) +#define OK return 0; +#endif + +#define CHECK(RES,CODE) MACRO(if(RES) return CODE;) + +#define BAD_SIZE 2000 +#define BAD_CODE 2001 +#define MEM 2002 +#define BAD_FILE 2003 +#define SINGULAR 2004 +#define NOCONVER 2005 +#define NODEFPOS 2006 + +//////////////////// real svd //////////////////////////////////// + +int svd_l_R(KDMAT(a),DMAT(u), DVEC(s),DMAT(v)) { + integer m = ar; + integer n = ac; + integer q = MIN(m,n); + REQUIRES(ur==m && uc==m && sn==q && vr==n && vc==n,BAD_SIZE); + DEBUGMSG("svd_l_R"); + double *B = (double*)malloc(m*n*sizeof(double)); + CHECK(!B,MEM); + memcpy(B,ap,m*n*sizeof(double)); + integer lwork = -1; + integer res; + // ask for optimal lwork + double ans; + //printf("ask zgesvd\n"); + char* job = "A"; + dgesvd_ (job,job, + &m,&n,B,&m, + sp, + up,&m, + vp,&n, + &ans, &lwork, + &res); + lwork = ceil(ans); + //printf("ans = %d\n",lwork); + double * work = (double*)malloc(lwork*sizeof(double)); + CHECK(!work,MEM); + //printf("dgesdd\n"); + dgesvd_ (job,job, + &m,&n,B,&m, + sp, + up,&m, + vp,&n, + work, &lwork, + &res); + CHECK(res,res); + free(work); + free(B); + OK +} + +// (alternative version) + +int svd_l_Rdd(KDMAT(a),DMAT(u), DVEC(s),DMAT(v)) { + integer m = ar; + integer n = ac; + integer q = MIN(m,n); + REQUIRES(ur==m && uc==m && sn==q && vr==n && vc==n,BAD_SIZE); + DEBUGMSG("svd_l_Rdd"); + double *B = (double*)malloc(m*n*sizeof(double)); + CHECK(!B,MEM); + memcpy(B,ap,m*n*sizeof(double)); + integer* iwk = (integer*) malloc(8*q*sizeof(int)); + CHECK(!iwk,MEM); + integer lwk = -1; + integer res; + // ask for optimal lwk + double ans; + //printf("ask dgesdd\n"); + dgesdd_ ("A",&m,&n,B,&m,sp,up,&m,vp,&n,&ans,&lwk,iwk,&res); + lwk = 2*ceil(ans); // ????? otherwise 50x100 rejects lwk + //printf("lwk = %d\n",lwk); + double * workv = (double*)malloc(lwk*sizeof(double)); + CHECK(!workv,MEM); + //printf("dgesdd\n"); + dgesdd_ ("A",&m,&n,B,&m,sp,up,&m,vp,&n,workv,&lwk,iwk,&res); + CHECK(res,res); + free(iwk); + free(workv); + free(B); + OK +} + +//////////////////// complex svd //////////////////////////////////// + +// not in clapack.h + +int zgesvd_(char *jobu, char *jobvt, integer *m, integer *n, + doublecomplex *a, integer *lda, doublereal *s, doublecomplex *u, + integer *ldu, doublecomplex *vt, integer *ldvt, doublecomplex *work, + integer *lwork, doublereal *rwork, integer *info); + +int svd_l_C(KCMAT(a),CMAT(u), DVEC(s),CMAT(v)) { + integer m = ar; + integer n = ac; + integer q = MIN(m,n); + REQUIRES(ur==m && uc==m && sn==q && vr==n && vc==n,BAD_SIZE); + DEBUGMSG("svd_l_C"); + double *B = (double*)malloc(2*m*n*sizeof(double)); + CHECK(!B,MEM); + memcpy(B,ap,m*n*2*sizeof(double)); + + double *rwork = (double*) malloc(5*q*sizeof(double)); + CHECK(!rwork,MEM); + integer lwork = -1; + integer res; + // ask for optimal lwork + doublecomplex ans; + //printf("ask zgesvd\n"); + char* job = "A"; + zgesvd_ (job,job, + &m,&n,(doublecomplex*)B,&m, + sp, + (doublecomplex*)up,&m, + (doublecomplex*)vp,&n, + &ans, &lwork, + rwork, + &res); + lwork = ceil(ans.r); + //printf("ans = %d\n",lwork); + doublecomplex * work = (doublecomplex*)malloc(lwork*2*sizeof(double)); + CHECK(!work,MEM); + //printf("zgesvd\n"); + zgesvd_ (job,job, + &m,&n,(doublecomplex*)B,&m, + sp, + (doublecomplex*)up,&m, + (doublecomplex*)vp,&n, + work, &lwork, + rwork, + &res); + CHECK(res,res); + free(work); + free(rwork); + free(B); + OK +} + + + +//////////////////// general complex eigensystem //////////// + +int eig_l_C(KCMAT(a),CMAT(u), CVEC(s),CMAT(v)) { + integer n = ar; + REQUIRES(n>=2 && ac==n && (ur==1 || (ur==n && uc==n)) && sn==n && (vr==1 || (vr==n && vc==n)),BAD_SIZE); + DEBUGMSG("eig_l_C"); + double *B = (double*)malloc(2*n*n*sizeof(double)); + CHECK(!B,MEM); + memcpy(B,ap,n*n*2*sizeof(double)); + + double *rwork = (double*) malloc(2*n*sizeof(double)); + CHECK(!rwork,MEM); + integer lwork = -1; + char jobvl = ur==1?'N':'V'; + char jobvr = vr==1?'N':'V'; + integer res; + // ask for optimal lwork + doublecomplex ans; + //printf("ask zgeev\n"); + zgeev_ (&jobvl,&jobvr, + &n,(doublecomplex*)B,&n, + (doublecomplex*)sp, + (doublecomplex*)up,&n, + (doublecomplex*)vp,&n, + &ans, &lwork, + rwork, + &res); + lwork = ceil(ans.r); + //printf("ans = %d\n",lwork); + doublecomplex * work = (doublecomplex*)malloc(lwork*2*sizeof(double)); + CHECK(!work,MEM); + //printf("zgeev\n"); + zgeev_ (&jobvl,&jobvr, + &n,(doublecomplex*)B,&n, + (doublecomplex*)sp, + (doublecomplex*)up,&n, + (doublecomplex*)vp,&n, + work, &lwork, + rwork, + &res); + CHECK(res,res); + free(work); + free(rwork); + free(B); + OK +} + + + +//////////////////// general real eigensystem //////////// + +int eig_l_R(KDMAT(a),DMAT(u), CVEC(s),DMAT(v)) { + integer n = ar; + REQUIRES(n>=2 && ac == n && (ur==1 || (ur==n && uc==n)) && sn==n && (vr==1 || (vr==n && vc==n)),BAD_SIZE); + DEBUGMSG("eig_l_R"); + double *B = (double*)malloc(n*n*sizeof(double)); + CHECK(!B,MEM); + memcpy(B,ap,n*n*sizeof(double)); + integer lwork = -1; + char jobvl = ur==1?'N':'V'; + char jobvr = vr==1?'N':'V'; + integer res; + // ask for optimal lwork + double ans; + //printf("ask dgeev\n"); + dgeev_ (&jobvl,&jobvr, + &n,B,&n, + sp, sp+n, + up,&n, + vp,&n, + &ans, &lwork, + &res); + lwork = ceil(ans); + //printf("ans = %d\n",lwork); + double * work = (double*)malloc(lwork*sizeof(double)); + CHECK(!work,MEM); + //printf("dgeev\n"); + dgeev_ (&jobvl,&jobvr, + &n,B,&n, + sp, sp+n, + up,&n, + vp,&n, + work, &lwork, + &res); + CHECK(res,res); + free(work); + free(B); + OK +} + + +//////////////////// symmetric real eigensystem //////////// + + +int eig_l_S(KDMAT(a),DVEC(s),DMAT(v)) { + integer n = ar; + REQUIRES(n>=2 && ac == n && sn==n && (vr==1 || (vr==n && vc==n)),BAD_SIZE); + DEBUGMSG("eig_l_S"); + memcpy(vp,ap,n*n*sizeof(double)); + integer lwork = -1; + char jobz = vr==1?'N':'V'; + char uplo = 'U'; + integer res; + // ask for optimal lwork + double ans; + //printf("ask dsyev\n"); + dsyev_ (&jobz,&uplo, + &n,vp,&n, + sp, + &ans, &lwork, + &res); + lwork = ceil(ans); + //printf("ans = %d\n",lwork); + double * work = (double*)malloc(lwork*sizeof(double)); + CHECK(!work,MEM); + dsyev_ (&jobz,&uplo, + &n,vp,&n, + sp, + work, &lwork, + &res); + CHECK(res,res); + free(work); + OK +} + +//////////////////// hermitian complex eigensystem //////////// + +int eig_l_H(KCMAT(a),DVEC(s),CMAT(v)) { + integer n = ar; + REQUIRES(n>=2 && ac==n && sn==n && (vr==1 || (vr==n && vc==n)),BAD_SIZE); + DEBUGMSG("eig_l_H"); + memcpy(vp,ap,2*n*n*sizeof(double)); + double *rwork = (double*) malloc((3*n-2)*sizeof(double)); + CHECK(!rwork,MEM); + integer lwork = -1; + char jobz = vr==1?'N':'V'; + char uplo = 'U'; + integer res; + // ask for optimal lwork + doublecomplex ans; + //printf("ask zheev\n"); + zheev_ (&jobz,&uplo, + &n,(doublecomplex*)vp,&n, + sp, + &ans, &lwork, + rwork, + &res); + lwork = ceil(ans.r); + //printf("ans = %d\n",lwork); + doublecomplex * work = (doublecomplex*)malloc(lwork*2*sizeof(double)); + CHECK(!work,MEM); + zheev_ (&jobz,&uplo, + &n,(doublecomplex*)vp,&n, + sp, + work, &lwork, + rwork, + &res); + CHECK(res,res); + free(work); + free(rwork); + OK +} + +//////////////////// general real linear system //////////// + +int linearSolveR_l(KDMAT(a),KDMAT(b),DMAT(x)) { + integer n = ar; + integer nhrs = bc; + REQUIRES(n>=1 && ar==ac && ar==br,BAD_SIZE); + DEBUGMSG("linearSolveR_l"); + double*AC = (double*)malloc(n*n*sizeof(double)); + memcpy(AC,ap,n*n*sizeof(double)); + memcpy(xp,bp,n*nhrs*sizeof(double)); + integer * ipiv = (integer*)malloc(n*sizeof(integer)); + integer res; + dgesv_ (&n,&nhrs, + AC, &n, + ipiv, + xp, &n, + &res); + if(res>0) { + return SINGULAR; + } + CHECK(res,res); + free(ipiv); + free(AC); + OK +} + +//////////////////// general complex linear system //////////// + +int linearSolveC_l(KCMAT(a),KCMAT(b),CMAT(x)) { + integer n = ar; + integer nhrs = bc; + REQUIRES(n>=1 && ar==ac && ar==br,BAD_SIZE); + DEBUGMSG("linearSolveC_l"); + double*AC = (double*)malloc(2*n*n*sizeof(double)); + memcpy(AC,ap,2*n*n*sizeof(double)); + memcpy(xp,bp,2*n*nhrs*sizeof(double)); + integer * ipiv = (integer*)malloc(n*sizeof(integer)); + integer res; + zgesv_ (&n,&nhrs, + (doublecomplex*)AC, &n, + ipiv, + (doublecomplex*)xp, &n, + &res); + if(res>0) { + return SINGULAR; + } + CHECK(res,res); + free(ipiv); + free(AC); + OK +} + +//////////////////// least squares real linear system //////////// + +int linearSolveLSR_l(KDMAT(a),KDMAT(b),DMAT(x)) { + integer m = ar; + integer n = ac; + integer nrhs = bc; + integer ldb = xr; + REQUIRES(m>=1 && n>=1 && ar==br && xr==MAX(m,n) && xc == bc, BAD_SIZE); + DEBUGMSG("linearSolveLSR_l"); + double*AC = (double*)malloc(m*n*sizeof(double)); + memcpy(AC,ap,m*n*sizeof(double)); + if (m>=n) { + memcpy(xp,bp,m*nrhs*sizeof(double)); + } else { + int k; + for(k = 0; k0) { + return SINGULAR; + } + CHECK(res,res); + free(work); + free(AC); + OK +} + +//////////////////// least squares complex linear system //////////// + +int linearSolveLSC_l(KCMAT(a),KCMAT(b),CMAT(x)) { + integer m = ar; + integer n = ac; + integer nrhs = bc; + integer ldb = xr; + REQUIRES(m>=1 && n>=1 && ar==br && xr==MAX(m,n) && xc == bc, BAD_SIZE); + DEBUGMSG("linearSolveLSC_l"); + double*AC = (double*)malloc(2*m*n*sizeof(double)); + memcpy(AC,ap,2*m*n*sizeof(double)); + memcpy(AC,ap,2*m*n*sizeof(double)); + if (m>=n) { + memcpy(xp,bp,2*m*nrhs*sizeof(double)); + } else { + int k; + for(k = 0; k0) { + return SINGULAR; + } + CHECK(res,res); + free(work); + free(AC); + OK +} + +//////////////////// least squares real linear system using SVD //////////// + +int linearSolveSVDR_l(double rcond,KDMAT(a),KDMAT(b),DMAT(x)) { + integer m = ar; + integer n = ac; + integer nrhs = bc; + integer ldb = xr; + REQUIRES(m>=1 && n>=1 && ar==br && xr==MAX(m,n) && xc == bc, BAD_SIZE); + DEBUGMSG("linearSolveSVDR_l"); + double*AC = (double*)malloc(m*n*sizeof(double)); + double*S = (double*)malloc(MIN(m,n)*sizeof(double)); + memcpy(AC,ap,m*n*sizeof(double)); + if (m>=n) { + memcpy(xp,bp,m*nrhs*sizeof(double)); + } else { + int k; + for(k = 0; k0) { + return NOCONVER; + } + CHECK(res,res); + free(work); + free(S); + free(AC); + OK +} + +//////////////////// least squares complex linear system using SVD //////////// + +// not in clapack.h + +int zgelss_(integer *m, integer *n, integer *nhrs, + doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, doublereal *s, + doublereal *rcond, integer* rank, + doublecomplex *work, integer* lwork, doublereal* rwork, + integer *info); + +int linearSolveSVDC_l(double rcond, KCMAT(a),KCMAT(b),CMAT(x)) { + integer m = ar; + integer n = ac; + integer nrhs = bc; + integer ldb = xr; + REQUIRES(m>=1 && n>=1 && ar==br && xr==MAX(m,n) && xc == bc, BAD_SIZE); + DEBUGMSG("linearSolveSVDC_l"); + double*AC = (double*)malloc(2*m*n*sizeof(double)); + double*S = (double*)malloc(MIN(m,n)*sizeof(double)); + double*RWORK = (double*)malloc(5*MIN(m,n)*sizeof(double)); + memcpy(AC,ap,2*m*n*sizeof(double)); + if (m>=n) { + memcpy(xp,bp,2*m*nrhs*sizeof(double)); + } else { + int k; + for(k = 0; k0) { + return NOCONVER; + } + CHECK(res,res); + free(work); + free(RWORK); + free(S); + free(AC); + OK +} + +//////////////////// Cholesky factorization ///////////////////////// + +int chol_l_H(KCMAT(a),CMAT(l)) { + integer n = ar; + REQUIRES(n>=1 && ac == n && lr==n && lc==n,BAD_SIZE); + DEBUGMSG("chol_l_H"); + memcpy(lp,ap,n*n*sizeof(doublecomplex)); + char uplo = 'U'; + integer res; + zpotrf_ (&uplo,&n,(doublecomplex*)lp,&n,&res); + CHECK(res>0,NODEFPOS); + CHECK(res,res); + doublecomplex zero = {0.,0.}; + int r,c; + for (r=0; r=1 && ac == n && lr==n && lc==n,BAD_SIZE); + DEBUGMSG("chol_l_S"); + memcpy(lp,ap,n*n*sizeof(double)); + char uplo = 'U'; + integer res; + dpotrf_ (&uplo,&n,lp,&n,&res); + CHECK(res>0,NODEFPOS); + CHECK(res,res); + int r,c; + for (r=0; r=1 && n >=1 && rr== m && rc == n && taun == mn, BAD_SIZE); + DEBUGMSG("qr_l_R"); + double *WORK = (double*)malloc(m*sizeof(double)); + CHECK(!WORK,MEM); + memcpy(rp,ap,m*n*sizeof(double)); + integer res; + dgeqr2_ (&m,&n,rp,&m,taup,WORK,&res); + CHECK(res,res); + free(WORK); + OK +} + +int qr_l_C(KCMAT(a), CVEC(tau), CMAT(r)) { + integer m = ar; + integer n = ac; + integer mn = MIN(m,n); + REQUIRES(m>=1 && n >=1 && rr== m && rc == n && taun == mn, BAD_SIZE); + DEBUGMSG("qr_l_C"); + doublecomplex *WORK = (doublecomplex*)malloc(m*sizeof(doublecomplex)); + CHECK(!WORK,MEM); + memcpy(rp,ap,m*n*sizeof(doublecomplex)); + integer res; + zgeqr2_ (&m,&n,(doublecomplex*)rp,&m,(doublecomplex*)taup,WORK,&res); + CHECK(res,res); + free(WORK); + OK +} 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 @@ +#include "f2c.h" +#include "clapack.h" + +#define DVEC(A) int A##n, double*A##p +#define CVEC(A) int A##n, double*A##p +#define DMAT(A) int A##r, int A##c, double* A##p +#define CMAT(A) int A##r, int A##c, double* A##p + +// const pointer versions for the parameters +#define KDVEC(A) int A##n, const double*A##p +#define KCVEC(A) int A##n, const double*A##p +#define KDMAT(A) int A##r, int A##c, const double* A##p +#define KCMAT(A) int A##r, int A##c, const double* A##p + +int svd_l_R(KDMAT(x),DMAT(u),DVEC(s),DMAT(v)); +int svd_l_Rdd(KDMAT(x),DMAT(u),DVEC(s),DMAT(v)); + +int svd_l_C(KCMAT(a),CMAT(u),DVEC(s),CMAT(v)); + +int eig_l_C(KCMAT(a),CMAT(u),CVEC(s),CMAT(v)); + +int eig_l_R(KDMAT(a),DMAT(u),CVEC(s),DMAT(v)); + +int eig_l_S(KDMAT(a),DVEC(s),DMAT(v)); + +int eig_l_H(KCMAT(a),DVEC(s),CMAT(v)); + +int linearSolveR_l(KDMAT(a),KDMAT(b),DMAT(x)); + +int linearSolveC_l(KCMAT(a),KCMAT(b),CMAT(x)); + +int linearSolveLSR_l(KDMAT(a),KDMAT(b),DMAT(x)); + +int linearSolveLSC_l(KCMAT(a),KCMAT(b),CMAT(x)); + +int linearSolveSVDR_l(double,KDMAT(a),KDMAT(b),DMAT(x)); + +int linearSolveSVDC_l(double,KCMAT(a),KCMAT(b),CMAT(x)); + +int chol_l_H(KCMAT(a),CMAT(r)); + +int chol_l_S(KDMAT(a),DMAT(r)); + +int qr_l_R(KDMAT(a), DVEC(tau), DMAT(r)); + +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 @@ +{-# OPTIONS_GHC -fglasgow-exts #-} +----------------------------------------------------------------------------- +{- | +Module : Numeric.LinearAlgebra.Linear +Copyright : (c) Alberto Ruiz 2006-7 +License : GPL-style + +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + +Basic optimized operations on vectors and matrices. + +-} +----------------------------------------------------------------------------- + +module Numeric.LinearAlgebra.Linear ( + Linear(..), + multiply, dot, outer +) where + + +import Data.Packed.Internal +import Data.Packed +import Numeric.GSL.Vector +import Complex + +-- | basic optimized operations +class (Container c e) => Linear c e where + scale :: e -> c e -> c e + addConstant :: e -> c e -> c e + add :: c e -> c e -> c e + sub :: c e -> c e -> c e + -- | element by element multiplication + mul :: c e -> c e -> c e + -- | element by element division + divide :: c e -> c e -> c e + -- | scale the element by element reciprocal of the object: @scaleRecip 2 (fromList [5,i]) == 2 |> [0.4 :+ 0.0,0.0 :+ (-2.0)]@ + scaleRecip :: e -> c e -> c e + equal :: c e -> c e -> Bool +-- numequal :: Double -> c e -> c e -> Bool + +instance Linear Vector Double where + scale = vectorMapValR Scale + scaleRecip = vectorMapValR Recip + addConstant = vectorMapValR AddConstant + add = vectorZipR Add + sub = vectorZipR Sub + mul = vectorZipR Mul + divide = vectorZipR Div + equal u v = dim u == dim v && vectorMax (vectorMapR Abs (sub u v)) == 0.0 + +instance Linear Vector (Complex Double) where + scale = vectorMapValC Scale + scaleRecip = vectorMapValC Recip + addConstant = vectorMapValC AddConstant + add = vectorZipC Add + sub = vectorZipC Sub + mul = vectorZipC Mul + divide = vectorZipC Div + equal u v = dim u == dim v && vectorMax (liftVector magnitude (sub u v)) == 0.0 + +instance Linear Matrix Double where + scale x = liftMatrix (scale x) + scaleRecip x = liftMatrix (scaleRecip x) + addConstant x = liftMatrix (addConstant x) + add = liftMatrix2 add + sub = liftMatrix2 sub + mul = liftMatrix2 mul + divide = liftMatrix2 divide + equal a b = cols a == cols b && cdat a `equal` cdat b + + +instance Linear Matrix (Complex Double) where + scale x = liftMatrix (scale x) + scaleRecip x = liftMatrix (scaleRecip x) + addConstant x = liftMatrix (addConstant x) + add = liftMatrix2 add + sub = liftMatrix2 sub + mul = liftMatrix2 mul + divide = liftMatrix2 divide + equal a b = cols a == cols b && cdat a `equal` cdat b + +-------------------------------------------------- + +-- | euclidean inner product +dot :: (Field t) => Vector t -> Vector t -> t +dot u v = dat (multiply r c) `at` 0 + where r = asRow u + c = asColumn v + + +{- | Outer product of two vectors. + +@\> 'fromList' [1,2,3] \`outer\` 'fromList' [5,2,3] +(3><3) + [ 5.0, 2.0, 3.0 + , 10.0, 4.0, 6.0 + , 15.0, 6.0, 9.0 ]@ +-} +outer :: (Field t) => Vector t -> Vector t -> Matrix t +outer u v = asColumn u `multiply` asRow v -- cgit v1.2.3