decouple init_orbit_data from Group, S generation

This commit is contained in:
kalmar 2017-06-08 16:47:50 +02:00
parent c38dcb02ed
commit aaba1a056a

View File

@ -213,14 +213,18 @@ function init_data(name::String, N::Int, logger; radius=2)
info(logger, "Symmetric generating set of size $(length(S))")
info(logger, S)
function init_orbit_data{T<:Nemo.GroupElem}(logger, name::String, G::Nemo.Group,
S::Vector{T}; radius=2)
ex(fname) = isfile(joinpath(name, fname))
conditions = ex.(["delta.jld", "pm.jld", "U_pis.jld", "orbits.jld"])
if !all(conditions)
files_exists = ex.(["delta.jld", "pm.jld", "U_pis.jld", "orbits.jld"])
if !all(files_exists)
compute_orbit_data(logger, name, SOutFN, S, radius=radius)
end
return SOutFN, S, PropertyT.ΔandSDPconstraints(name, SOutFN)[1]
return 0
end
function main()
@ -243,6 +247,8 @@ function main()
G, S, Δ = init_data(dirname, N, logger, radius=radius)
init_orbit_data(logger, dirname, G, S; radius=2)
tol = parsed_args["tol"]
iterations = parsed_args["iterations"]
upper_bound = parsed_args["upper-bound"]