diff options
author | Gael Guennebaud <g.gael@free.fr> | 2010-01-04 19:13:08 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2010-01-04 19:13:08 +0100 |
commit | 71a171c267df54118cda01d845d42f3d3d465de3 (patch) | |
tree | 9432398656cee78e36fde1841cf7453af18dae2f /test | |
parent | b6898996d4107b5823fc0fdaa22bfe0811716863 (diff) |
s/asMatrix()/matrix()
Diffstat (limited to 'test')
-rw-r--r-- | test/array.cpp | 12 | ||||
-rw-r--r-- | test/geo_quaternion.cpp | 2 | ||||
-rw-r--r-- | test/nomalloc.cpp | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/test/array.cpp b/test/array.cpp index 0284d550d..0d54cf9d9 100644 --- a/test/array.cpp +++ b/test/array.cpp @@ -51,14 +51,14 @@ template<typename MatrixType> void array(const MatrixType& m) // scalar addition VERIFY_IS_APPROX(m1.array() + s1, s1 + m1.array()); - VERIFY_IS_APPROX((m1.array() + s1).asMatrix(), MatrixType::Constant(rows,cols,s1) + m1); - VERIFY_IS_APPROX(((m1*Scalar(2)).array() - s2).asMatrix(), (m1+m1) - MatrixType::Constant(rows,cols,s2) ); + VERIFY_IS_APPROX((m1.array() + s1).matrix(), MatrixType::Constant(rows,cols,s1) + m1); + VERIFY_IS_APPROX(((m1*Scalar(2)).array() - s2).matrix(), (m1+m1) - MatrixType::Constant(rows,cols,s2) ); m3 = m1; m3.array() += s2; - VERIFY_IS_APPROX(m3, (m1.array() + s2).asMatrix()); + VERIFY_IS_APPROX(m3, (m1.array() + s2).matrix()); m3 = m1; m3.array() -= s1; - VERIFY_IS_APPROX(m3, (m1.array() - s1).asMatrix()); + VERIFY_IS_APPROX(m3, (m1.array() - s1).matrix()); // reductions VERIFY_IS_APPROX(m1.colwise().sum().sum(), m1.sum()); @@ -130,8 +130,8 @@ template<typename MatrixType> void comparisons(const MatrixType& m) // count VERIFY(((m1.array().abs()+1)>RealScalar(0.1)).count() == rows*cols); // TODO allows colwise/rowwise for array - VERIFY_IS_APPROX(((m1.array().abs()+1)>RealScalar(0.1)).asMatrix().colwise().count(), RowVectorXi::Constant(cols,rows)); - VERIFY_IS_APPROX(((m1.array().abs()+1)>RealScalar(0.1)).asMatrix().rowwise().count(), VectorXi::Constant(rows, cols)); + VERIFY_IS_APPROX(((m1.array().abs()+1)>RealScalar(0.1)).matrix().colwise().count(), RowVectorXi::Constant(cols,rows)); + VERIFY_IS_APPROX(((m1.array().abs()+1)>RealScalar(0.1)).matrix().rowwise().count(), VectorXi::Constant(rows, cols)); } template<typename VectorType> void lpNorm(const VectorType& v) diff --git a/test/geo_quaternion.cpp b/test/geo_quaternion.cpp index a73ff19ec..052c01fbf 100644 --- a/test/geo_quaternion.cpp +++ b/test/geo_quaternion.cpp @@ -95,7 +95,7 @@ template<typename Scalar> void quaternion(void) VERIFY_IS_APPROX(-v1.normalized(),(q2.setFromTwoVectors(v1,-v1)*v1).normalized()); if (ei_is_same_type<Scalar,double>::ret) { - v3 = (v1.array()+eps).asMatrix(); + v3 = (v1.array()+eps).matrix(); VERIFY_IS_APPROX( v3.normalized(),(q2.setFromTwoVectors(v1, v3)*v1).normalized()); VERIFY_IS_APPROX(-v3.normalized(),(q2.setFromTwoVectors(v1,-v3)*v1).normalized()); } diff --git a/test/nomalloc.cpp b/test/nomalloc.cpp index 0452de78d..53732abe6 100644 --- a/test/nomalloc.cpp +++ b/test/nomalloc.cpp @@ -64,7 +64,7 @@ template<typename MatrixType> void nomalloc(const MatrixType& m) VERIFY_IS_APPROX((m1+m2)*s1, s1*m1+s1*m2); VERIFY_IS_APPROX((m1+m2)(r,c), (m1(r,c))+(m2(r,c))); - VERIFY_IS_APPROX(m1.cwiseProduct(m1.block(0,0,rows,cols)), (m1.array()*m1.array()).asMatrix()); + VERIFY_IS_APPROX(m1.cwiseProduct(m1.block(0,0,rows,cols)), (m1.array()*m1.array()).matrix()); if (MatrixType::RowsAtCompileTime<EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD) { // If the matrices are too large, we have better to use the optimized GEMM // routines which allocates temporaries. However, on some platforms |