diff options
author | Alberto Ruiz <aruiz@um.es> | 2008-11-04 09:32:35 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2008-11-04 09:32:35 +0000 |
commit | 02805ad64715373347b34bac2f75cbb866563ba2 (patch) | |
tree | 4eeb137ce0232d57ce98c0a0ced8fffe7baf7f99 /lib/Numeric/LinearAlgebra/Tests/Properties.hs | |
parent | 86c7aed1de8efe5988f994867d35addb6b62a655 (diff) |
multiply/trans ok
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 |