public Edge(Node to) { this.to = to; }
/// <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); }
/// <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; } } }
public MarkerEdge(Node to) : base(to) { }