Note
This is the documentation for the current state of the development branch of rustworkx. The documentation or APIs here can change prior to being released.
BFSVisitor#
- class BFSVisitor[source]#
Bases:
object
A visitor object that is invoked at the event-points inside the
bfs_search()
algorithm. By default, it performs no action, and should be used as a base class in order to be useful.Methods
This is invoked on the subset of non-tree edges whose target vertex is colored black at the time of examination.
This is invoked when a vertex is encountered for the first time.
This is invoked on vertex v after all of its out edges have been examined.
This is invoked on the subset of non-tree edges whose target vertex is colored gray at the time of examination.
This is invoked on back or cross edges for directed graphs and cross edges for undirected graphs.
This is invoked on each edge as it becomes a member of the edges that form the search tree.