private void ContractEdge(UndirectedGraph <int> g, int index) { var edge = g.Edges[index]; g.Contraction(edge.Source.Key, edge.Dest.Key); }