mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 16:33:15 +01:00
always compact initial polynomial in case of some constants become null
This commit is contained in:
parent
931a05ac36
commit
f18e8b0cdd
1 changed files with 2 additions and 7 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue