diff options
author | Alberto Ruiz <aruiz@um.es> | 2007-06-22 17:33:17 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2007-06-22 17:33:17 +0000 |
commit | 978e6d038239af50d70bae2c303f4e45b1879b7a (patch) | |
tree | 571b2060f388d0693820f808b40089acb100a5d9 /examples/tests.hs | |
parent | 989bdf7e88c13500bd1986dcde36f6cc4f467efb (diff) |
refactoring
Diffstat (limited to 'examples/tests.hs')
-rw-r--r-- | examples/tests.hs | 6 |
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 | ||
193 | eigTestC prod (SqM m) = (m <> v) |~~| (v <> diag s) | 193 | eigTestC 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 | ||
198 | eigTestR prod (SqM m) = (liftMatrix comp m <> v) |~~| (v <> diag s) | 198 | eigTestR 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 | ||
275 | arit1 u = vectorMapValR PowVS 2 (vectorMapR Sin u) | 275 | arit1 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 | ||
279 | arit2 u = (vectorMapR Cos u) `mul` (vectorMapR Tan u) | 279 | arit2 u = (vectorMapR Cos u) `mul` (vectorMapR Tan u) |
280 | ~|~ vectorMapR Sin u | 280 | ~|~ vectorMapR Sin u |