[eigen] [Sparse] InnerIterator not assignable |

[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]

Hi,
While wrapping Eigen::Sparse iterator into something like :
"
NNZSparseIterator& operator++()
{
++innerIt;
if(!innerIt)
{
if(++outerIdx >= sp.outerSize())
{
outerIdx= 0;
}

` innerIt= typename Sp::InnerIterator(sp, outerIdx); // <-
``fail
` }
return *this;
}

`I fail to compile the "// -<fail" line because template<typename
``Scalar, int _Options, typename _Index>
``class SparseMatrix<Scalar,_Options,_Index>::InnerIterator has some
``const members.[*]
`

`Would it be possible to remove this constness in order to have
``assignable InnerIterator ?
`
Best regards,
Bernard

`[*]
``https://bitbucket.org/eigen/eigen/src/04e0683a1547/Eigen/src/Sparse/SparseMatrix.h#cl-639
`m_outer and m_end.