diff options
Diffstat (limited to 'lib/Numeric/LinearAlgebra/Tests/Properties.hs')
-rw-r--r-- | lib/Numeric/LinearAlgebra/Tests/Properties.hs | 4 |
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 | |||
152 | expmDiagProp m = expm (logm m) :~ 7 ~: complex m | 152 | expmDiagProp m = expm (logm m) :~ 7 ~: complex m |
153 | where logm = matFunc log | 153 | where logm = matFunc log |
154 | 154 | ||
155 | -- reference multiply | ||
156 | mulH a b = fromLists [[ doth ai bj | bj <- toColumns b] | ai <- toRows a ] | ||
157 | where doth u v = sum $ zipWith (*) (toList u) (toList v) | ||
158 | |||
155 | multProp1 (a,b) = a <> b |~| mulH a b | 159 | multProp1 (a,b) = a <> b |~| mulH a b |
156 | 160 | ||
157 | multProp2 (a,b) = ctrans (a <> b) |~| ctrans b <> ctrans a | 161 | multProp2 (a,b) = ctrans (a <> b) |~| ctrans b <> ctrans a |