summaryrefslogtreecommitdiff
path: root/examples/tests.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2007-06-22 17:33:17 +0000
committerAlberto Ruiz <aruiz@um.es>2007-06-22 17:33:17 +0000
commit978e6d038239af50d70bae2c303f4e45b1879b7a (patch)
tree571b2060f388d0693820f808b40089acb100a5d9 /examples/tests.hs
parent989bdf7e88c13500bd1986dcde36f6cc4f467efb (diff)
refactoring
Diffstat (limited to 'examples/tests.hs')
-rw-r--r--examples/tests.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/tests.hs b/examples/tests.hs
index 4adc104..37800cd 100644
--- a/examples/tests.hs
+++ b/examples/tests.hs
@@ -191,12 +191,12 @@ svdTestC prod m = u <> s' <> (trans v) |~~| m
191 s' = liftMatrix comp s 191 s' = liftMatrix comp s
192 192
193eigTestC prod (SqM m) = (m <> v) |~~| (v <> diag s) 193eigTestC prod (SqM m) = (m <> v) |~~| (v <> diag s)
194 && takeDiag ((liftMatrix conj (trans v)) <> v) ~~ constant (rows m) 1 --normalized 194 && takeDiag ((liftMatrix conj (trans v)) <> v) ~~ constant 1 (rows m) --normalized
195 where (s,v) = eigC m 195 where (s,v) = eigC m
196 (<>) = prod 196 (<>) = prod
197 197
198eigTestR prod (SqM m) = (liftMatrix comp m <> v) |~~| (v <> diag s) 198eigTestR prod (SqM m) = (liftMatrix comp m <> v) |~~| (v <> diag s)
199 -- && takeDiag ((liftMatrix conj (trans v)) <> v) ~~ constant (rows m) 1 --normalized ??? 199 -- && takeDiag ((liftMatrix conj (trans v)) <> v) ~~ constant 1 (rows m) --normalized ???
200 where (s,v) = eigR m 200 where (s,v) = eigR m
201 (<>) = prod 201 (<>) = prod
202 202
@@ -274,7 +274,7 @@ integrateTest = assertBool "integrate" (abs (volSphere 2.5 - 4/3*pi*2.5^3) < eps
274 274
275arit1 u = vectorMapValR PowVS 2 (vectorMapR Sin u) 275arit1 u = vectorMapValR PowVS 2 (vectorMapR Sin u)
276 `add` vectorMapValR PowVS 2 (vectorMapR Cos u) 276 `add` vectorMapValR PowVS 2 (vectorMapR Cos u)
277 ~|~ constant (dim u) 1 277 ~|~ constant 1 (dim u)
278 278
279arit2 u = (vectorMapR Cos u) `mul` (vectorMapR Tan u) 279arit2 u = (vectorMapR Cos u) `mul` (vectorMapR Tan u)
280 ~|~ vectorMapR Sin u 280 ~|~ vectorMapR Sin u