Commit 0a5027c
committed
Set up partition table for Hilbert algorithm w/ at least 1 variable
Even when our ring doesn't have any variables, we still represent the
monomial 1 using a dummy variable raised to the 0th power.
Previously, when calling "poincaire ideal 1_R" when R had no
variables, we segfaulted in partition_table::partition() when calling
"reset(I->topvar() + 1)", since "I->topvar()" returned 0 (for the dummy
variable) and reset tries writing in the "dad" and "occurs" arrays,
but they were initialized as length 0.
To fix this, we initialize these arrays to have length 1 even when the
ring has no variables.1 parent 0fc397b commit 0a5027c
2 files changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
| 353 | + | |
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
0 commit comments