1
0
mirror of https://github.com/kalmarek/SmallHyperbolic synced 2024-12-25 18:25:29 +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
function parse_our_args()
print(ARGS)
s = ArgParseSettings()
@add_arg_table s begin
"-p"
@ -66,10 +67,12 @@ function parse_our_args()
help = "generator a (optional)"
"-b"
help = "generator b (optional)"
"--ab"
help = "array of generators a and b (optional)"
end
result = parse_args(s)
for key in ["a", "b"]
for key in ["a", "b", "ab"]
val = get(result, key, "")
if val != nothing
result[key] = eval(Meta.parse(val))
@ -77,6 +80,11 @@ function parse_our_args()
delete!(result, key)
end
end
val = get(result, "ab", "")
if val != ""
result["a"] = val[1]
result["b"] = val[2]
end
result
end
@ -101,7 +109,8 @@ open(joinpath("log", LOGFILE), "w") do io
a,b = SL2p_gens(p)
a = SL₂{p}(get(parsed_args, "a", a))
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)
SL2p, sizes =