Perl Diver 2.31
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

Graph::Traversal::BFS

Name Graph::Traversal::BFS
Version
Located at /usr/share/perl5/vendor_perl
File /usr/share/perl5/vendor_perl/Graph/Traversal/BFS.pm
Is Core No
Search CPAN for this module Graph::Traversal::BFS
Documentation Graph::Traversal::BFS
Module Details Graph::Traversal::BFS

NAME

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


SYNOPSIS

    use Graph;
    my $g = Graph->new;
    $g->add_edge(...);
    use Graph::Traversal::BFS;
    my $b = Graph::Traversal::BFS->new($g, %opt);
    $b->bfs; # Do the traversal.


DESCRIPTION

With this class one can traverse a Graph in breadth-first order.

The callback parameters %opt are explained in the Graph::Traversal manpage.

Methods

The following methods are available:

bfs
Traverse the graph in breadth-first order. Returns all vertices traversed in post-order.


SEE ALSO

the Graph::Traversal manpage, the Graph::Traversal::DFS manpage, Graph.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2024