summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra/Tests/Properties.hs
diff options
context:
space:
mode:
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