mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-19 07:20:28 +01:00
use preps_reprs instead of matrix_reprs
and save them in preps.jld
This commit is contained in:
parent
2d02c98947
commit
72261afdeb
@ -103,7 +103,7 @@ function init_orbit_data(logger, sett::Settings; radius=2)
|
||||
|
||||
ex(fname) = isfile(joinpath(prepath(sett), fname))
|
||||
|
||||
files_exists = ex.(["delta.jld", "pm.jld", "U_pis.jld", "orbits.jld"])
|
||||
files_exists = ex.(["delta.jld", "pm.jld", "U_pis.jld", "orbits.jld", "preps.jld"])
|
||||
|
||||
if !all(files_exists)
|
||||
compute_orbit_data(logger, prepath(sett), sett.G, sett.S, sett.AutS, radius=radius)
|
||||
@ -204,7 +204,7 @@ function λandP(m::JuMP.Model, data::OrbitData, sett::Settings)
|
||||
|
||||
info(logger, "Reconstructing P...")
|
||||
|
||||
@logtime logger preps = perm_reps(sett.G, sett.S, sett.AutS, sett.radius)
|
||||
preps = load_preps(joinpath(prepath(sett), "preps.jld"), sett.AutS)
|
||||
|
||||
@logtime logger recP = reconstruct_sol(preps, data.Us, Ps, data.dims)
|
||||
|
||||
@ -213,6 +213,18 @@ function λandP(m::JuMP.Model, data::OrbitData, sett::Settings)
|
||||
return λ, recP
|
||||
end
|
||||
|
||||
function load_preps(fname::String, G::Nemo.Group)
|
||||
lded_preps = load(fname, "perms_d")
|
||||
permG = PermutationGroup(length(first(lded_preps)))
|
||||
@assert length(lded_preps) == order(G)
|
||||
return Dict(k=>permG(v) for (k,v) in zip(elements(G), lded_preps))
|
||||
end
|
||||
|
||||
function save_preps(fname::String, preps)
|
||||
autS = parent(first(keys(preps)))
|
||||
JLD.save(fname, "perms_d", [preps[elt].d for elt in elements(autS)])
|
||||
end
|
||||
|
||||
function check_property_T(sett::Settings)
|
||||
|
||||
init_orbit_data(logger, sett, radius=sett.radius)
|
||||
|
@ -225,7 +225,9 @@ function compute_orbit_data{T<:GroupElem}(logger, name::String, G::Nemo.Group, S
|
||||
save(joinpath(name, "orbits.jld"), "orbits", orbs)
|
||||
|
||||
info(logger, "Action matrices")
|
||||
@logtime logger AutS_mreps = matrix_reps(AutS, E4[1:sizes[radius]], E_dict)
|
||||
@logtime logger reps = perm_reps(AutS, E_2R[1:sizes[radius]], E_rdict)
|
||||
save_preps(joinpath(name, "preps.jld"), reps)
|
||||
reps = matrix_reps(reps)
|
||||
|
||||
info(logger, "Projections")
|
||||
@logtime logger AutS_mps = rankOne_projections(AutS);
|
||||
|
Loading…
Reference in New Issue
Block a user