infovis.tree
Class DepthFirst
java.lang.Object
infovis.tree.DepthFirst
public class DepthFirst
- extends Object
Depth First traversal algorithm for trees.
- Version:
- $Revision: 1.9 $
- Author:
- Jean-Daniel Fekete
Nested Class Summary |
static interface |
DepthFirst.Visitor
Class for traversing a tree depth first. |
DepthFirst
public DepthFirst()
visit
public static void visit(Tree tree,
DepthFirst.Visitor visitor,
int node)
- Traverse the tree starting at a node with a depth first traversal,
calling the visitor at each node.
- Parameters:
tree
- the Tree
visitor
- the DepthFirst,Visitor
node
- the root node.
visitPreorder
public static void visitPreorder(Tree tree,
IntProcedure visitor,
int node)
visitPreorder
public static void visitPreorder(Tree tree,
IntProcedure visitor)
visit
public static void visit(Tree tree,
DepthFirst.Visitor visitor)
- Traverse the tree starting at a node with a depth first traversal,
calling the visitor at each node.
- Parameters:
tree
- the Tree
visitor
- the DepthFirst,Visitor
Copyright © 2005 by Jean-Daniel Fekete and INRIA, France All rights reserved.