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

Needed for SumOfSquares #34

Closed
wants to merge 1 commit into from
Closed

Needed for SumOfSquares #34

wants to merge 1 commit into from

Conversation

blegat
Copy link
Member

@blegat blegat commented May 27, 2024

The purpose of this PR is not to be merged but to list the changes that are needed so that we can then cherry-pick them and then open separate PRs.

Variety of changes needed for SumOfSquares

@blegat blegat force-pushed the bl/sos branch 3 times, most recently from acd2380 to 7128e8a Compare May 28, 2024 14:30
@blegat blegat changed the base branch from mk/non_monomial_basis to main May 28, 2024 14:30
Copy link

codecov bot commented May 28, 2024

Codecov Report

Attention: Patch coverage is 16.66667% with 15 lines in your changes missing coverage. Please review.

Project coverage is 84.06%. Comparing base (c01cd3f) to head (b91aa72).

Files Patch % Lines
src/arithmetic.jl 11.11% 8 Missing ⚠️
src/algebra_elts.jl 0.00% 3 Missing ⚠️
src/sparse_coeffs.jl 0.00% 2 Missing ⚠️
src/types.jl 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #34      +/-   ##
==========================================
- Coverage   85.85%   84.06%   -1.80%     
==========================================
  Files          14       14              
  Lines         693      709      +16     
==========================================
+ Hits          595      596       +1     
- Misses         98      113      +15     
Flag Coverage Δ
unittests 84.06% <16.66%> (-1.80%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 105 to 126
args::Vararg{Any,N},
) where {N}
for arg in args
if arg isa AlgebraElement
@assert parent(res) == parent(arg)
end
end
mstr = mstructure(basis(res))
MA.operate_to!(coeffs(res), mstr, _coeffs_if_element.(args)...)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not a fan of _coeffs_if_element and this mechanic. Why is adding an AlgebraElement and e.g. some coefficients even supported? when is it useful?

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe it's not needed. It's used here: https://github.com/jump-dev/SumOfSquares.jl/pull/355/files#diff-3ce98ebb7dc7f7313a7049ec96353c60cdc0cba45f9a9199255402a5dd2cc427R150-R158
What I can do is move the coefficient to one of the three algebra element so I think I can refactor so that I don't give values alone outside of an AlgebraElement so that we can assume that every argument is an AbstractCoefficients.
I'm close to get the SumOfSquares tests green, then I'll refactor and merge the open PRs here and there so that SumOfSquares work with the master versions of its dependencies and then I'll fix the symmetry reduction (it's possible to have the tests passing without this since it's only used in the doc tutorials ^^)

@blegat
Copy link
Member Author

blegat commented Jun 12, 2024

Tests are passing now for SumOfSquares locally so I think we're close to have what we need from StarAlgebras so I'll not open separate PRs for the changes that are needed, maybe some parts in this PR are not needed anymore so I'll see

@blegat blegat force-pushed the bl/sos branch 7 times, most recently from bf123eb to 92bd54d Compare June 14, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants