mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Temporary workaround for bug #875:
Let TriangularView<Sparse>::nonZeros() return nonZeros() of the nested expression
This commit is contained in:
@@ -50,6 +50,13 @@ protected:
|
|||||||
|
|
||||||
template<typename OtherDerived> void solveInPlace(MatrixBase<OtherDerived>& other) const;
|
template<typename OtherDerived> void solveInPlace(MatrixBase<OtherDerived>& other) const;
|
||||||
template<typename OtherDerived> void solveInPlace(SparseMatrixBase<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();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user