Make operator=(EigenBase<>) uses the new assignment mechanism and introduce a generic EigenBase to EigenBase assignment kind based on the previous evalTo mechanism.

This commit is contained in:
Gael Guennebaud
2014-06-25 17:23:52 +02:00
parent 3b19b466a7
commit b868bfb84a
10 changed files with 111 additions and 15 deletions

View File

@@ -337,6 +337,7 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived>
Block<Derived,Dynamic,Dynamic,true> innerVectors(Index outerStart, Index outerSize);
const Block<const Derived,Dynamic,Dynamic,true> innerVectors(Index outerStart, Index outerSize) const;
#ifndef EIGEN_TEST_EVALUATORS
/** \internal use operator= */
template<typename DenseDerived>
void evalTo(MatrixBase<DenseDerived>& dst) const
@@ -346,6 +347,7 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived>
for (typename Derived::InnerIterator i(derived(),j); i; ++i)
dst.coeffRef(i.row(),i.col()) = i.value();
}
#endif
Matrix<Scalar,RowsAtCompileTime,ColsAtCompileTime> toDense() const
{