1Graph::Traversal::BFS(3U)ser Contributed Perl DocumentatiGornaph::Traversal::BFS(3)
2
3
4

NAME

6       Graph::Traversal::BFS - breadth-first traversal of graphs
7

SYNOPSIS

9           use Graph;
10           my $g = Graph->new;
11           $g->add_edge(...);
12           use Graph::Traversal::BFS;
13           my $b = Graph::Traversal::BFS->new($g, %opt);
14           $b->bfs; # Do the traversal.
15

DESCRIPTION

17       With this class one can traverse a Graph in breadth-first order.
18
19       The callback parameters %opt are explained in Graph::Traversal.
20
21   Methods
22       The following methods are available:
23
24       bfs Traverse the graph in breadth-first order.  Returns all vertices
25           traversed in post-order.
26

SEE ALSO

28       Graph::Traversal, Graph::Traversal::DFS, Graph.
29
30
31
32perl v5.32.0                      2020-07-28          Graph::Traversal::BFS(3)
Impressum