diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-08-03 17:20:45 +0200 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-08-03 17:20:45 +0200 |
commit | 523cdedf58a95c02c73ede59fe9d22c5799a9df5 (patch) | |
tree | 1b065691c6d0521480ebd0acc8f207c8630895ec /test/adjoint.cpp | |
parent | 912da9fade7a02086747d086e0634cab0d6ff4b6 (diff) |
make the dot product linear in the second variable, not the first variable
Diffstat (limited to 'test/adjoint.cpp')
-rw-r--r-- | test/adjoint.cpp | 4 |
1 files changed, 2 insertions, 2 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) |