kalmarek / SymbolicWedderburn.jl

Amazing package to compute decompositions into irreducibles of explicit group representations and the Wedderburn decomposition for endomorphisms thereof!
MIT License
9 stars 4 forks source link

Enh/symmetry adapted basis #15

Closed kalmarek closed 3 years ago

codecov[bot] commented 3 years ago

Codecov Report

Merging #15 (baf815f) into master (1fac35e) will increase coverage by 19.07%. The diff coverage is 91.02%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #15       +/-   ##
===========================================
+ Coverage   72.10%   91.17%   +19.07%     
===========================================
  Files           9       10        +1     
  Lines         276      442      +166     
===========================================
+ Hits          199      403      +204     
+ Misses         77       39       -38     
Flag Coverage Δ
unittests 91.17% <91.02%> (+19.07%) :arrow_up:

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

Impacted Files Coverage Δ
src/SymbolicWedderburn.jl 100.00% <ø> (ø)
src/characters.jl 74.07% <58.33%> (+14.07%) :arrow_up:
src/eigenspacedecomposition.jl 93.93% <90.00%> (+0.39%) :arrow_up:
src/actions.jl 91.66% <90.90%> (+91.66%) :arrow_up:
src/gf.jl 94.02% <90.90%> (+7.82%) :arrow_up:
src/projections.jl 94.44% <92.72%> (+94.44%) :arrow_up:
src/characters_arith.jl 71.42% <100.00%> (+71.42%) :arrow_up:
src/cmmatrix.jl 100.00% <100.00%> (+16.66%) :arrow_up:
src/dixon.jl 98.14% <100.00%> (+0.71%) :arrow_up:
src/powermap.jl 100.00% <100.00%> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6248dbc...baf815f. Read the comment docs.

kalmarek commented 3 years ago

We seriously need to increase the coverage ;)

kalmarek commented 3 years ago

mein Gott, when broadcasting is fixed on master, now master decided to change spacing in parametrized types...

blegat commented 3 years ago

Anything blocking the merge ?

kalmarek commented 3 years ago

@blegat: coverage ;) @tweisser should I pick it up?

kalmarek commented 3 years ago

@blegat I will add coverage and merge this over this weekend

kalmarek commented 3 years ago

@tweisser @blegat this seems to be ready to go!

kalmarek commented 3 years ago

@blegat I'm updating the examples and I tried this:

msym = let m = SOSModel(SCS.Optimizer), basis = basis, R = R
    @variable m t
    @objective m Max t
    soses = [@variable m [1:length(R)] SOSPoly(FixedPolynomialBasis(r * basis)) for r in R]
    @constraint m f - t == sum(soses)

    optimize!(m)
    @info termination_status(m) objective_value(m)
    msym
end

but JuMP/SumOfSquares refuses to sum(soses); any ideas?

blegat commented 3 years ago

This looks to be a but in MutableArithmetics, I would recommend doing the sum outside the macro as a workaround. EDIT in fact, this should be resolved by doing

soses = @variable m [1:length(R)] SOSPoly(FixedPolynomialBasis(r * basis))

Otherwise, you're doing a vector of vector and sum gives a vector instead of a polynomial

kalmarek commented 3 years ago

This looks to be a but in MutableArithmetics, I would recommend doing the sum outside the macro as a workaround. EDIT in fact, this should be resolved by doing

soses = @variable m [1:length(R)] SOSPoly(FixedPolynomialBasis(r * basis))

Otherwise, you're doing a vector of vector and sum gives a vector instead of a polynomial

??? this doesn't even compile as r is not defined. did you mean

soses = @variable m [1:length(R)] SOSPoly(FixedPolynomialBasis(R * basis))

?? (non-compatible dimensions, doesn't work even with R .* Ref(basis)) this: polys = SOSPoly.(FixedPolynomialBasis.(R.*Ref(basis))) gives me a vector of SOSPolys. How do I create a vector of SOSPolys variables ??

blegat commented 3 years ago
[@variable m variable_type=SOSPoly(FixedPolynomialBasis(r * basis)) for r in R]

or

@variable m [r in R]  SOSPoly(FixedPolynomialBasis(r * basis))

should work

kalmarek commented 3 years ago

:tada: