#18910: Boost minimum spanning tree
-------------------------------------+-------------------------------------
       Reporter:  borassi            |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.8
      Component:  graph theory       |   Resolution:
       Keywords:  Boost, minimum     |    Merged in:
  spanning tree                      |    Reviewers:
        Authors:  Michele Borassi    |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  8278b0bf8b3b4c86bdc5b543f5ca57c8b682f83a
  u/borassi/boost_minimum_spanning_tree|     Stopgaps:
   Dependencies:  #18876, #18906     |
-------------------------------------+-------------------------------------

Comment (by dcoudert):

 The weight function you use does not allow to access all possible stuff
 that might be stored on an edge. For instance, I may have an edge like
 `(u, v, {'weight':3, 'toto':4})` in which case a function like
 `weight_function=lambda e:e[2]['weight']` is possible. With current
 implementation, you assume that `weight_function((u,v))` returns the
 weight. Better to have `weight_function(e)` or `weight_function((u,v,l))`.

 Also, could you be a bit more specific with the description of the weight
 function
 {{{
 - ``weight_function`` -- A function that takes an edge and returns a
           numeric weight. If ``None`` (default), the algorithm uses the
 edge
           weights, if available, otherwise it assigns weight 1 to each
 edge (in
           the latter case, the output can be any spanning tree).
 }}}
 In particular, the default behavior assume that edge weights are numbers,
 that is if `e=(u,v,l)` then `l` is a number.

 David.

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