backporting fix of #65

This commit is contained in:
Gael Guennebaud 2009-10-29 14:26:00 +01:00
parent de693cf34a
commit 5455d6fbe8

View File

@ -165,7 +165,7 @@ template<typename Derived> class MatrixBase
inline int size() const { return rows() * cols(); }
/** \returns the number of nonzero coefficients which is in practice the number
* of stored coefficients. */
inline int nonZeros() const { return derived.nonZeros(); }
inline int nonZeros() const { return size(); }
/** \returns true if either the number of rows or the number of columns is equal to 1.
* In other words, this function returns
* \code rows()==1 || cols()==1 \endcode