summaryrefslogtreecommitdiff
path: root/packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2015-07-21 11:11:49 +0200
committerAlberto Ruiz <aruiz@um.es>2015-07-21 11:11:49 +0200
commit792864d3ec95d198a751591256c302aed11d8392 (patch)
tree4e030abf4458d4038586f740d1c95c83eb32354c /packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs
parent39f2bbe937ccbf786af0a326e7aa065890ee331e (diff)
change names: Herm, unSym, mTm, and rnf instances
Diffstat (limited to 'packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs')
-rw-r--r--packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs13
1 files changed, 6 insertions, 7 deletions
diff --git a/packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs b/packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs
index 4704989..3d5441d 100644
--- a/packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs
+++ b/packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs
@@ -81,8 +81,7 @@ instance (Field a, Arbitrary a) => Arbitrary (Rot a) where
81 81
82 82
83-- a complex hermitian or real symmetric matrix 83-- a complex hermitian or real symmetric matrix
84--newtype (Her a) = Her (Matrix a) deriving Show 84instance (Field a, Arbitrary a, Num (Vector a)) => Arbitrary (Herm a) where
85instance (Field a, Arbitrary a, Num (Vector a)) => Arbitrary (Her a) where
86 arbitrary = do 85 arbitrary = do
87 Sq m <- arbitrary 86 Sq m <- arbitrary
88 let m' = m/2 87 let m' = m/2
@@ -127,7 +126,7 @@ instance (Numeric a, ArbitraryField a, Num (Vector a))
127 arbitrary = do 126 arbitrary = do
128 m <- arbitrary 127 m <- arbitrary
129 let (_,v) = eigSH m 128 let (_,v) = eigSH m
130 n = rows (her m) 129 n = rows (unSym m)
131 l <- replicateM n (choose (0,100)) 130 l <- replicateM n (choose (0,100))
132 let s = diag (fromList l) 131 let s = diag (fromList l)
133 p = v <> real s <> tr v 132 p = v <> real s <> tr v
@@ -161,8 +160,8 @@ fM m = m :: FM
161zM m = m :: ZM 160zM m = m :: ZM
162 161
163 162
164rHer m = her m :: RM 163rHer m = unSym m :: RM
165cHer m = her m :: CM 164cHer m = unSym m :: CM
166 165
167rRot (Rot m) = m :: RM 166rRot (Rot m) = m :: RM
168cRot (Rot m) = m :: CM 167cRot (Rot m) = m :: CM
@@ -176,8 +175,8 @@ cWC (WC m) = m :: CM
176rSqWC (SqWC m) = m :: RM 175rSqWC (SqWC m) = m :: RM
177cSqWC (SqWC m) = m :: CM 176cSqWC (SqWC m) = m :: CM
178 177
179rSymWC (SqWC m) = sym m :: Her R 178rSymWC (SqWC m) = sym m :: Herm R
180cSymWC (SqWC m) = sym m :: Her C 179cSymWC (SqWC m) = sym m :: Herm C
181 180
182rPosDef (PosDef m) = m :: RM 181rPosDef (PosDef m) = m :: RM
183cPosDef (PosDef m) = m :: CM 182cPosDef (PosDef m) = m :: CM