mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Implement nonZeros() for Transpose<sparse>
This commit is contained in:
@@ -61,6 +61,17 @@ template<typename MatrixType> class TransposeImpl<MatrixType,Sparse>::ReverseInn
|
||||
|
||||
#else // EIGEN_TEST_EVALUATORS
|
||||
|
||||
// Implement nonZeros() for transpose. I'm not sure that's the best approach for that.
|
||||
// Perhaps it should be implemented in Transpose<> itself.
|
||||
template<typename MatrixType> class TransposeImpl<MatrixType,Sparse>
|
||||
: public SparseMatrixBase<Transpose<MatrixType> >
|
||||
{
|
||||
protected:
|
||||
typedef SparseMatrixBase<Transpose<MatrixType> > Base;
|
||||
public:
|
||||
inline typename MatrixType::Index nonZeros() const { return Base::derived().nestedExpression().nonZeros(); }
|
||||
};
|
||||
|
||||
namespace internal {
|
||||
|
||||
template<typename ArgType>
|
||||
|
||||
Reference in New Issue
Block a user