mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Several improvements in sparse module:
* add a LDL^T factorization with solver using code from T. Davis's LDL library (LPGL2.1+) * various bug fixes in trianfular solver, matrix product, etc. * improve cmake files for the supported libraries * split the sparse unit test * etc.
This commit is contained in:
@@ -70,7 +70,9 @@ struct ei_solve_triangular_selector<Lhs,Rhs,Upper,RowMajor|IsSparse>
|
||||
{
|
||||
Scalar tmp = other.coeff(i,col);
|
||||
typename Lhs::InnerIterator it(lhs, i);
|
||||
for(++it; it; ++it)
|
||||
if (it.index() == i)
|
||||
++it;
|
||||
for(; it; ++it)
|
||||
{
|
||||
tmp -= it.value() * other.coeff(it.index(),col);
|
||||
}
|
||||
@@ -107,7 +109,9 @@ struct ei_solve_triangular_selector<Lhs,Rhs,Lower,ColMajor|IsSparse>
|
||||
other.coeffRef(i,col) /= it.value();
|
||||
}
|
||||
Scalar tmp = other.coeffRef(i,col);
|
||||
for(++it; it; ++it)
|
||||
if (it.index()==i)
|
||||
++it;
|
||||
for(; it; ++it)
|
||||
other.coeffRef(it.index(), col) -= tmp * it.value();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user