I'm doing calculations that involve DiGraphs, and I'd like to know whether 
there's a path from one point to another.   

I had been using

def Conn(G,i,j):
    return(G.all_paths(i,j) != [])

But when the graphs got big, this started to take forever.   

I tried

def Conn2(G,i,j):
    return(j in Set(G.connected_component_containing_vertex(i)))

but this treats ignores the directedness.

Any ideas?

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to