|
net.datastructures - version 5.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.datastructures.EulerTour<E,R>
public abstract class EulerTour<E,R>
Template for algorithms traversing a binary tree using an Euler tour. The subclasses of this class will redefine some of the methods of this class to create a specific traversal.
Nested Class Summary | |
---|---|
class |
EulerTour.TourResult<R>
|
Field Summary | |
---|---|
protected BinaryTree<E> |
tree
|
Constructor Summary | |
---|---|
EulerTour()
|
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected BinaryTree<E> tree
Constructor Detail |
---|
public EulerTour()
Method Detail |
---|
public abstract R execute(BinaryTree<E> T)
protected void init(BinaryTree<E> T)
protected R eulerTour(Position<E> v)
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)
|
net.datastructures - version 5.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |