Skip to content

Conversation

@tweisser
Copy link

@tweisser tweisser commented Jun 8, 2020

Use MultivariateBases for comparing coefficients. Dual is MM.Measure in MB.

The TestNonNegPoly is adapted in a way that it passes the tests, but is not necessarily useful.

cone = getdefault(model, NonNegPoly())
coefs = non_constant_coefficients(constraint.polynomial_or_matrix)
monos = monomials(constraint.polynomial_or_matrix)
monos = MB.MonomialBasis(monomials(constraint.polynomial_or_matrix))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename the variable to basis

kws...)
coefs = non_constant_coefficients(p)
monos = monomials(p)
monos = MB.basis_covering_monomials(basis_type, monomials(p))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename the variable to basis


function JuMP.build_constraint(_error::Function, p::AbstractPolynomialLike,
s::TestNonNeg; kwargs...)
s::TestNonNeg; basis_type = MB.MonomialBasis, kwargs...)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe replace basis_type by basis to be consistent with SumOfSquares

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants