Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Jun 18, 2024
1 parent 7763055 commit f13c16e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/Bridges/Constraint/sos_polynomial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,7 @@ end

function _get(

Check warning on line 194 in src/Bridges/Constraint/sos_polynomial.jl

View check run for this annotation

Codecov / codecov/patch

src/Bridges/Constraint/sos_polynomial.jl#L194

Added line #L194 was not covered by tests
model::MOI.ModelLike,
attr::Union{
SOS.GramMatrixAttribute,
SOS.MomentMatrixAttribute,
},
attr::Union{SOS.GramMatrixAttribute,SOS.MomentMatrixAttribute},
constraint::MOI.ConstraintIndex,
index::Int,
)
Expand Down
12 changes: 9 additions & 3 deletions test/certificate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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],)),
Expand Down
5 changes: 4 additions & 1 deletion test/sparsity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f13c16e

Please sign in to comment.