diff options
author | Nao Pross <np@0hm.ch> | 2024-06-02 16:06:09 +0200 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2024-06-02 16:06:09 +0200 |
commit | 8428ba70654869ccfd48259e56ce1ecdb26f38b9 (patch) | |
tree | 470ec3a35a1c87366e4fe504efe3fd8b53900855 | |
parent | Cleanup comments (diff) | |
download | sumofsquares-8428ba70654869ccfd48259e56ce1ecdb26f38b9.tar.gz sumofsquares-8428ba70654869ccfd48259e56ce1ecdb26f38b9.zip |
Use sufficient set of candidates with Half Newton Polytope
Diffstat (limited to '')
-rw-r--r-- | sumofsquares/canon.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sumofsquares/canon.py b/sumofsquares/canon.py index 295a892..94759f2 100644 --- a/sumofsquares/canon.py +++ b/sumofsquares/canon.py @@ -147,7 +147,10 @@ class PutinarPSatz(Canonicalization): # FIXME: need to check that there is not a \gamma_{i} already! # TODO: deterministically generate unique names - monomials = x.combinations(poly.arange(d + 1)) + # TODO: better documentation + # Generate monomials of up to degree d and take only monomials + # that are in half of the newton polytope + monomials = x.combinations(poly.arange(d + 1)).half_newton_polytope(x) c = opt_variable_from_name(rf"\gamma_{i}", shape=monomials.shape) multiplier = c.T @ monomials |