Commit 6aa5b328 authored by Jirka Fink's avatar Jirka Fink
Browse files

1st assignment: Fixed running individual tests

parent 1bce6e2d
......@@ -42,7 +42,7 @@ def evaluate(vertex_cnt, edge_cnt, is_bipartite, seed, optimal_weight, max_weigh
def main():
tests = {
"trivial": (10, 15, False, 2157, 2453, 1000, 0, 0.01),
"general_sparse_unweighted": (100, 200, False, 45876, 49, 1, 2, 4),
"general_sparse_unweighted": (500, 1000, False, 45876, 245, 1, 2, 0.1),
"bipartite_dense": (500, 1000000, True, 98754, 249987, 1000, 2, 10),
"general_dense": (500, 1000000, False, 2134, 249987, 1000, 2, 20),
"bipartite_sparse": (10000, 30000, True, 4578, 3700952, 1000, 2, 1.5),
......@@ -58,13 +58,13 @@ def main():
running_time = process_time() - start_time
print(msg)
print()
results.add_row([name, points, vertices, edges, expected_time, running_time, msg])
print(results)
else:
name = sys.argv[1]
if name in tests:
status,msg = evaluate(*tests[name])
vertices, edges, bipartite, seed, optimal_weight, max_weight, points, expected_time = tests[name]
status,msg = evaluate(vertices, edges, bipartite, seed, optimal_weight, max_weight)
print(msg)
else:
print("Unknown test", name)
......
Supports Markdown
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