faster & simpler Cstar_repr

This commit is contained in:
kalmarek 2017-11-08 09:29:12 +01:00
parent e636c97738
commit 2d02c98947
1 changed files with 1 additions and 9 deletions

View File

@ -187,15 +187,7 @@ function reconstruct_sol{T<:GroupElem, S<:Nemo.perm}(preps::Dict{T, S},
end
function Cstar_repr{T}(x::GroupRingElem{T}, mreps::Dict)
res = spzeros(size(mreps[first(keys(mreps))])...)
for g in parent(x).basis
if x[g] != zero(T)
res .+= Float64(x[g]).*mreps[g]
end
end
return res
return sum(x[g].*mreps[g] for g in parent(x).basis if x[g] != zero(T))
end
function orthSVD(M::AbstractMatrix)