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

SymbolicWedderburn v0.3 -> v0.4 #341

Closed
wants to merge 1 commit into from
Closed

SymbolicWedderburn v0.3 -> v0.4 #341

wants to merge 1 commit into from

Conversation

blegat
Copy link
Member

@blegat blegat commented Feb 9, 2024

Closes #352

Copy link

codecov bot commented Feb 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c4f7e9a) 85.10% compared to head (d33d510) 85.32%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #341      +/-   ##
==========================================
+ Coverage   85.10%   85.32%   +0.22%     
==========================================
  Files          41       41              
  Lines        2222     2222              
==========================================
+ Hits         1891     1896       +5     
+ Misses        331      326       -5     

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

@kalmarek
Copy link
Contributor

@blegat how to turn MonomialBasis{Monomial{DynamicPolynomials.Commutative{DynamicPolynomials.CreationOrder}, Graded{LexOrder}}, MonomialVector{DynamicPolynomials.Commutative{DynamicPolynomials.CreationOrder}, Graded{LexOrder}}} into an actual vector?

@kalmarek
Copy link
Contributor

also something is rather odd here:

    basis = SumOfSquares.Certificate.gram_basis(cert.certificate, poly)
    @info eltype(basis)

shows Any ?

@blegat
Copy link
Member Author

blegat commented Feb 26, 2024

Maybe we could define eltype I think I didn't do it since it's not an AbstractVector. By the way, an StarAlgebras.AbstractBasis is also not an AbstractVector so probably that will remain the case right ?

julia> basis = MonomialBasis(monomials([x, y], 2))
MonomialBasis([y², xy, x²])

julia> generators(basis)
3-element MonomialVector{DynamicPolynomials.Commutative{DynamicPolynomials.CreationOrder}, Graded{LexOrder}}:
 y²
 xy
 x²

julia> generators(basis) isa AbstractVector
true

julia> eltype(generators(basis))
Monomial{DynamicPolynomials.Commutative{DynamicPolynomials.CreationOrder}, Graded{LexOrder}}

You could also let me know the API you need the basis to implement and we could make sure StarAlgebra.AbstractBasis subtypes such as MonomialBasis do implement it.

@kalmarek
Copy link
Contributor

at the moment it's enough for basis to get an honest vector that's it.

We'll overhaul the whole thing in the near future, so there's no need to define the API for the old version, right?

@blegat
Copy link
Member Author

blegat commented Feb 26, 2024

No, no need, this PR can sit here and wait for StarAlgebras

@blegat
Copy link
Member Author

blegat commented Jul 5, 2024

I bumped in #355 even if it's not working but I'll wait for kalmarek/SymbolicWedderburn.jl#79

@blegat blegat closed this Jul 5, 2024
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