#10885: Floyd-Warshall algorithm in Cython
-----------------------------+----------------------------------------------
   Reporter:  ncohen         |       Owner:  jason, ncohen, rlm
       Type:  enhancement    |      Status:  needs_work        
   Priority:  major          |   Milestone:  sage-4.7          
  Component:  graph theory   |    Keywords:                    
     Author:  Nathann Cohen  |    Upstream:  N/A               
   Reviewer:                 |      Merged:                    
Work_issues:                 |  
-----------------------------+----------------------------------------------
Changes (by ylchapuy):

  * status:  needs_review => needs_work


Comment:

 You can easily improve a lot the efficiency by:
   * cdefing list gverts = g.verts()
   * using g instead of gg._backend._cg
   * cdefing two dicts variables for gg._backend.vertex_ints and
 gg._backend.vertex_labels as well
   * in the main triple loop, cdefing two vars dv = dist[v_int] and dw =
 dist[w_int] as outside as possible

 Also anything dealing with prec should only be done it paths=True. This
 can save half the memory when not needed.

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