public override Node AddChild(TKey child, TWeight weight = default) { if (children.ContainsKey(child)) { return(nodes[child]); } DAGraphNode node = null; if (nodes.ContainsKey(child)) { node = (DAGraphNode)nodes[child]; } else { node = new DAGraphNode(Container, child, Level + 1); } ++node.tracking; children[child] = weight; return(node); }
public override void Init(TKey key, TValue value = default) { Root = new DAGraphNode(this, key, value); }