示例#1
0
文件: Edge.cs 项目: jfreax/BAIMP
 public Edge(Node to)
 {
     this.to = to;
 }
示例#2
0
文件: Node.cs 项目: jfreax/BAIMP
 /// <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);
 }
示例#3
0
文件: Node.cs 项目: jfreax/BAIMP
 /// <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;
         }
     }
 }
示例#4
0
 public MarkerEdge(Node to)
     : base(to)
 {
 }