dispatch main ::PropertyTGroup

This commit is contained in:
kalmarek 2018-09-09 13:12:53 +02:00
parent 1b45625a71
commit c7b8776e2d
2 changed files with 22 additions and 25 deletions

40
main.jl
View File

@ -21,18 +21,19 @@ include("FPGroups_GAP.jl")
include("groups/Allgroups.jl")
using PropertyTGroups
function summarize(groupdir, iterations, tol, upper_bound, radius, G, S)
info("Group: $groupdir")
info("Iterations: $iterations")
info("Precision: $tol")
info("Upper bound: $upper_bound")
info("Radius: $radius")
import PropertyT.Settings
function summarize(sett::PropertyT.Settings)
info("Threads: $(Threads.nthreads())")
info("Workers: $(workers())")
info(string(G))
info("with generating set of size $(length(S))")
info("GroupDir: $(PropertyT.prepath(sett))")
info(string(sett.G))
info("with generating set of size $(length(sett.S))")
info("Radius: $(sett.radius)")
info("Precision: $(sett.tol)")
info("Upper bound: $(sett.upper_bound)")
info("Solver: $(sett.solver)")
end
function Settings(Gr::PropertyTGroup, args, solver):
@ -54,28 +55,23 @@ function Settings(Gr::PropertyTGroup, args, solver):
end
end
function main(Gr::SymmetrizedGroup)
sett = Settings(Gr)
function main(::PropertyTGroup, sett::Property.Settings)
isdir(PropertyT.fullpath(sett)) || mkpath(PropertyT.fullpath(sett))
if Gr.args["nosymmetry"]
return PropertyT.check_property_T(PropertyT.Naive, sett)
else
autS = PropertyTGroups.autS(Gr)
info("Symmetrising with $(autS)")
sett.autS = autS
return PropertyT.check_property_T(PropertyT.Symmetrize, sett)
end
summarize(sett)
return PropertyT.check_property_T(sett)
end
function main(Gr::GAPGroup)
sett = Settings(Gr)
function main(::GAPGroup, sett::PropertyT.Settings)
isdir(PropertyT.fullpath(sett)) || mkpath(PropertyT.fullpath(sett))
summarize(sett)
S = [s for s in sett.S if s.symbols[1].pow == 1]
relations = [k*inv(v) for (k,v) in sett.G.rels]
prepare_pm_delta(PropertyT.prepath(sett), GAP_groupcode(S, relations), sett.radius)
return PropertyT.check_property_T(PropertyT.Naive, sett)
return PropertyT.check_property_T(sett)
end

7
run.jl
View File

@ -78,10 +78,11 @@ include("CPUselect.jl")
include("logging.jl")
include("main.jl")
const G = PropertyTGroups.PropertyTGroup(PARSEDARGS)
fullpath = joinpath(name(G), string(G.args["upper-bound"]))
const Gr = PropertyTGroups.PropertyTGroup(PARSEDARGS)
const sett = PropertyT.Settings(PARSEDARGS, Gr,
solver(args["tol"], args["iterations"]))
isdir(fullpath) || mkpath(fullpath)
logger=setup_logging(PropertyT.filename(fullpath, :fulllog), :fulllog)
main(G)
main(Gr, sett)