Beispiel #1
0
 List<Node> EdgesFor(Node node)
 {
     List<Node> value;
     if (edges.TryGetValue(node, out value))
         return value;
     return edges[node] = new List<Node>();
 }
Beispiel #2
0
 public void Connect(Node from, Node to)
 {
     var fromEdges = EdgesFor(from);
     if (fromEdges.Contains(to))
         return;
     fromEdges.Add(to);
 }
Beispiel #3
0
 void Append(Node node)
 {
     if(node.IsEmpty)
         return;
     Append(node.ToString());
 }