always compact initial polynomial in case of some constants become null

This commit is contained in:
Val Erastov (xibyte) 2020-06-26 02:25:47 -07:00
parent 931a05ac36
commit f18e8b0cdd

View file

@ -179,20 +179,15 @@ export class AlgNumSubSystem {
const polynomial = this.polynomials[i]; const polynomial = this.polynomials[i];
this.polyToConstr.set(polynomial, c); this.polyToConstr.set(polynomial, c);
let touched = false;
c.objects.forEach(obj => { c.objects.forEach(obj => {
if (!this.owns(obj)) { if (!this.owns(obj)) {
obj.visitParams(p => { obj.visitParams(p => {
if (polynomial.eliminate(p, p.get())) { polynomial.eliminate(p, p.get());
touched = true;
}
}); });
} }
}); });
if (touched) {
polynomial.compact(); polynomial.compact();
} }
}
}); });
if (DEBUG) { if (DEBUG) {