Beispiel #1
0
 /// <summary>
 /// Adds a edge where the node is connected to
 /// </summary>
 /// <param name="e"></param>
 public void AddEdge(Edge e)
 {
     if (ConnectedEdges.Contains(e))
     {
         return;
     }
     ConnectedEdges.Add(e);
 }
Beispiel #2
0
 public void AddUniqueConnectedEdge(Edge e)
 {
     foreach (Edge edge in ConnectedEdges)
     {
         Edge inverseEdge = e.getInverse();
         if (edge.Vertex1.Location.Equals(e.Vertex1.Location) && edge.Vertex2.Location.Equals(e.Vertex2.Location))
         {
             return;
         }
         else if (edge.Vertex1.Location.Equals(inverseEdge.Vertex1.Location) && edge.Vertex2.Location.Equals(inverseEdge.Vertex2.Location))
         {
             return;
         }
     }
     ConnectedEdges.Add(e);
 }