public List <TItem> Traverse(Traversion traversion) { List <TItem> result = new List <TItem>(); switch (traversion) { case Traversion.PreOrder: PreOrder(Root, ref result); break; case Traversion.PostOrder: PostOrder(Root, ref result); break; default: throw new ArgumentException("Traversion not supported (did the enum change?)"); } return(result); }
public SickTree() { Root = new SickTreeNode <TItem, TDecision>(); CurrTraversion = Traversion.PreOrder; }
public SickTreeEnumerator(SickTree <TItem, TDecision> tree, Traversion traversion) { list = tree.Traverse(traversion); }