mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 12:46:00 +08:00
Temporary workaround for bug #875:
Let TriangularView<Sparse>::nonZeros() return nonZeros() of the nested expression
This commit is contained in:
parent
79225db0b6
commit
bd2d330b25
@ -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();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user