1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-26 09:00:28 +01:00

move filename, etc to its section

This commit is contained in:
kalmarek 2018-09-05 08:56:55 +02:00
parent c929b0f149
commit 278a62da2f

View File

@ -10,29 +10,8 @@ import AbstractAlgebra: Group, GroupElem, Ring, perm
using JLD
using JuMP
exists(fname::String) = isfile(fname) || islink(fname)
filename(prefix, s::Symbol) = filename(prefix, Val{s})
import MathProgBase.SolverInterface.AbstractMathProgSolver
@eval begin
for (s,n) in [
[:fulllog, "full_$(string(now())).log"],
[:solverlog, "solver_$(string(now())).log"],
[:pm, "pm.jld"],
[, "delta.jld"],
[, "lambda.jld"],
[:P, "SDPmatrix.jld"],
[:warm, "warmstart.jld"],
[:Uπs, "U_pis.jld"],
[:orbits,"orbits.jld"],
[:preps, "preps.jld"],
]
filename(prefix::String, ::Type{Val{$:(s)}}) = joinpath(prefix, :($n))
end
end
function loadLaplacian(name::String, G::Group)
if exists(filename(name, )) && exists(filename(name, :pm))
info("Loading precomputed Δ...")
@ -137,7 +116,25 @@ function check_property_T(name::String, S, solver, upper_bound, tol, radius, war
Δ = computeLaplacian(S, radius)
save(filename(name, :pm), "pm", parent(Δ).pm)
save(filename(name, ), "Δ", Δ.coeffs)
filename(prefix, s::Symbol) = filename(prefix, Val{s})
@eval begin
for (s,n) in [
[:fulllog, "full_$(string(now())).log"],
[:solverlog, "solver_$(string(now())).log"],
[:pm, "pm.jld"],
[, "delta.jld"],
[, "lambda.jld"],
[:P, "SDPmatrix.jld"],
[:warm, "warmstart.jld"],
[:Uπs, "U_pis.jld"],
[:orbits, "orbits.jld"],
[:preps, "preps.jld"],
]
filename(prefix::String, ::Type{Val{$:(s)}}) = joinpath(prefix, :($n))
end
end
fullpath = joinpath(name, string(upper_bound))
isdir(fullpath) || mkdir(fullpath)