Beispiel #1
0
 public bool AddConnectionHistory(PTGraphEdge edge)
 {
     try
     {
         _historyEdges.Add(edge);
         UpdateEdges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Beispiel #2
0
 /// <summary>
 /// The other node the node is connected to by an edge
 /// </summary>
 /// <param name="edge"></param>
 /// <returns>Return null of input is invalid</returns>
 public PTGraphNode DestinationThrough(PTGraphEdge edge)
 {
     if (edge == null)
     {
         return(null);
     }
     if (this == edge.nodeA)
     {
         return(edge.nodeB);
     }
     if (this == edge.nodeB)
     {
         return(edge.nodeA);
     }
     return(null);
 }