summaryrefslogtreecommitdiff
path: root/lib/Numeric
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Numeric')
-rw-r--r--lib/Numeric/LinearAlgebra.hs3
-rw-r--r--lib/Numeric/LinearAlgebra/Algorithms.hs6
-rw-r--r--lib/Numeric/LinearAlgebra/Interface.hs4
-rw-r--r--lib/Numeric/LinearAlgebra/LAPACK.hs5
-rw-r--r--lib/Numeric/LinearAlgebra/Linear.hs4
-rw-r--r--lib/Numeric/LinearAlgebra/Tests.hs6
6 files changed, 17 insertions, 11 deletions
diff --git a/lib/Numeric/LinearAlgebra.hs b/lib/Numeric/LinearAlgebra.hs
index 2652f2d..7664a9f 100644
--- a/lib/Numeric/LinearAlgebra.hs
+++ b/lib/Numeric/LinearAlgebra.hs
@@ -14,13 +14,10 @@ This module reexports all normally required functions for Linear Algebra applica
14----------------------------------------------------------------------------- 14-----------------------------------------------------------------------------
15module Numeric.LinearAlgebra ( 15module Numeric.LinearAlgebra (
16 module Data.Packed, 16 module Data.Packed,
17 module Data.Packed.Random,
18 module Numeric.LinearAlgebra.Algorithms, 17 module Numeric.LinearAlgebra.Algorithms,
19 module Numeric.LinearAlgebra.Interface 18 module Numeric.LinearAlgebra.Interface
20) where 19) where
21 20
22import Data.Packed 21import Data.Packed
23import Data.Packed.Random
24import Numeric.LinearAlgebra.Algorithms 22import Numeric.LinearAlgebra.Algorithms
25import Numeric.LinearAlgebra.Instances()
26import Numeric.LinearAlgebra.Interface 23import Numeric.LinearAlgebra.Interface
diff --git a/lib/Numeric/LinearAlgebra/Algorithms.hs b/lib/Numeric/LinearAlgebra/Algorithms.hs
index 7de9587..55398e0 100644
--- a/lib/Numeric/LinearAlgebra/Algorithms.hs
+++ b/lib/Numeric/LinearAlgebra/Algorithms.hs
@@ -76,8 +76,10 @@ module Numeric.LinearAlgebra.Algorithms (
76) where 76) where
77 77
78 78
79import Data.Packed.Internal hiding (fromComplex, toComplex, conj, (//)) 79import Data.Packed.Internal hiding ((//))
80import Data.Packed 80import Data.Packed.Vector
81import Data.Packed.Matrix
82import Data.Complex
81import Numeric.GSL.Vector 83import Numeric.GSL.Vector
82import Numeric.LinearAlgebra.LAPACK as LAPACK 84import Numeric.LinearAlgebra.LAPACK as LAPACK
83import Numeric.LinearAlgebra.Linear 85import Numeric.LinearAlgebra.Linear
diff --git a/lib/Numeric/LinearAlgebra/Interface.hs b/lib/Numeric/LinearAlgebra/Interface.hs
index 750670b..30547d9 100644
--- a/lib/Numeric/LinearAlgebra/Interface.hs
+++ b/lib/Numeric/LinearAlgebra/Interface.hs
@@ -9,9 +9,7 @@ Maintainer : Alberto Ruiz (aruiz at um dot es)
9Stability : provisional 9Stability : provisional
10Portability : portable 10Portability : portable
11 11
12Operators for frequent operations. 12Some useful operators, and Show, Read, Eq, Num, Fractional, and Floating instances for Vector and Matrix.
13
14This module exports Show, Read, Eq, Num, Fractional, and Floating instances for Vector and Matrix.
15 13
16In the context of the standard numeric operators, one-component vectors and matrices automatically expand to match the dimensions of the other operand. 14In the context of the standard numeric operators, one-component vectors and matrices automatically expand to match the dimensions of the other operand.
17 15
diff --git a/lib/Numeric/LinearAlgebra/LAPACK.hs b/lib/Numeric/LinearAlgebra/LAPACK.hs
index f5af8be..7f057ba 100644
--- a/lib/Numeric/LinearAlgebra/LAPACK.hs
+++ b/lib/Numeric/LinearAlgebra/LAPACK.hs
@@ -41,8 +41,9 @@ module Numeric.LinearAlgebra.LAPACK (
41 schurR, schurC 41 schurR, schurC
42) where 42) where
43 43
44import Data.Packed.Internal hiding (toComplex) 44import Data.Packed.Internal
45import Data.Packed 45import Data.Packed.Matrix
46import Data.Complex
46import Numeric.GSL.Vector(vectorMapValR, FunCodeSV(Scale)) 47import Numeric.GSL.Vector(vectorMapValR, FunCodeSV(Scale))
47import Foreign 48import Foreign
48import Foreign.C.Types (CInt) 49import Foreign.C.Types (CInt)
diff --git a/lib/Numeric/LinearAlgebra/Linear.hs b/lib/Numeric/LinearAlgebra/Linear.hs
index 2568410..c802712 100644
--- a/lib/Numeric/LinearAlgebra/Linear.hs
+++ b/lib/Numeric/LinearAlgebra/Linear.hs
@@ -18,7 +18,9 @@ module Numeric.LinearAlgebra.Linear (
18 Linear(..) 18 Linear(..)
19) where 19) where
20 20
21import Data.Packed 21import Data.Packed.Vector
22import Data.Packed.Matrix
23import Data.Complex
22import Numeric.GSL.Vector 24import Numeric.GSL.Vector
23 25
24-- | Basic element-by-element functions. 26-- | Basic element-by-element functions.
diff --git a/lib/Numeric/LinearAlgebra/Tests.hs b/lib/Numeric/LinearAlgebra/Tests.hs
index ac26466..65b0e4c 100644
--- a/lib/Numeric/LinearAlgebra/Tests.hs
+++ b/lib/Numeric/LinearAlgebra/Tests.hs
@@ -78,6 +78,11 @@ volSphere r = 8 * quad2 (\x y -> sqrt (r*r-x*x-y*y))
78 78
79--------------------------------------------------------------------- 79---------------------------------------------------------------------
80 80
81derivTest = abs (d (\x-> x * d (\y-> x+y) 1) 1 - 1) < 1E-10
82 where d f x = fst $ derivCentral 0.01 f x
83
84---------------------------------------------------------------------
85
81-- besselTest = utest "bessel_J0_e" ( abs (r-expected) < e ) 86-- besselTest = utest "bessel_J0_e" ( abs (r-expected) < e )
82-- where (r,e) = bessel_J0_e 5.0 87-- where (r,e) = bessel_J0_e 5.0
83-- expected = -0.17759677131433830434739701 88-- expected = -0.17759677131433830434739701
@@ -319,6 +324,7 @@ runTests n = do
319-- , utest "gamma" (gamma 5 == 24.0) 324-- , utest "gamma" (gamma 5 == 24.0)
320-- , besselTest 325-- , besselTest
321-- , exponentialTest 326-- , exponentialTest
327 , utest "deriv" derivTest
322 , utest "integrate" (abs (volSphere 2.5 - 4/3*pi*2.5^3) < 1E-8) 328 , utest "integrate" (abs (volSphere 2.5 - 4/3*pi*2.5^3) < 1E-8)
323 , utest "polySolve" (polySolveProp [1,2,3,4]) 329 , utest "polySolve" (polySolveProp [1,2,3,4])
324 , minimizationTest 330 , minimizationTest