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,19 +179,14 @@ export class AlgNumSubSystem {
const polynomial = this.polynomials[i];
this.polyToConstr.set(polynomial, c);
let touched = false;
c.objects.forEach(obj => {
if (!this.owns(obj)) {
obj.visitParams(p => {
if (polynomial.eliminate(p, p.get())) {
touched = true;
}
polynomial.eliminate(p, p.get());
});
}
});
if (touched) {
polynomial.compact();
}
polynomial.compact();
}
});