diff options
author | Gael Guennebaud <g.gael@free.fr> | 2015-04-01 22:27:34 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2015-04-01 22:27:34 +0200 |
commit | 3105986e7125b659385ace69b95c1a38464cb157 (patch) | |
tree | 1fec25755668dc345bd01a0ece6ff88d9f5989a7 /Eigen/src/SparseCore/SparseCwiseUnaryOp.h | |
parent | 39dcd01b0ac8556d1d46d5d897bdefa82cf5d91c (diff) |
bug #875: remove broken SparseMatrixBase::nonZeros and introduce a nonZerosEstimate() method to sparse evaluators for internal uses.
Factorize some code in SparseCompressedBase.
Diffstat (limited to 'Eigen/src/SparseCore/SparseCwiseUnaryOp.h')
-rw-r--r-- | Eigen/src/SparseCore/SparseCwiseUnaryOp.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Eigen/src/SparseCore/SparseCwiseUnaryOp.h b/Eigen/src/SparseCore/SparseCwiseUnaryOp.h index 63d8f329c..d484be876 100644 --- a/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +++ b/Eigen/src/SparseCore/SparseCwiseUnaryOp.h @@ -30,6 +30,10 @@ struct unary_evaluator<CwiseUnaryOp<UnaryOp,ArgType>, IteratorBased> }; explicit unary_evaluator(const XprType& op) : m_functor(op.functor()), m_argImpl(op.nestedExpression()) {} + + inline Index nonZerosEstimate() const { + return m_argImpl.nonZerosEstimate(); + } protected: typedef typename evaluator<ArgType>::InnerIterator EvalIterator; |