unify AutFN and AutFN_orbit
This commit is contained in:
parent
fa3fffa202
commit
82da35efdd
67
AutFN.jl
67
AutFN.jl
@ -17,6 +17,27 @@ Moreover, due to work of Potapchik and Rapinchuk [1] every real representation o
|
|||||||
We need a different approach: Here we actually compute in Aut(𝔽₄)
|
We need a different approach: Here we actually compute in Aut(𝔽₄)
|
||||||
=#
|
=#
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Generating set
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
function SOutFN_generating_set(N::Int)
|
||||||
|
|
||||||
|
SOutFN = AutGroup(FreeGroup(N), special=true, outer=true)
|
||||||
|
S = gens(SOutFN);
|
||||||
|
S = [S; [inv(s) for s in S]]
|
||||||
|
|
||||||
|
return SOutFN, unique(S)
|
||||||
|
end
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Parsing command line
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
function cpuinfo_physicalcores()
|
function cpuinfo_physicalcores()
|
||||||
maxcore = -1
|
maxcore = -1
|
||||||
for line in eachline("/proc/cpuinfo")
|
for line in eachline("/proc/cpuinfo")
|
||||||
@ -33,15 +54,15 @@ function parse_commandline()
|
|||||||
|
|
||||||
@add_arg_table s begin
|
@add_arg_table s begin
|
||||||
"--tol"
|
"--tol"
|
||||||
help = "set numerical tolerance for the SDP solver (default: 1e-5)"
|
help = "set numerical tolerance for the SDP solver"
|
||||||
arg_type = Float64
|
arg_type = Float64
|
||||||
default = 1e-5
|
default = 1e-6
|
||||||
"--iterations"
|
"--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
|
arg_type = Int
|
||||||
default = 20000
|
default = 20000
|
||||||
"--upper-bound"
|
"--upper-bound"
|
||||||
help = "Set an upper bound for the spectral gap (default: Inf)"
|
help = "Set an upper bound for the spectral gap"
|
||||||
arg_type = Float64
|
arg_type = Float64
|
||||||
default = Inf
|
default = Inf
|
||||||
"--cpus"
|
"--cpus"
|
||||||
@ -49,7 +70,7 @@ function parse_commandline()
|
|||||||
arg_type = Int
|
arg_type = Int
|
||||||
required = false
|
required = false
|
||||||
"-N"
|
"-N"
|
||||||
help = "Consider automorphisms of free group on N generators (default: N=3)"
|
help = "Consider automorphisms of free group on N generators"
|
||||||
arg_type = Int
|
arg_type = Int
|
||||||
default = 2
|
default = 2
|
||||||
end
|
end
|
||||||
@ -57,14 +78,6 @@ function parse_commandline()
|
|||||||
return parse_args(s)
|
return parse_args(s)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# const name = "SYM$N"
|
|
||||||
# const upper_bound=factorial(N)-TOL^(1/5)
|
|
||||||
# S() = generating_set_of_Sym(N)
|
|
||||||
|
|
||||||
# name = "AutF$N"
|
|
||||||
# S() = generating_set_of_AutF(N)
|
|
||||||
|
|
||||||
function main()
|
function main()
|
||||||
|
|
||||||
parsed_args = parse_commandline()
|
parsed_args = parse_commandline()
|
||||||
@ -76,32 +89,30 @@ function main()
|
|||||||
Blas.set_num_threads(parsed_args["cpus"])
|
Blas.set_num_threads(parsed_args["cpus"])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
N = parsed_args["N"]
|
||||||
|
radius = 2
|
||||||
tol = parsed_args["tol"]
|
tol = parsed_args["tol"]
|
||||||
iterations = parsed_args["iterations"]
|
iterations = parsed_args["iterations"]
|
||||||
|
|
||||||
# solver = SCSSolver(eps=tol, max_iters=iterations, verbose=true, linearsolver=SCS.Indirect)
|
|
||||||
solver = SCSSolver(eps=tol, max_iters=iterations, linearsolver=SCS.Direct)
|
|
||||||
|
|
||||||
N = parsed_args["N"]
|
|
||||||
upper_bound = parsed_args["upper-bound"]
|
upper_bound = parsed_args["upper-bound"]
|
||||||
radius=2
|
|
||||||
|
|
||||||
name = "SOutF$N"
|
dirname = "SOutF$(N)_$(upper_bound)_r=$radius"
|
||||||
name = "$(name)_$(upper_bound)_r=$radius"
|
|
||||||
|
|
||||||
logger = PropertyT.setup_logging(name)
|
logger = PropertyT.setup_logging(dirname)
|
||||||
|
|
||||||
info(logger, "Group: $name")
|
info(logger, "Group: $dirname")
|
||||||
info(logger, "Iterations: $iterations")
|
info(logger, "Iterations: $iterations")
|
||||||
info(logger, "Precision: $tol")
|
info(logger, "Precision: $tol")
|
||||||
info(logger, "Upper bound: $upper_bound")
|
info(logger, "Upper bound: $upper_bound")
|
||||||
|
|
||||||
AutFN = AutGroup(FreeGroup(N), special=true, outer=true)
|
G, S = SOutFN_generating_set(N)
|
||||||
S = gens(AutFN);
|
info(logger, G)
|
||||||
S = unique([S; [inv(s) for s in S]])
|
info(logger, "Symmetric generating set of size $(length(S))")
|
||||||
Id = AutFN()
|
info(logger, S)
|
||||||
|
Id = G()
|
||||||
|
|
||||||
@time PropertyT.check_property_T(name, S, Id, solver, upper_bound, tol, 2)
|
solver = SCSSolver(eps=tol, max_iters=iterations, linearsolver=SCS.Direct)
|
||||||
|
|
||||||
|
@time PropertyT.check_property_T(dirname, S, Id, solver, upper_bound, tol, 2)
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -58,20 +58,31 @@ end
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
function cpuinfo_physicalcores()
|
||||||
|
maxcore = -1
|
||||||
|
for line in eachline("/proc/cpuinfo")
|
||||||
|
if startswith(line, "core id")
|
||||||
|
maxcore = max(maxcore, parse(Int, split(line, ':')[2]))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
maxcore < 0 && error("failure to read core ids from /proc/cpuinfo")
|
||||||
|
return maxcore + 1
|
||||||
|
end
|
||||||
|
|
||||||
function parse_commandline()
|
function parse_commandline()
|
||||||
settings = ArgParseSettings()
|
settings = ArgParseSettings()
|
||||||
|
|
||||||
@add_arg_table settings begin
|
@add_arg_table settings begin
|
||||||
"--tol"
|
"--tol"
|
||||||
help = "set numerical tolerance for the SDP solver (default: 1e-5)"
|
help = "set numerical tolerance for the SDP solver"
|
||||||
arg_type = Float64
|
arg_type = Float64
|
||||||
default = 1e-5
|
default = 1e-14
|
||||||
"--iterations"
|
"--iterations"
|
||||||
help = "set maximal number of iterations for the SDP solver (default: 20000)"
|
help = "set maximal number of iterations for the SDP solver (default: 20000)"
|
||||||
arg_type = Int
|
arg_type = Int
|
||||||
default = 20000
|
default = 100000
|
||||||
"--upper-bound"
|
"--upper-bound"
|
||||||
help = "Set an upper bound for the spectral gap (default: Inf)"
|
help = "Set an upper bound for the spectral gap"
|
||||||
arg_type = Float64
|
arg_type = Float64
|
||||||
default = Inf
|
default = Inf
|
||||||
"--cpus"
|
"--cpus"
|
||||||
@ -79,11 +90,11 @@ function parse_commandline()
|
|||||||
arg_type = Int
|
arg_type = Int
|
||||||
required = false
|
required = false
|
||||||
"-N"
|
"-N"
|
||||||
help = "Consider automorphisms of free group on N generators (default: N=2)"
|
help = "Consider automorphisms of free group on N generators"
|
||||||
arg_type = Int
|
arg_type = Int
|
||||||
default = 2
|
default = 2
|
||||||
"--radius"
|
"--radius"
|
||||||
help = "Find the decomposition over B_r(e,S)"
|
help = "Radius of ball B_r(e,S) to find solution over"
|
||||||
arg_type = Int
|
arg_type = Int
|
||||||
default = 2
|
default = 2
|
||||||
end
|
end
|
||||||
@ -100,6 +111,13 @@ end
|
|||||||
function main()
|
function main()
|
||||||
parsed_args = parse_commandline()
|
parsed_args = parse_commandline()
|
||||||
|
|
||||||
|
if parsed_args["cpus"] ≠ nothing
|
||||||
|
if parsed_args["cpus"] > cpuinfo_physicalcores()
|
||||||
|
warn("Number of specified cores exceeds the physical core cound. Performance will suffer.")
|
||||||
|
end
|
||||||
|
BLAS.set_num_threads(parsed_args["cpus"])
|
||||||
|
end
|
||||||
|
|
||||||
N = parsed_args["N"]
|
N = parsed_args["N"]
|
||||||
radius = parsed_args["radius"]
|
radius = parsed_args["radius"]
|
||||||
tol = parsed_args["tol"]
|
tol = parsed_args["tol"]
|
||||||
@ -108,7 +126,6 @@ function main()
|
|||||||
|
|
||||||
dirname = "oSOutF$(N)_$(upper_bound)_r=$radius"
|
dirname = "oSOutF$(N)_$(upper_bound)_r=$radius"
|
||||||
|
|
||||||
isdir(dirname) || mkdir(dirname)
|
|
||||||
logger = PropertyT.setup_logging(dirname)
|
logger = PropertyT.setup_logging(dirname)
|
||||||
|
|
||||||
info(logger, "Group: $dirname")
|
info(logger, "Group: $dirname")
|
||||||
@ -123,7 +140,7 @@ function main()
|
|||||||
AutS = WreathProduct(FiniteField(2,1, "a")[1], PermutationGroup(N))
|
AutS = WreathProduct(FiniteField(2,1, "a")[1], PermutationGroup(N))
|
||||||
# AutS = PermutationGroup(N)
|
# AutS = PermutationGroup(N)
|
||||||
|
|
||||||
solver = SCS.SCSSolver(eps=tol, max_iters=iterations, verbose=true, linearsolver=SCS.Direct)
|
solver = SCSSolver(eps=tol, max_iters=iterations, linearsolver=SCS.Direct)
|
||||||
|
|
||||||
sett = Settings(dirname, N, G, S, AutS, radius, solver, upper_bound, tol)
|
sett = Settings(dirname, N, G, S, AutS, radius, solver, upper_bound, tol)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user