Exemple #1
0
 public void addNeighbor(Node node)
 {
     if (!neighbors.Contains(node))
     {
         neighbors.Add(node);
     }   
 }
Exemple #2
0
 public void removeNeighbor(Node node)
 {
     if (node != null)
     {
         while (neighbors.Contains(node))
         {
             neighbors.Remove(node);
         }
     }                       
 }
Exemple #3
0
 public Edge(Node node1, Node node2)
 {
     this.node1 = node1;
     this.node2 = node2;
 }