mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 11:19:02 +08:00
Remove DenseBase::nonZeros() which just calls DenseBase::size()
Fixes #2382.
This commit is contained in:
parent
96e537d6fd
commit
08da52eb85
@ -204,11 +204,6 @@ template<typename Derived> class DenseBase
|
|||||||
typedef typename internal::conditional<internal::is_same<typename internal::traits<Derived>::XprKind,MatrixXpr >::value,
|
typedef typename internal::conditional<internal::is_same<typename internal::traits<Derived>::XprKind,MatrixXpr >::value,
|
||||||
PlainMatrix, PlainArray>::type PlainObject;
|
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.
|
/** \returns the outer size.
|
||||||
*
|
*
|
||||||
* \note For a vector, this returns just 1. For a matrix (non-vector), this is the major dimension
|
* \note For a vector, this returns just 1. For a matrix (non-vector), this is the major dimension
|
||||||
|
@ -29,7 +29,7 @@ void check_kronecker_product(const MatrixType& ab)
|
|||||||
{
|
{
|
||||||
VERIFY_IS_EQUAL(ab.rows(), 6);
|
VERIFY_IS_EQUAL(ab.rows(), 6);
|
||||||
VERIFY_IS_EQUAL(ab.cols(), 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,0), -0.4017367630386106);
|
||||||
VERIFY_IS_APPROX(ab.coeff(0,1), 0.1056863433932735);
|
VERIFY_IS_APPROX(ab.coeff(0,1), 0.1056863433932735);
|
||||||
VERIFY_IS_APPROX(ab.coeff(0,2), -0.7255206194554212);
|
VERIFY_IS_APPROX(ab.coeff(0,2), -0.7255206194554212);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user