#18938: Refactor shortest paths
-------------------------------------+-------------------------------------
       Reporter:  borassi            |        Owner:
           Type:  defect             |       Status:  new
       Priority:  major              |    Milestone:  sage-6.8
      Component:  graph theory       |   Resolution:
       Keywords:  Shortest path,     |    Merged in:
  eccentricity, Dijkstra             |    Reviewers:
        Authors:  Michele Borassi    |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  dca691b5114e24d8a157a8b0bf7f92b2275a87e0
  u/borassi/refactor_shortest_paths  |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by ncohen):

 Hello,

 > I think you should only review the methods `shortest_paths` and
 `check_weight_function`

 The second function should be a hidden one, i.e. `_check_weight_function`.
 It is only a checking routine that we need internally. I am always wary of
 these routines by the way, especially when they apply to linear-time
 algorithms....

 Anyawy. You should probably replace `.edges()` by `.edge_iterator()` in
 there, for otherwise the first line of the loop is actually as time/space
 consuming as a full graph copy (even worse actually, as it is pure python
 stuff).

 > One question: since most of the arguments are the same for several
 routines, is there a way to avoid copy-paste in the documentation?

 No magical way that I know. It's either this or "see the doc of <X> for
 more inforamtion". Or you can have a `**kwds` instead of copy/pasting the
 arguments in the function's prototype and foward them all to the subcall,
 saying that "all arguments of function <X> (see its doc) are accepted". No
 magic, really.

 - {{{If ``None`` and ``by_weight`` is ``True``, we output ``l`` by
 default.}}} We output 'l'? What about 'we use the edge's label as a
 weight'?

 Nathann

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