mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-10-19 09:05:36 +02:00
sparsify only once during the reconstruction
This commit is contained in:
parent
706097931a
commit
f6674337ed
@ -123,10 +123,11 @@ function reconstruct_sol{T<:GroupElem, S<:AbstractArray}(mreps::Dict{T, S},
|
|||||||
for g in keys(mreps)
|
for g in keys(mreps)
|
||||||
A, B = mreps[g], mreps[inv(g)]
|
A, B = mreps[g], mreps[inv(g)]
|
||||||
for π in 1:length(Us)
|
for π in 1:length(Us)
|
||||||
recP .+= sparsify(dims[π].* (A * Us[π]*Ps[π]*Ust[π] * B))
|
recP .+= dims[π].* (A * Us[π]*Ps[π]*Ust[π] * B)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
recP .*= 1/length(keys(mreps))
|
recP .*= 1/length(keys(mreps))
|
||||||
|
recP[abs.(recP) .< eps(eltype(recP))] = zero(eltype(recP))
|
||||||
return recP
|
return recP
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user