Example #1
0
 public bool Contains(GraphNode aNode)
 {
     if (nodes.Contains(aNode))
       {
     return true;
       }
       return false;
 }
Example #2
0
 public bool Remove(GraphNode aNode)
 {
     if (Contains(aNode))
       {
     nodes.Remove(aNode);
     return true;
       }
       return false;
 }
Example #3
0
 public bool Add(GraphNode aNode)
 {
     if (!Contains(aNode))
       {
     nodes.Add(aNode);
     return true;
       }
       return false;
 }
Example #4
0
 public void AddEdge(GraphNode destination)
 {
     GraphEdge e = new CommunicationGraphEdge(this, destination);
       if (!edges.Contains(e))
     edges.Add(e);
 }
 public CommunicationGraphEdge(GraphNode sourceNode, GraphNode destinationNode)
 {
     source = sourceNode;
     destination = destinationNode;
 }