diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2008-06-24 15:13:00 +0000 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2008-06-24 15:13:00 +0000 |
commit | 3b94436d2fc7d8f6716b056ed544acecf256c4fe (patch) | |
tree | 0736b130a5ea62a21be73a58a6eba1f90dd025b7 /test | |
parent | c9560df4a0c274eb5011f0596682a3cf3274363e (diff) |
* vectorize dot product, copying code from sum.
* make the conj functor vectorizable: it is just identity in real case,
and complex doesn't use the vectorized path anyway.
* fix bug in Block: a 3x1 block in a 4x4 matrix (all fixed-size)
should not be vectorizable, since in fixed-size we are assuming
the size to be a multiple of packet size. (Or would you prefer
Vector3d to be flagged "packetaccess" even though no packet access
is possible on vectors of that type?)
* rename:
isOrtho for vectors ---> isOrthogonal
isOrtho for matrices ---> isUnitary
* add normalize()
* reimplement normalized with quotient1 functor
Diffstat (limited to 'test')
-rw-r--r-- | test/adjoint.cpp | 3 | ||||
-rw-r--r-- | test/cwiseop.cpp | 7 | ||||
-rw-r--r-- | test/geometry.cpp | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/test/adjoint.cpp b/test/adjoint.cpp index 9a15c4986..cfcf1f0a5 100644 --- a/test/adjoint.cpp +++ b/test/adjoint.cpp @@ -56,9 +56,6 @@ template<typename MatrixType> void adjoint(const MatrixType& m) VERIFY_IS_APPROX(m1.adjoint().conjugate().transpose(), m1); // check multiplicative behavior - std::cout << (m1.adjoint() * m2).adjoint() << std::endl; - std::cout << "------------------------------" << std::endl; - std::cout << m2.adjoint() * m1 << std::endl; VERIFY_IS_APPROX((m1.adjoint() * m2).adjoint(), m2.adjoint() * m1); VERIFY_IS_APPROX((s1 * m1).adjoint(), ei_conj(s1) * m1.adjoint()); diff --git a/test/cwiseop.cpp b/test/cwiseop.cpp index 43308a8b7..8f7ce9953 100644 --- a/test/cwiseop.cpp +++ b/test/cwiseop.cpp @@ -59,7 +59,12 @@ template<typename MatrixType> void cwiseops(const MatrixType& m) VERIFY_IS_APPROX( mzero, m1-m1); VERIFY_IS_APPROX( m2, m1+m2-m1); - VERIFY_IS_APPROX( mones, m2.cwiseQuotient(m2)); +#ifdef EIGEN_VECTORIZE + if(NumTraits<Scalar>::HasFloatingPoint) +#endif + { + VERIFY_IS_APPROX( mones, m2.cwiseQuotient(m2)); + } VERIFY_IS_APPROX( m1.cwiseProduct(m2), m2.cwiseProduct(m1)); VERIFY( m1.cwiseLessThan(m1.cwise(bind2nd(plus<Scalar>(), Scalar(1)))).all() ); diff --git a/test/geometry.cpp b/test/geometry.cpp index bf3268745..fd20c137f 100644 --- a/test/geometry.cpp +++ b/test/geometry.cpp @@ -86,7 +86,7 @@ template<typename Scalar> void geometry(void) m << v0.normalized(), (v0.cross(v1)).normalized(), (v0.cross(v1).cross(v0)).normalized(); - VERIFY(m.isOrtho()); + VERIFY(m.isUnitary()); // AngleAxis VERIFY_IS_APPROX(AngleAxis(a,v1.normalized()).toRotationMatrix(), |