Thank you for this.

On 16 jan, 10:02, Robert Bradshaw <rober...@math.washington.edu>
wrote:
> On Jan 16, 2009, at 12:34 AM, Vincent D 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.
>
> One can get all the networkx features directly via
>
> sage: G = digraphs.ButterflyGraph(3)
> sage: G.networkx_graph()
> <networkx.xdigraph.XDiGraph object at 0xe851330>
>
> - Robert
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to