From 522022ebfc254dad454a18f6d305a582e66b2485 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Wed, 25 Nov 2009 08:31:25 -0500 Subject: [PATCH] wow, restore Gael's changeset 5455d6fbe8d889f100b1526d046da16b375fc451 that I had accidentally undone in my changeset c64ca6870ea3f76b5ea5182bba1e62fd5a632f89 . --- Eigen/src/Core/MatrixBase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index f88d5939f..fd1b74735 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -159,7 +159,7 @@ template 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