'd' should be local here too
Give the graph to use to mergeVertices()

We want it to act on an arbitrary graph, not just the one we have in the
class, as we need a copy for the min-cut phase.