#19227: Graphs: DFS and broken distance-parameter
-------------------------------------+-------------------------------------
       Reporter:  jmantysalo         |        Owner:
           Type:  defect             |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.9
      Component:  graph theory       |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Jori Mäntysalo     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/jmantysalo/graphs__dfs_and_broken_distance_parameter|  
89b7490bec7e28f1c63bb81603eeab69fefb4e65
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by dcoudert):

 Could this be ok?
 {{{
 sage: D = digraphs.Path(10)
 sage: D.add_path([22,23,24,5])
 sage: D.add_path([5,33,34,35])
 sage: list(D.depth_first_search(5, neighbors=D.neighbors_in))
 [5, 4, 3, 2, 1, 0, 24, 23, 22]
 sage: list(D.breadth_first_search(5, neighbors=D.neighbors_in))
 [5, 24, 4, 23, 3, 22, 2, 1, 0]
 sage: list(D.depth_first_search(5, neighbors=D.neighbors_out))
 [5, 6, 7, 8, 9, 33, 34, 35]
 sage: list(D.breadth_first_search(5, neighbors=D.neighbors_out))
 [5, 33, 6, 34, 7, 35, 8, 9]
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/19227#comment:11>
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