Commit af9fb2e7 authored by Hans-Peter Deifel's avatar Hans-Peter Deifel
Browse files

wta: Re-implement out-degree argument

This still passes --transitions to the generator but calculates the number of
transitions based on the number of states and a desired number of edges per
state.
parent 1e0e0635
......@@ -30,6 +30,8 @@ def check_zerotrans(args):
edge_spec = ("zero-frequency", args.zero_frequency)
elif args.transitions:
edge_spec = ("transitions", args.transitions)
elif args.out_degree:
edge_spec = ("transitions", args.out_degree) # HACK
else:
print("One of --zero-frequency and --transitions must be provided")
sys.exit(1)
......@@ -204,6 +206,9 @@ def test(args, states):
print("Trying %d..." % states)
args.states = str(states)
if args.out_degree:
args.transitions = str(states * int(args.out_degree))
generate(args)
for i in range(0, samples):
......@@ -288,6 +293,7 @@ def main():
bisect_parser.add_argument('--symbols', required=True)
bisect_parser.add_argument('--zero-frequency')
bisect_parser.add_argument('--transitions')
bisect_parser.add_argument('--out-degree')
bisect_parser.add_argument('--different-values')
bisect_parser.add_argument('--start-states', type=int, default=50)
bisect_parser.add_argument('--good', type=int)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment