mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-10-19 09:05:36 +02:00
slight(?!) optimisation to Cstar_repr
This commit is contained in:
parent
0a3b5b227d
commit
b89598c67c
@ -130,13 +130,15 @@ function reconstruct_sol{T<:GroupElem, S<:AbstractArray}(mreps::Dict{T, S},
|
|||||||
return recP
|
return recP
|
||||||
end
|
end
|
||||||
|
|
||||||
function Cstar_repr(x::GroupRingElem, mreps::Dict)
|
function Cstar_repr{T}(x::GroupRingElem{T}, mreps::Dict)
|
||||||
k = collect(keys(mreps))[1]
|
res = zeros(size(mreps[first(keys(mreps))])...)
|
||||||
res = zeros(size(mreps[k])...)
|
|
||||||
|
|
||||||
for g in parent(x).basis
|
for g in parent(x).basis
|
||||||
res .+= x[g]*mreps[g]
|
if x[g] != zero(T)
|
||||||
|
res .+= x[g].*mreps[g]
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return res
|
return res
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user