bug fix in SparseSelfAdjointTimeDenseProduct for empty rows or columns

This commit is contained in:
Gael Guennebaud 2011-11-30 19:39:20 +01:00
parent 00d4a360ba
commit 6b8d6887ac
2 changed files with 4 additions and 13 deletions

View File

@ -556,24 +556,15 @@ class SparseMatrix
#ifndef EIGEN_PARSED_BY_DOXYGEN
template<typename Lhs, typename Rhs>
inline SparseMatrix& operator=(const SparseSparseProduct<Lhs,Rhs>& product)
{
initAssignment(product);
return Base::operator=(product);
}
{ return Base::operator=(product); }
template<typename OtherDerived>
inline SparseMatrix& operator=(const ReturnByValue<OtherDerived>& other)
{
initAssignment(other.derived());
return Base::operator=(other.derived());
}
{ return Base::operator=(other.derived()); }
template<typename OtherDerived>
inline SparseMatrix& operator=(const EigenBase<OtherDerived>& other)
{
initAssignment(other.derived());
return Base::operator=(other.derived());
}
{ return Base::operator=(other.derived()); }
#endif
template<typename OtherDerived>

View File

@ -229,7 +229,7 @@ class SparseSelfAdjointTimeDenseProduct
LhsInnerIterator i(m_lhs,j);
if (ProcessSecondHalf)
{
while (i.index()<j) ++i;
while (i && i.index()<j) ++i;
if(i && i.index()==j)
{
dest.row(j) += i.value() * m_rhs.row(j);