1
0
mirror of https://github.com/kalmarek/SmallHyperbolic synced 2024-11-30 17:15:28 +01:00

Also take both generators in a single argument.

This commit is contained in:
Stefan Witzel 2020-09-03 11:35:33 +02:00
parent ef6f5db7c7
commit 8e1b410d41

View File

@ -56,6 +56,7 @@ function adjacency(ϱ, CC, a, b)
end end
function parse_our_args() function parse_our_args()
print(ARGS)
s = ArgParseSettings() s = ArgParseSettings()
@add_arg_table s begin @add_arg_table s begin
"-p" "-p"
@ -66,10 +67,12 @@ function parse_our_args()
help = "generator a (optional)" help = "generator a (optional)"
"-b" "-b"
help = "generator b (optional)" help = "generator b (optional)"
"--ab"
help = "array of generators a and b (optional)"
end end
result = parse_args(s) result = parse_args(s)
for key in ["a", "b"] for key in ["a", "b", "ab"]
val = get(result, key, "") val = get(result, key, "")
if val != nothing if val != nothing
result[key] = eval(Meta.parse(val)) result[key] = eval(Meta.parse(val))
@ -77,6 +80,11 @@ function parse_our_args()
delete!(result, key) delete!(result, key)
end end
end end
val = get(result, "ab", "")
if val != ""
result["a"] = val[1]
result["b"] = val[2]
end
result result
end end
@ -101,7 +109,8 @@ open(joinpath("log", LOGFILE), "w") do io
a,b = SL2p_gens(p) a,b = SL2p_gens(p)
a = SL₂{p}(get(parsed_args, "a", a)) a = SL₂{p}(get(parsed_args, "a", a))
b = SL₂{p}(get(parsed_args, "b", b)) b = SL₂{p}(get(parsed_args, "b", b))
print(a, " ", b) @info "a = " a
@info "b = " b
Borel_cosets = let p = p, (a,b) = (a,b) Borel_cosets = let p = p, (a,b) = (a,b)
SL2p, sizes = SL2p, sizes =