2017-12-29 17:45:09 +01:00
|
|
|
using ArgParse
|
|
|
|
|
2018-01-04 22:08:32 +01:00
|
|
|
function parse_commandline()
|
|
|
|
args = ArgParseSettings()
|
|
|
|
|
|
|
|
@add_arg_table args begin
|
|
|
|
"--tol"
|
|
|
|
help = "set numerical tolerance for the SDP solver"
|
|
|
|
arg_type = Float64
|
2018-08-08 19:37:28 +02:00
|
|
|
default = 1e-6
|
2018-01-04 22:08:32 +01:00
|
|
|
"--iterations"
|
2018-08-08 19:37:28 +02:00
|
|
|
help = "set maximal number of iterations for the SDP solver"
|
2018-01-04 22:08:32 +01:00
|
|
|
arg_type = Int
|
2018-08-08 19:37:28 +02:00
|
|
|
default = 50000
|
2018-01-04 22:08:32 +01:00
|
|
|
"--upper-bound"
|
|
|
|
help = "Set an upper bound for the spectral gap"
|
|
|
|
arg_type = Float64
|
|
|
|
default = Inf
|
|
|
|
"--cpus"
|
|
|
|
help = "Set number of cpus used by solver (default: auto)"
|
|
|
|
arg_type = Int
|
|
|
|
required = false
|
|
|
|
"--radius"
|
|
|
|
help = "Radius of ball B_r(e,S) to find solution over"
|
|
|
|
arg_type = Int
|
2018-03-22 11:09:03 +01:00
|
|
|
default = 2
|
2018-01-04 22:08:32 +01:00
|
|
|
"--warmstart"
|
|
|
|
help = "Use warmstart.jl as the initial guess for SCS"
|
|
|
|
action = :store_true
|
2018-08-08 19:37:28 +02:00
|
|
|
"--MCG"
|
2018-07-31 16:54:35 +02:00
|
|
|
help = "Compute for mapping class group of surface of genus N"
|
|
|
|
arg_type = Int
|
|
|
|
required = false
|
|
|
|
"--Higman"
|
|
|
|
help = "Compute for Higman Group"
|
|
|
|
action = :store_true
|
|
|
|
"--Caprace"
|
|
|
|
help = "Compute for Higman Group"
|
|
|
|
action = :store_true
|
2018-01-04 22:08:32 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
return parse_args(args)
|
|
|
|
end
|
|
|
|
const PARSEDARGS = parse_commandline()
|
|
|
|
|
2018-07-31 16:54:35 +02:00
|
|
|
include("CPUselect.jl")
|
|
|
|
set_parallel_mthread(PARSEDARGS, workers=false)
|
2017-12-29 17:45:09 +01:00
|
|
|
|
2018-08-08 19:37:28 +02:00
|
|
|
include("main.jl")
|
|
|
|
include("FPGroups_GAP.jl")
|
2017-12-29 17:45:09 +01:00
|
|
|
|
2018-07-31 16:54:35 +02:00
|
|
|
if PARSEDARGS["Caprace"]
|
2018-08-08 19:37:28 +02:00
|
|
|
G = PropertyTGroups.CapraceGroup(PARSEDARGS)
|
2018-07-31 16:54:35 +02:00
|
|
|
elseif PARSEDARGS["Higman"]
|
2018-08-08 19:37:28 +02:00
|
|
|
G = PropertyTGroups.HigmanGroup(PARSEDARGS)
|
|
|
|
elseif PARSEDARGS["MCG"] != nothing
|
|
|
|
G = PropertyTGroups.MappingClassGroup(PARSEDARGS)
|
2018-07-31 16:54:35 +02:00
|
|
|
else
|
2018-08-08 19:37:28 +02:00
|
|
|
throw("You need to specify one of the --Higman, --Caprace, --MCG N")
|
2017-12-29 17:45:09 +01:00
|
|
|
end
|
2018-08-08 19:37:28 +02:00
|
|
|
|
|
|
|
main(G)
|