packages feed

hmatrix 0.5.2.2 → 0.6.0.0

raw patch · 50 files changed

+888/−128 lines, 50 filesdep +parallelPVP ok

version bump matches the API change (PVP)

Dependencies added: parallel

API changes (from Hackage documentation)

- Data.Packed.Vector: foldLoop :: (Int -> t -> t) -> t -> Int -> t
- Data.Packed.Vector: foldVector :: (Double -> b -> b) -> b -> Vector Double -> b
- Data.Packed.Vector: foldVectorG :: (Storable a) => (Int -> (Int -> a) -> t -> t) -> t -> Vector a -> t
- Data.Packed.Vector: liftVector :: (Storable a, Storable b) => (a -> b) -> Vector a -> Vector b
- Data.Packed.Vector: liftVector2 :: (Storable a, Storable b, Storable c) => (a -> b -> c) -> Vector a -> Vector b -> Vector c
- Numeric.GSL.Minimization: minimizeConjugateGradient :: Double -> Double -> Double -> Int -> ([Double] -> Double) -> ([Double] -> [Double]) -> [Double] -> ([Double], Matrix Double)
- Numeric.GSL.Minimization: minimizeNMSimplex :: ([Double] -> Double) -> [Double] -> [Double] -> Double -> Int -> ([Double], Matrix Double)
- Numeric.GSL.Minimization: minimizeVectorBFGS2 :: Double -> Double -> Double -> Int -> ([Double] -> Double) -> ([Double] -> [Double]) -> [Double] -> ([Double], Matrix Double)
- Numeric.LinearAlgebra.Algorithms: pinvTol :: Double -> Matrix Double -> Matrix Double
- Numeric.LinearAlgebra.LAPACK: eigH' :: Matrix (Complex Double) -> (Vector Double, Matrix (Complex Double))
- Numeric.LinearAlgebra.LAPACK: eigS' :: Matrix Double -> (Vector Double, Matrix Double)
- Numeric.LinearAlgebra.Tests: qCheck :: (Testable prop) => Int -> prop -> IO ()
+ Data.Packed.Random: Gaussian :: RandDist
+ Data.Packed.Random: Uniform :: RandDist
+ Data.Packed.Random: data RandDist
+ Data.Packed.Random: gaussianSample :: Int -> Int -> Vector Double -> Matrix Double -> Matrix Double
+ Data.Packed.Random: meanCov :: Matrix Double -> (Vector Double, Matrix Double)
+ Data.Packed.Random: randomVector :: Int -> RandDist -> Int -> Vector Double
+ Data.Packed.Random: uniformSample :: Int -> Int -> [(Double, Double)] -> Matrix Double
+ Graphics.Plot: gnuplotpdf :: String -> String -> [([[Double]], String)] -> IO ()
+ Numeric.GSL.Vector: Gaussian :: RandDist
+ Numeric.GSL.Vector: Uniform :: RandDist
+ Numeric.GSL.Vector: data RandDist
+ Numeric.GSL.Vector: instance Enum RandDist
+ Numeric.GSL.Vector: randomVector :: Int -> RandDist -> Int -> Vector Double
+ Numeric.LinearAlgebra.Algorithms: nullspaceSVD :: (Field t) => Either Double Int -> Matrix t -> (Matrix t, Vector Double, Matrix t) -> [Vector t]
+ Numeric.LinearAlgebra.Algorithms: rankSVD :: (Element t) => Double -> Matrix t -> (Matrix t, Vector Double, Matrix t) -> Int
+ Numeric.LinearAlgebra.Instances: instance (NFData a, Element a) => NFData (Matrix a)
+ Numeric.LinearAlgebra.Instances: instance (NFData a, Storable a) => NFData (Vector a)

Files

