Temporary workaround for bug #875:

Let TriangularView<Sparse>::nonZeros() return nonZeros() of the nested expression
This commit is contained in:
Christoph Hertzberg 2014-10-28 13:31:00 +01:00
parent 79225db0b6
commit bd2d330b25

View File

@ -50,6 +50,13 @@ protected:
template<typename OtherDerived> void solveInPlace(MatrixBase<OtherDerived>& other) const;
template<typename OtherDerived> void solveInPlace(SparseMatrixBase<OtherDerived>& other) const;
inline Index nonZeros() const {
// FIXME HACK number of nonZeros is required for product logic
// this returns only an upper bound (but should be OK for most purposes)
return derived().nestedExpression().nonZeros();
}
};