public abstract class EulerTour<E,R>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
EulerTour.TourResult<R> |
Modifier and Type | Field and Description |
---|---|
protected BinaryTree<E> |
tree |
Constructor and Description |
---|
EulerTour() |
Modifier and Type | Method and Description |
---|---|
protected R |
eulerTour(Position<E> v)
Template method
|
abstract R |
execute(BinaryTree<E> T)
Execution of the traversal.
|
protected void |
init(BinaryTree<E> T)
Initialization of the traversal
|
protected void |
visitBelow(Position<E> v,
EulerTour.TourResult<R> r)
Method called for the visit on from below
|
protected void |
visitLeft(Position<E> v,
EulerTour.TourResult<R> r)
Method called for the visit on the left
|
protected void |
visitRight(Position<E> v,
EulerTour.TourResult<R> r)
Method called for the visit on the right
|
protected BinaryTree<E> tree
public abstract R execute(BinaryTree<E> T)
protected void init(BinaryTree<E> T)
protected void visitLeft(Position<E> v, EulerTour.TourResult<R> r)
protected void visitBelow(Position<E> v, EulerTour.TourResult<R> r)
protected void visitRight(Position<E> v, EulerTour.TourResult<R> r)