Hello, Here is my digraph in .dot format: digraph G { 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 0->3 ; 0->2 ; 1->4 ; 1->8 ; 2->5 ; 3->7 ; 3->8 ; 4->8 ; 5->6 ; 6->2 ; 7->9 ; 8->0 ; 9->7 ; } to load it, just do: from graph_tool import load_graph g = load_graph('filename', fmt='dot') So, How can i get a list of all strongly connected components<http://en.wikipedia.org/wiki/Strongly_connected_component> of a digraph? I tried *label_components, *but i didnt understand how it works... Thanks!
On 04/02/2014 04:32 AM, Marcelo Maia wrote:
So, How can i get a list of all strongly connected components <http://en.wikipedia.org/wiki/Strongly_connected_component> of a digraph? I tried *label_components, *but i didnt understand how it works...
The function label_components() is exactly what you need. What did you not understand? Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
participants (2)
-
Marcelo Maia -
Tiago de Paula Peixoto