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