Changeset 7320:3a4dace4227b


Ignore:
Timestamp:
11/06/07 15:54:12 (6 years ago)
Author:
mabshoff@…
Branch:
default
Message:

revert #1117 due to correct fix coming up next

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sage/graphs/graph.py

    r7318 r7320  
    52245224            sage: edges4 = g.min_spanning_tree(weight_function=lambda (v,w,l): 1/(v+w+1)^2) 
    52255225            sage: len(edges4) 
    5226             14 
     5226            49 
    52275227         
    52285228        """ 
     
    52335233            # Kruskal's algorithm 
    52345234            edges=[] 
    5235             sorted_edges_iterator=iter(sorted(self.edges(), cmp=lambda x,y: cmp(weight_function(x),weight_function(y)))) 
     5235            sorted_edges_iterator=iter(sorted(self.edges(), cmp=cmp)) 
    52365236            union_find = dict([(v,None) for v in self.vertex_iterator()]) 
    52375237            for i in xrange(self.order()): 
Note: See TracChangeset for help on using the changeset viewer.