Class AbstractInOrderVisitor<T,R>
java.lang.Object
io.openml.gearbox.binarytree.traversal.AbstractVisitor<T,R>
io.openml.gearbox.binarytree.traversal.AbstractInOrderVisitor<T,R>
- Type Parameters:
T
- The type of value stored in the nodeR
- The type of object to be computed via a visiting the tree, seeAbstractVisitor.getTraversalResult()
Deprecated.
AbstractInOrderVisitor
represents the notion of iteratively reading a binary tree in an in-order fashion.-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.openml.gearbox.binarytree.traversal.AbstractVisitor
canTerminate, getTraversalResult, visitNode
-
Constructor Details
-
AbstractInOrderVisitor
public AbstractInOrderVisitor()Deprecated.
-
-
Method Details
-
traverse
Deprecated.Returns inorder traversal of a binary tree.This method runs in O(n^2) time and O(n) space without recursion.
- Parameters:
root
- the root of the tree- Returns:
- the inorder traversal of the tree
- Throws:
NullPointerException
- ifroot
isnull
-
apply
Deprecated.
-
AbstractInOrderVisitor
reflects an obsolete implementation that doesn't strictly bind the principle of Visitor pattern. Please use the enhancedTreeTraverser
orAbstractInOrderTraversalVisitor