add the possibility to reserve room for inner vector in SparseMatrix

This commit is contained in:
Gael Guennebaud
2011-09-08 13:42:54 +02:00
parent 7898281b2b
commit 7706bafcfd
3 changed files with 276 additions and 33 deletions

View File

@@ -189,15 +189,15 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived>
SparseMatrixBase() : m_isRValue(false) { /* TODO check flags */ }
inline Derived& operator=(const Derived& other)
{
// std::cout << "Derived& operator=(const Derived& other)\n";
// if (other.isRValue())
// derived().swap(other.const_cast_derived());
// else
this->operator=<Derived>(other);
return derived();
}
// inline Derived& operator=(const Derived& other)
// {
// // std::cout << "Derived& operator=(const Derived& other)\n";
// // if (other.isRValue())
// // derived().swap(other.const_cast_derived());
// // else
// this->operator=<Derived>(other);
// return derived();
// }
template<typename OtherDerived>
Derived& operator=(const ReturnByValue<OtherDerived>& other)