aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-08-03 17:20:45 +0200
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-08-03 17:20:45 +0200
commit523cdedf58a95c02c73ede59fe9d22c5799a9df5 (patch)
tree1b065691c6d0521480ebd0acc8f207c8630895ec /test
parent912da9fade7a02086747d086e0634cab0d6ff4b6 (diff)
make the dot product linear in the second variable, not the first variable
Diffstat (limited to 'test')
-rw-r--r--test/adjoint.cpp4
-rw-r--r--test/submatrices.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/test/adjoint.cpp b/test/adjoint.cpp
index 47e1bd740..300650338 100644
--- a/test/adjoint.cpp
+++ b/test/adjoint.cpp
@@ -65,8 +65,8 @@ template<typename MatrixType> void adjoint(const MatrixType& m)
// check basic properties of dot, norm, norm2
typedef typename NumTraits<Scalar>::Real RealScalar;
- VERIFY(ei_isApprox((s1 * v1 + s2 * v2).dot(v3), s1 * v1.dot(v3) + s2 * v2.dot(v3), largerEps));
- VERIFY(ei_isApprox(v3.dot(s1 * v1 + s2 * v2), ei_conj(s1)*v3.dot(v1)+ei_conj(s2)*v3.dot(v2), largerEps));
+ VERIFY(ei_isApprox((s1 * v1 + s2 * v2).dot(v3), ei_conj(s1) * v1.dot(v3) + ei_conj(s2) * v2.dot(v3), largerEps));
+ VERIFY(ei_isApprox(v3.dot(s1 * v1 + s2 * v2), s1*v3.dot(v1)+s2*v3.dot(v2), largerEps));
VERIFY_IS_APPROX(ei_conj(v1.dot(v2)), v2.dot(v1));
VERIFY_IS_APPROX(ei_abs(v1.dot(v1)), v1.squaredNorm());
if(NumTraits<Scalar>::HasFloatingPoint)
diff --git a/test/submatrices.cpp b/test/submatrices.cpp
index a9b9ff9a8..d876f9593 100644
--- a/test/submatrices.cpp
+++ b/test/submatrices.cpp
@@ -86,7 +86,7 @@ template<typename MatrixType> void submatrices(const MatrixType& m)
//check row() and col()
VERIFY_IS_APPROX(m1.col(c1).transpose(), m1.transpose().row(c1));
- VERIFY_IS_APPROX(square.row(r1).dot(m1.col(c1)), (square.lazy() * m1.conjugate())(r1,c1));
+ VERIFY_IS_APPROX(m1.col(c1).dot(square.row(r1)), (square.lazy() * m1.conjugate())(r1,c1));
//check operator(), both constant and non-constant, on row() and col()
m1.row(r1) += s1 * m1.row(r2);
m1.col(c1) += s1 * m1.col(c2);