Exemplo n.º 1
0
 public void RemoveNeighbour(MA_Node neighbour)
 {
     Console.WriteLine("RemoveNeighbour()");
     try
     {
         this.neighbours.Remove(neighbour.NodeID);
         neighbour.Neighbours.Remove(this.NodeID);
     }
     catch (Exception ex)
     {
     }
 }
Exemplo n.º 2
0
 public void AddNeighbour(MA_Node neighbour)
 {
     for (int index = 0; index < this.neighbours.Count; ++index)
     {
         if (this.neighbours[index] == neighbour.NodeID)
         {
             return;
         }
     }
     this.neighbours.Add(neighbour.NodeID);
     neighbour.Neighbours.Add(this.NodeID);
 }