Пример #1
0
 public Vertex OtherNode(Vertex that)
 {
     return Ends.Where(v => v != that).Single();
 }
Пример #2
0
 public Edge(int cost, Vertex v, Vertex u)
 {
     Cost = cost;
     Ends = new[] { v, u };
 }