Re: [graph-tool] Graphs into layers

2020-12-15 Thread Tiago de Paula Peixoto
Am 14.12.20 um 06:49 schrieb Lietz, Haiko: Is there a better way? Yes, take a look at the graph_union() function, with joins two graphs into one. If you pass it an 'intersection' parameter, it maps nodes of one graph into the other, which allows you to join only the edge lists. I’m using

[graph-tool] Graphs into layers

2020-12-13 Thread Lietz, Haiko
Hi all, If I have two graphs g and h with internal edge property maps, how can I make these the layers of a graph i? g = Graph(directed=False) g.add_vertex(4) g_weight = g.new_ep('int') g_layer = g.new_ep('int') g.add_edge_list([[0, 1, 2, 0], [2, 3, 2, 0]], eprops=[g_weight, g_layer])