Interface VertexVisitor
public interface VertexVisitor
A visitor is encapsulation of some operation on graph vertices during
traveling graph (DFS or BFS).
-
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(int vertex) Performs some operations on the currently-visiting vertex during DFS or BFS.
-
Method Details
-
accept
void accept(int vertex) Performs some operations on the currently-visiting vertex during DFS or BFS.- Parameters:
vertex- the index of vertex.
-