diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h index 940eabd92..09a44f811 100644 --- a/Eigen/src/Core/DenseBase.h +++ b/Eigen/src/Core/DenseBase.h @@ -204,11 +204,6 @@ template class DenseBase typedef typename internal::conditional::XprKind,MatrixXpr >::value, PlainMatrix, PlainArray>::type PlainObject; - /** \returns the number of nonzero coefficients which is in practice the number - * of stored coefficients. */ - EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR - inline Index nonZeros() const { return size(); } - /** \returns the outer size. * * \note For a vector, this returns just 1. For a matrix (non-vector), this is the major dimension diff --git a/unsupported/test/kronecker_product.cpp b/unsupported/test/kronecker_product.cpp index b5b764c65..3bac01db4 100644 --- a/unsupported/test/kronecker_product.cpp +++ b/unsupported/test/kronecker_product.cpp @@ -29,7 +29,7 @@ void check_kronecker_product(const MatrixType& ab) { VERIFY_IS_EQUAL(ab.rows(), 6); VERIFY_IS_EQUAL(ab.cols(), 6); - VERIFY_IS_EQUAL(ab.nonZeros(), 36); + VERIFY_IS_EQUAL(ab.size(), 36); VERIFY_IS_APPROX(ab.coeff(0,0), -0.4017367630386106); VERIFY_IS_APPROX(ab.coeff(0,1), 0.1056863433932735); VERIFY_IS_APPROX(ab.coeff(0,2), -0.7255206194554212);