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::DFS

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

NAME

Graph::Traversal::DFS - depth-first traversal of graphs


SYNOPSIS

    use Graph;
    my $g = Graph->new;
    $g->add_edge(...);
    use Graph::Traversal::DFS;
    my $d = Graph::Traversal::DFS->new($g, %opt);
    $d->dfs; # Do the traversal.


DESCRIPTION

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

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

Methods

The following methods are available:

dfs
Traverse the graph in depth-first order. Returns all vertices traversed in post-order.


SEE ALSO

the Graph::Traversal manpage, the Graph::Traversal::BFS manpage, Graph.

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