mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-27 01:10:28 +01:00
sparsify both on the forward and backward transform
This commit is contained in:
parent
3ff649683a
commit
66f860bac1
@ -83,7 +83,7 @@ function init_orbit_data(logger, sett::Settings; radius=2)
|
|||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
||||||
function transform(U::AbstractArray, V::AbstractArray; sparse=false)
|
function transform(U::AbstractArray, V::AbstractArray; sparse=true)
|
||||||
if sparse
|
if sparse
|
||||||
return sparsify(U'*V*U)
|
return sparsify(U'*V*U)
|
||||||
else
|
else
|
||||||
|
@ -123,7 +123,7 @@ 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 .+= dims[π].* (A * Us[π]*Ps[π]*Ust[π] * B)
|
recP .+= sparsify(dims[π].* (A * Us[π]*Ps[π]*Ust[π] * B))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
recP .*= 1/length(keys(mreps))
|
recP .*= 1/length(keys(mreps))
|
||||||
|
Loading…
Reference in New Issue
Block a user