Exemple #1
0
 public Edge(Node to)
 {
     this.to = to;
 }
Exemple #2
0
 /// <summary>
 /// Add an edge to a specified node.
 /// </summary>
 /// <param name="otherNode">Other node.</param>
 /// <param name="directed">If set to <c>true</c> directed.</param>
 public void AddEdgeTo(Node otherNode, bool directed = false)
 {
     AddEdge(new MarkerEdge(otherNode), directed);
 }
Exemple #3
0
 /// <summary>
 /// Removes an edge.
 /// </summary>
 /// <param name="otherNode">Other node.</param>
 /// <param name="directed">If set to <c>true</c> directed.</param>
 public virtual void RemoveEdgeTo(Node otherNode, bool directed = false)
 {
     foreach (Edge edge in edges) {
         if (edge.to.ID == otherNode.ID) {
             RemoveEdge(edge, directed);
             RemoveEdgeTo(otherNode, directed);
             return;
         }
     }
 }
Exemple #4
0
 public MarkerEdge(Node to)
     : base(to)
 {
 }