Ticket #9911: 9911_fix.patch

File 9911_fix.patch, 952 bytes (added by gbe, 10 years ago)
  • sage/graphs/digraph.py

    # HG changeset patch
    # User gbe <gehrman@gmail.com>
    # Date 1294797295 28800
    # Node ID 7b2844b1374a87836c1a13bd2bbb03b2418aed15
    # Parent  24aeabcfdbe53592bc54398f1e108ab67cedcb4f
    Trac #9911: switch two lines to use for syntax instead of list comprehension.
    
    diff -r 24aeabcfdbe5 -r 7b2844b1374a sage/graphs/digraph.py
    a b  
    13901390        n=self.order()
    13911391
    13921392        # The removed vertices cover all the back arcs ( third condition )
    1393         [p.add_constraint(d[u]-d[v]+n*(b[u]+b[v]),min=1) for (u,v) in self.edges(labels=None)]
    1394         [p.add_constraint(d[u],max=n) for u in self]
     1393        for (u, v) in self.edges(labels=False):
     1394            p.add_constraint(d[u] - d[v] + n*(b[u] + b[v]), min=1)
     1395        for u in self:
     1396            p.add_constraint(d[u], max=n)
    13951397
    13961398        p.set_objective(Sum([b[v] for v in self]))
    13971399