/// <summary></summary> public IEnumerator <BinaryTreeNode <T> > GetEnumerator(TraversalMethod method) { switch (method) { case TraversalMethod.Postorder: return(Postorder.GetEnumerator()); case TraversalMethod.Inorder: return(Inorder.GetEnumerator()); case TraversalMethod.Levelorder: return(Levelorder.GetEnumerator()); case TraversalMethod.Preorder: default: return(Preorder.GetEnumerator()); } }
/// <summary></summary> public IEnumerator <TreeNode <T> > GetEnumerator(TraversalMethod method) { switch (method) { case TraversalMethod.Postorder: return(Postorder.GetEnumerator()); case TraversalMethod.Inorder: return(Inorder.GetEnumerator()); case TraversalMethod.Levelorder: return(Levelorder.GetEnumerator()); case TraversalMethod.Children: return(this._children.GetEnumerator()); case TraversalMethod.Path: return(Path.GetEnumerator()); case TraversalMethod.Preorder: default: return(Preorder.GetEnumerator()); } }