예제 #1
0
 public void AddDirectedEdge(GraphNode <T> from, GraphNode <T> to, int cost)
 {
     from.Neighbors.Add(to);
     from.Costs.Add(cost);
 }
예제 #2
0
 public void AddNode(GraphNode <T> node)
 {
     // adds a node to the graph
     nodeSet.Add(node);
 }