#19014: Tarjan Strongly Connected Components Algorithm
-------------------------------------+-------------------------------------
       Reporter:  borassi            |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.9
      Component:  graph theory       |   Resolution:
       Keywords:  Strongly           |    Merged in:
  connected components, Tarjan       |    Reviewers:
        Authors:  Michele Borassi    |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  0f855c6676d6f10a6f68b64b4c2be693c08eba91
  u/borassi/tarjan_strongly_connected_components_algorithm|     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by borassi):

 Just a detail, for future references:

 {{{
 cdef int i
 cdef list output = list(list() for i in range(nscc))  # We cannot use []
 here
 for i,v in enumerate(G.vertex_iterator()):
 output[scc[i]].append(v)

 }}}
 If we use `G.vertex_iterator()`, the vertex labels are not correct (I also
 added an example with labels, that shows the problem). With
 `G.vertices()`, everything works fine.

 Why?

--
Ticket URL: <http://trac.sagemath.org/ticket/19014#comment:15>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" 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-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to