Skip to content

Commit

Permalink
fixed a hash-dependent SumsOfSquares test
Browse files Browse the repository at this point in the history
  • Loading branch information
mahrud committed Oct 18, 2024
1 parent bb63d1f commit bbc9f09
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions M2/Macaulay2/packages/SumsOfSquares.m2
Original file line number Diff line number Diff line change
Expand Up @@ -474,12 +474,12 @@ createSOSModel(Matrix,Matrix) := o -> (F,v) -> (

-- monomials in vvT
vvT := entries(v* transpose v);
mons := g -> set first entries monomials g;
K1 := toList \\ sum \\ mons \ flatten vvT;
mons := g -> unique first entries monomials g;
K1 := unique \\ flatten \\ mons \ flatten vvT;

-- monomials in F and not in vvT
lmf := sum \\ mons \ flatten entries F;
K2 := toList(lmf - K1);
lmf := unique \\ flatten \\ mons \ flatten entries F;
K2 := lmf - set K1;
K := K1 | K2;

-- Linear constraints: b
Expand Down

0 comments on commit bbc9f09

Please sign in to comment.