-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add simple SOS decomposition example #168
Conversation
Adds a trivial SOS decomposition example in response to issue #166 (comment) It is simple but hopefully clearer than a docstring.
examples/sos_decomposition.jl
Outdated
# ------------------------------------------------------------------------------ | ||
|
||
# The polynomial p = x^2 - x*y^2 + y^4 + 1 is SOS. | ||
# Among infinite others, it has the decomposition: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by "Among infinite others" ? Isn't it the only polynomial with this decomposition ?
Express the opening note more clearly. Remove unnecessary `SumOfSquares.` prefix.
Does this update resolve the issues? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Minor last comments :)
examples/sos_decomposition.jl
Outdated
# Among infinite others, it has the decomposition: | ||
# p = 3/4*(x-y^2)^2 + 1/4*(x + y)^2 + 1. | ||
# We can, for example, decompose it as | ||
# p = 3/4*(x-y^2)^2 + 1/4*(x + y)^2 + 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add spaces around the -
sign
using SumOfSquares | ||
using JuMP | ||
using SCS | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add your name here after **Contributed by**:
? This is not done for other notebboks yet but I am reworking them at the moment
Sign header. Format polynomial in comment.
Sure, does username suffice as a signature? |
Yes, as you prefer :) |
Adds a trivial SOS decomposition example in response to issue #166 (comment)
It is simple but hopefully clearer than a docstring.