|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface defines a breadth first graph visitor. An instance of
this visitor serves as callback for the BFS algorithm according
to the Visitor pattern.
| 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. |
| Method Detail |
public void startGraph(Graph graph)
graph - graph the algorithm is working upon.public void endGraph(Graph graph)
graph - graph the algorithm is working upon.
public void visitNode(Graph graph,
Node node,
Node parent,
int depth)
graph - 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)
graph - 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 | ||||||||||