#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:                     |  ceda13f0b83784adce78b527099e08e7e003c6ac
  u/borassi/boost_minimum_spanning_tree|     Stopgaps:
   Dependencies:  #18876, #18906     |
-------------------------------------+-------------------------------------

Comment (by dcoudert):

 Hello,

 I know that dealing with weights is not easy. However, here we have
 different behaviors.
 {{{
 sage: g = Graph([(0,1,{'blop':1}), (1,2,{'blop':'b'})])
 sage: g.min_spanning_tree(algorithm="Prim_Boost", weight_function=lambda
 e:e[2]['blop'])
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)
 ...
 TypeError: a float is required
 sage: g = Graph([(0,1,1), (1,2,'b')])
 sage: g.min_spanning_tree(algorithm="Prim_Boost", weight_function=lambda
 e:e[2])
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)
 ...
 TypeError: a float is required
 sage: g.min_spanning_tree(algorithm="Prim_Boost")
 [(0, 1, 1), (1, 2, 'b')]
 }}}

 David.

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