improve glop internals

This commit is contained in:
Laurent Perron
2019-08-22 13:15:29 +02:00
parent 44edf167d9
commit e3c0ae5b9b
5 changed files with 16 additions and 6 deletions

View File

@@ -182,11 +182,16 @@ bool AreEqualWithPermutation(const DenseColumn& a, const DenseColumn& b,
} // namespace
void LuFactorization::RightSolveLWithPermutedInput(const DenseColumn& a,
DenseColumn* x) const {
ScatteredColumn* x) const {
SCOPED_TIME_STAT(&stats_);
if (!is_identity_factorization_) {
DCHECK(AreEqualWithPermutation(a, *x, row_perm_));
lower_.LowerSolve(x);
DCHECK(AreEqualWithPermutation(a, x->values, row_perm_));
lower_.ComputeRowsToConsiderInSortedOrder(&x->non_zeros);
if (x->non_zeros.empty()) {
lower_.LowerSolve(&x->values);
} else {
lower_.HyperSparseSolve(&x->values, &x->non_zeros);
}
}
}