public Vertex OtherNode(Vertex that) { return Ends.Where(v => v != that).Single(); }
public Edge(int cost, Vertex v, Vertex u) { Cost = cost; Ends = new[] { v, u }; }