> Probably that won't be needed. At some point I need to know if a vertex
> is part of an oriented cycle. That's all. I need to know it only once.

Okay. Then try that:

sage: any(v == x for x in d.breadth_first_search(d.neighbors_out(v)))

Algorithmically it is optimal, but it is written at higher level than
the strongly connected components routines (and may be slower as a
result).

Nathann

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

Reply via email to