new feature: copy from a sparse selfadjoint view to a full sparse matrix

This commit is contained in:
Gael Guennebaud
2010-11-15 14:14:05 +01:00
parent 5a3a229550
commit 9a3ec637ff
5 changed files with 104 additions and 4 deletions

View File

@@ -46,6 +46,16 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived>
typedef typename internal::traits<Derived>::Index Index;
typedef SparseMatrixBase StorageBaseType;
typedef EigenBase<Derived> Base;
template<typename OtherDerived>
Derived& operator=(const EigenBase<OtherDerived> &other)
{
other.derived().evalTo(derived());
return derived();
}
// using Base::operator=;
enum {
@@ -173,7 +183,7 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived>
Derived& markAsRValue() { m_isRValue = true; return derived(); }
SparseMatrixBase() : m_isRValue(false) { /* TODO check flags */ }
inline Derived& operator=(const Derived& other)
{
// std::cout << "Derived& operator=(const Derived& other)\n";