+ CHANGES view
@@ -0,0 +1,15 @@+6.0.0.0+=======++- added randomVector, gaussianSample, uniformSample, meanCov++- added rankSVD, nullspaceSVD++- rank, nullspacePrec, and economy svd defined in terms of ranksvd.++- economy svd now admits zero rank matrices and return a "degenerate+  rank 1" decomposition with zero singular value.++- added NFData instances for Matrix and Vector.++- liftVector, liftVector2 replaced by mapVector, zipVector.
INSTALL view
@@ -40,11 +40,10 @@      line 17:      build-type:         Custom      change to:    build-type:         Simple -     line 162:     extra-libraries:-     add:          extra-libraries: libgsl-0 blas lapack+     and at the end of the file add: -     line 163:     extra-lib-dirs:-     add:          extra-lib-dirs: c:\ghc\ghc-6.10.3\bin+        extra-libraries: libgsl-0 blas lapack+        extra-lib-dirs: c:\ghc\ghc-6.10.3\bin  8) Open a terminal, cd to the hmatrix folder, and run 
README view
@@ -115,3 +115,5 @@ - Tracy Wadleigh improved the definitions of (|>) and (><), which now   apply an appropriate 'take' to the given lists so that they may be   safely used on lists that are too long (or infinite).++- Chris Waterson improved the configure.hs program for OS/X.
configure.hs view
@@ -18,7 +18,7 @@ -}  import System-import Data.List(isPrefixOf)+import Data.List(isPrefixOf, intercalate) import Distribution.Simple.LocalBuildInfo import Distribution.Simple.Configure import Distribution.PackageDescription@@ -36,34 +36,52 @@        ]  -- compile a simple program with symbols from GSL and LAPACK with the given libs-testprog libs fmks = "echo \"#include <gsl/gsl_sf_gamma.h>\nint main(){zgesvd_(); gsl_sf_gamma(5);}\""-                     ++" > /tmp/dummy.c; gcc /tmp/dummy.c -o /tmp/dummy "-                     ++ f1 libs ++ " " ++ f2 fmks ++ " > /dev/null 2> /dev/null"+testprog buildInfo libs fmks =+    "echo \"#include <gsl/gsl_sf_gamma.h>\nint main(){zgesvd_(); gsl_sf_gamma(5);}\""+                     ++" > /tmp/dummy.c; gcc "+                     ++ (join $ ccOptions buildInfo) ++ " "+                     ++ (join $ cppOptions buildInfo) ++ " "+                     ++ (join $ map ("-I"++) $ includeDirs buildInfo)+                     ++" /tmp/dummy.c -o /tmp/dummy "+                     ++ (join $ map ("-L"++) $ extraLibDirs buildInfo) ++ " "+                     ++ (prepend "-l" $ libs) ++ " "+                     ++ (prepend "-framework " fmks) ++ " > /dev/null 2> /dev/null" -f1 = unwords . map ("-l"++) . words-f2 = unwords . map ("-framework "++) . words+join = intercalate " "+prepend x = unwords . map (x++) . words -check libs fmks = (ExitSuccess ==) `fmap` system (testprog libs fmks)+check buildInfo libs fmks = (ExitSuccess ==) `fmap` system (testprog buildInfo libs fmks)  -- simple test for GSL-gsl = "echo \"#include <gsl/gsl_sf_gamma.h>\nint main(){gsl_sf_gamma(5);}\""-           ++" > /tmp/dummy.c; gcc /tmp/dummy.c -o /tmp/dummy -lgsl -lgslcblas"+gsl buildInfo = "echo \"#include <gsl/gsl_sf_gamma.h>\nint main(){gsl_sf_gamma(5);}\""+           ++" > /tmp/dummy.c; gcc "+           ++ (join $ ccOptions buildInfo) ++ " "+           ++ (join $ cppOptions buildInfo) ++ " "+           ++ (join $ map ("-I"++) $ includeDirs buildInfo)+           ++ " /tmp/dummy.c -o /tmp/dummy "+           ++ (join $ map ("-L"++) $ extraLibDirs buildInfo) ++ " -lgsl -lgslcblas"            ++ " > /dev/null 2> /dev/null"  -- test for gsl >= 1.12-gsl112 = "echo \"#include <gsl/gsl_sf_exp.h>\nint main(){gsl_sf_exprel_n_CF_e(1,1,0);}\""-           ++" > /tmp/dummy.c; gcc /tmp/dummy.c -o /tmp/dummy -lgsl -lgslcblas"+gsl112 buildInfo =+    "echo \"#include <gsl/gsl_sf_exp.h>\nint main(){gsl_sf_exprel_n_CF_e(1,1,0);}\""+           ++" > /tmp/dummy.c; gcc /tmp/dummy.c "+           ++ (join $ ccOptions buildInfo) ++ " "+           ++ (join $ cppOptions buildInfo) ++ " "+           ++ (join $ map ("-I"++) $ includeDirs buildInfo)+           ++" -o /tmp/dummy "+           ++ (join $ map ("-L"++) $ extraLibDirs buildInfo) ++ " -lgsl -lgslcblas"            ++ " > /dev/null 2> /dev/null"   checkCommand c = (ExitSuccess ==) `fmap` system c  -- test different configurations until the first one works-try _ _ [] = return Nothing-try b f (opt:rest) = do-    ok <- check (b ++ " " ++ opt) f+try _ _ _ [] = return Nothing+try i b f (opt:rest) = do+    ok <- check i (b ++ " " ++ opt) f     if ok then return (Just opt)-          else try b f rest+          else try i b f rest  -- read --configure-option=link:lib1,lib2,lib3,etc linkop = "link:"@@ -79,8 +97,9 @@     Just bInfo <- maybeGetPersistBuildConfig "dist"      let Just lib = library . localPkgDescr $ bInfo-        base = unwords . extraLibs . libBuildInfo $ lib-        fwks = unwords . frameworks . libBuildInfo $ lib+        buildInfo = libBuildInfo lib+        base = unwords . extraLibs $ buildInfo+        fwks = unwords . frameworks $ buildInfo         auxpref = getUserLink args      -- We extract the desired libs from hmatrix.cabal (using a cabal flags)@@ -90,11 +109,11 @@     let pref = if null (words (base ++ " " ++ auxpref)) then "gsl lapack" else auxpref         fullOpts = map ((pref++" ")++) opts -    r <- try base fwks fullOpts+    r <- try buildInfo base fwks fullOpts     case r of         Nothing -> do             putStrLn " FAIL"-            g  <- checkCommand gsl+            g  <- checkCommand $ gsl buildInfo             if g                 then putStrLn " *** Sorry, I can't link LAPACK."                 else putStrLn " *** Sorry, I can't link GSL."@@ -104,7 +123,7 @@             writeFile "hmatrix.buildinfo" ("buildable: False\n")         Just ops -> do             putStrLn " OK"-            g <- checkCommand gsl112+            g <- checkCommand $ gsl112 buildInfo             writeFile "hmatrix.buildinfo" $ "extra-libraries: " ++                 ops ++ "\n" ++                 if g
examples/parallel.hs view
@@ -1,13 +1,16 @@+-- $ runhaskell parallel.hs 2000+ import System(getArgs) import Numeric.LinearAlgebra import Control.Parallel.Strategies import System.Time -inParallel = parMap rwhnf id+inParallel = parMap rnf id+-- rwhnf also works in this case +-- matrix product decomposed into p parallel subtasks parMul p x y = fromBlocks [ inParallel ( map (x <>) ys ) ]     where ys = splitColumns p y-  main = do     n <- (read . head) `fmap` getArgs
hmatrix.cabal view
@@ -1,5 +1,5 @@ Name:               hmatrix-Version:            0.5.2.2+Version:            0.6.0.0 License:            GPL License-file:       LICENSE Author:             Alberto Ruiz@@ -17,7 +17,7 @@ build-type:         Custom extra-source-files: lib/Numeric/LinearAlgebra/Tests/quickCheckCompat.h -extra-source-files: configure configure.hs README INSTALL+extra-source-files: configure configure.hs README INSTALL CHANGES extra-tmp-files:    hmatrix.buildinfo  extra-source-files: examples/tests.hs@@ -38,7 +38,7 @@                     examples/benchmarks.hs                     examples/error.hs                     examples/devel/wrappers.hs-                    examples/devel/functions.hs+                    examples/devel/functions.c  extra-source-files: lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.h,                     lib/Numeric/LinearAlgebra/LAPACK/clapack.h@@ -64,11 +64,16 @@  library     if flag(splitBase)-      build-depends:    base >= 3 && < 5, array, QuickCheck, HUnit, storable-complex, process+      build-depends:    base >= 3 && < 5, array     else-      build-depends:    base < 3, QuickCheck, HUnit, storable-complex, process+      build-depends:    base < 3 -    Build-Depends:      haskell98+    Build-Depends:      haskell98,+                        QuickCheck, HUnit,+                        storable-complex,+                        process,+                        parallel+     Extensions:         ForeignFunctionInterface,                         CPP @@ -124,8 +129,10 @@                         Data.Packed.Convert,                         Data.Packed.ST,                         Data.Packed.Development+                        Data.Packed.Random     other-modules:      Data.Packed.Internal,                         Data.Packed.Internal.Common,+                        Data.Packed.Internal.Signatures,                         Data.Packed.Internal.Vector,                         Data.Packed.Internal.Matrix,                         Numeric.GSL.Internal,@@ -135,7 +142,7 @@     C-sources:          lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c,                         lib/Numeric/GSL/gsl-aux.c -    ghc-prof-options:   -auto-all+    ghc-prof-options:   -auto      ghc-options:        -Wall -fno-warn-missing-signatures                               -fno-warn-orphans
lib/Data/Packed/Internal.hs view
@@ -15,10 +15,12 @@  module Data.Packed.Internal (     module Data.Packed.Internal.Common,+    module Data.Packed.Internal.Signatures,     module Data.Packed.Internal.Vector,     module Data.Packed.Internal.Matrix, ) where  import Data.Packed.Internal.Common+import Data.Packed.Internal.Signatures import Data.Packed.Internal.Vector import Data.Packed.Internal.Matrix
lib/Data/Packed/Internal/Common.hs view
@@ -14,25 +14,20 @@ ----------------------------------------------------------------------------- -- #hide -module Data.Packed.Internal.Common where+module Data.Packed.Internal.Common(+  Adapt,+  app1, app2, app3, app4,+  (//), check,+  partit, common,+  fi+) where  import Foreign-import Complex import Control.Monad(when)-import Debug.Trace import Foreign.C.String(peekCString) import Foreign.C.Types import Foreign.Storable.Complex() ---- | @debug x = trace (show x) x@-debug :: (Show a) => a -> a-debug x = trace (show x) x---- | useful for expressions like @sortBy (compare \`on\` length)@-on :: (a -> a -> b) -> (t -> a) -> t -> t -> b-on f g = \x y -> f (g x) (g y)- -- | @partit 3 [1..9] == [[1,2,3],[4,5,6],[7,8,9]]@ partit :: Int -> [a] -> [[a]] partit _ [] = []@@ -139,42 +134,3 @@  -- | description of GSL error codes foreign import ccall "auxi.h gsl_strerror" gsl_strerror :: CInt -> IO (Ptr CChar)---------------------------------------------------------------- signatures of the C functions -------------------------------------------------------------type PD = Ptr Double                            ---type PC = Ptr (Complex Double)                  ---type TV = CInt -> PD -> IO CInt                 ---type TVV = CInt -> PD -> TV                     ---type TVVV = CInt -> PD -> TVV                   ---type TM = CInt -> CInt -> PD -> IO CInt         ---type TMM =  CInt -> CInt -> PD -> TM            ---type TVMM = CInt -> PD -> TMM                   ---type TMVMM = CInt -> CInt -> PD -> TVMM         ---type TMMM =  CInt -> CInt -> PD -> TMM          ---type TVM = CInt -> PD -> TM                     ---type TVVM = CInt -> PD -> TVM                   ---type TMV = CInt -> CInt -> PD -> TV             ---type TMMV = CInt -> CInt -> PD -> TMV           ---type TMVM = CInt -> CInt -> PD -> TVM           ---type TMMVM = CInt -> CInt -> PD -> TMVM         ---type TCM = CInt -> CInt -> PC -> IO CInt        ---type TCVCM = CInt -> PC -> TCM                  ---type TCMCVCM = CInt -> CInt -> PC -> TCVCM      ---type TMCMCVCM = CInt -> CInt -> PD -> TCMCVCM   ---type TCMCMCVCM = CInt -> CInt -> PC -> TCMCVCM  ---type TCMCM = CInt -> CInt -> PC -> TCM          ---type TVCM = CInt -> PD -> TCM                   ---type TCMVCM = CInt -> CInt -> PC -> TVCM        ---type TCMCMVCM = CInt -> CInt -> PC -> TCMVCM    ---type TCMCMCM = CInt -> CInt -> PC -> TCMCM      ---type TCV = CInt -> PC -> IO CInt                ---type TCVCV = CInt -> PC -> TCV                  ---type TCVCVCV = CInt -> PC -> TCVCV              ---type TCMCV = CInt -> CInt -> PC -> TCV          ---type TVCV = CInt -> PD -> TCV                   ---type TCVM = CInt -> PC -> TM                    ---type TMCVM = CInt -> CInt -> PD -> TCVM         ---type TMMCVM = CInt -> CInt -> PD -> TMCVM       -----------------------------------------------------
lib/Data/Packed/Internal/Matrix.hs view
@@ -15,9 +15,26 @@ ----------------------------------------------------------------------------- -- #hide -module Data.Packed.Internal.Matrix where+module Data.Packed.Internal.Matrix(+    Matrix(..),+    MatrixOrder(..), orderOf,+    createMatrix, withMatrix, mat,+    cmat, fmat,+    toLists, flatten, reshape,+    Element(..),+    trans,+    fromRows, toRows, fromColumns, toColumns,+    matrixFromVector,+    subMatrix,+    liftMatrix, liftMatrix2,+    (@@>),+    saveMatrix,+    fromComplex, toComplex, conj,+    singleton+) where  import Data.Packed.Internal.Common+import Data.Packed.Internal.Signatures import Data.Packed.Internal.Vector  import Foreign hiding (xor)@@ -223,18 +240,19 @@     subMatrixD :: (Int,Int) -- ^ (r0,c0) starting position                 -> (Int,Int) -- ^ (rt,ct) dimensions of submatrix                -> Matrix a -> Matrix a+    subMatrixD = subMatrix'     transdata :: Int -> Vector a -> Int -> Vector a+    transdata = transdata'     constantD  :: a -> Int -> Vector a+    constantD = constant'  instance Element Double where-    subMatrixD = subMatrix'-    transdata  = transdataAux ctransR     -- transdata'-    constantD  = constantAux cconstantR   -- constant'+    transdata  = transdataAux ctransR+    constantD  = constantAux cconstantR  instance Element (Complex Double) where-    subMatrixD = subMatrix'-    transdata  = transdataAux ctransC     -- transdata'-    constantD  = constantAux cconstantC   -- constant'+    transdata  = transdataAux ctransC+    constantD  = constantAux cconstantC  ------------------------------------------------------------------- 
+ lib/Data/Packed/Internal/Signatures.hs view
@@ -0,0 +1,54 @@+-----------------------------------------------------------------------------+-- |+-- Module      :  Data.Packed.Internal.Signatures+-- Copyright   :  (c) Alberto Ruiz 2009+-- License     :  GPL-style+--+-- Maintainer  :  Alberto Ruiz <aruiz@um.es>+-- Stability   :  provisional+-- Portability :  portable (uses FFI)+--+-- Signatures of the C functions.+--+-----------------------------------------------------------------------------++module Data.Packed.Internal.Signatures where++import Foreign+import Complex+import Foreign.C.Types++type PD = Ptr Double                            --+type PC = Ptr (Complex Double)                  --+type TV = CInt -> PD -> IO CInt                 --+type TVV = CInt -> PD -> TV                     --+type TVVV = CInt -> PD -> TVV                   --+type TM = CInt -> CInt -> PD -> IO CInt         --+type TMM =  CInt -> CInt -> PD -> TM            --+type TVMM = CInt -> PD -> TMM                   --+type TMVMM = CInt -> CInt -> PD -> TVMM         --+type TMMM =  CInt -> CInt -> PD -> TMM          --+type TVM = CInt -> PD -> TM                     --+type TVVM = CInt -> PD -> TVM                   --+type TMV = CInt -> CInt -> PD -> TV             --+type TMMV = CInt -> CInt -> PD -> TMV           --+type TMVM = CInt -> CInt -> PD -> TVM           --+type TMMVM = CInt -> CInt -> PD -> TMVM         --+type TCM = CInt -> CInt -> PC -> IO CInt        --+type TCVCM = CInt -> PC -> TCM                  --+type TCMCVCM = CInt -> CInt -> PC -> TCVCM      --+type TMCMCVCM = CInt -> CInt -> PD -> TCMCVCM   --+type TCMCMCVCM = CInt -> CInt -> PC -> TCMCVCM  --+type TCMCM = CInt -> CInt -> PC -> TCM          --+type TVCM = CInt -> PD -> TCM                   --+type TCMVCM = CInt -> CInt -> PC -> TVCM        --+type TCMCMVCM = CInt -> CInt -> PC -> TCMVCM    --+type TCMCMCM = CInt -> CInt -> PC -> TCMCM      --+type TCV = CInt -> PC -> IO CInt                --+type TCVCV = CInt -> PC -> TCV                  --+type TCVCVCV = CInt -> PC -> TCVCV              --+type TCMCV = CInt -> CInt -> PC -> TCV          --+type TVCV = CInt -> PD -> TCV                   --+type TCVM = CInt -> PC -> TM                    --+type TMCVM = CInt -> CInt -> PD -> TCVM         --+type TMMCVM = CInt -> CInt -> PD -> TMCVM       --
lib/Data/Packed/Internal/Vector.hs view
@@ -14,9 +14,20 @@ ----------------------------------------------------------------------------- -- #hide -module Data.Packed.Internal.Vector where+module Data.Packed.Internal.Vector (+    Vector(..),+    fromList, toList, (|>),+    join, (@>), safe, at, at', subVector,+    mapVector, zipVector,+    foldVector, foldVectorG, foldLoop,+    createVector, withVector, vec,+    asComplex, asReal,+    fwriteVector, freadVector, fprintfVector, fscanfVector,+    cloneVector+) where  import Data.Packed.Internal.Common+import Data.Packed.Internal.Signatures import Foreign import Foreign.C.String import Foreign.C.Types(CInt,CChar)@@ -171,6 +182,7 @@ -} join :: Storable t => [Vector t] -> Vector t join [] = error "joining zero vectors"+join [v] = v join as = unsafePerformIO $ do     let tot = sum (map dim as)     r@V {fptr = p} <- createVector tot@@ -192,12 +204,6 @@ asComplex v = V { dim = dim v `div` 2, fptr =  castForeignPtr (fptr v) }  ------------------------------------------------------------------liftVector f x = mapVector f x--liftVector2 f u v = zipVector f u v-------------------------------------------------------------------  cloneVector :: Storable t => Vector t -> IO (Vector t) cloneVector (v@V {dim=n}) = do
+ lib/Data/Packed/Random.hs view
@@ -0,0 +1,69 @@+-----------------------------------------------------------------------------+-- |+-- Module      :  Data.Packed.Vector+-- Copyright   :  (c) Alberto Ruiz 2009+-- License     :  GPL+--+-- Maintainer  :  Alberto Ruiz <aruiz@um.es>+-- Stability   :  provisional+--+-- Random vectors and matrices.+--+-----------------------------------------------------------------------------++module Data.Packed.Random (+    RandDist(..),+    randomVector,+    gaussianSample,+    uniformSample,+    meanCov,+) where++import Numeric.GSL.Vector+import Data.Packed+import Numeric.LinearAlgebra.Algorithms+import Numeric.LinearAlgebra.Instances()+import Numeric.LinearAlgebra.Interface++-- | Obtains a matrix whose rows are pseudorandom samples from a multivariate+-- Gaussian distribution.+gaussianSample :: Int -- ^ seed+               -> Int -- ^ number of rows+               -> Vector Double -- ^ mean vector+               -> Matrix Double -- ^ covariance matrix+               -> Matrix Double -- ^ result+gaussianSample seed n med cov = m where+    (l,v) = eigSH' cov+    c = dim l+    meds = constant 1 n `outer` med+    rs = reshape c $ randomVector seed Gaussian (c * n)+    ds = sqrt (abs l)+    m = rs <> (diag ds <> trans v) + meds++-- | Obtains a matrix whose rows are pseudorandom samples from a multivariate+-- uniform distribution.+uniformSample :: Int -- ^ seed+               -> Int -- ^ number of rows+               -> [(Double,Double)] -- ^ ranges for each column+               -> Matrix Double -- ^ result+uniformSample seed n rgs = m where+    (as,bs) = unzip rgs+    a = fromList as+    b = fromList bs+    cs = zipWith subtract as bs+    d = dim a+    dat = toRows $ reshape n $ randomVector seed Uniform (n*d)+    am = constant 1 n `outer` a+    m = fromColumns (zipWith (.*) cs dat) + am++------------ utilities -------------------------------++-- | Compute mean vector and covariance matrix of the rows of a matrix.+meanCov :: Matrix Double -> (Vector Double, Matrix Double)+meanCov x = (med,cov) where+    r    = rows x+    k    = 1 / fromIntegral r+    med  = constant k r <> x+    meds = constant 1 r `outer` med+    xc   = x - meds+    cov  = (trans xc <> xc) / fromIntegral (r-1)
lib/Data/Packed/Vector.hs view
@@ -21,7 +21,6 @@     vectorMax, vectorMin, vectorMaxIndex, vectorMinIndex,     mapVector, zipVector,     fscanfVector, fprintfVector, freadVector, fwriteVector,-    liftVector, liftVector2,     foldLoop, foldVector, foldVectorG ) where 
lib/Graphics/Plot.hs view
@@ -24,7 +24,7 @@      matrixToPGM, imshow, -    gnuplotX+    gnuplotX, gnuplotpdf  ) where @@ -163,3 +163,43 @@ imshow m = do     system $ "echo \""++ matrixToPGM m ++"\"| display -antialias -resize 300 - &"     return ()++----------------------------------------------------++gnuplotpdf :: String -> String -> [([[Double]], String)] -> IO ()+gnuplotpdf title command ds = gnuplot (prelude ++ command ++" "++ draw) >> postproc where+    prelude = "set terminal epslatex color; set output '"++title++".tex';"+    (dats,defs) = unzip ds+    draw = concat (intersperse ", " (map ("\"-\" "++) defs)) ++ "\n" +++           concatMap pr dats+    postproc = do+        system $ "epstopdf "++title++".eps"+        mklatex+        system $ "pdflatex "++title++"aux.tex > /dev/null"+        system $ "pdfcrop "++title++"aux.pdf > /dev/null"+        system $ "mv "++title++"aux-crop.pdf "++title++".pdf"+        system $ "rm "++title++"aux.* "++title++".eps "++title++".tex"+        return ()++    mklatex = writeFile (title++"aux.tex") $+       "\\documentclass{article}\n"+++       "\\usepackage{graphics}\n"+++       "\\usepackage{nopageno}\n"+++       "\\usepackage{txfonts}\n"+++       "\\renewcommand{\\familydefault}{phv}\n"+++       "\\usepackage[usenames]{color}\n"++++       "\\begin{document}\n"++++       "\\begin{center}\n"+++       "  \\input{./"++title++".tex}\n"+++       "\\end{center}\n"++++       "\\end{document}"++    pr = (++"e\n") . unlines . map (unwords . (map show))++    gnuplot cmd = do+        writeFile "gnuplotcommand" cmd+        system "gnuplot gnuplotcommand"+        system "rm gnuplotcommand"
lib/Numeric/GSL/Minimization.hs view
@@ -115,7 +115,7 @@  ------------------------------------------------------------------------- -+ww2 w1 o1 w2 o2 f = w1 o1 $ \a1 -> w2 o2 $ \a2 -> f a1 a2  minimizeGen method eps maxit sz f xi = unsafePerformIO $ do     let xiv = fromList xi
lib/Numeric/GSL/Special/Airy.hs view
@@ -43,75 +43,99 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ 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 "gsl_sf_airy_Ai_e" gsl_sf_airy_Ai_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt+ airy_Ai :: Double -> Precision -> Double airy_Ai x mode = gsl_sf_airy_Ai x  (precCode mode) foreign import ccall "gsl_sf_airy_Ai" gsl_sf_airy_Ai :: Double -> Gsl_mode_t -> Double+ 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 "gsl_sf_airy_Bi_e" gsl_sf_airy_Bi_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt+ airy_Bi :: Double -> Precision -> Double airy_Bi x mode = gsl_sf_airy_Bi x  (precCode mode) foreign import ccall "gsl_sf_airy_Bi" gsl_sf_airy_Bi :: Double -> Gsl_mode_t -> Double+ 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 "gsl_sf_airy_Ai_scaled_e" gsl_sf_airy_Ai_scaled_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt+ airy_Ai_scaled :: Double -> Precision -> Double airy_Ai_scaled x mode = gsl_sf_airy_Ai_scaled x  (precCode mode) foreign import ccall "gsl_sf_airy_Ai_scaled" gsl_sf_airy_Ai_scaled :: Double -> Gsl_mode_t -> Double+ 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 "gsl_sf_airy_Bi_scaled_e" gsl_sf_airy_Bi_scaled_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt+ airy_Bi_scaled :: Double -> Precision -> Double airy_Bi_scaled x mode = gsl_sf_airy_Bi_scaled x  (precCode mode) foreign import ccall "gsl_sf_airy_Bi_scaled" gsl_sf_airy_Bi_scaled :: Double -> Gsl_mode_t -> Double+ 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 "gsl_sf_airy_Ai_deriv_e" gsl_sf_airy_Ai_deriv_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt+ airy_Ai_deriv :: Double -> Precision -> Double airy_Ai_deriv x mode = gsl_sf_airy_Ai_deriv x  (precCode mode) foreign import ccall "gsl_sf_airy_Ai_deriv" gsl_sf_airy_Ai_deriv :: Double -> Gsl_mode_t -> Double+ 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 "gsl_sf_airy_Bi_deriv_e" gsl_sf_airy_Bi_deriv_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt+ airy_Bi_deriv :: Double -> Precision -> Double airy_Bi_deriv x mode = gsl_sf_airy_Bi_deriv x  (precCode mode) foreign import ccall "gsl_sf_airy_Bi_deriv" gsl_sf_airy_Bi_deriv :: Double -> Gsl_mode_t -> Double+ 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 "gsl_sf_airy_Ai_deriv_scaled_e" gsl_sf_airy_Ai_deriv_scaled_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt+ 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 "gsl_sf_airy_Ai_deriv_scaled" gsl_sf_airy_Ai_deriv_scaled :: Double -> Gsl_mode_t -> Double+ 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 "gsl_sf_airy_Bi_deriv_scaled_e" gsl_sf_airy_Bi_deriv_scaled_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt+ 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 "gsl_sf_airy_Bi_deriv_scaled" gsl_sf_airy_Bi_deriv_scaled :: Double -> Gsl_mode_t -> Double+ airy_zero_Ai_e :: CInt -> (Double,Double) airy_zero_Ai_e s = createSFR "airy_zero_Ai_e" $ gsl_sf_airy_zero_Ai_e s foreign import ccall "gsl_sf_airy_zero_Ai_e" gsl_sf_airy_zero_Ai_e :: CInt -> Ptr () -> IO CInt+ airy_zero_Ai :: CInt -> Double airy_zero_Ai = gsl_sf_airy_zero_Ai foreign import ccall "gsl_sf_airy_zero_Ai" gsl_sf_airy_zero_Ai :: CInt -> Double+ airy_zero_Bi_e :: CInt -> (Double,Double) airy_zero_Bi_e s = createSFR "airy_zero_Bi_e" $ gsl_sf_airy_zero_Bi_e s foreign import ccall "gsl_sf_airy_zero_Bi_e" gsl_sf_airy_zero_Bi_e :: CInt -> Ptr () -> IO CInt+ airy_zero_Bi :: CInt -> Double airy_zero_Bi = gsl_sf_airy_zero_Bi foreign import ccall "gsl_sf_airy_zero_Bi" gsl_sf_airy_zero_Bi :: CInt -> Double+ airy_zero_Ai_deriv_e :: CInt -> (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 "gsl_sf_airy_zero_Ai_deriv_e" gsl_sf_airy_zero_Ai_deriv_e :: CInt -> Ptr () -> IO CInt+ airy_zero_Ai_deriv :: CInt -> Double airy_zero_Ai_deriv = gsl_sf_airy_zero_Ai_deriv foreign import ccall "gsl_sf_airy_zero_Ai_deriv" gsl_sf_airy_zero_Ai_deriv :: CInt -> Double+ airy_zero_Bi_deriv_e :: CInt -> (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 "gsl_sf_airy_zero_Bi_deriv_e" gsl_sf_airy_zero_Bi_deriv_e :: CInt -> Ptr () -> IO CInt+ airy_zero_Bi_deriv :: CInt -> Double airy_zero_Bi_deriv = gsl_sf_airy_zero_Bi_deriv foreign import ccall "gsl_sf_airy_zero_Bi_deriv" gsl_sf_airy_zero_Bi_deriv :: CInt -> Double
lib/Numeric/GSL/Special/Bessel.hs view
@@ -106,303 +106,403 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ bessel_J0_e :: Double -> (Double,Double) bessel_J0_e x = createSFR "bessel_J0_e" $ gsl_sf_bessel_J0_e x foreign import ccall "gsl_sf_bessel_J0_e" gsl_sf_bessel_J0_e :: Double -> Ptr () -> IO CInt+ bessel_J0 :: Double -> Double bessel_J0 = gsl_sf_bessel_J0 foreign import ccall "gsl_sf_bessel_J0" gsl_sf_bessel_J0 :: Double -> Double+ bessel_J1_e :: Double -> (Double,Double) bessel_J1_e x = createSFR "bessel_J1_e" $ gsl_sf_bessel_J1_e x foreign import ccall "gsl_sf_bessel_J1_e" gsl_sf_bessel_J1_e :: Double -> Ptr () -> IO CInt+ bessel_J1 :: Double -> Double bessel_J1 = gsl_sf_bessel_J1 foreign import ccall "gsl_sf_bessel_J1" gsl_sf_bessel_J1 :: Double -> Double+ bessel_Jn_e :: CInt -> Double -> (Double,Double) bessel_Jn_e n x = createSFR "bessel_Jn_e" $ gsl_sf_bessel_Jn_e n x foreign import ccall "gsl_sf_bessel_Jn_e" gsl_sf_bessel_Jn_e :: CInt -> Double -> Ptr () -> IO CInt+ bessel_Jn :: CInt -> Double -> Double bessel_Jn = gsl_sf_bessel_Jn foreign import ccall "gsl_sf_bessel_Jn" gsl_sf_bessel_Jn :: CInt -> Double -> Double+ bessel_Jn_array :: CInt -> CInt -> Double -> Ptr Double -> CInt bessel_Jn_array = gsl_sf_bessel_Jn_array foreign import ccall "gsl_sf_bessel_Jn_array" gsl_sf_bessel_Jn_array :: CInt -> CInt -> Double -> Ptr Double -> CInt+ bessel_Y0_e :: Double -> (Double,Double) bessel_Y0_e x = createSFR "bessel_Y0_e" $ gsl_sf_bessel_Y0_e x foreign import ccall "gsl_sf_bessel_Y0_e" gsl_sf_bessel_Y0_e :: Double -> Ptr () -> IO CInt+ bessel_Y0 :: Double -> Double bessel_Y0 = gsl_sf_bessel_Y0 foreign import ccall "gsl_sf_bessel_Y0" gsl_sf_bessel_Y0 :: Double -> Double+ bessel_Y1_e :: Double -> (Double,Double) bessel_Y1_e x = createSFR "bessel_Y1_e" $ gsl_sf_bessel_Y1_e x foreign import ccall "gsl_sf_bessel_Y1_e" gsl_sf_bessel_Y1_e :: Double -> Ptr () -> IO CInt+ bessel_Y1 :: Double -> Double bessel_Y1 = gsl_sf_bessel_Y1 foreign import ccall "gsl_sf_bessel_Y1" gsl_sf_bessel_Y1 :: Double -> Double+ bessel_Yn_e :: CInt -> Double -> (Double,Double) bessel_Yn_e n x = createSFR "bessel_Yn_e" $ gsl_sf_bessel_Yn_e n x foreign import ccall "gsl_sf_bessel_Yn_e" gsl_sf_bessel_Yn_e :: CInt -> Double -> Ptr () -> IO CInt+ bessel_Yn :: CInt -> Double -> Double bessel_Yn = gsl_sf_bessel_Yn foreign import ccall "gsl_sf_bessel_Yn" gsl_sf_bessel_Yn :: CInt -> Double -> Double+ bessel_Yn_array :: CInt -> CInt -> Double -> Ptr Double -> CInt bessel_Yn_array = gsl_sf_bessel_Yn_array foreign import ccall "gsl_sf_bessel_Yn_array" gsl_sf_bessel_Yn_array :: CInt -> CInt -> Double -> Ptr Double -> CInt+ bessel_I0_e :: Double -> (Double,Double) bessel_I0_e x = createSFR "bessel_I0_e" $ gsl_sf_bessel_I0_e x foreign import ccall "gsl_sf_bessel_I0_e" gsl_sf_bessel_I0_e :: Double -> Ptr () -> IO CInt+ bessel_I0 :: Double -> Double bessel_I0 = gsl_sf_bessel_I0 foreign import ccall "gsl_sf_bessel_I0" gsl_sf_bessel_I0 :: Double -> Double+ bessel_I1_e :: Double -> (Double,Double) bessel_I1_e x = createSFR "bessel_I1_e" $ gsl_sf_bessel_I1_e x foreign import ccall "gsl_sf_bessel_I1_e" gsl_sf_bessel_I1_e :: Double -> Ptr () -> IO CInt+ bessel_I1 :: Double -> Double bessel_I1 = gsl_sf_bessel_I1 foreign import ccall "gsl_sf_bessel_I1" gsl_sf_bessel_I1 :: Double -> Double+ bessel_In_e :: CInt -> Double -> (Double,Double) bessel_In_e n x = createSFR "bessel_In_e" $ gsl_sf_bessel_In_e n x foreign import ccall "gsl_sf_bessel_In_e" gsl_sf_bessel_In_e :: CInt -> Double -> Ptr () -> IO CInt+ bessel_In :: CInt -> Double -> Double bessel_In = gsl_sf_bessel_In foreign import ccall "gsl_sf_bessel_In" gsl_sf_bessel_In :: CInt -> Double -> Double+ bessel_In_array :: CInt -> CInt -> Double -> Ptr Double -> CInt bessel_In_array = gsl_sf_bessel_In_array foreign import ccall "gsl_sf_bessel_In_array" gsl_sf_bessel_In_array :: CInt -> CInt -> Double -> Ptr Double -> CInt+ 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 "gsl_sf_bessel_I0_scaled_e" gsl_sf_bessel_I0_scaled_e :: Double -> Ptr () -> IO CInt+ bessel_I0_scaled :: Double -> Double bessel_I0_scaled = gsl_sf_bessel_I0_scaled foreign import ccall "gsl_sf_bessel_I0_scaled" gsl_sf_bessel_I0_scaled :: Double -> Double+ 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 "gsl_sf_bessel_I1_scaled_e" gsl_sf_bessel_I1_scaled_e :: Double -> Ptr () -> IO CInt+ bessel_I1_scaled :: Double -> Double bessel_I1_scaled = gsl_sf_bessel_I1_scaled foreign import ccall "gsl_sf_bessel_I1_scaled" gsl_sf_bessel_I1_scaled :: Double -> Double+ bessel_In_scaled_e :: CInt -> 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 "gsl_sf_bessel_In_scaled_e" gsl_sf_bessel_In_scaled_e :: CInt -> Double -> Ptr () -> IO CInt+ bessel_In_scaled :: CInt -> Double -> Double bessel_In_scaled = gsl_sf_bessel_In_scaled foreign import ccall "gsl_sf_bessel_In_scaled" gsl_sf_bessel_In_scaled :: CInt -> Double -> Double+ bessel_In_scaled_array :: CInt -> CInt -> Double -> Ptr Double -> CInt bessel_In_scaled_array = gsl_sf_bessel_In_scaled_array foreign import ccall "gsl_sf_bessel_In_scaled_array" gsl_sf_bessel_In_scaled_array :: CInt -> CInt -> Double -> Ptr Double -> CInt+ bessel_K0_e :: Double -> (Double,Double) bessel_K0_e x = createSFR "bessel_K0_e" $ gsl_sf_bessel_K0_e x foreign import ccall "gsl_sf_bessel_K0_e" gsl_sf_bessel_K0_e :: Double -> Ptr () -> IO CInt+ bessel_K0 :: Double -> Double bessel_K0 = gsl_sf_bessel_K0 foreign import ccall "gsl_sf_bessel_K0" gsl_sf_bessel_K0 :: Double -> Double+ bessel_K1_e :: Double -> (Double,Double) bessel_K1_e x = createSFR "bessel_K1_e" $ gsl_sf_bessel_K1_e x foreign import ccall "gsl_sf_bessel_K1_e" gsl_sf_bessel_K1_e :: Double -> Ptr () -> IO CInt+ bessel_K1 :: Double -> Double bessel_K1 = gsl_sf_bessel_K1 foreign import ccall "gsl_sf_bessel_K1" gsl_sf_bessel_K1 :: Double -> Double+ bessel_Kn_e :: CInt -> Double -> (Double,Double) bessel_Kn_e n x = createSFR "bessel_Kn_e" $ gsl_sf_bessel_Kn_e n x foreign import ccall "gsl_sf_bessel_Kn_e" gsl_sf_bessel_Kn_e :: CInt -> Double -> Ptr () -> IO CInt+ bessel_Kn :: CInt -> Double -> Double bessel_Kn = gsl_sf_bessel_Kn foreign import ccall "gsl_sf_bessel_Kn" gsl_sf_bessel_Kn :: CInt -> Double -> Double+ bessel_Kn_array :: CInt -> CInt -> Double -> Ptr Double -> CInt bessel_Kn_array = gsl_sf_bessel_Kn_array foreign import ccall "gsl_sf_bessel_Kn_array" gsl_sf_bessel_Kn_array :: CInt -> CInt -> Double -> Ptr Double -> CInt+ 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 "gsl_sf_bessel_K0_scaled_e" gsl_sf_bessel_K0_scaled_e :: Double -> Ptr () -> IO CInt+ bessel_K0_scaled :: Double -> Double bessel_K0_scaled = gsl_sf_bessel_K0_scaled foreign import ccall "gsl_sf_bessel_K0_scaled" gsl_sf_bessel_K0_scaled :: Double -> Double+ 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 "gsl_sf_bessel_K1_scaled_e" gsl_sf_bessel_K1_scaled_e :: Double -> Ptr () -> IO CInt+ bessel_K1_scaled :: Double -> Double bessel_K1_scaled = gsl_sf_bessel_K1_scaled foreign import ccall "gsl_sf_bessel_K1_scaled" gsl_sf_bessel_K1_scaled :: Double -> Double+ bessel_Kn_scaled_e :: CInt -> 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 "gsl_sf_bessel_Kn_scaled_e" gsl_sf_bessel_Kn_scaled_e :: CInt -> Double -> Ptr () -> IO CInt+ bessel_Kn_scaled :: CInt -> Double -> Double bessel_Kn_scaled = gsl_sf_bessel_Kn_scaled foreign import ccall "gsl_sf_bessel_Kn_scaled" gsl_sf_bessel_Kn_scaled :: CInt -> Double -> Double+ bessel_Kn_scaled_array :: CInt -> CInt -> Double -> Ptr Double -> CInt bessel_Kn_scaled_array = gsl_sf_bessel_Kn_scaled_array foreign import ccall "gsl_sf_bessel_Kn_scaled_array" gsl_sf_bessel_Kn_scaled_array :: CInt -> CInt -> Double -> Ptr Double -> CInt+ bessel_j0_e :: Double -> (Double,Double) bessel_j0_e x = createSFR "bessel_j0_e" $ gsl_sf_bessel_j0_e x foreign import ccall "gsl_sf_bessel_j0_e" gsl_sf_bessel_j0_e :: Double -> Ptr () -> IO CInt+ bessel_j0 :: Double -> Double bessel_j0 = gsl_sf_bessel_j0 foreign import ccall "gsl_sf_bessel_j0" gsl_sf_bessel_j0 :: Double -> Double+ bessel_j1_e :: Double -> (Double,Double) bessel_j1_e x = createSFR "bessel_j1_e" $ gsl_sf_bessel_j1_e x foreign import ccall "gsl_sf_bessel_j1_e" gsl_sf_bessel_j1_e :: Double -> Ptr () -> IO CInt+ bessel_j1 :: Double -> Double bessel_j1 = gsl_sf_bessel_j1 foreign import ccall "gsl_sf_bessel_j1" gsl_sf_bessel_j1 :: Double -> Double+ bessel_j2_e :: Double -> (Double,Double) bessel_j2_e x = createSFR "bessel_j2_e" $ gsl_sf_bessel_j2_e x foreign import ccall "gsl_sf_bessel_j2_e" gsl_sf_bessel_j2_e :: Double -> Ptr () -> IO CInt+ bessel_j2 :: Double -> Double bessel_j2 = gsl_sf_bessel_j2 foreign import ccall "gsl_sf_bessel_j2" gsl_sf_bessel_j2 :: Double -> Double+ bessel_jl_e :: CInt -> Double -> (Double,Double) bessel_jl_e l x = createSFR "bessel_jl_e" $ gsl_sf_bessel_jl_e l x foreign import ccall "gsl_sf_bessel_jl_e" gsl_sf_bessel_jl_e :: CInt -> Double -> Ptr () -> IO CInt+ bessel_jl :: CInt -> Double -> Double bessel_jl = gsl_sf_bessel_jl foreign import ccall "gsl_sf_bessel_jl" gsl_sf_bessel_jl :: CInt -> Double -> Double+ bessel_jl_array :: CInt -> Double -> Ptr Double -> CInt bessel_jl_array = gsl_sf_bessel_jl_array foreign import ccall "gsl_sf_bessel_jl_array" gsl_sf_bessel_jl_array :: CInt -> Double -> Ptr Double -> CInt+ bessel_jl_steed_array :: CInt -> Double -> Ptr Double -> CInt bessel_jl_steed_array = gsl_sf_bessel_jl_steed_array foreign import ccall "gsl_sf_bessel_jl_steed_array" gsl_sf_bessel_jl_steed_array :: CInt -> Double -> Ptr Double -> CInt+ bessel_y0_e :: Double -> (Double,Double) bessel_y0_e x = createSFR "bessel_y0_e" $ gsl_sf_bessel_y0_e x foreign import ccall "gsl_sf_bessel_y0_e" gsl_sf_bessel_y0_e :: Double -> Ptr () -> IO CInt+ bessel_y0 :: Double -> Double bessel_y0 = gsl_sf_bessel_y0 foreign import ccall "gsl_sf_bessel_y0" gsl_sf_bessel_y0 :: Double -> Double+ bessel_y1_e :: Double -> (Double,Double) bessel_y1_e x = createSFR "bessel_y1_e" $ gsl_sf_bessel_y1_e x foreign import ccall "gsl_sf_bessel_y1_e" gsl_sf_bessel_y1_e :: Double -> Ptr () -> IO CInt+ bessel_y1 :: Double -> Double bessel_y1 = gsl_sf_bessel_y1 foreign import ccall "gsl_sf_bessel_y1" gsl_sf_bessel_y1 :: Double -> Double+ bessel_y2_e :: Double -> (Double,Double) bessel_y2_e x = createSFR "bessel_y2_e" $ gsl_sf_bessel_y2_e x foreign import ccall "gsl_sf_bessel_y2_e" gsl_sf_bessel_y2_e :: Double -> Ptr () -> IO CInt+ bessel_y2 :: Double -> Double bessel_y2 = gsl_sf_bessel_y2 foreign import ccall "gsl_sf_bessel_y2" gsl_sf_bessel_y2 :: Double -> Double+ bessel_yl_e :: CInt -> Double -> (Double,Double) bessel_yl_e l x = createSFR "bessel_yl_e" $ gsl_sf_bessel_yl_e l x foreign import ccall "gsl_sf_bessel_yl_e" gsl_sf_bessel_yl_e :: CInt -> Double -> Ptr () -> IO CInt+ bessel_yl :: CInt -> Double -> Double bessel_yl = gsl_sf_bessel_yl foreign import ccall "gsl_sf_bessel_yl" gsl_sf_bessel_yl :: CInt -> Double -> Double+ bessel_yl_array :: CInt -> Double -> Ptr Double -> CInt bessel_yl_array = gsl_sf_bessel_yl_array foreign import ccall "gsl_sf_bessel_yl_array" gsl_sf_bessel_yl_array :: CInt -> Double -> Ptr Double -> CInt+ 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 "gsl_sf_bessel_i0_scaled_e" gsl_sf_bessel_i0_scaled_e :: Double -> Ptr () -> IO CInt+ bessel_i0_scaled :: Double -> Double bessel_i0_scaled = gsl_sf_bessel_i0_scaled foreign import ccall "gsl_sf_bessel_i0_scaled" gsl_sf_bessel_i0_scaled :: Double -> Double+ 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 "gsl_sf_bessel_i1_scaled_e" gsl_sf_bessel_i1_scaled_e :: Double -> Ptr () -> IO CInt+ bessel_i1_scaled :: Double -> Double bessel_i1_scaled = gsl_sf_bessel_i1_scaled foreign import ccall "gsl_sf_bessel_i1_scaled" gsl_sf_bessel_i1_scaled :: Double -> Double+ 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 "gsl_sf_bessel_i2_scaled_e" gsl_sf_bessel_i2_scaled_e :: Double -> Ptr () -> IO CInt+ bessel_i2_scaled :: Double -> Double bessel_i2_scaled = gsl_sf_bessel_i2_scaled foreign import ccall "gsl_sf_bessel_i2_scaled" gsl_sf_bessel_i2_scaled :: Double -> Double+ bessel_il_scaled_e :: CInt -> 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 "gsl_sf_bessel_il_scaled_e" gsl_sf_bessel_il_scaled_e :: CInt -> Double -> Ptr () -> IO CInt+ bessel_il_scaled :: CInt -> Double -> Double bessel_il_scaled = gsl_sf_bessel_il_scaled foreign import ccall "gsl_sf_bessel_il_scaled" gsl_sf_bessel_il_scaled :: CInt -> Double -> Double+ bessel_il_scaled_array :: CInt -> Double -> Ptr Double -> CInt bessel_il_scaled_array = gsl_sf_bessel_il_scaled_array foreign import ccall "gsl_sf_bessel_il_scaled_array" gsl_sf_bessel_il_scaled_array :: CInt -> Double -> Ptr Double -> CInt+ 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 "gsl_sf_bessel_k0_scaled_e" gsl_sf_bessel_k0_scaled_e :: Double -> Ptr () -> IO CInt+ bessel_k0_scaled :: Double -> Double bessel_k0_scaled = gsl_sf_bessel_k0_scaled foreign import ccall "gsl_sf_bessel_k0_scaled" gsl_sf_bessel_k0_scaled :: Double -> Double+ 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 "gsl_sf_bessel_k1_scaled_e" gsl_sf_bessel_k1_scaled_e :: Double -> Ptr () -> IO CInt+ bessel_k1_scaled :: Double -> Double bessel_k1_scaled = gsl_sf_bessel_k1_scaled foreign import ccall "gsl_sf_bessel_k1_scaled" gsl_sf_bessel_k1_scaled :: Double -> Double+ 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 "gsl_sf_bessel_k2_scaled_e" gsl_sf_bessel_k2_scaled_e :: Double -> Ptr () -> IO CInt+ bessel_k2_scaled :: Double -> Double bessel_k2_scaled = gsl_sf_bessel_k2_scaled foreign import ccall "gsl_sf_bessel_k2_scaled" gsl_sf_bessel_k2_scaled :: Double -> Double+ bessel_kl_scaled_e :: CInt -> 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 "gsl_sf_bessel_kl_scaled_e" gsl_sf_bessel_kl_scaled_e :: CInt -> Double -> Ptr () -> IO CInt+ bessel_kl_scaled :: CInt -> Double -> Double bessel_kl_scaled = gsl_sf_bessel_kl_scaled foreign import ccall "gsl_sf_bessel_kl_scaled" gsl_sf_bessel_kl_scaled :: CInt -> Double -> Double+ bessel_kl_scaled_array :: CInt -> Double -> Ptr Double -> CInt bessel_kl_scaled_array = gsl_sf_bessel_kl_scaled_array foreign import ccall "gsl_sf_bessel_kl_scaled_array" gsl_sf_bessel_kl_scaled_array :: CInt -> Double -> Ptr Double -> CInt+ 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 "gsl_sf_bessel_Jnu_e" gsl_sf_bessel_Jnu_e :: Double -> Double -> Ptr () -> IO CInt+ bessel_Jnu :: Double -> Double -> Double bessel_Jnu = gsl_sf_bessel_Jnu foreign import ccall "gsl_sf_bessel_Jnu" gsl_sf_bessel_Jnu :: Double -> Double -> Double+ 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 "gsl_sf_bessel_Ynu_e" gsl_sf_bessel_Ynu_e :: Double -> Double -> Ptr () -> IO CInt+ bessel_Ynu :: Double -> Double -> Double bessel_Ynu = gsl_sf_bessel_Ynu foreign import ccall "gsl_sf_bessel_Ynu" gsl_sf_bessel_Ynu :: Double -> Double -> Double+ bessel_sequence_Jnu_e :: Double -> Precision -> Size_t -> Ptr Double -> CInt bessel_sequence_Jnu_e nu mode size v = gsl_sf_bessel_sequence_Jnu_e nu  (precCode mode) size v foreign import ccall "gsl_sf_bessel_sequence_Jnu_e" gsl_sf_bessel_sequence_Jnu_e :: Double -> Gsl_mode_t -> Size_t -> Ptr Double -> CInt+ 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 "gsl_sf_bessel_Inu_scaled_e" gsl_sf_bessel_Inu_scaled_e :: Double -> Double -> Ptr () -> IO CInt+ bessel_Inu_scaled :: Double -> Double -> Double bessel_Inu_scaled = gsl_sf_bessel_Inu_scaled foreign import ccall "gsl_sf_bessel_Inu_scaled" gsl_sf_bessel_Inu_scaled :: Double -> Double -> Double+ 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 "gsl_sf_bessel_Inu_e" gsl_sf_bessel_Inu_e :: Double -> Double -> Ptr () -> IO CInt+ bessel_Inu :: Double -> Double -> Double bessel_Inu = gsl_sf_bessel_Inu foreign import ccall "gsl_sf_bessel_Inu" gsl_sf_bessel_Inu :: Double -> Double -> Double+ 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 "gsl_sf_bessel_Knu_scaled_e" gsl_sf_bessel_Knu_scaled_e :: Double -> Double -> Ptr () -> IO CInt+ bessel_Knu_scaled :: Double -> Double -> Double bessel_Knu_scaled = gsl_sf_bessel_Knu_scaled foreign import ccall "gsl_sf_bessel_Knu_scaled" gsl_sf_bessel_Knu_scaled :: Double -> Double -> Double+ 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 "gsl_sf_bessel_Knu_e" gsl_sf_bessel_Knu_e :: Double -> Double -> Ptr () -> IO CInt+ bessel_Knu :: Double -> Double -> Double bessel_Knu = gsl_sf_bessel_Knu foreign import ccall "gsl_sf_bessel_Knu" gsl_sf_bessel_Knu :: Double -> Double -> Double+ 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 "gsl_sf_bessel_lnKnu_e" gsl_sf_bessel_lnKnu_e :: Double -> Double -> Ptr () -> IO CInt+ bessel_lnKnu :: Double -> Double -> Double bessel_lnKnu = gsl_sf_bessel_lnKnu foreign import ccall "gsl_sf_bessel_lnKnu" gsl_sf_bessel_lnKnu :: Double -> Double -> Double+ bessel_zero_J0_e :: CInt -> (Double,Double) bessel_zero_J0_e s = createSFR "bessel_zero_J0_e" $ gsl_sf_bessel_zero_J0_e s foreign import ccall "gsl_sf_bessel_zero_J0_e" gsl_sf_bessel_zero_J0_e :: CInt -> Ptr () -> IO CInt+ bessel_zero_J0 :: CInt -> Double bessel_zero_J0 = gsl_sf_bessel_zero_J0 foreign import ccall "gsl_sf_bessel_zero_J0" gsl_sf_bessel_zero_J0 :: CInt -> Double+ bessel_zero_J1_e :: CInt -> (Double,Double) bessel_zero_J1_e s = createSFR "bessel_zero_J1_e" $ gsl_sf_bessel_zero_J1_e s foreign import ccall "gsl_sf_bessel_zero_J1_e" gsl_sf_bessel_zero_J1_e :: CInt -> Ptr () -> IO CInt+ bessel_zero_J1 :: CInt -> Double bessel_zero_J1 = gsl_sf_bessel_zero_J1 foreign import ccall "gsl_sf_bessel_zero_J1" gsl_sf_bessel_zero_J1 :: CInt -> Double+ bessel_zero_Jnu_e :: Double -> CInt -> (Double,Double) bessel_zero_Jnu_e nu s = createSFR "bessel_zero_Jnu_e" $ gsl_sf_bessel_zero_Jnu_e nu s foreign import ccall "gsl_sf_bessel_zero_Jnu_e" gsl_sf_bessel_zero_Jnu_e :: Double -> CInt -> Ptr () -> IO CInt+ bessel_zero_Jnu :: Double -> CInt -> Double bessel_zero_Jnu = gsl_sf_bessel_zero_Jnu foreign import ccall "gsl_sf_bessel_zero_Jnu" gsl_sf_bessel_zero_Jnu :: Double -> CInt -> Double
lib/Numeric/GSL/Special/Clausen.hs view
@@ -20,9 +20,11 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ clausen_e :: Double -> (Double,Double) clausen_e x = createSFR "clausen_e" $ gsl_sf_clausen_e x foreign import ccall "gsl_sf_clausen_e" gsl_sf_clausen_e :: Double -> Ptr () -> IO CInt+ clausen :: Double -> Double clausen = gsl_sf_clausen foreign import ccall "gsl_sf_clausen" gsl_sf_clausen :: Double -> Double
lib/Numeric/GSL/Special/Coulomb.hs view
@@ -23,36 +23,47 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ 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 "gsl_sf_hydrogenicR_1_e" gsl_sf_hydrogenicR_1_e :: Double -> Double -> Ptr () -> IO CInt+ hydrogenicR_1 :: Double -> Double -> Double hydrogenicR_1 = gsl_sf_hydrogenicR_1 foreign import ccall "gsl_sf_hydrogenicR_1" gsl_sf_hydrogenicR_1 :: Double -> Double -> Double+ hydrogenicR_e :: CInt -> CInt -> Double -> Double -> (Double,Double) hydrogenicR_e n l zZ r = createSFR "hydrogenicR_e" $ gsl_sf_hydrogenicR_e n l zZ r foreign import ccall "gsl_sf_hydrogenicR_e" gsl_sf_hydrogenicR_e :: CInt -> CInt -> Double -> Double -> Ptr () -> IO CInt+ hydrogenicR :: CInt -> CInt -> Double -> Double -> Double hydrogenicR = gsl_sf_hydrogenicR foreign import ccall "gsl_sf_hydrogenicR" gsl_sf_hydrogenicR :: CInt -> CInt -> Double -> Double -> Double+ coulomb_wave_FG_e :: Double -> Double -> Double -> CInt -> Ptr () -> Ptr () -> Ptr () -> Ptr () -> Ptr Double -> Ptr Double -> CInt coulomb_wave_FG_e = gsl_sf_coulomb_wave_FG_e foreign import ccall "gsl_sf_coulomb_wave_FG_e" gsl_sf_coulomb_wave_FG_e :: Double -> Double -> Double -> CInt -> Ptr () -> Ptr () -> Ptr () -> Ptr () -> Ptr Double -> Ptr Double -> CInt+ coulomb_wave_F_array :: Double -> CInt -> Double -> Double -> Ptr Double -> Ptr Double -> CInt coulomb_wave_F_array = gsl_sf_coulomb_wave_F_array foreign import ccall "gsl_sf_coulomb_wave_F_array" gsl_sf_coulomb_wave_F_array :: Double -> CInt -> Double -> Double -> Ptr Double -> Ptr Double -> CInt+ coulomb_wave_FG_array :: Double -> CInt -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> CInt coulomb_wave_FG_array = gsl_sf_coulomb_wave_FG_array foreign import ccall "gsl_sf_coulomb_wave_FG_array" gsl_sf_coulomb_wave_FG_array :: Double -> CInt -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> CInt+ coulomb_wave_FGp_array :: Double -> CInt -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> CInt coulomb_wave_FGp_array = gsl_sf_coulomb_wave_FGp_array foreign import ccall "gsl_sf_coulomb_wave_FGp_array" gsl_sf_coulomb_wave_FGp_array :: Double -> CInt -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> CInt+ coulomb_wave_sphF_array :: Double -> CInt -> Double -> Double -> Ptr Double -> Ptr Double -> CInt coulomb_wave_sphF_array = gsl_sf_coulomb_wave_sphF_array foreign import ccall "gsl_sf_coulomb_wave_sphF_array" gsl_sf_coulomb_wave_sphF_array :: Double -> CInt -> Double -> Double -> Ptr Double -> Ptr Double -> CInt+ 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 "gsl_sf_coulomb_CL_e" gsl_sf_coulomb_CL_e :: Double -> Double -> Ptr () -> IO CInt+ coulomb_CL_array :: Double -> CInt -> Double -> Ptr Double -> CInt coulomb_CL_array = gsl_sf_coulomb_CL_array foreign import ccall "gsl_sf_coulomb_CL_array" gsl_sf_coulomb_CL_array :: Double -> CInt -> Double -> Ptr Double -> CInt
lib/Numeric/GSL/Special/Coupling.hs view
@@ -26,33 +26,43 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ coupling_3j_e :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> (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 "gsl_sf_coupling_3j_e" gsl_sf_coupling_3j_e :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Ptr () -> IO CInt+ coupling_3j :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Double coupling_3j = gsl_sf_coupling_3j foreign import ccall "gsl_sf_coupling_3j" gsl_sf_coupling_3j :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Double+ coupling_6j_e :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> (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 "gsl_sf_coupling_6j_e" gsl_sf_coupling_6j_e :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Ptr () -> IO CInt+ coupling_6j :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Double coupling_6j = gsl_sf_coupling_6j foreign import ccall "gsl_sf_coupling_6j" gsl_sf_coupling_6j :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Double+ coupling_RacahW_e :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> (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 "gsl_sf_coupling_RacahW_e" gsl_sf_coupling_RacahW_e :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Ptr () -> IO CInt+ coupling_RacahW :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Double coupling_RacahW = gsl_sf_coupling_RacahW foreign import ccall "gsl_sf_coupling_RacahW" gsl_sf_coupling_RacahW :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Double+ coupling_9j_e :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> (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 "gsl_sf_coupling_9j_e" gsl_sf_coupling_9j_e :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Ptr () -> IO CInt+ coupling_9j :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Double coupling_9j = gsl_sf_coupling_9j foreign import ccall "gsl_sf_coupling_9j" gsl_sf_coupling_9j :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Double+ coupling_6j_INCORRECT_e :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> (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 "gsl_sf_coupling_6j_INCORRECT_e" gsl_sf_coupling_6j_INCORRECT_e :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Ptr () -> IO CInt+ coupling_6j_INCORRECT :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Double coupling_6j_INCORRECT = gsl_sf_coupling_6j_INCORRECT foreign import ccall "gsl_sf_coupling_6j_INCORRECT" gsl_sf_coupling_6j_INCORRECT :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Double
lib/Numeric/GSL/Special/Dawson.hs view
@@ -20,9 +20,11 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ dawson_e :: Double -> (Double,Double) dawson_e x = createSFR "dawson_e" $ gsl_sf_dawson_e x foreign import ccall "gsl_sf_dawson_e" gsl_sf_dawson_e :: Double -> Ptr () -> IO CInt+ dawson :: Double -> Double dawson = gsl_sf_dawson foreign import ccall "gsl_sf_dawson" gsl_sf_dawson :: Double -> Double
lib/Numeric/GSL/Special/Debye.hs view
@@ -30,39 +30,51 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ debye_1_e :: Double -> (Double,Double) debye_1_e x = createSFR "debye_1_e" $ gsl_sf_debye_1_e x foreign import ccall "gsl_sf_debye_1_e" gsl_sf_debye_1_e :: Double -> Ptr () -> IO CInt+ debye_1 :: Double -> Double debye_1 = gsl_sf_debye_1 foreign import ccall "gsl_sf_debye_1" gsl_sf_debye_1 :: Double -> Double+ debye_2_e :: Double -> (Double,Double) debye_2_e x = createSFR "debye_2_e" $ gsl_sf_debye_2_e x foreign import ccall "gsl_sf_debye_2_e" gsl_sf_debye_2_e :: Double -> Ptr () -> IO CInt+ debye_2 :: Double -> Double debye_2 = gsl_sf_debye_2 foreign import ccall "gsl_sf_debye_2" gsl_sf_debye_2 :: Double -> Double+ debye_3_e :: Double -> (Double,Double) debye_3_e x = createSFR "debye_3_e" $ gsl_sf_debye_3_e x foreign import ccall "gsl_sf_debye_3_e" gsl_sf_debye_3_e :: Double -> Ptr () -> IO CInt+ debye_3 :: Double -> Double debye_3 = gsl_sf_debye_3 foreign import ccall "gsl_sf_debye_3" gsl_sf_debye_3 :: Double -> Double+ debye_4_e :: Double -> (Double,Double) debye_4_e x = createSFR "debye_4_e" $ gsl_sf_debye_4_e x foreign import ccall "gsl_sf_debye_4_e" gsl_sf_debye_4_e :: Double -> Ptr () -> IO CInt+ debye_4 :: Double -> Double debye_4 = gsl_sf_debye_4 foreign import ccall "gsl_sf_debye_4" gsl_sf_debye_4 :: Double -> Double+ debye_5_e :: Double -> (Double,Double) debye_5_e x = createSFR "debye_5_e" $ gsl_sf_debye_5_e x foreign import ccall "gsl_sf_debye_5_e" gsl_sf_debye_5_e :: Double -> Ptr () -> IO CInt+ debye_5 :: Double -> Double debye_5 = gsl_sf_debye_5 foreign import ccall "gsl_sf_debye_5" gsl_sf_debye_5 :: Double -> Double+ debye_6_e :: Double -> (Double,Double) debye_6_e x = createSFR "debye_6_e" $ gsl_sf_debye_6_e x foreign import ccall "gsl_sf_debye_6_e" gsl_sf_debye_6_e :: Double -> Ptr () -> IO CInt+ debye_6 :: Double -> Double debye_6 = gsl_sf_debye_6 foreign import ccall "gsl_sf_debye_6" gsl_sf_debye_6 :: Double -> Double
lib/Numeric/GSL/Special/Dilog.hs view
@@ -20,18 +20,23 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ dilog_e :: Double -> (Double,Double) dilog_e x = createSFR "dilog_e" $ gsl_sf_dilog_e x foreign import ccall "gsl_sf_dilog_e" gsl_sf_dilog_e :: Double -> Ptr () -> IO CInt+ dilog :: Double -> Double dilog = gsl_sf_dilog foreign import ccall "gsl_sf_dilog" gsl_sf_dilog :: Double -> Double+ complex_dilog_xy_e :: Double -> Double -> Ptr () -> (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 "gsl_sf_complex_dilog_xy_e" gsl_sf_complex_dilog_xy_e :: Double -> Double -> Ptr () -> Ptr () -> IO CInt+ complex_dilog_e :: Double -> Double -> Ptr () -> (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 "gsl_sf_complex_dilog_e" gsl_sf_complex_dilog_e :: Double -> Double -> Ptr () -> Ptr () -> IO CInt+ complex_spence_xy_e :: Double -> Double -> Ptr () -> (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 "gsl_sf_complex_spence_xy_e" gsl_sf_complex_spence_xy_e :: Double -> Double -> Ptr () -> Ptr () -> IO CInt
lib/Numeric/GSL/Special/Elementary.hs view
@@ -21,12 +21,15 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ multiply_e :: Double -> Double -> (Double,Double) multiply_e x y = createSFR "multiply_e" $ gsl_sf_multiply_e x y foreign import ccall "gsl_sf_multiply_e" gsl_sf_multiply_e :: Double -> Double -> Ptr () -> IO CInt+ multiply :: Double -> Double -> Double multiply = gsl_sf_multiply foreign import ccall "gsl_sf_multiply" gsl_sf_multiply :: Double -> Double -> Double+ 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 "gsl_sf_multiply_err_e" gsl_sf_multiply_err_e :: Double -> Double -> Double -> Double -> Ptr () -> IO CInt
lib/Numeric/GSL/Special/Ellint.hs view
@@ -42,75 +42,99 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ 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 "gsl_sf_ellint_Kcomp_e" gsl_sf_ellint_Kcomp_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt+ ellint_Kcomp :: Double -> Precision -> Double ellint_Kcomp k mode = gsl_sf_ellint_Kcomp k  (precCode mode) foreign import ccall "gsl_sf_ellint_Kcomp" gsl_sf_ellint_Kcomp :: Double -> Gsl_mode_t -> Double+ 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 "gsl_sf_ellint_Ecomp_e" gsl_sf_ellint_Ecomp_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt+ ellint_Ecomp :: Double -> Precision -> Double ellint_Ecomp k mode = gsl_sf_ellint_Ecomp k  (precCode mode) foreign import ccall "gsl_sf_ellint_Ecomp" gsl_sf_ellint_Ecomp :: Double -> Gsl_mode_t -> Double+ ellint_Pcomp_e :: Double -> Double -> Precision -> (Double,Double) ellint_Pcomp_e k n mode = createSFR "ellint_Pcomp_e" $ gsl_sf_ellint_Pcomp_e k n  (precCode mode) foreign import ccall "gsl_sf_ellint_Pcomp_e" gsl_sf_ellint_Pcomp_e :: Double -> Double -> Gsl_mode_t -> Ptr () -> IO CInt+ ellint_Pcomp :: Double -> Double -> Precision -> Double ellint_Pcomp k n mode = gsl_sf_ellint_Pcomp k n  (precCode mode) foreign import ccall "gsl_sf_ellint_Pcomp" gsl_sf_ellint_Pcomp :: Double -> Double -> Gsl_mode_t -> Double+ ellint_Dcomp_e :: Double -> Precision -> (Double,Double) ellint_Dcomp_e k mode = createSFR "ellint_Dcomp_e" $ gsl_sf_ellint_Dcomp_e k  (precCode mode) foreign import ccall "gsl_sf_ellint_Dcomp_e" gsl_sf_ellint_Dcomp_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt+ ellint_Dcomp :: Double -> Precision -> Double ellint_Dcomp k mode = gsl_sf_ellint_Dcomp k  (precCode mode) foreign import ccall "gsl_sf_ellint_Dcomp" gsl_sf_ellint_Dcomp :: Double -> Gsl_mode_t -> Double+ 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 "gsl_sf_ellint_F_e" gsl_sf_ellint_F_e :: Double -> Double -> Gsl_mode_t -> Ptr () -> IO CInt+ ellint_F :: Double -> Double -> Precision -> Double ellint_F phi k mode = gsl_sf_ellint_F phi k  (precCode mode) foreign import ccall "gsl_sf_ellint_F" gsl_sf_ellint_F :: Double -> Double -> Gsl_mode_t -> Double+ 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 "gsl_sf_ellint_E_e" gsl_sf_ellint_E_e :: Double -> Double -> Gsl_mode_t -> Ptr () -> IO CInt+ ellint_E :: Double -> Double -> Precision -> Double ellint_E phi k mode = gsl_sf_ellint_E phi k  (precCode mode) foreign import ccall "gsl_sf_ellint_E" gsl_sf_ellint_E :: Double -> Double -> Gsl_mode_t -> Double+ 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 "gsl_sf_ellint_P_e" gsl_sf_ellint_P_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr () -> IO CInt+ 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 "gsl_sf_ellint_P" gsl_sf_ellint_P :: Double -> Double -> Double -> Gsl_mode_t -> Double+ 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 "gsl_sf_ellint_D_e" gsl_sf_ellint_D_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr () -> IO CInt+ 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 "gsl_sf_ellint_D" gsl_sf_ellint_D :: Double -> Double -> Double -> Gsl_mode_t -> Double+ 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 "gsl_sf_ellint_RC_e" gsl_sf_ellint_RC_e :: Double -> Double -> Gsl_mode_t -> Ptr () -> IO CInt+ ellint_RC :: Double -> Double -> Precision -> Double ellint_RC x y mode = gsl_sf_ellint_RC x y  (precCode mode) foreign import ccall "gsl_sf_ellint_RC" gsl_sf_ellint_RC :: Double -> Double -> Gsl_mode_t -> Double+ 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 "gsl_sf_ellint_RD_e" gsl_sf_ellint_RD_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr () -> IO CInt+ 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 "gsl_sf_ellint_RD" gsl_sf_ellint_RD :: Double -> Double -> Double -> Gsl_mode_t -> Double+ 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 "gsl_sf_ellint_RF_e" gsl_sf_ellint_RF_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr () -> IO CInt+ 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 "gsl_sf_ellint_RF" gsl_sf_ellint_RF :: Double -> Double -> Double -> Gsl_mode_t -> Double+ 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 "gsl_sf_ellint_RJ_e" gsl_sf_ellint_RJ_e :: Double -> Double -> Double -> Double -> Gsl_mode_t -> Ptr () -> IO CInt+ 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 "gsl_sf_ellint_RJ" gsl_sf_ellint_RJ :: Double -> Double -> Double -> Double -> Gsl_mode_t -> Double
lib/Numeric/GSL/Special/Erf.hs view
@@ -30,39 +30,51 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ erfc_e :: Double -> (Double,Double) erfc_e x = createSFR "erfc_e" $ gsl_sf_erfc_e x foreign import ccall "gsl_sf_erfc_e" gsl_sf_erfc_e :: Double -> Ptr () -> IO CInt+ erfc :: Double -> Double erfc = gsl_sf_erfc foreign import ccall "gsl_sf_erfc" gsl_sf_erfc :: Double -> Double+ log_erfc_e :: Double -> (Double,Double) log_erfc_e x = createSFR "log_erfc_e" $ gsl_sf_log_erfc_e x foreign import ccall "gsl_sf_log_erfc_e" gsl_sf_log_erfc_e :: Double -> Ptr () -> IO CInt+ log_erfc :: Double -> Double log_erfc = gsl_sf_log_erfc foreign import ccall "gsl_sf_log_erfc" gsl_sf_log_erfc :: Double -> Double+ erf_e :: Double -> (Double,Double) erf_e x = createSFR "erf_e" $ gsl_sf_erf_e x foreign import ccall "gsl_sf_erf_e" gsl_sf_erf_e :: Double -> Ptr () -> IO CInt+ erf :: Double -> Double erf = gsl_sf_erf foreign import ccall "gsl_sf_erf" gsl_sf_erf :: Double -> Double+ erf_Z_e :: Double -> (Double,Double) erf_Z_e x = createSFR "erf_Z_e" $ gsl_sf_erf_Z_e x foreign import ccall "gsl_sf_erf_Z_e" gsl_sf_erf_Z_e :: Double -> Ptr () -> IO CInt+ erf_Q_e :: Double -> (Double,Double) erf_Q_e x = createSFR "erf_Q_e" $ gsl_sf_erf_Q_e x foreign import ccall "gsl_sf_erf_Q_e" gsl_sf_erf_Q_e :: Double -> Ptr () -> IO CInt+ erf_Z :: Double -> Double erf_Z = gsl_sf_erf_Z foreign import ccall "gsl_sf_erf_Z" gsl_sf_erf_Z :: Double -> Double+ erf_Q :: Double -> Double erf_Q = gsl_sf_erf_Q foreign import ccall "gsl_sf_erf_Q" gsl_sf_erf_Q :: Double -> Double+ hazard_e :: Double -> (Double,Double) hazard_e x = createSFR "hazard_e" $ gsl_sf_hazard_e x foreign import ccall "gsl_sf_hazard_e" gsl_sf_hazard_e :: Double -> Ptr () -> IO CInt+ hazard :: Double -> Double hazard = gsl_sf_hazard foreign import ccall "gsl_sf_hazard" gsl_sf_hazard :: Double -> Double
lib/Numeric/GSL/Special/Exp.hs view
@@ -37,60 +37,79 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ exp_e :: Double -> (Double,Double) exp_e x = createSFR "exp_e" $ gsl_sf_exp_e x foreign import ccall "gsl_sf_exp_e" gsl_sf_exp_e :: Double -> Ptr () -> IO CInt+ exp :: Double -> Double exp = gsl_sf_exp foreign import ccall "gsl_sf_exp" gsl_sf_exp :: Double -> Double+ 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 "gsl_sf_exp_e10_e" gsl_sf_exp_e10_e :: Double -> Ptr () -> IO CInt+ 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 "gsl_sf_exp_mult_e" gsl_sf_exp_mult_e :: Double -> Double -> Ptr () -> IO CInt+ exp_mult :: Double -> Double -> Double exp_mult = gsl_sf_exp_mult foreign import ccall "gsl_sf_exp_mult" gsl_sf_exp_mult :: Double -> Double -> Double+ 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 "gsl_sf_exp_mult_e10_e" gsl_sf_exp_mult_e10_e :: Double -> Double -> Ptr () -> IO CInt+ expm1_e :: Double -> (Double,Double) expm1_e x = createSFR "expm1_e" $ gsl_sf_expm1_e x foreign import ccall "gsl_sf_expm1_e" gsl_sf_expm1_e :: Double -> Ptr () -> IO CInt+ expm1 :: Double -> Double expm1 = gsl_sf_expm1 foreign import ccall "gsl_sf_expm1" gsl_sf_expm1 :: Double -> Double+ exprel_e :: Double -> (Double,Double) exprel_e x = createSFR "exprel_e" $ gsl_sf_exprel_e x foreign import ccall "gsl_sf_exprel_e" gsl_sf_exprel_e :: Double -> Ptr () -> IO CInt+ exprel :: Double -> Double exprel = gsl_sf_exprel foreign import ccall "gsl_sf_exprel" gsl_sf_exprel :: Double -> Double+ exprel_2_e :: Double -> (Double,Double) exprel_2_e x = createSFR "exprel_2_e" $ gsl_sf_exprel_2_e x foreign import ccall "gsl_sf_exprel_2_e" gsl_sf_exprel_2_e :: Double -> Ptr () -> IO CInt+ exprel_2 :: Double -> Double exprel_2 = gsl_sf_exprel_2 foreign import ccall "gsl_sf_exprel_2" gsl_sf_exprel_2 :: Double -> Double+ exprel_n_e :: CInt -> Double -> (Double,Double) exprel_n_e n x = createSFR "exprel_n_e" $ gsl_sf_exprel_n_e n x foreign import ccall "gsl_sf_exprel_n_e" gsl_sf_exprel_n_e :: CInt -> Double -> Ptr () -> IO CInt+ exprel_n :: CInt -> Double -> Double exprel_n = gsl_sf_exprel_n foreign import ccall "gsl_sf_exprel_n" gsl_sf_exprel_n :: CInt -> Double -> Double+ exprel_n_CF_e :: Double -> Double -> (Double,Double) exprel_n_CF_e n x = createSFR "exprel_n_CF_e" $ gsl_sf_exprel_n_CF_e n x foreign import ccall "gsl_sf_exprel_n_CF_e" gsl_sf_exprel_n_CF_e :: Double -> Double -> Ptr () -> IO CInt+ 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 "gsl_sf_exp_err_e" gsl_sf_exp_err_e :: Double -> Double -> Ptr () -> IO CInt+ 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 "gsl_sf_exp_err_e10_e" gsl_sf_exp_err_e10_e :: Double -> Double -> Ptr () -> IO CInt+ 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 "gsl_sf_exp_mult_err_e" gsl_sf_exp_mult_err_e :: Double -> Double -> Double -> Double -> Ptr () -> IO CInt+ 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 "gsl_sf_exp_mult_err_e10_e" gsl_sf_exp_mult_err_e10_e :: Double -> Double -> Double -> Double -> Ptr () -> IO CInt
lib/Numeric/GSL/Special/Expint.hs view
@@ -46,87 +46,115 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ expint_E1_e :: Double -> (Double,Double) expint_E1_e x = createSFR "expint_E1_e" $ gsl_sf_expint_E1_e x foreign import ccall "gsl_sf_expint_E1_e" gsl_sf_expint_E1_e :: Double -> Ptr () -> IO CInt+ expint_E1 :: Double -> Double expint_E1 = gsl_sf_expint_E1 foreign import ccall "gsl_sf_expint_E1" gsl_sf_expint_E1 :: Double -> Double+ expint_E2_e :: Double -> (Double,Double) expint_E2_e x = createSFR "expint_E2_e" $ gsl_sf_expint_E2_e x foreign import ccall "gsl_sf_expint_E2_e" gsl_sf_expint_E2_e :: Double -> Ptr () -> IO CInt+ expint_E2 :: Double -> Double expint_E2 = gsl_sf_expint_E2 foreign import ccall "gsl_sf_expint_E2" gsl_sf_expint_E2 :: Double -> Double+ expint_En_e :: CInt -> Double -> (Double,Double) expint_En_e n x = createSFR "expint_En_e" $ gsl_sf_expint_En_e n x foreign import ccall "gsl_sf_expint_En_e" gsl_sf_expint_En_e :: CInt -> Double -> Ptr () -> IO CInt+ expint_En :: CInt -> Double -> Double expint_En = gsl_sf_expint_En foreign import ccall "gsl_sf_expint_En" gsl_sf_expint_En :: CInt -> Double -> Double+ 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 "gsl_sf_expint_E1_scaled_e" gsl_sf_expint_E1_scaled_e :: Double -> Ptr () -> IO CInt+ expint_E1_scaled :: Double -> Double expint_E1_scaled = gsl_sf_expint_E1_scaled foreign import ccall "gsl_sf_expint_E1_scaled" gsl_sf_expint_E1_scaled :: Double -> Double+ 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 "gsl_sf_expint_E2_scaled_e" gsl_sf_expint_E2_scaled_e :: Double -> Ptr () -> IO CInt+ expint_E2_scaled :: Double -> Double expint_E2_scaled = gsl_sf_expint_E2_scaled foreign import ccall "gsl_sf_expint_E2_scaled" gsl_sf_expint_E2_scaled :: Double -> Double+ expint_En_scaled_e :: CInt -> Double -> (Double,Double) expint_En_scaled_e n x = createSFR "expint_En_scaled_e" $ gsl_sf_expint_En_scaled_e n x foreign import ccall "gsl_sf_expint_En_scaled_e" gsl_sf_expint_En_scaled_e :: CInt -> Double -> Ptr () -> IO CInt+ expint_En_scaled :: CInt -> Double -> Double expint_En_scaled = gsl_sf_expint_En_scaled foreign import ccall "gsl_sf_expint_En_scaled" gsl_sf_expint_En_scaled :: CInt -> Double -> Double+ expint_Ei_e :: Double -> (Double,Double) expint_Ei_e x = createSFR "expint_Ei_e" $ gsl_sf_expint_Ei_e x foreign import ccall "gsl_sf_expint_Ei_e" gsl_sf_expint_Ei_e :: Double -> Ptr () -> IO CInt+ expint_Ei :: Double -> Double expint_Ei = gsl_sf_expint_Ei foreign import ccall "gsl_sf_expint_Ei" gsl_sf_expint_Ei :: Double -> Double+ 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 "gsl_sf_expint_Ei_scaled_e" gsl_sf_expint_Ei_scaled_e :: Double -> Ptr () -> IO CInt+ expint_Ei_scaled :: Double -> Double expint_Ei_scaled = gsl_sf_expint_Ei_scaled foreign import ccall "gsl_sf_expint_Ei_scaled" gsl_sf_expint_Ei_scaled :: Double -> Double+ shi_e :: Double -> (Double,Double) shi_e x = createSFR "shi_e" $ gsl_sf_Shi_e x foreign import ccall "gsl_sf_Shi_e" gsl_sf_Shi_e :: Double -> Ptr () -> IO CInt+ shi :: Double -> Double shi = gsl_sf_Shi foreign import ccall "gsl_sf_Shi" gsl_sf_Shi :: Double -> Double+ chi_e :: Double -> (Double,Double) chi_e x = createSFR "chi_e" $ gsl_sf_Chi_e x foreign import ccall "gsl_sf_Chi_e" gsl_sf_Chi_e :: Double -> Ptr () -> IO CInt+ chi :: Double -> Double chi = gsl_sf_Chi foreign import ccall "gsl_sf_Chi" gsl_sf_Chi :: Double -> Double+ expint_3_e :: Double -> (Double,Double) expint_3_e x = createSFR "expint_3_e" $ gsl_sf_expint_3_e x foreign import ccall "gsl_sf_expint_3_e" gsl_sf_expint_3_e :: Double -> Ptr () -> IO CInt+ expint_3 :: Double -> Double expint_3 = gsl_sf_expint_3 foreign import ccall "gsl_sf_expint_3" gsl_sf_expint_3 :: Double -> Double+ si_e :: Double -> (Double,Double) si_e x = createSFR "si_e" $ gsl_sf_Si_e x foreign import ccall "gsl_sf_Si_e" gsl_sf_Si_e :: Double -> Ptr () -> IO CInt+ si :: Double -> Double si = gsl_sf_Si foreign import ccall "gsl_sf_Si" gsl_sf_Si :: Double -> Double+ ci_e :: Double -> (Double,Double) ci_e x = createSFR "ci_e" $ gsl_sf_Ci_e x foreign import ccall "gsl_sf_Ci_e" gsl_sf_Ci_e :: Double -> Ptr () -> IO CInt+ ci :: Double -> Double ci = gsl_sf_Ci foreign import ccall "gsl_sf_Ci" gsl_sf_Ci :: Double -> Double+ atanint_e :: Double -> (Double,Double) atanint_e x = createSFR "atanint_e" $ gsl_sf_atanint_e x foreign import ccall "gsl_sf_atanint_e" gsl_sf_atanint_e :: Double -> Ptr () -> IO CInt+ atanint :: Double -> Double atanint = gsl_sf_atanint foreign import ccall "gsl_sf_atanint" gsl_sf_atanint :: Double -> Double
lib/Numeric/GSL/Special/Fermi_dirac.hs view
@@ -36,57 +36,75 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ 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 "gsl_sf_fermi_dirac_m1_e" gsl_sf_fermi_dirac_m1_e :: Double -> Ptr () -> IO CInt+ fermi_dirac_m1 :: Double -> Double fermi_dirac_m1 = gsl_sf_fermi_dirac_m1 foreign import ccall "gsl_sf_fermi_dirac_m1" gsl_sf_fermi_dirac_m1 :: Double -> Double+ 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 "gsl_sf_fermi_dirac_0_e" gsl_sf_fermi_dirac_0_e :: Double -> Ptr () -> IO CInt+ fermi_dirac_0 :: Double -> Double fermi_dirac_0 = gsl_sf_fermi_dirac_0 foreign import ccall "gsl_sf_fermi_dirac_0" gsl_sf_fermi_dirac_0 :: Double -> Double+ 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 "gsl_sf_fermi_dirac_1_e" gsl_sf_fermi_dirac_1_e :: Double -> Ptr () -> IO CInt+ fermi_dirac_1 :: Double -> Double fermi_dirac_1 = gsl_sf_fermi_dirac_1 foreign import ccall "gsl_sf_fermi_dirac_1" gsl_sf_fermi_dirac_1 :: Double -> Double+ 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 "gsl_sf_fermi_dirac_2_e" gsl_sf_fermi_dirac_2_e :: Double -> Ptr () -> IO CInt+ fermi_dirac_2 :: Double -> Double fermi_dirac_2 = gsl_sf_fermi_dirac_2 foreign import ccall "gsl_sf_fermi_dirac_2" gsl_sf_fermi_dirac_2 :: Double -> Double+ fermi_dirac_int_e :: CInt -> 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 "gsl_sf_fermi_dirac_int_e" gsl_sf_fermi_dirac_int_e :: CInt -> Double -> Ptr () -> IO CInt+ fermi_dirac_int :: CInt -> Double -> Double fermi_dirac_int = gsl_sf_fermi_dirac_int foreign import ccall "gsl_sf_fermi_dirac_int" gsl_sf_fermi_dirac_int :: CInt -> Double -> Double+ 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 "gsl_sf_fermi_dirac_mhalf_e" gsl_sf_fermi_dirac_mhalf_e :: Double -> Ptr () -> IO CInt+ fermi_dirac_mhalf :: Double -> Double fermi_dirac_mhalf = gsl_sf_fermi_dirac_mhalf foreign import ccall "gsl_sf_fermi_dirac_mhalf" gsl_sf_fermi_dirac_mhalf :: Double -> Double+ 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 "gsl_sf_fermi_dirac_half_e" gsl_sf_fermi_dirac_half_e :: Double -> Ptr () -> IO CInt+ fermi_dirac_half :: Double -> Double fermi_dirac_half = gsl_sf_fermi_dirac_half foreign import ccall "gsl_sf_fermi_dirac_half" gsl_sf_fermi_dirac_half :: Double -> Double+ 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 "gsl_sf_fermi_dirac_3half_e" gsl_sf_fermi_dirac_3half_e :: Double -> Ptr () -> IO CInt+ fermi_dirac_3half :: Double -> Double fermi_dirac_3half = gsl_sf_fermi_dirac_3half foreign import ccall "gsl_sf_fermi_dirac_3half" gsl_sf_fermi_dirac_3half :: Double -> Double+ 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 "gsl_sf_fermi_dirac_inc_0_e" gsl_sf_fermi_dirac_inc_0_e :: Double -> Double -> Ptr () -> IO CInt+ fermi_dirac_inc_0 :: Double -> Double -> Double fermi_dirac_inc_0 = gsl_sf_fermi_dirac_inc_0 foreign import ccall "gsl_sf_fermi_dirac_inc_0" gsl_sf_fermi_dirac_inc_0 :: Double -> Double -> Double
lib/Numeric/GSL/Special/Gamma.hs view
@@ -58,135 +58,179 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ lngamma_e :: Double -> (Double,Double) lngamma_e x = createSFR "lngamma_e" $ gsl_sf_lngamma_e x foreign import ccall "gsl_sf_lngamma_e" gsl_sf_lngamma_e :: Double -> Ptr () -> IO CInt+ lngamma :: Double -> Double lngamma = gsl_sf_lngamma foreign import ccall "gsl_sf_lngamma" gsl_sf_lngamma :: Double -> Double+ lngamma_sgn_e :: Double -> Ptr () -> Ptr Double -> CInt lngamma_sgn_e = gsl_sf_lngamma_sgn_e foreign import ccall "gsl_sf_lngamma_sgn_e" gsl_sf_lngamma_sgn_e :: Double -> Ptr () -> Ptr Double -> CInt+ gamma_e :: Double -> (Double,Double) gamma_e x = createSFR "gamma_e" $ gsl_sf_gamma_e x foreign import ccall "gsl_sf_gamma_e" gsl_sf_gamma_e :: Double -> Ptr () -> IO CInt+ gamma :: Double -> Double gamma = gsl_sf_gamma foreign import ccall "gsl_sf_gamma" gsl_sf_gamma :: Double -> Double+ gammastar_e :: Double -> (Double,Double) gammastar_e x = createSFR "gammastar_e" $ gsl_sf_gammastar_e x foreign import ccall "gsl_sf_gammastar_e" gsl_sf_gammastar_e :: Double -> Ptr () -> IO CInt+ gammastar :: Double -> Double gammastar = gsl_sf_gammastar foreign import ccall "gsl_sf_gammastar" gsl_sf_gammastar :: Double -> Double+ gammainv_e :: Double -> (Double,Double) gammainv_e x = createSFR "gammainv_e" $ gsl_sf_gammainv_e x foreign import ccall "gsl_sf_gammainv_e" gsl_sf_gammainv_e :: Double -> Ptr () -> IO CInt+ gammainv :: Double -> Double gammainv = gsl_sf_gammainv foreign import ccall "gsl_sf_gammainv" gsl_sf_gammainv :: Double -> Double+ lngamma_complex_e :: Double -> Double -> Ptr () -> (Double,Double) lngamma_complex_e zr zi lnr = createSFR "lngamma_complex_e" $ gsl_sf_lngamma_complex_e zr zi lnr foreign import ccall "gsl_sf_lngamma_complex_e" gsl_sf_lngamma_complex_e :: Double -> Double -> Ptr () -> Ptr () -> IO CInt+ taylorcoeff_e :: CInt -> Double -> (Double,Double) taylorcoeff_e n x = createSFR "taylorcoeff_e" $ gsl_sf_taylorcoeff_e n x foreign import ccall "gsl_sf_taylorcoeff_e" gsl_sf_taylorcoeff_e :: CInt -> Double -> Ptr () -> IO CInt+ taylorcoeff :: CInt -> Double -> Double taylorcoeff = gsl_sf_taylorcoeff foreign import ccall "gsl_sf_taylorcoeff" gsl_sf_taylorcoeff :: CInt -> Double -> Double+ fact_e :: CInt -> (Double,Double) fact_e n = createSFR "fact_e" $ gsl_sf_fact_e n foreign import ccall "gsl_sf_fact_e" gsl_sf_fact_e :: CInt -> Ptr () -> IO CInt+ fact :: CInt -> Double fact = gsl_sf_fact foreign import ccall "gsl_sf_fact" gsl_sf_fact :: CInt -> Double+ doublefact_e :: CInt -> (Double,Double) doublefact_e n = createSFR "doublefact_e" $ gsl_sf_doublefact_e n foreign import ccall "gsl_sf_doublefact_e" gsl_sf_doublefact_e :: CInt -> Ptr () -> IO CInt+ doublefact :: CInt -> Double doublefact = gsl_sf_doublefact foreign import ccall "gsl_sf_doublefact" gsl_sf_doublefact :: CInt -> Double+ lnfact_e :: CInt -> (Double,Double) lnfact_e n = createSFR "lnfact_e" $ gsl_sf_lnfact_e n foreign import ccall "gsl_sf_lnfact_e" gsl_sf_lnfact_e :: CInt -> Ptr () -> IO CInt+ lnfact :: CInt -> Double lnfact = gsl_sf_lnfact foreign import ccall "gsl_sf_lnfact" gsl_sf_lnfact :: CInt -> Double+ lndoublefact_e :: CInt -> (Double,Double) lndoublefact_e n = createSFR "lndoublefact_e" $ gsl_sf_lndoublefact_e n foreign import ccall "gsl_sf_lndoublefact_e" gsl_sf_lndoublefact_e :: CInt -> Ptr () -> IO CInt+ lndoublefact :: CInt -> Double lndoublefact = gsl_sf_lndoublefact foreign import ccall "gsl_sf_lndoublefact" gsl_sf_lndoublefact :: CInt -> Double+ lnchoose_e :: CInt -> CInt -> (Double,Double) lnchoose_e n m = createSFR "lnchoose_e" $ gsl_sf_lnchoose_e n m foreign import ccall "gsl_sf_lnchoose_e" gsl_sf_lnchoose_e :: CInt -> CInt -> Ptr () -> IO CInt+ lnchoose :: CInt -> CInt -> Double lnchoose = gsl_sf_lnchoose foreign import ccall "gsl_sf_lnchoose" gsl_sf_lnchoose :: CInt -> CInt -> Double+ choose_e :: CInt -> CInt -> (Double,Double) choose_e n m = createSFR "choose_e" $ gsl_sf_choose_e n m foreign import ccall "gsl_sf_choose_e" gsl_sf_choose_e :: CInt -> CInt -> Ptr () -> IO CInt+ choose :: CInt -> CInt -> Double choose = gsl_sf_choose foreign import ccall "gsl_sf_choose" gsl_sf_choose :: CInt -> CInt -> Double+ lnpoch_e :: Double -> Double -> (Double,Double) lnpoch_e a x = createSFR "lnpoch_e" $ gsl_sf_lnpoch_e a x foreign import ccall "gsl_sf_lnpoch_e" gsl_sf_lnpoch_e :: Double -> Double -> Ptr () -> IO CInt+ lnpoch :: Double -> Double -> Double lnpoch = gsl_sf_lnpoch foreign import ccall "gsl_sf_lnpoch" gsl_sf_lnpoch :: Double -> Double -> Double+ lnpoch_sgn_e :: Double -> Double -> Ptr () -> Ptr Double -> CInt lnpoch_sgn_e = gsl_sf_lnpoch_sgn_e foreign import ccall "gsl_sf_lnpoch_sgn_e" gsl_sf_lnpoch_sgn_e :: Double -> Double -> Ptr () -> Ptr Double -> CInt+ poch_e :: Double -> Double -> (Double,Double) poch_e a x = createSFR "poch_e" $ gsl_sf_poch_e a x foreign import ccall "gsl_sf_poch_e" gsl_sf_poch_e :: Double -> Double -> Ptr () -> IO CInt+ poch :: Double -> Double -> Double poch = gsl_sf_poch foreign import ccall "gsl_sf_poch" gsl_sf_poch :: Double -> Double -> Double+ pochrel_e :: Double -> Double -> (Double,Double) pochrel_e a x = createSFR "pochrel_e" $ gsl_sf_pochrel_e a x foreign import ccall "gsl_sf_pochrel_e" gsl_sf_pochrel_e :: Double -> Double -> Ptr () -> IO CInt+ pochrel :: Double -> Double -> Double pochrel = gsl_sf_pochrel foreign import ccall "gsl_sf_pochrel" gsl_sf_pochrel :: Double -> Double -> Double+ 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 "gsl_sf_gamma_inc_Q_e" gsl_sf_gamma_inc_Q_e :: Double -> Double -> Ptr () -> IO CInt+ gamma_inc_Q :: Double -> Double -> Double gamma_inc_Q = gsl_sf_gamma_inc_Q foreign import ccall "gsl_sf_gamma_inc_Q" gsl_sf_gamma_inc_Q :: Double -> Double -> Double+ 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 "gsl_sf_gamma_inc_P_e" gsl_sf_gamma_inc_P_e :: Double -> Double -> Ptr () -> IO CInt+ gamma_inc_P :: Double -> Double -> Double gamma_inc_P = gsl_sf_gamma_inc_P foreign import ccall "gsl_sf_gamma_inc_P" gsl_sf_gamma_inc_P :: Double -> Double -> Double+ 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 "gsl_sf_gamma_inc_e" gsl_sf_gamma_inc_e :: Double -> Double -> Ptr () -> IO CInt+ gamma_inc :: Double -> Double -> Double gamma_inc = gsl_sf_gamma_inc foreign import ccall "gsl_sf_gamma_inc" gsl_sf_gamma_inc :: Double -> Double -> Double+ lnbeta_e :: Double -> Double -> (Double,Double) lnbeta_e a b = createSFR "lnbeta_e" $ gsl_sf_lnbeta_e a b foreign import ccall "gsl_sf_lnbeta_e" gsl_sf_lnbeta_e :: Double -> Double -> Ptr () -> IO CInt+ lnbeta :: Double -> Double -> Double lnbeta = gsl_sf_lnbeta foreign import ccall "gsl_sf_lnbeta" gsl_sf_lnbeta :: Double -> Double -> Double+ lnbeta_sgn_e :: Double -> Double -> Ptr () -> Ptr Double -> CInt lnbeta_sgn_e = gsl_sf_lnbeta_sgn_e foreign import ccall "gsl_sf_lnbeta_sgn_e" gsl_sf_lnbeta_sgn_e :: Double -> Double -> Ptr () -> Ptr Double -> CInt+ beta_e :: Double -> Double -> (Double,Double) beta_e a b = createSFR "beta_e" $ gsl_sf_beta_e a b foreign import ccall "gsl_sf_beta_e" gsl_sf_beta_e :: Double -> Double -> Ptr () -> IO CInt+ beta :: Double -> Double -> Double beta = gsl_sf_beta foreign import ccall "gsl_sf_beta" gsl_sf_beta :: Double -> Double -> Double+ 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 "gsl_sf_beta_inc_e" gsl_sf_beta_inc_e :: Double -> Double -> Double -> Ptr () -> IO CInt+ beta_inc :: Double -> Double -> Double -> Double beta_inc = gsl_sf_beta_inc foreign import ccall "gsl_sf_beta_inc" gsl_sf_beta_inc :: Double -> Double -> Double -> Double
lib/Numeric/GSL/Special/Gegenbauer.hs view
@@ -26,30 +26,39 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ 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 "gsl_sf_gegenpoly_1_e" gsl_sf_gegenpoly_1_e :: Double -> Double -> Ptr () -> IO CInt+ 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 "gsl_sf_gegenpoly_2_e" gsl_sf_gegenpoly_2_e :: Double -> Double -> Ptr () -> IO CInt+ 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 "gsl_sf_gegenpoly_3_e" gsl_sf_gegenpoly_3_e :: Double -> Double -> Ptr () -> IO CInt+ gegenpoly_1 :: Double -> Double -> Double gegenpoly_1 = gsl_sf_gegenpoly_1 foreign import ccall "gsl_sf_gegenpoly_1" gsl_sf_gegenpoly_1 :: Double -> Double -> Double+ gegenpoly_2 :: Double -> Double -> Double gegenpoly_2 = gsl_sf_gegenpoly_2 foreign import ccall "gsl_sf_gegenpoly_2" gsl_sf_gegenpoly_2 :: Double -> Double -> Double+ gegenpoly_3 :: Double -> Double -> Double gegenpoly_3 = gsl_sf_gegenpoly_3 foreign import ccall "gsl_sf_gegenpoly_3" gsl_sf_gegenpoly_3 :: Double -> Double -> Double+ gegenpoly_n_e :: CInt -> 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 "gsl_sf_gegenpoly_n_e" gsl_sf_gegenpoly_n_e :: CInt -> Double -> Double -> Ptr () -> IO CInt+ gegenpoly_n :: CInt -> Double -> Double -> Double gegenpoly_n = gsl_sf_gegenpoly_n foreign import ccall "gsl_sf_gegenpoly_n" gsl_sf_gegenpoly_n :: CInt -> Double -> Double -> Double+ gegenpoly_array :: CInt -> Double -> Double -> Ptr Double -> CInt gegenpoly_array = gsl_sf_gegenpoly_array foreign import ccall "gsl_sf_gegenpoly_array" gsl_sf_gegenpoly_array :: CInt -> Double -> Double -> Ptr Double -> CInt
lib/Numeric/GSL/Special/Hyperg.hs view
@@ -40,69 +40,91 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ 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 "gsl_sf_hyperg_0F1_e" gsl_sf_hyperg_0F1_e :: Double -> Double -> Ptr () -> IO CInt+ hyperg_0F1 :: Double -> Double -> Double hyperg_0F1 = gsl_sf_hyperg_0F1 foreign import ccall "gsl_sf_hyperg_0F1" gsl_sf_hyperg_0F1 :: Double -> Double -> Double+ hyperg_1F1_int_e :: CInt -> CInt -> 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 "gsl_sf_hyperg_1F1_int_e" gsl_sf_hyperg_1F1_int_e :: CInt -> CInt -> Double -> Ptr () -> IO CInt+ hyperg_1F1_int :: CInt -> CInt -> Double -> Double hyperg_1F1_int = gsl_sf_hyperg_1F1_int foreign import ccall "gsl_sf_hyperg_1F1_int" gsl_sf_hyperg_1F1_int :: CInt -> CInt -> Double -> Double+ 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 "gsl_sf_hyperg_1F1_e" gsl_sf_hyperg_1F1_e :: Double -> Double -> Double -> Ptr () -> IO CInt+ hyperg_1F1 :: Double -> Double -> Double -> Double hyperg_1F1 = gsl_sf_hyperg_1F1 foreign import ccall "gsl_sf_hyperg_1F1" gsl_sf_hyperg_1F1 :: Double -> Double -> Double -> Double+ hyperg_U_int_e :: CInt -> CInt -> 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 "gsl_sf_hyperg_U_int_e" gsl_sf_hyperg_U_int_e :: CInt -> CInt -> Double -> Ptr () -> IO CInt+ hyperg_U_int :: CInt -> CInt -> Double -> Double hyperg_U_int = gsl_sf_hyperg_U_int foreign import ccall "gsl_sf_hyperg_U_int" gsl_sf_hyperg_U_int :: CInt -> CInt -> Double -> Double+ hyperg_U_int_e10_e :: CInt -> CInt -> 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 "gsl_sf_hyperg_U_int_e10_e" gsl_sf_hyperg_U_int_e10_e :: CInt -> CInt -> Double -> Ptr () -> IO CInt+ 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 "gsl_sf_hyperg_U_e" gsl_sf_hyperg_U_e :: Double -> Double -> Double -> Ptr () -> IO CInt+ hyperg_U :: Double -> Double -> Double -> Double hyperg_U = gsl_sf_hyperg_U foreign import ccall "gsl_sf_hyperg_U" gsl_sf_hyperg_U :: Double -> Double -> Double -> Double+ 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 "gsl_sf_hyperg_U_e10_e" gsl_sf_hyperg_U_e10_e :: Double -> Double -> Double -> Ptr () -> IO CInt+ 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 "gsl_sf_hyperg_2F1_e" gsl_sf_hyperg_2F1_e :: Double -> Double -> Double -> Double -> Ptr () -> IO CInt+ hyperg_2F1 :: Double -> Double -> Double -> Double -> Double hyperg_2F1 = gsl_sf_hyperg_2F1 foreign import ccall "gsl_sf_hyperg_2F1" gsl_sf_hyperg_2F1 :: Double -> Double -> Double -> Double -> Double+ 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 "gsl_sf_hyperg_2F1_conj_e" gsl_sf_hyperg_2F1_conj_e :: Double -> Double -> Double -> Double -> Ptr () -> IO CInt+ hyperg_2F1_conj :: Double -> Double -> Double -> Double -> Double hyperg_2F1_conj = gsl_sf_hyperg_2F1_conj foreign import ccall "gsl_sf_hyperg_2F1_conj" gsl_sf_hyperg_2F1_conj :: Double -> Double -> Double -> Double -> Double+ 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 "gsl_sf_hyperg_2F1_renorm_e" gsl_sf_hyperg_2F1_renorm_e :: Double -> Double -> Double -> Double -> Ptr () -> IO CInt+ hyperg_2F1_renorm :: Double -> Double -> Double -> Double -> Double hyperg_2F1_renorm = gsl_sf_hyperg_2F1_renorm foreign import ccall "gsl_sf_hyperg_2F1_renorm" gsl_sf_hyperg_2F1_renorm :: Double -> Double -> Double -> Double -> Double+ 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 "gsl_sf_hyperg_2F1_conj_renorm_e" gsl_sf_hyperg_2F1_conj_renorm_e :: Double -> Double -> Double -> Double -> Ptr () -> IO CInt+ hyperg_2F1_conj_renorm :: Double -> Double -> Double -> Double -> Double hyperg_2F1_conj_renorm = gsl_sf_hyperg_2F1_conj_renorm foreign import ccall "gsl_sf_hyperg_2F1_conj_renorm" gsl_sf_hyperg_2F1_conj_renorm :: Double -> Double -> Double -> Double -> Double+ 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 "gsl_sf_hyperg_2F0_e" gsl_sf_hyperg_2F0_e :: Double -> Double -> Double -> Ptr () -> IO CInt+ hyperg_2F0 :: Double -> Double -> Double -> Double hyperg_2F0 = gsl_sf_hyperg_2F0 foreign import ccall "gsl_sf_hyperg_2F0" gsl_sf_hyperg_2F0 :: Double -> Double -> Double -> Double
lib/Numeric/GSL/Special/Laguerre.hs view
@@ -26,27 +26,35 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ 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 "gsl_sf_laguerre_1_e" gsl_sf_laguerre_1_e :: Double -> Double -> Ptr () -> IO CInt+ 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 "gsl_sf_laguerre_2_e" gsl_sf_laguerre_2_e :: Double -> Double -> Ptr () -> IO CInt+ 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 "gsl_sf_laguerre_3_e" gsl_sf_laguerre_3_e :: Double -> Double -> Ptr () -> IO CInt+ laguerre_1 :: Double -> Double -> Double laguerre_1 = gsl_sf_laguerre_1 foreign import ccall "gsl_sf_laguerre_1" gsl_sf_laguerre_1 :: Double -> Double -> Double+ laguerre_2 :: Double -> Double -> Double laguerre_2 = gsl_sf_laguerre_2 foreign import ccall "gsl_sf_laguerre_2" gsl_sf_laguerre_2 :: Double -> Double -> Double+ laguerre_3 :: Double -> Double -> Double laguerre_3 = gsl_sf_laguerre_3 foreign import ccall "gsl_sf_laguerre_3" gsl_sf_laguerre_3 :: Double -> Double -> Double+ laguerre_n_e :: CInt -> 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 "gsl_sf_laguerre_n_e" gsl_sf_laguerre_n_e :: CInt -> Double -> Double -> Ptr () -> IO CInt+ laguerre_n :: CInt -> Double -> Double -> Double laguerre_n = gsl_sf_laguerre_n foreign import ccall "gsl_sf_laguerre_n" gsl_sf_laguerre_n :: CInt -> Double -> Double -> Double
lib/Numeric/GSL/Special/Lambert.hs view
@@ -22,15 +22,19 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ lambert_W0_e :: Double -> (Double,Double) lambert_W0_e x = createSFR "lambert_W0_e" $ gsl_sf_lambert_W0_e x foreign import ccall "gsl_sf_lambert_W0_e" gsl_sf_lambert_W0_e :: Double -> Ptr () -> IO CInt+ lambert_W0 :: Double -> Double lambert_W0 = gsl_sf_lambert_W0 foreign import ccall "gsl_sf_lambert_W0" gsl_sf_lambert_W0 :: Double -> Double+ lambert_Wm1_e :: Double -> (Double,Double) lambert_Wm1_e x = createSFR "lambert_Wm1_e" $ gsl_sf_lambert_Wm1_e x foreign import ccall "gsl_sf_lambert_Wm1_e" gsl_sf_lambert_Wm1_e :: Double -> Ptr () -> IO CInt+ lambert_Wm1 :: Double -> Double lambert_Wm1 = gsl_sf_lambert_Wm1 foreign import ccall "gsl_sf_lambert_Wm1" gsl_sf_lambert_Wm1 :: Double -> Double
lib/Numeric/GSL/Special/Legendre.hs view
@@ -55,135 +55,179 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ legendre_Pl_e :: CInt -> Double -> (Double,Double) legendre_Pl_e l x = createSFR "legendre_Pl_e" $ gsl_sf_legendre_Pl_e l x foreign import ccall "gsl_sf_legendre_Pl_e" gsl_sf_legendre_Pl_e :: CInt -> Double -> Ptr () -> IO CInt+ legendre_Pl :: CInt -> Double -> Double legendre_Pl = gsl_sf_legendre_Pl foreign import ccall "gsl_sf_legendre_Pl" gsl_sf_legendre_Pl :: CInt -> Double -> Double+ legendre_Pl_array :: CInt -> Double -> Ptr Double -> CInt legendre_Pl_array = gsl_sf_legendre_Pl_array foreign import ccall "gsl_sf_legendre_Pl_array" gsl_sf_legendre_Pl_array :: CInt -> Double -> Ptr Double -> CInt+ legendre_Pl_deriv_array :: CInt -> Double -> Ptr Double -> Ptr Double -> CInt legendre_Pl_deriv_array = gsl_sf_legendre_Pl_deriv_array foreign import ccall "gsl_sf_legendre_Pl_deriv_array" gsl_sf_legendre_Pl_deriv_array :: CInt -> Double -> Ptr Double -> Ptr Double -> CInt+ legendre_P1_e :: Double -> (Double,Double) legendre_P1_e x = createSFR "legendre_P1_e" $ gsl_sf_legendre_P1_e x foreign import ccall "gsl_sf_legendre_P1_e" gsl_sf_legendre_P1_e :: Double -> Ptr () -> IO CInt+ legendre_P2_e :: Double -> (Double,Double) legendre_P2_e x = createSFR "legendre_P2_e" $ gsl_sf_legendre_P2_e x foreign import ccall "gsl_sf_legendre_P2_e" gsl_sf_legendre_P2_e :: Double -> Ptr () -> IO CInt+ legendre_P3_e :: Double -> (Double,Double) legendre_P3_e x = createSFR "legendre_P3_e" $ gsl_sf_legendre_P3_e x foreign import ccall "gsl_sf_legendre_P3_e" gsl_sf_legendre_P3_e :: Double -> Ptr () -> IO CInt+ legendre_P1 :: Double -> Double legendre_P1 = gsl_sf_legendre_P1 foreign import ccall "gsl_sf_legendre_P1" gsl_sf_legendre_P1 :: Double -> Double+ legendre_P2 :: Double -> Double legendre_P2 = gsl_sf_legendre_P2 foreign import ccall "gsl_sf_legendre_P2" gsl_sf_legendre_P2 :: Double -> Double+ legendre_P3 :: Double -> Double legendre_P3 = gsl_sf_legendre_P3 foreign import ccall "gsl_sf_legendre_P3" gsl_sf_legendre_P3 :: Double -> Double+ legendre_Q0_e :: Double -> (Double,Double) legendre_Q0_e x = createSFR "legendre_Q0_e" $ gsl_sf_legendre_Q0_e x foreign import ccall "gsl_sf_legendre_Q0_e" gsl_sf_legendre_Q0_e :: Double -> Ptr () -> IO CInt+ legendre_Q0 :: Double -> Double legendre_Q0 = gsl_sf_legendre_Q0 foreign import ccall "gsl_sf_legendre_Q0" gsl_sf_legendre_Q0 :: Double -> Double+ legendre_Q1_e :: Double -> (Double,Double) legendre_Q1_e x = createSFR "legendre_Q1_e" $ gsl_sf_legendre_Q1_e x foreign import ccall "gsl_sf_legendre_Q1_e" gsl_sf_legendre_Q1_e :: Double -> Ptr () -> IO CInt+ legendre_Q1 :: Double -> Double legendre_Q1 = gsl_sf_legendre_Q1 foreign import ccall "gsl_sf_legendre_Q1" gsl_sf_legendre_Q1 :: Double -> Double+ legendre_Ql_e :: CInt -> Double -> (Double,Double) legendre_Ql_e l x = createSFR "legendre_Ql_e" $ gsl_sf_legendre_Ql_e l x foreign import ccall "gsl_sf_legendre_Ql_e" gsl_sf_legendre_Ql_e :: CInt -> Double -> Ptr () -> IO CInt+ legendre_Ql :: CInt -> Double -> Double legendre_Ql = gsl_sf_legendre_Ql foreign import ccall "gsl_sf_legendre_Ql" gsl_sf_legendre_Ql :: CInt -> Double -> Double+ legendre_Plm_e :: CInt -> CInt -> Double -> (Double,Double) legendre_Plm_e l m x = createSFR "legendre_Plm_e" $ gsl_sf_legendre_Plm_e l m x foreign import ccall "gsl_sf_legendre_Plm_e" gsl_sf_legendre_Plm_e :: CInt -> CInt -> Double -> Ptr () -> IO CInt+ legendre_Plm :: CInt -> CInt -> Double -> Double legendre_Plm = gsl_sf_legendre_Plm foreign import ccall "gsl_sf_legendre_Plm" gsl_sf_legendre_Plm :: CInt -> CInt -> Double -> Double+ legendre_Plm_array :: CInt -> CInt -> Double -> Ptr Double -> CInt legendre_Plm_array = gsl_sf_legendre_Plm_array foreign import ccall "gsl_sf_legendre_Plm_array" gsl_sf_legendre_Plm_array :: CInt -> CInt -> Double -> Ptr Double -> CInt+ legendre_Plm_deriv_array :: CInt -> CInt -> Double -> Ptr Double -> Ptr Double -> CInt legendre_Plm_deriv_array = gsl_sf_legendre_Plm_deriv_array foreign import ccall "gsl_sf_legendre_Plm_deriv_array" gsl_sf_legendre_Plm_deriv_array :: CInt -> CInt -> Double -> Ptr Double -> Ptr Double -> CInt+ legendre_sphPlm_e :: CInt -> CInt -> Double -> (Double,Double) legendre_sphPlm_e l m x = createSFR "legendre_sphPlm_e" $ gsl_sf_legendre_sphPlm_e l m x foreign import ccall "gsl_sf_legendre_sphPlm_e" gsl_sf_legendre_sphPlm_e :: CInt -> CInt -> Double -> Ptr () -> IO CInt+ legendre_sphPlm :: CInt -> CInt -> Double -> Double legendre_sphPlm = gsl_sf_legendre_sphPlm foreign import ccall "gsl_sf_legendre_sphPlm" gsl_sf_legendre_sphPlm :: CInt -> CInt -> Double -> Double+ legendre_sphPlm_array :: CInt -> CInt -> Double -> Ptr Double -> CInt legendre_sphPlm_array = gsl_sf_legendre_sphPlm_array foreign import ccall "gsl_sf_legendre_sphPlm_array" gsl_sf_legendre_sphPlm_array :: CInt -> CInt -> Double -> Ptr Double -> CInt+ legendre_sphPlm_deriv_array :: CInt -> CInt -> Double -> Ptr Double -> Ptr Double -> CInt legendre_sphPlm_deriv_array = gsl_sf_legendre_sphPlm_deriv_array foreign import ccall "gsl_sf_legendre_sphPlm_deriv_array" gsl_sf_legendre_sphPlm_deriv_array :: CInt -> CInt -> Double -> Ptr Double -> Ptr Double -> CInt+ legendre_array_size :: CInt -> CInt -> CInt legendre_array_size = gsl_sf_legendre_array_size foreign import ccall "gsl_sf_legendre_array_size" gsl_sf_legendre_array_size :: CInt -> CInt -> CInt+ 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 "gsl_sf_conicalP_half_e" gsl_sf_conicalP_half_e :: Double -> Double -> Ptr () -> IO CInt+ conicalP_half :: Double -> Double -> Double conicalP_half = gsl_sf_conicalP_half foreign import ccall "gsl_sf_conicalP_half" gsl_sf_conicalP_half :: Double -> Double -> Double+ 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 "gsl_sf_conicalP_mhalf_e" gsl_sf_conicalP_mhalf_e :: Double -> Double -> Ptr () -> IO CInt+ conicalP_mhalf :: Double -> Double -> Double conicalP_mhalf = gsl_sf_conicalP_mhalf foreign import ccall "gsl_sf_conicalP_mhalf" gsl_sf_conicalP_mhalf :: Double -> Double -> Double+ 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 "gsl_sf_conicalP_0_e" gsl_sf_conicalP_0_e :: Double -> Double -> Ptr () -> IO CInt+ conicalP_0 :: Double -> Double -> Double conicalP_0 = gsl_sf_conicalP_0 foreign import ccall "gsl_sf_conicalP_0" gsl_sf_conicalP_0 :: Double -> Double -> Double+ 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 "gsl_sf_conicalP_1_e" gsl_sf_conicalP_1_e :: Double -> Double -> Ptr () -> IO CInt+ conicalP_1 :: Double -> Double -> Double conicalP_1 = gsl_sf_conicalP_1 foreign import ccall "gsl_sf_conicalP_1" gsl_sf_conicalP_1 :: Double -> Double -> Double+ conicalP_sph_reg_e :: CInt -> 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 "gsl_sf_conicalP_sph_reg_e" gsl_sf_conicalP_sph_reg_e :: CInt -> Double -> Double -> Ptr () -> IO CInt+ conicalP_sph_reg :: CInt -> Double -> Double -> Double conicalP_sph_reg = gsl_sf_conicalP_sph_reg foreign import ccall "gsl_sf_conicalP_sph_reg" gsl_sf_conicalP_sph_reg :: CInt -> Double -> Double -> Double+ conicalP_cyl_reg_e :: CInt -> 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 "gsl_sf_conicalP_cyl_reg_e" gsl_sf_conicalP_cyl_reg_e :: CInt -> Double -> Double -> Ptr () -> IO CInt+ conicalP_cyl_reg :: CInt -> Double -> Double -> Double conicalP_cyl_reg = gsl_sf_conicalP_cyl_reg foreign import ccall "gsl_sf_conicalP_cyl_reg" gsl_sf_conicalP_cyl_reg :: CInt -> Double -> Double -> Double+ 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 "gsl_sf_legendre_H3d_0_e" gsl_sf_legendre_H3d_0_e :: Double -> Double -> Ptr () -> IO CInt+ legendre_H3d_0 :: Double -> Double -> Double legendre_H3d_0 = gsl_sf_legendre_H3d_0 foreign import ccall "gsl_sf_legendre_H3d_0" gsl_sf_legendre_H3d_0 :: Double -> Double -> Double+ 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 "gsl_sf_legendre_H3d_1_e" gsl_sf_legendre_H3d_1_e :: Double -> Double -> Ptr () -> IO CInt+ legendre_H3d_1 :: Double -> Double -> Double legendre_H3d_1 = gsl_sf_legendre_H3d_1 foreign import ccall "gsl_sf_legendre_H3d_1" gsl_sf_legendre_H3d_1 :: Double -> Double -> Double+ legendre_H3d_e :: CInt -> 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 "gsl_sf_legendre_H3d_e" gsl_sf_legendre_H3d_e :: CInt -> Double -> Double -> Ptr () -> IO CInt+ legendre_H3d :: CInt -> Double -> Double -> Double legendre_H3d = gsl_sf_legendre_H3d foreign import ccall "gsl_sf_legendre_H3d" gsl_sf_legendre_H3d :: CInt -> Double -> Double -> Double+ legendre_H3d_array :: CInt -> Double -> Double -> Ptr Double -> CInt legendre_H3d_array = gsl_sf_legendre_H3d_array foreign import ccall "gsl_sf_legendre_H3d_array" gsl_sf_legendre_H3d_array :: CInt -> Double -> Double -> Ptr Double -> CInt
lib/Numeric/GSL/Special/Log.hs view
@@ -26,30 +26,39 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ log_e :: Double -> (Double,Double) log_e x = createSFR "log_e" $ gsl_sf_log_e x foreign import ccall "gsl_sf_log_e" gsl_sf_log_e :: Double -> Ptr () -> IO CInt+ log :: Double -> Double log = gsl_sf_log foreign import ccall "gsl_sf_log" gsl_sf_log :: Double -> Double+ log_abs_e :: Double -> (Double,Double) log_abs_e x = createSFR "log_abs_e" $ gsl_sf_log_abs_e x foreign import ccall "gsl_sf_log_abs_e" gsl_sf_log_abs_e :: Double -> Ptr () -> IO CInt+ log_abs :: Double -> Double log_abs = gsl_sf_log_abs foreign import ccall "gsl_sf_log_abs" gsl_sf_log_abs :: Double -> Double+ complex_log_e :: Double -> Double -> Ptr () -> (Double,Double) complex_log_e zr zi lnr = createSFR "complex_log_e" $ gsl_sf_complex_log_e zr zi lnr foreign import ccall "gsl_sf_complex_log_e" gsl_sf_complex_log_e :: Double -> Double -> Ptr () -> Ptr () -> IO CInt+ log_1plusx_e :: Double -> (Double,Double) log_1plusx_e x = createSFR "log_1plusx_e" $ gsl_sf_log_1plusx_e x foreign import ccall "gsl_sf_log_1plusx_e" gsl_sf_log_1plusx_e :: Double -> Ptr () -> IO CInt+ log_1plusx :: Double -> Double log_1plusx = gsl_sf_log_1plusx foreign import ccall "gsl_sf_log_1plusx" gsl_sf_log_1plusx :: Double -> Double+ 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 "gsl_sf_log_1plusx_mx_e" gsl_sf_log_1plusx_mx_e :: Double -> Ptr () -> IO CInt+ log_1plusx_mx :: Double -> Double log_1plusx_mx = gsl_sf_log_1plusx_mx foreign import ccall "gsl_sf_log_1plusx_mx" gsl_sf_log_1plusx_mx :: Double -> Double
lib/Numeric/GSL/Special/Pow_int.hs view
@@ -20,9 +20,11 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ pow_int_e :: Double -> CInt -> (Double,Double) pow_int_e x n = createSFR "pow_int_e" $ gsl_sf_pow_int_e x n foreign import ccall "gsl_sf_pow_int_e" gsl_sf_pow_int_e :: Double -> CInt -> Ptr () -> IO CInt+ pow_int :: Double -> CInt -> Double pow_int = gsl_sf_pow_int foreign import ccall "gsl_sf_pow_int" gsl_sf_pow_int :: Double -> CInt -> Double
lib/Numeric/GSL/Special/Psi.hs view
@@ -30,42 +30,55 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ psi_int_e :: CInt -> (Double,Double) psi_int_e n = createSFR "psi_int_e" $ gsl_sf_psi_int_e n foreign import ccall "gsl_sf_psi_int_e" gsl_sf_psi_int_e :: CInt -> Ptr () -> IO CInt+ psi_int :: CInt -> Double psi_int = gsl_sf_psi_int foreign import ccall "gsl_sf_psi_int" gsl_sf_psi_int :: CInt -> Double+ psi_e :: Double -> (Double,Double) psi_e x = createSFR "psi_e" $ gsl_sf_psi_e x foreign import ccall "gsl_sf_psi_e" gsl_sf_psi_e :: Double -> Ptr () -> IO CInt+ psi :: Double -> Double psi = gsl_sf_psi foreign import ccall "gsl_sf_psi" gsl_sf_psi :: Double -> Double+ psi_1piy_e :: Double -> (Double,Double) psi_1piy_e y = createSFR "psi_1piy_e" $ gsl_sf_psi_1piy_e y foreign import ccall "gsl_sf_psi_1piy_e" gsl_sf_psi_1piy_e :: Double -> Ptr () -> IO CInt+ psi_1piy :: Double -> Double psi_1piy = gsl_sf_psi_1piy foreign import ccall "gsl_sf_psi_1piy" gsl_sf_psi_1piy :: Double -> Double+ complex_psi_e :: Double -> Double -> Ptr () -> (Double,Double) complex_psi_e x y result_re = createSFR "complex_psi_e" $ gsl_sf_complex_psi_e x y result_re foreign import ccall "gsl_sf_complex_psi_e" gsl_sf_complex_psi_e :: Double -> Double -> Ptr () -> Ptr () -> IO CInt+ psi_1_int_e :: CInt -> (Double,Double) psi_1_int_e n = createSFR "psi_1_int_e" $ gsl_sf_psi_1_int_e n foreign import ccall "gsl_sf_psi_1_int_e" gsl_sf_psi_1_int_e :: CInt -> Ptr () -> IO CInt+ psi_1_int :: CInt -> Double psi_1_int = gsl_sf_psi_1_int foreign import ccall "gsl_sf_psi_1_int" gsl_sf_psi_1_int :: CInt -> Double+ psi_1_e :: Double -> (Double,Double) psi_1_e x = createSFR "psi_1_e" $ gsl_sf_psi_1_e x foreign import ccall "gsl_sf_psi_1_e" gsl_sf_psi_1_e :: Double -> Ptr () -> IO CInt+ psi_1 :: Double -> Double psi_1 = gsl_sf_psi_1 foreign import ccall "gsl_sf_psi_1" gsl_sf_psi_1 :: Double -> Double+ psi_n_e :: CInt -> Double -> (Double,Double) psi_n_e n x = createSFR "psi_n_e" $ gsl_sf_psi_n_e n x foreign import ccall "gsl_sf_psi_n_e" gsl_sf_psi_n_e :: CInt -> Double -> Ptr () -> IO CInt+ psi_n :: CInt -> Double -> Double psi_n = gsl_sf_psi_n foreign import ccall "gsl_sf_psi_n" gsl_sf_psi_n :: CInt -> Double -> Double
lib/Numeric/GSL/Special/Synchrotron.hs view
@@ -22,15 +22,19 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ synchrotron_1_e :: Double -> (Double,Double) synchrotron_1_e x = createSFR "synchrotron_1_e" $ gsl_sf_synchrotron_1_e x foreign import ccall "gsl_sf_synchrotron_1_e" gsl_sf_synchrotron_1_e :: Double -> Ptr () -> IO CInt+ synchrotron_1 :: Double -> Double synchrotron_1 = gsl_sf_synchrotron_1 foreign import ccall "gsl_sf_synchrotron_1" gsl_sf_synchrotron_1 :: Double -> Double+ synchrotron_2_e :: Double -> (Double,Double) synchrotron_2_e x = createSFR "synchrotron_2_e" $ gsl_sf_synchrotron_2_e x foreign import ccall "gsl_sf_synchrotron_2_e" gsl_sf_synchrotron_2_e :: Double -> Ptr () -> IO CInt+ synchrotron_2 :: Double -> Double synchrotron_2 = gsl_sf_synchrotron_2 foreign import ccall "gsl_sf_synchrotron_2" gsl_sf_synchrotron_2 :: Double -> Double
lib/Numeric/GSL/Special/Transport.hs view
@@ -26,27 +26,35 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ transport_2_e :: Double -> (Double,Double) transport_2_e x = createSFR "transport_2_e" $ gsl_sf_transport_2_e x foreign import ccall "gsl_sf_transport_2_e" gsl_sf_transport_2_e :: Double -> Ptr () -> IO CInt+ transport_2 :: Double -> Double transport_2 = gsl_sf_transport_2 foreign import ccall "gsl_sf_transport_2" gsl_sf_transport_2 :: Double -> Double+ transport_3_e :: Double -> (Double,Double) transport_3_e x = createSFR "transport_3_e" $ gsl_sf_transport_3_e x foreign import ccall "gsl_sf_transport_3_e" gsl_sf_transport_3_e :: Double -> Ptr () -> IO CInt+ transport_3 :: Double -> Double transport_3 = gsl_sf_transport_3 foreign import ccall "gsl_sf_transport_3" gsl_sf_transport_3 :: Double -> Double+ transport_4_e :: Double -> (Double,Double) transport_4_e x = createSFR "transport_4_e" $ gsl_sf_transport_4_e x foreign import ccall "gsl_sf_transport_4_e" gsl_sf_transport_4_e :: Double -> Ptr () -> IO CInt+ transport_4 :: Double -> Double transport_4 = gsl_sf_transport_4 foreign import ccall "gsl_sf_transport_4" gsl_sf_transport_4 :: Double -> Double+ transport_5_e :: Double -> (Double,Double) transport_5_e x = createSFR "transport_5_e" $ gsl_sf_transport_5_e x foreign import ccall "gsl_sf_transport_5_e" gsl_sf_transport_5_e :: Double -> Ptr () -> IO CInt+ transport_5 :: Double -> Double transport_5 = gsl_sf_transport_5 foreign import ccall "gsl_sf_transport_5" gsl_sf_transport_5 :: Double -> Double
lib/Numeric/GSL/Special/Trig.hs view
@@ -36,78 +36,103 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ sin_e :: Double -> (Double,Double) sin_e x = createSFR "sin_e" $ gsl_sf_sin_e x foreign import ccall "gsl_sf_sin_e" gsl_sf_sin_e :: Double -> Ptr () -> IO CInt+ sin :: Double -> Double sin = gsl_sf_sin foreign import ccall "gsl_sf_sin" gsl_sf_sin :: Double -> Double+ cos_e :: Double -> (Double,Double) cos_e x = createSFR "cos_e" $ gsl_sf_cos_e x foreign import ccall "gsl_sf_cos_e" gsl_sf_cos_e :: Double -> Ptr () -> IO CInt+ cos :: Double -> Double cos = gsl_sf_cos foreign import ccall "gsl_sf_cos" gsl_sf_cos :: Double -> Double+ hypot_e :: Double -> Double -> (Double,Double) hypot_e x y = createSFR "hypot_e" $ gsl_sf_hypot_e x y foreign import ccall "gsl_sf_hypot_e" gsl_sf_hypot_e :: Double -> Double -> Ptr () -> IO CInt+ hypot :: Double -> Double -> Double hypot = gsl_sf_hypot foreign import ccall "gsl_sf_hypot" gsl_sf_hypot :: Double -> Double -> Double+ complex_sin_e :: Double -> Double -> Ptr () -> (Double,Double) complex_sin_e zr zi szr = createSFR "complex_sin_e" $ gsl_sf_complex_sin_e zr zi szr foreign import ccall "gsl_sf_complex_sin_e" gsl_sf_complex_sin_e :: Double -> Double -> Ptr () -> Ptr () -> IO CInt+ complex_cos_e :: Double -> Double -> Ptr () -> (Double,Double) complex_cos_e zr zi czr = createSFR "complex_cos_e" $ gsl_sf_complex_cos_e zr zi czr foreign import ccall "gsl_sf_complex_cos_e" gsl_sf_complex_cos_e :: Double -> Double -> Ptr () -> Ptr () -> IO CInt+ complex_logsin_e :: Double -> Double -> Ptr () -> (Double,Double) complex_logsin_e zr zi lszr = createSFR "complex_logsin_e" $ gsl_sf_complex_logsin_e zr zi lszr foreign import ccall "gsl_sf_complex_logsin_e" gsl_sf_complex_logsin_e :: Double -> Double -> Ptr () -> Ptr () -> IO CInt+ sinc_e :: Double -> (Double,Double) sinc_e x = createSFR "sinc_e" $ gsl_sf_sinc_e x foreign import ccall "gsl_sf_sinc_e" gsl_sf_sinc_e :: Double -> Ptr () -> IO CInt+ sinc :: Double -> Double sinc = gsl_sf_sinc foreign import ccall "gsl_sf_sinc" gsl_sf_sinc :: Double -> Double+ lnsinh_e :: Double -> (Double,Double) lnsinh_e x = createSFR "lnsinh_e" $ gsl_sf_lnsinh_e x foreign import ccall "gsl_sf_lnsinh_e" gsl_sf_lnsinh_e :: Double -> Ptr () -> IO CInt+ lnsinh :: Double -> Double lnsinh = gsl_sf_lnsinh foreign import ccall "gsl_sf_lnsinh" gsl_sf_lnsinh :: Double -> Double+ lncosh_e :: Double -> (Double,Double) lncosh_e x = createSFR "lncosh_e" $ gsl_sf_lncosh_e x foreign import ccall "gsl_sf_lncosh_e" gsl_sf_lncosh_e :: Double -> Ptr () -> IO CInt+ lncosh :: Double -> Double lncosh = gsl_sf_lncosh foreign import ccall "gsl_sf_lncosh" gsl_sf_lncosh :: Double -> Double+ polar_to_rect :: Double -> Double -> Ptr () -> (Double,Double) polar_to_rect r theta x = createSFR "polar_to_rect" $ gsl_sf_polar_to_rect r theta x foreign import ccall "gsl_sf_polar_to_rect" gsl_sf_polar_to_rect :: Double -> Double -> Ptr () -> Ptr () -> IO CInt+ rect_to_polar :: Double -> Double -> Ptr () -> (Double,Double) rect_to_polar x y r = createSFR "rect_to_polar" $ gsl_sf_rect_to_polar x y r foreign import ccall "gsl_sf_rect_to_polar" gsl_sf_rect_to_polar :: Double -> Double -> Ptr () -> Ptr () -> IO CInt+ 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 "gsl_sf_sin_err_e" gsl_sf_sin_err_e :: Double -> Double -> Ptr () -> IO CInt+ 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 "gsl_sf_cos_err_e" gsl_sf_cos_err_e :: Double -> Double -> Ptr () -> IO CInt+ angle_restrict_symm_e :: Ptr Double -> CInt angle_restrict_symm_e = gsl_sf_angle_restrict_symm_e foreign import ccall "gsl_sf_angle_restrict_symm_e" gsl_sf_angle_restrict_symm_e :: Ptr Double -> CInt+ angle_restrict_symm :: Double -> Double angle_restrict_symm = gsl_sf_angle_restrict_symm foreign import ccall "gsl_sf_angle_restrict_symm" gsl_sf_angle_restrict_symm :: Double -> Double+ angle_restrict_pos_e :: Ptr Double -> CInt angle_restrict_pos_e = gsl_sf_angle_restrict_pos_e foreign import ccall "gsl_sf_angle_restrict_pos_e" gsl_sf_angle_restrict_pos_e :: Ptr Double -> CInt+ angle_restrict_pos :: Double -> Double angle_restrict_pos = gsl_sf_angle_restrict_pos foreign import ccall "gsl_sf_angle_restrict_pos" gsl_sf_angle_restrict_pos :: Double -> Double+ 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 "gsl_sf_angle_restrict_symm_err_e" gsl_sf_angle_restrict_symm_err_e :: Double -> Ptr () -> IO CInt+ 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 "gsl_sf_angle_restrict_pos_err_e" gsl_sf_angle_restrict_pos_err_e :: Double -> Ptr () -> IO CInt
lib/Numeric/GSL/Special/Zeta.hs view
@@ -32,45 +32,59 @@ import Foreign(Ptr) import Foreign.C.Types(CInt) import Numeric.GSL.Special.Internal+ zeta_int_e :: CInt -> (Double,Double) zeta_int_e n = createSFR "zeta_int_e" $ gsl_sf_zeta_int_e n foreign import ccall "gsl_sf_zeta_int_e" gsl_sf_zeta_int_e :: CInt -> Ptr () -> IO CInt+ zeta_int :: CInt -> Double zeta_int = gsl_sf_zeta_int foreign import ccall "gsl_sf_zeta_int" gsl_sf_zeta_int :: CInt -> Double+ zeta_e :: Double -> (Double,Double) zeta_e s = createSFR "zeta_e" $ gsl_sf_zeta_e s foreign import ccall "gsl_sf_zeta_e" gsl_sf_zeta_e :: Double -> Ptr () -> IO CInt+ zeta :: Double -> Double zeta = gsl_sf_zeta foreign import ccall "gsl_sf_zeta" gsl_sf_zeta :: Double -> Double+ zetam1_e :: Double -> (Double,Double) zetam1_e s = createSFR "zetam1_e" $ gsl_sf_zetam1_e s foreign import ccall "gsl_sf_zetam1_e" gsl_sf_zetam1_e :: Double -> Ptr () -> IO CInt+ zetam1 :: Double -> Double zetam1 = gsl_sf_zetam1 foreign import ccall "gsl_sf_zetam1" gsl_sf_zetam1 :: Double -> Double+ zetam1_int_e :: CInt -> (Double,Double) zetam1_int_e s = createSFR "zetam1_int_e" $ gsl_sf_zetam1_int_e s foreign import ccall "gsl_sf_zetam1_int_e" gsl_sf_zetam1_int_e :: CInt -> Ptr () -> IO CInt+ zetam1_int :: CInt -> Double zetam1_int = gsl_sf_zetam1_int foreign import ccall "gsl_sf_zetam1_int" gsl_sf_zetam1_int :: CInt -> Double+ hzeta_e :: Double -> Double -> (Double,Double) hzeta_e s q = createSFR "hzeta_e" $ gsl_sf_hzeta_e s q foreign import ccall "gsl_sf_hzeta_e" gsl_sf_hzeta_e :: Double -> Double -> Ptr () -> IO CInt+ hzeta :: Double -> Double -> Double hzeta = gsl_sf_hzeta foreign import ccall "gsl_sf_hzeta" gsl_sf_hzeta :: Double -> Double -> Double+ eta_int_e :: CInt -> (Double,Double) eta_int_e n = createSFR "eta_int_e" $ gsl_sf_eta_int_e n foreign import ccall "gsl_sf_eta_int_e" gsl_sf_eta_int_e :: CInt -> Ptr () -> IO CInt+ eta_int :: CInt -> Double eta_int = gsl_sf_eta_int foreign import ccall "gsl_sf_eta_int" gsl_sf_eta_int :: CInt -> Double+ eta_e :: Double -> (Double,Double) eta_e s = createSFR "eta_e" $ gsl_sf_eta_e s foreign import ccall "gsl_sf_eta_e" gsl_sf_eta_e :: Double -> Ptr () -> IO CInt+ eta :: Double -> Double eta = gsl_sf_eta foreign import ccall "gsl_sf_eta" gsl_sf_eta :: Double -> Double
lib/Numeric/GSL/Special/auto.hs view
@@ -198,10 +198,10 @@ showHa (t,a) = showHt t  showFull hc h@(Header t n args) = -- "\n-- | wrapper for "++showC h-                                  --   ++"\n--\n--   "++google n ++"\n"+                                  --   ++"\n--\n--   "++google n ++"\n"++                                   -- ++ "\n" ++-                                  boiler h ++ "\n" ++-                                  showH hc h+                                  "\n" ++ boiler h ++ +                                  "\n" ++ showH hc h  fixmd1 = rep ("Gsl_mode_t","Precision") fixmd2 = rep ("mode"," (precCode mode)")
lib/Numeric/GSL/Vector.hs view
@@ -17,10 +17,12 @@     FunCodeS(..), toScalarR,     FunCodeV(..), vectorMapR, vectorMapC,     FunCodeSV(..), vectorMapValR, vectorMapValC,-    FunCodeVV(..), vectorZipR, vectorZipC+    FunCodeVV(..), vectorZipR, vectorZipC,+    RandDist(..), randomVector ) where  import Data.Packed.Internal.Common+import Data.Packed.Internal.Signatures import Data.Packed.Internal.Vector  import Complex@@ -145,3 +147,21 @@ vectorZipC = vectorZipAux c_vectorZipC  foreign import ccall safe "gsl-aux.h zipC" c_vectorZipC :: CInt -> TCVCVCV++-----------------------------------------------------------------------++data RandDist = Uniform  -- ^ uniform distribution in [0,1)+              | Gaussian -- ^ normal distribution with mean zero and standard deviation one+              deriving Enum++-- | Obtains a vector of pseudorandom elements from the the mt19937 generator in GSL, with a given seed. Use randomIO to get a random seed.+randomVector :: Int      -- ^ seed+             -> RandDist -- ^ distribution+             -> Int      -- ^ vector size+             -> Vector Double+randomVector seed dist n = unsafePerformIO $ do+    r <- createVector n+    app1 (c_random_vector (fi seed) ((fi.fromEnum) dist)) vec r "randomVector"+    return r++foreign import ccall safe "random_vector" c_random_vector :: CInt -> CInt -> TV
lib/Numeric/GSL/gsl-aux.c view
@@ -20,6 +20,8 @@ #include <gsl/gsl_multimin.h> #include <gsl/gsl_multiroots.h> #include <gsl/gsl_complex_math.h>+#include <gsl/gsl_rng.h>+#include <gsl/gsl_randist.h> #include <string.h> #include <stdio.h> @@ -777,3 +779,21 @@     gsl_multiroot_fdfsolver_free(s);     OK }++//////////////////////////////////////////////////////++#define RAN(C,F) case C: { for(k=0;k<rn;k++) { rp[k]= F(gen); }; OK }++int random_vector(int seed, int code, RVEC(r)) {+    DEBUGMSG("random_vector")+    static gsl_rng * gen = NULL;+    if (!gen) { gen = gsl_rng_alloc (gsl_rng_mt19937);}+    gsl_rng_set (gen, seed);+    int k;+    switch (code) {+        RAN(0,gsl_rng_uniform)+        RAN(1,gsl_ran_ugaussian)+        default: ERROR(BAD_CODE);+    }+}+#undef RAN
lib/Numeric/LinearAlgebra.hs view
@@ -16,12 +16,14 @@ ----------------------------------------------------------------------------- module Numeric.LinearAlgebra (     module Data.Packed,+    module Data.Packed.Random,     module Numeric.LinearAlgebra.Linear,     module Numeric.LinearAlgebra.Algorithms,     module Numeric.LinearAlgebra.Interface ) where  import Data.Packed+import Data.Packed.Random import Numeric.LinearAlgebra.Linear import Numeric.LinearAlgebra.Algorithms import Numeric.LinearAlgebra.Instances()
lib/Numeric/LinearAlgebra/Algorithms.hs view
@@ -62,7 +62,9 @@ -- * Util     haussholder,     unpackQR, unpackHess,-    pinvTol+    pinvTol,+    rankSVD,+    nullspaceSVD ) where  @@ -248,18 +250,28 @@ economy :: Element t          => (Matrix t -> (Matrix t, Vector Double, Matrix t)) -> Matrix t -> (Matrix t, Vector Double, Matrix t) economy svdFun m = (u', subVector 0 d s, v') where-    (u,s,v) = svdFun m-    sl@(g:_) = toList s-    s' = fromList . filter (>tol) $ sl-    t = 1-    tol = (fromIntegral (max r c) * g * t * eps)-    r = rows m-    c = cols m-    d = dim s'+    r@(u,s,v) = svdFun m+    d = rankSVD (1*eps) m r  `max` 1     u' = takeColumns d u     v' = takeColumns d v  +-- | Numeric rank of a matrix from the SVD decomposition.+rankSVD :: Element t+        => Double   -- ^ numeric zero (e.g. 1*'eps')+        -> Matrix t -- ^ input matrix m+        -> (Matrix t, Vector Double, Matrix t) -- ^ 'svd' of m+        -> Int      -- ^ rank of m+rankSVD teps m (_,s,_) = k where+    sl@(g:_) = toList s+    r = rows m+    c = cols m+    tol = fromIntegral (max r c) * g * teps+    s' = fromList . filter (>tol) $ sl+    k = if g > teps+        then dim s'+             else 0+ -- | The machine precision of a Double: @eps = 2.22044604925031e-16@ (the value used by GNU-Octave). eps :: Double eps =  2.22044604925031e-16@@ -298,8 +310,8 @@ --pnormRV _ = error "pnormRV not yet defined"  pnormCV PNorm2 = norm2 . asReal-pnormCV PNorm1 = norm1 . liftVector magnitude-pnormCV Infinity = vectorMax . liftVector magnitude+pnormCV PNorm1 = norm1 . mapVector magnitude+pnormCV Infinity = vectorMax . mapVector magnitude --pnormCV _ = error "pnormCV not yet defined"  pnormRM PNorm2 m = head (toList s) where (_,s,_) = svdR m@@ -308,8 +320,8 @@ --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 PNorm1 m = vectorMax $ constant 1 (rows m) `vXm` liftMatrix (mapVector magnitude) m+pnormCM Infinity m = vectorMax $ liftMatrix (mapVector magnitude) m `mXv` constant 1 (cols m) --pnormCM _ _ = error "p norm not yet defined"  -- | Objects which have a p-norm.@@ -336,18 +348,36 @@ -----------------------------------------------------------------------  -- | The nullspace of a matrix from its SVD decomposition.+nullspaceSVD :: Field t+             => Either Double Int -- ^ Left \"numeric\" zero (eg. 1*'eps'),+                                  --   or Right \"theoretical\" matrix rank.+             -> Matrix t          -- ^ input matrix m+             -> (Matrix t, Vector Double, Matrix t) -- ^ 'svd' of m+             -> [Vector t]        -- ^ list of unitary vectors spanning the nullspace+nullspaceSVD hint a z@(_,_,v) = vs where+    r = rows a+    c = cols a+    tol = case hint of+        Left t -> t+        _      -> eps+    k = case hint of+        Right t -> t+        _       -> rankSVD tol a z+    nsol = c - k+    vs = drop k (toColumns v)+++-- | The nullspace of a matrix. See also 'nullspaceSVD'. nullspacePrec :: Field 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' $ toRows $ ctrans v+    r@(_,_,v) = svd m+    k = rankSVD (t*eps) m r+    ns = drop k $ toRows $ ctrans v --- | The nullspace of a matrix, assumed to be one-dimensional, with default tolerance (shortcut for @last . nullspacePrec 1@).+-- | The nullspace of a matrix, assumed to be one-dimensional, with default tolerance 1*'eps'. nullVector :: Field t => Matrix t -> Vector t nullVector = last . nullspacePrec 1 @@ -436,8 +466,7 @@  -- | Number of linearly independent rows or columns. rank :: Field t => Matrix t -> Int-rank m | pnorm PNorm1 m < eps = 0-       | otherwise = dim s where (_,s,_) = economy svd m+rank m = rankSVD eps m (svd m)  {- expm' m = case diagonalize (complex m) of@@ -460,7 +489,7 @@ -- matFunc :: Field t => (Complex Double -> Complex Double) -> Matrix t -> Matrix (Complex Double) matFunc f m = case diagonalize (complex m) of-    Just (l,v) -> v `mXm` diag (liftVector f l) `mXm` inv v+    Just (l,v) -> v `mXm` diag (mapVector f l) `mXm` inv v     Nothing -> error "Sorry, matFunc requires a diagonalizable matrix"   --------------------------------------------------------------
lib/Numeric/LinearAlgebra/Instances.hs view
@@ -27,6 +27,7 @@ import Foreign(Storable) import Data.Monoid import Data.Packed.Internal.Vector+import Control.Parallel.Strategies  ------------------------------------------------------------------ @@ -196,3 +197,10 @@         where j [] = mempty               j l  = join l +---------------------------------------------------------------++instance (NFData a, Storable a) => NFData (Vector a) where+    rnf = rnf . (@>0)++instance (NFData a, Element a) => NFData (Matrix a) where+    rnf = rnf . flatten
lib/Numeric/LinearAlgebra/Linear.hs view
@@ -55,7 +55,7 @@     sub = vectorZipC Sub     mul = vectorZipC Mul     divide = vectorZipC Div-    equal u v = dim u == dim v && vectorMax (liftVector magnitude (sub u v)) == 0.0+    equal u v = dim u == dim v && vectorMax (mapVector magnitude (sub u v)) == 0.0  instance (Linear Vector a, Container Matrix a) => (Linear Matrix a) where     scale x = liftMatrix (scale x)
lib/Numeric/LinearAlgebra/Tests.hs view
@@ -131,6 +131,20 @@  --------------------------------------------------------------------- +randomTestGaussian = c :~1~: snd (meanCov dat) where+    a = (3><3) [1,2,3,+                2,4,0,+               -2,2,1]+    m = 3 |> [1,2,3]+    c = a <> trans a+    dat = gaussianSample 7 (10^6) m c++randomTestUniform = c :~1~: snd (meanCov dat) where+    c = diag $ 3 |> map ((/12).(^2)) [1,2,3]+    dat = uniformSample 7 (10^6) [(0,1),(1,3),(3,6)]++---------------------------------------------------------------------+ rot :: Double -> Matrix Double rot a = (3><3) [ c,0,s                , 0,1,0@@ -227,6 +241,8 @@         , utest "polySolve" (polySolveProp [1,2,3,4])         , minimizationTest         , rootFindingTest+        , utest "randomGaussian" randomTestGaussian+        , utest "randomUniform" randomTestUniform         ]     return ()