#7673: implement Dijkstra's algorithm for C graphs
----------------------------+-----------------------------------------------
   Reporter:  rlm           |       Owner:  rlm          
       Type:  defect        |      Status:  needs_work   
   Priority:  major         |   Milestone:  sage-4.3.1   
  Component:  graph theory  |    Keywords:               
Work_issues:                |      Author:  Nathann Cohen
   Upstream:  N/A           |    Reviewer:  Robert Miller
     Merged:                |  
----------------------------+-----------------------------------------------
Changes (by ylchapuy):

  * status:  positive_review => needs_work


Comment:

 Hi,
 I'm sorry, but this implementation is buggy...
 {{{
 sage: G = Graph()
 sage: G.add_edge(0,1,9)
 sage: G.add_edge(0,2,8)
 sage: G.add_edge(1,2,7)
 sage: G.shortest_path(0,1,by_weight=True)
 [0, 1]
 sage: G.shortest_path_length(0,1,by_weight=True)
 9
 sage: Gc = G.copy(implementation='c_graph')
 sage: Gc.shortest_path(0,1,by_weight=True)
 [0, 2, 1]
 sage: Gc.shortest_path_length(0,1,by_weight=True)
 15
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7673#comment:8>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.


Reply via email to