Hi,
I'm using the function add_edge_list() to add vertices/edges to the graph.
However, I have to do the operation more than once and I was wondering if
there was a way of updating property maps. For example:
g = Graph()
edges = [(0, 1), (4, 6), (1, 2)]
vertex_map = g.add_edge_list(edges, hashed=True)
g.vp["vertex_map"] = vertex_map
print([(g.vertex_index[v], g.vp["vertex_map"][v]) for v in g.vertices()])
# [(0, 0), (1, 1), (2, 4), (3, 6), (4, 2)]
edges = [(1, 6), (7, 8)]
vertex_map = g.add_edge_list(edges, hashed=True)
print([(g.vertex_index[v], vertex_map[v]) for v in g.vertices()])




--
Sent from: 
http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
_______________________________________________
graph-tool mailing list
[email protected]
https://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to