diff options
author | Gael Guennebaud <g.gael@free.fr> | 2010-11-23 19:19:04 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2010-11-23 19:19:04 +0100 |
commit | f1690fb9faf6331f12f1a6465ba124ff6e1ad187 (patch) | |
tree | bf5f2e0c6ee153933ae1165df757d30ba9955e3b /test/product_selfadjoint.cpp | |
parent | 0ab9a0a2f7e30e58051ed211ad8388cb274cc13d (diff) |
fix bug #122 : rank 2 update test and scalar multiple extraction were both wrong
Diffstat (limited to 'test/product_selfadjoint.cpp')
-rw-r--r-- | test/product_selfadjoint.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/product_selfadjoint.cpp b/test/product_selfadjoint.cpp index 2e1fc7ec0..ca84969eb 100644 --- a/test/product_selfadjoint.cpp +++ b/test/product_selfadjoint.cpp @@ -60,11 +60,11 @@ template<typename MatrixType> void product_selfadjoint(const MatrixType& m) m2 = m1.template triangularView<Upper>(); m2.template selfadjointView<Upper>().rankUpdate(-v1,s2*v2,s3); - VERIFY_IS_APPROX(m2, (m1 + (-s2*s3) * (v1 * v2.adjoint()+ v2 * v1.adjoint())).template triangularView<Upper>().toDenseMatrix()); + VERIFY_IS_APPROX(m2, (m1 + (s3*(-v1)*(s2*v2).adjoint()+internal::conj(s3)*(s2*v2)*(-v1).adjoint())).template triangularView<Upper>().toDenseMatrix()); m2 = m1.template triangularView<Upper>(); - m2.template selfadjointView<Upper>().rankUpdate(-r1.adjoint(),r2.adjoint()*s3,s1); - VERIFY_IS_APPROX(m2, (m1 + (-s3*s1) * (r1.adjoint() * r2 + r2.adjoint() * r1)).template triangularView<Upper>().toDenseMatrix()); + m2.template selfadjointView<Upper>().rankUpdate(-s2*r1.adjoint(),r2.adjoint()*s3,s1); + VERIFY_IS_APPROX(m2, (m1 + s1*(-s2*r1.adjoint())*(r2.adjoint()*s3).adjoint() + internal::conj(s1)*(r2.adjoint()*s3) * (-s2*r1.adjoint()).adjoint()).template triangularView<Upper>().toDenseMatrix()); if (rows>1) { |