From 3d59ecc8749bda85156cc815ebb051b31fb1124a Mon Sep 17 00:00:00 2001 From: kalmarek Date: Wed, 8 Aug 2018 19:37:28 +0200 Subject: [PATCH] update FPgroup.jl to PropertyTGroup interface --- FPgroup.jl | 33 +++++++++++++-------------------- main.jl | 2 -- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/FPgroup.jl b/FPgroup.jl index e60fe91..9cea32d 100644 --- a/FPgroup.jl +++ b/FPgroup.jl @@ -7,11 +7,11 @@ function parse_commandline() "--tol" help = "set numerical tolerance for the SDP solver" arg_type = Float64 - default = 1e-14 + default = 1e-6 "--iterations" - help = "set maximal number of iterations for the SDP solver (default: 20000)" + help = "set maximal number of iterations for the SDP solver" arg_type = Int - default = 60000 + default = 50000 "--upper-bound" help = "Set an upper bound for the spectral gap" arg_type = Float64 @@ -27,7 +27,7 @@ function parse_commandline() "--warmstart" help = "Use warmstart.jl as the initial guess for SCS" action = :store_true - "-MCG" + "--MCG" help = "Compute for mapping class group of surface of genus N" arg_type = Int required = false @@ -43,27 +43,20 @@ function parse_commandline() end const PARSEDARGS = parse_commandline() -using AbstractAlgebra -using PropertyT -using Groups - include("CPUselect.jl") set_parallel_mthread(PARSEDARGS, workers=false) -include("main_gapgroup.jl") +include("main.jl") +include("FPGroups_GAP.jl") if PARSEDARGS["Caprace"] - include("groups/caprace.jl") - main(CapraceGroup, PARSEDARGS) - + G = PropertyTGroups.CapraceGroup(PARSEDARGS) elseif PARSEDARGS["Higman"] - include("groups/higman.jl") - main(HigmanGroup, PARSEDARGS) - -elseif PARSEDARGS["N"] != nothing - include("groups/mappingclassgroup.jl") - main(MappingClassGroups, PARSEDARGS) - + G = PropertyTGroups.HigmanGroup(PARSEDARGS) +elseif PARSEDARGS["MCG"] != nothing + G = PropertyTGroups.MappingClassGroup(PARSEDARGS) else - warn("You need to specify one of the --Higman, --Caprace, -MCG N") + throw("You need to specify one of the --Higman, --Caprace, --MCG N") end + +main(G) diff --git a/main.jl b/main.jl index 6852397..ba086a4 100644 --- a/main.jl +++ b/main.jl @@ -102,8 +102,6 @@ end function main(Gr::GAPGroup) - include("FPGroups_GAP.jl") - radius, tol, iterations, upper_bound, warm = params(Gr) groupdir = groupname(Gr)