summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra/Tests/Properties.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2008-02-27 10:57:29 +0000
committerAlberto Ruiz <aruiz@um.es>2008-02-27 10:57:29 +0000
commit2c99bcb1de3fae6e2e075316126cc70658e20ac9 (patch)
treec80dfb5933b88efb3cd3d913240a690fc59ae0c3 /lib/Numeric/LinearAlgebra/Tests/Properties.hs
parent500f5fca244dadab494655aa73d7183df1c87c50 (diff)
tests reorganized
Diffstat (limited to 'lib/Numeric/LinearAlgebra/Tests/Properties.hs')
-rw-r--r--lib/Numeric/LinearAlgebra/Tests/Properties.hs34
1 files changed, 28 insertions, 6 deletions
diff --git a/lib/Numeric/LinearAlgebra/Tests/Properties.hs b/lib/Numeric/LinearAlgebra/Tests/Properties.hs
index 0317469..0563e62 100644
--- a/lib/Numeric/LinearAlgebra/Tests/Properties.hs
+++ b/lib/Numeric/LinearAlgebra/Tests/Properties.hs
@@ -9,13 +9,33 @@ Maintainer : Alberto Ruiz (aruiz at um dot es)
9Stability : provisional 9Stability : provisional
10Portability : portable 10Portability : portable
11 11
12Arbitrary instances for vectors, matrices. 12Testing properties.
13 13
14-} 14-}
15 15
16module Numeric.LinearAlgebra.Tests.Properties 16module Numeric.LinearAlgebra.Tests.Properties (
17 17 dist, (|~|), (~:), Aprox((:~)),
18where 18 zeros, ones,
19 square,
20 unitary,
21 hermitian,
22 wellCond,
23 positiveDefinite,
24 upperTriang,
25 upperHessenberg,
26 luProp,
27 invProp,
28 pinvProp,
29 detProp,
30 nullspaceProp,
31 svdProp1, svdProp2,
32 eigProp, eigSHProp,
33 qrProp,
34 hessProp,
35 schurProp1, schurProp2,
36 cholProp,
37 expmDiagProp
38) where
19 39
20import Numeric.LinearAlgebra 40import Numeric.LinearAlgebra
21import Numeric.LinearAlgebra.Tests.Instances(Sq(..),Her(..),Rot(..)) 41import Numeric.LinearAlgebra.Tests.Instances(Sq(..),Her(..),Rot(..))
@@ -50,8 +70,6 @@ unitary m = square m && m <> ctrans m |~| ident (rows m)
50 70
51hermitian m = square m && m |~| ctrans m 71hermitian m = square m && m |~| ctrans m
52 72
53degenerate m = rank m < min (rows m) (cols m)
54
55wellCond m = rcond m > 1/100 73wellCond m = rcond m > 1/100
56 74
57positiveDefinite m = minimum (toList e) > 0 75positiveDefinite m = minimum (toList e) > 0
@@ -125,3 +143,7 @@ schurProp2 m = m |~| u <> s <> ctrans u && unitary u && upperHessenberg s -- fix
125cholProp m = m |~| ctrans c <> c && upperTriang c 143cholProp m = m |~| ctrans c <> c && upperTriang c
126 where c = chol m 144 where c = chol m
127 pos = positiveDefinite m 145 pos = positiveDefinite m
146
147expmDiagProp m = expm (logm m) |~| complex m
148 where logm m = matFunc log m
149