|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graph.algorithm.BFSVisitorAdapter
This defines a bfs graph visitor adapter for convenience. All methods
from the interface BFSVisitor are implemented as empty
methods in this adapter class.
| Constructor Summary | |
BFSVisitorAdapter()
Constructs a new BFSVisitorAdapter adapter instance. |
|
| Method Summary | |
void |
endGraph(Graph graph)
Callback invoked after the dfs algorithm completed its work. |
void |
startGraph(Graph graph)
Callback invoked before the dfs algorithm starts its work. |
void |
visitEdge(Graph graph,
Edge edge,
boolean treeEdge)
Invoked when an edge is processed by the BFS. |
void |
visitNode(Graph graph,
Node node,
Node parent,
int depth)
Invoked when a node is processed by the BFS. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BFSVisitorAdapter()
BFSVisitorAdapter adapter instance.
| Method Detail |
public void startGraph(Graph graph)
BFSVisitor
startGraph in interface BFSVisitorgraph - graph the algorithm is working upon.public void endGraph(Graph graph)
BFSVisitor
endGraph in interface BFSVisitorgraph - graph the algorithm is working upon.
public void visitNode(Graph graph,
Node node,
Node parent,
int depth)
BFSVisitor
visitNode in interface BFSVisitorgraph - the graph we visitnode - the node currently being visited.parent - the parent of the node or null if no parent was found.depth - the depth of the bfs search.
public void visitEdge(Graph graph,
Edge edge,
boolean treeEdge)
BFSVisitor
visitEdge in interface BFSVisitorgraph - the graph we visit.edge - the edge currently being visited.treeEdge - true if this edge is a tree edge of the BFS search tree.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||