1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-23 08:15:29 +01:00

filter Upis and dims at LOADTIME for only those which are non-zeros

This commit is contained in:
kalmarek 2017-11-13 10:57:57 +01:00
parent 04a13616c6
commit 39bef16aa7
2 changed files with 5 additions and 8 deletions

View File

@ -37,11 +37,13 @@ function OrbitData(sett::Settings)
splap² = similar(splap) splap² = similar(splap)
splap² = GroupRings.mul!(splap², splap, splap, pm); splap² = GroupRings.mul!(splap², splap, splap, pm);
# Uπs = load(joinpath(name, "U_pis.jld"), "Uπs");
Uπs = load(joinpath(prepath(sett), "U_pis.jld"), "Uπs") Uπs = load(joinpath(prepath(sett), "U_pis.jld"), "Uπs")
nzros = [i for i in 1:length(Uπs) if size(Uπs[i],2) !=0]
Uπs = Uπs[nzros]
Uπs = sparsify!.(Uπs, sett.tol, check=true, verbose=true) Uπs = sparsify!.(Uπs, sett.tol, check=true, verbose=true)
#dimensions of the corresponding πs: #dimensions of the corresponding πs:
dims = load(joinpath(prepath(sett), "U_pis.jld"), "dims") dims = load(joinpath(prepath(sett), "U_pis.jld"), "dims")[nzros]
m, P = init_model(size(Uπs,1), [size(U,2) for U in Uπs]); m, P = init_model(size(Uπs,1), [size(U,2) for U in Uπs]);

View File

@ -137,12 +137,7 @@ function perm_reps(S::Vector, autS::Group, radius::Int)
end end
function reconstruct_sol{T<:GroupElem, S<:Nemo.perm}(preps::Dict{T, S}, function reconstruct_sol{T<:GroupElem, S<:Nemo.perm}(preps::Dict{T, S},
aUs::Vector, aPs::Vector, adims::Vector) Us::Vector, Ps::Vector, dims::Vector)
idx = [π for π in 1:length(aUs) if size(aUs[π], 2) != 0]
Us = aUs[idx]
Ps = aPs[idx]
dims = adims[idx];
l = length(Us) l = length(Us)
transfP = [dims[π].*Us[π]*Ps[π]*Us[π]' for π in 1:l] transfP = [dims[π].*Us[π]*Ps[π]*Us[π]' for π in 1:l]