fix sparse selfadjoint time dense such that the other triangular part is not used at all

This commit is contained in:
Gael Guennebaud 2011-07-26 09:02:41 +02:00
parent 97ac0fd192
commit 8fa7e92e77

View File

@ -227,10 +227,14 @@ class SparseSelfAdjointTimeDenseProduct
for (Index j=0; j<m_lhs.outerSize(); ++j)
{
LhsInnerIterator i(m_lhs,j);
if (ProcessSecondHalf && i && (i.index()==j))
if (ProcessSecondHalf)
{
dest.row(j) += i.value() * m_rhs.row(j);
++i;
while (i.index()<j) ++i;
if(i && i.index()==j)
{
dest.row(j) += i.value() * m_rhs.row(j);
++i;
}
}
for(; (ProcessFirstHalf ? i && i.index() < j : i) ; ++i)
{