mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
add ReverseInnerIterators to loop over the elements in reverse order,
and partly fix bug #356 (issue in trisolve for upper-column major))
This commit is contained in:
@@ -156,9 +156,11 @@ struct sparse_solve_triangular_selector<Lhs,Rhs,Mode,Upper,ColMajor>
|
||||
{
|
||||
if(!(Mode & UnitDiag))
|
||||
{
|
||||
// FIXME lhs.coeff(i,i) might not be always efficient while it must simply be the
|
||||
// last element of the column !
|
||||
other.coeffRef(i,col) /= lhs.innerVector(i).lastCoeff();
|
||||
typename Lhs::ReverseInnerIterator it(lhs, i);
|
||||
while(it && it.index()!=i)
|
||||
--it;
|
||||
eigen_assert(it && it.index()==i);
|
||||
other.coeffRef(i,col) /= it.value();
|
||||
}
|
||||
typename Lhs::InnerIterator it(lhs, i);
|
||||
for(; it && it.index()<i; ++it)
|
||||
|
||||
Reference in New Issue
Block a user