summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra/Tests/Properties.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2008-11-04 09:32:35 +0000
committerAlberto Ruiz <aruiz@um.es>2008-11-04 09:32:35 +0000
commit02805ad64715373347b34bac2f75cbb866563ba2 (patch)
tree4eeb137ce0232d57ce98c0a0ced8fffe7baf7f99 /lib/Numeric/LinearAlgebra/Tests/Properties.hs
parent86c7aed1de8efe5988f994867d35addb6b62a655 (diff)
multiply/trans ok
Diffstat (limited to 'lib/Numeric/LinearAlgebra/Tests/Properties.hs')
-rw-r--r--lib/Numeric/LinearAlgebra/Tests/Properties.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Numeric/LinearAlgebra/Tests/Properties.hs b/lib/Numeric/LinearAlgebra/Tests/Properties.hs
index 45b03a2..ec87ad0 100644
--- a/lib/Numeric/LinearAlgebra/Tests/Properties.hs
+++ b/lib/Numeric/LinearAlgebra/Tests/Properties.hs
@@ -152,6 +152,10 @@ cholProp m = m |~| ctrans c <> c && upperTriang c
152expmDiagProp m = expm (logm m) :~ 7 ~: complex m 152expmDiagProp m = expm (logm m) :~ 7 ~: complex m
153 where logm = matFunc log 153 where logm = matFunc log
154 154
155-- reference multiply
156mulH a b = fromLists [[ doth ai bj | bj <- toColumns b] | ai <- toRows a ]
157 where doth u v = sum $ zipWith (*) (toList u) (toList v)
158
155multProp1 (a,b) = a <> b |~| mulH a b 159multProp1 (a,b) = a <> b |~| mulH a b
156 160
157multProp2 (a,b) = ctrans (a <> b) |~| ctrans b <> ctrans a 161multProp2 (a,b) = ctrans (a <> b) |~| ctrans b <> ctrans a