diff --git a/src/Bridges/Constraint/sos_polynomial.jl b/src/Bridges/Constraint/sos_polynomial.jl index 15c131a71..ed0d48bd2 100644 --- a/src/Bridges/Constraint/sos_polynomial.jl +++ b/src/Bridges/Constraint/sos_polynomial.jl @@ -193,10 +193,7 @@ end function _get( model::MOI.ModelLike, - attr::Union{ - SOS.GramMatrixAttribute, - SOS.MomentMatrixAttribute, - }, + attr::Union{SOS.GramMatrixAttribute,SOS.MomentMatrixAttribute}, constraint::MOI.ConstraintIndex, index::Int, ) diff --git a/test/certificate.jl b/test/certificate.jl index 303c3ad5c..b7c2a0052 100644 --- a/test/certificate.jl +++ b/test/certificate.jl @@ -55,9 +55,15 @@ end end uni = Certificate.NewtonDegreeBounds(tuple()) @testset "Unipartite" begin - @test SOS.Certificate.monomials_half_newton_polytope([x * y, y^2], uni) == [y] - @test isempty(SOS.Certificate.monomials_half_newton_polytope([x, y], uni)) - @test SOS.Certificate.monomials_half_newton_polytope([x^2, y^2], uni) == [x, y] + @test SOS.Certificate.monomials_half_newton_polytope( + [x * y, y^2], + uni, + ) == [y] + @test isempty( + SOS.Certificate.monomials_half_newton_polytope([x, y], uni), + ) + @test SOS.Certificate.monomials_half_newton_polytope([x^2, y^2], uni) == + [x, y] @test SOS.Certificate.monomials_half_newton_polytope( [x^2, y^2], Certificate.NewtonDegreeBounds(([x, y],)), diff --git a/test/sparsity.jl b/test/sparsity.jl index dda2b2b64..7e2aeb073 100644 --- a/test/sparsity.jl +++ b/test/sparsity.jl @@ -311,7 +311,10 @@ function l09() ) with_var = SumOfSquares.Certificate.WithVariables(alg_el, x) newt = Certificate.NewtonDegreeBounds(tuple()) - @test SOS.Certificate.monomials_half_newton_polytope(monomials(f), newt) == [ + @test SOS.Certificate.monomials_half_newton_polytope( + monomials(f), + newt, + ) == [ x[1]^2 * x[2], x[1] * x[2]^2, x[1]^2,