Class TreeIterator


  • public class TreeIterator
    extends java.lang.Object
    Class used to iterate over a given subtree. Does not work for artificial node as root because cur == end at the start.
    Author:
    brockhoff
    • Constructor Summary

      Constructors 
      Constructor Description
      TreeIterator​(int[] t, int[] f)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()  
      int next()  
      void setRoot​(int root)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TreeIterator

        public TreeIterator​(int[] t,
                            int[] f)
    • Method Detail

      • setRoot

        public void setRoot​(int root)
      • hasNext

        public boolean hasNext()
      • next

        public int next()