public bool MoveNext() { bool goUp = false; while (nodesPath.Count > 0) { DictRadix <T> .DictNode n = nodesPath.Last.Value; if (goUp || n.Children == null || n.Children.Length == 0) { nodesPath.RemoveLast(); if (nodesPath.Count == 0) { break; } goUp = true; for (int i = 0; i < nodesPath.Last.Value.Children.Length; i++) { // Move to the next child if (nodesPath.Last.Value.Children[i] == n && i + 1 < nodesPath.Last.Value.Children.Length) { nodesPath.AddLast(nodesPath.Last.Value.Children[i + 1]); if (!object.Equals(nodesPath.Last.Value.Value, default(T))) { return(true); } goUp = false; break; } } } else { nodesPath.AddLast(n.Children[0]); goUp = false; if (!object.Equals(n.Children[0].Value, default(T))) { return(true); } } } return(false); }
public TolerantLookupCrawler(DictRadix <T> _enclosingInstance, ToleranceFuncDelegate[] _tolFuncs) { this.enclosingInstance = _enclosingInstance; this.toleranceFunctions = _tolFuncs; }
public RadixEnumerator(DictRadix <T> r) { this.radix = r; nodesPath = new LinkedList <DictRadix <T> .DictNode>(); nodesPath.AddLast(radix.m_root); }