Skip to content
Snippets Groups Projects
Commit cfb2fffa authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Print properties of graph neatly

Simply printing g displays the address of the graph, which may change
between runs. This was not convenient for the comparison of runs.
parent cdc1447d
No related branches found
No related tags found
No related merge requests found
......@@ -103,7 +103,12 @@ print('Loading gt file...')
g = graph_tool.Graph()
g.load('segmented.gt')
t1 = time.perf_counter()
print(f'Loading done: {g}')
print("Input graph:")
print("Number of vertices:", g.num_vertices())
print("Number of edges:", g.num_edges())
print("Internal properties:")
g.list_properties()
print('Loading done...')
timings.write(f"loading: {t1 - t0} s\n")
timings.close()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment