Fix a typo, find a bug.

topo-mov
LEdoian 1 year ago
parent 3cbb14c1af
commit 3ca253598a

@ -96,7 +96,7 @@ class ShortestPathTree(Annotator):
self.e = edge
def __lt__(self, other):
return (self.mt, self.dist) < (other.mt, other.dist)
def __ew__(self, other):
def __eq__(self, other):
return (self.mt, self.dist) == (other.mt, other.dist)
heap = [CE(e.cost, e) for e in topo.vertices[self.start_vtxid].outgoing_edges]
heap.sort()

@ -268,6 +268,7 @@ class MainWindow(QtWidgets.QMainWindow):
ann = self.annot_topo.annotations[self.highlighter]
for shk in ann.for_vertex.keys() | ann.for_edge.keys():
shapes[shk].setPen(QtGui.QPen(QtGui.QColor('blue')))
# FIXME: also color edges in opposite direction
for sh in shapes.values(): self.scene.addItem(sh)
main_window = MainWindow()

Loading…
Cancel
Save