Пример #1
0
 public int DistanceTo(Vertex v)
 {
     return Math.Abs(this.Weight - v.Weight);
 }
Пример #2
0
 public bool TryRemoveNeighbor(Vertex neighbor)
 {
     return neighbors.Remove(neighbor);
 }