Skip to content
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

Merged
merged 3 commits into from
Aug 8, 2020
Merged

Add simple SOS decomposition example #168

merged 3 commits into from
Aug 8, 2020

Conversation

votroto
Copy link
Contributor

@votroto votroto commented Aug 4, 2020

Adds a trivial SOS decomposition example in response to issue #166 (comment)
It is simple but hopefully clearer than a docstring.

Adds a trivial SOS decomposition example in response to issue #166 (comment)
It is simple but hopefully clearer than a docstring.
# ------------------------------------------------------------------------------

# The polynomial p = x^2 - x*y^2 + y^4 + 1 is SOS.
# Among infinite others, it has the decomposition:
Copy link
Member

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.
@votroto
Copy link
Contributor Author

votroto commented Aug 7, 2020

Does this update resolve the issues?

Copy link
Member

@blegat blegat left a 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 :)

# 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,
Copy link
Member

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

Copy link
Member

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.
@votroto
Copy link
Contributor Author

votroto commented Aug 7, 2020

Sure, does username suffice as a signature?

@blegat
Copy link
Member

blegat commented Aug 8, 2020

Sure, does username suffice as a signature?

Yes, as you prefer :)

@blegat blegat merged commit 3eb3193 into jump-dev:master Aug 8, 2020
@votroto votroto deleted the patch-1 branch August 8, 2020 12:26
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