Closed kalmarek closed 3 years ago
At the moment the refine function creates a new ESD
function refine(esd::EigenSpaceDecomposition{T}, M::Matrix{T}) where T
nbasis = Array{T}(undef, 0, size(first(esd), 2))
nptrs = [1]
for (i, e) in enumerate(esd)
if size(e, 1) > 1
esd2, ptrs = eigen_decomposition!(e*M[:, _find_l(e)])
nbasis = vcat(nbasis, esd2*e)
append!(nptrs, ptrs.+(pop!(nptrs)-1))
else
nbasis = vcat(nbasis, e)
push!(nptrs, nptrs[end]+1)
end
end
return EigenSpaceDecomposition(nbasis,nptrs)
end
I cannot make these line work:
using AbstractAlgebra
using PermutationGroups
G = SymmetricGroup(4)
S = gens(G)
ccG = conjugacy_classes(G)
AbstractAlgebra is on version 0.9.2 PermutationGroups checked out for dev on master
with latest PermutationGroups this should work
julia> using AbstractAlgebra, PermutationGroups
[ Info: Precompiling PermutationGroups [8bc5a954-2dfc-11e9-10e6-cd969bffa420]
julia> G = SymmetricGroup(4)
Full symmetric group over 4 elements
julia> S = gens(G)
2-element Array{Perm{Int64},1}:
(1,2)
(1,2,3,4)
julia> ccG = conjugacy_classes(G)
5-element Array{PermutationGroups.Orbit1{Perm{Int64},Nothing},1}:
PermutationGroups.Orbit1{Perm{Int64},Nothing}(Perm{Int64}[()], Dict{Perm{Int64},Nothing}(() => nothing))
PermutationGroups.Orbit1{Perm{Int64},Nothing}(Perm{Int64}[(1,2), (2,3), (1,3), (3,4), (2,4), (1,4)], Dict{Perm{Int64},Nothing}((2,3) => nothing,(1,3) => nothing,(3,4) => nothing,(1,4) => nothing,(1,2) => nothing,(2,4) => nothing))
PermutationGroups.Orbit1{Perm{Int64},Nothing}(Perm{Int64}[(1,3,2), (1,2,3), (2,4,3), (2,3,4), (1,4,3), (1,3,4), (1,4,2), (1,2,4)], Dict{Perm{Int64},Nothing}((2,3,4) => nothing,(2,4,3) => nothing,(1,2,4) => nothing,(1,3,4) => nothing,(1,3,2) => nothing,(1,4,2) => nothing,(1,4,3) => nothing,(1,2,3) => nothing))
PermutationGroups.Orbit1{Perm{Int64},Nothing}(Perm{Int64}[(1,2,4,3), (1,4,3,2), (1,4,2,3), (1,3,2,4), (1,3,4,2), (1,2,3,4)], Dict{Perm{Int64},Nothing}((1,2,3,4) => nothing,(1,3,2,4) => nothing,(1,4,2,3) => nothing,(1,3,4,2) => nothing,(1,4,3,2) => nothing,(1,2,4,3) => nothing))
PermutationGroups.Orbit1{Perm{Int64},Nothing}(Perm{Int64}[(1,2)(3,4), (1,4)(2,3), (1,3)(2,4)], Dict{Perm{Int64},Nothing}((1,2)(3,4) => nothing,(1,4)(2,3) => nothing,(1,3)(2,4) => nothing))
I needed to clean-up
thanks for the nudge ;)