1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-12-25 02:15:29 +01:00

slight(?!) optimisation to Cstar_repr

This commit is contained in:
kalmar 2017-07-27 22:02:07 +02:00
parent 0a3b5b227d
commit b89598c67c

View File

@ -130,14 +130,16 @@ function reconstruct_sol{T<:GroupElem, S<:AbstractArray}(mreps::Dict{T, S},
return recP
end
function Cstar_repr(x::GroupRingElem, mreps::Dict)
k = collect(keys(mreps))[1]
res = zeros(size(mreps[k])...)
function Cstar_repr{T}(x::GroupRingElem{T}, mreps::Dict)
res = zeros(size(mreps[first(keys(mreps))])...)
for g in parent(x).basis
res .+= x[g]*mreps[g]
end
return res
for g in parent(x).basis
if x[g] != zero(T)
res .+= x[g].*mreps[g]
end
end
return res
end
function orthSVD(M::AbstractMatrix)