the real function I wrote is more :
def is_strongly_connected(G) :
if len(G.vertices) == 0 : return True
return len(G.strongly_connected_components()) == 1
It is really not the same !
On 16 jan, 09:34, Vincent D <[email protected]> wrote:
> Hello,
>
> I'm working on directed graphs. So
> sage : G = DiGraph()
> ...
>
> and I want to know if my graph G is strongly connected. There is such
> a method in networkx but it seems that this features disappear in SAGE
> (?). Moreover, there is a method strongly_connected_components which
> return the decomposition in strongly connected components. My solution
> is for now :
>
> def is_strongly_connected(G) :
> if G.vertices() == 0 : return True
> return len(G.strongly_connected_components()) != 1
>
> Which is a really non efficient.
>
> Hoping somebody knows where this feature hides.
>
> Vincent D.
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---