From f1690fb9faf6331f12f1a6465ba124ff6e1ad187 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 23 Nov 2010 19:19:04 +0100 Subject: fix bug #122 : rank 2 update test and scalar multiple extraction were both wrong --- test/product_selfadjoint.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/product_selfadjoint.cpp') 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 void product_selfadjoint(const MatrixType& m) m2 = m1.template triangularView(); m2.template selfadjointView().rankUpdate(-v1,s2*v2,s3); - VERIFY_IS_APPROX(m2, (m1 + (-s2*s3) * (v1 * v2.adjoint()+ v2 * v1.adjoint())).template triangularView().toDenseMatrix()); + VERIFY_IS_APPROX(m2, (m1 + (s3*(-v1)*(s2*v2).adjoint()+internal::conj(s3)*(s2*v2)*(-v1).adjoint())).template triangularView().toDenseMatrix()); m2 = m1.template triangularView(); - m2.template selfadjointView().rankUpdate(-r1.adjoint(),r2.adjoint()*s3,s1); - VERIFY_IS_APPROX(m2, (m1 + (-s3*s1) * (r1.adjoint() * r2 + r2.adjoint() * r1)).template triangularView().toDenseMatrix()); + m2.template selfadjointView().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().toDenseMatrix()); if (rows>1) { -- cgit v1.2.3