Microsoft
Software
Hardware
Network
Question : Graph and Perl
I want to perform BFS and DFS on a graph.
1. how do I build a graph in Perl?
2. how do I do BFS on a given graph in Perl?
3. how do I do a DFS on a given graph in Perl?
Answer : Graph and Perl
Building a graph in Perl:
use Graph::Directed;
use Graph::Undirected;
$d1 = new Graph;
$d2 = new Graph::Directed;
$u = new Graph::Undirected;
explenations + full list of things you can do on a graph:
http://search.cpan.org/doc
/JHI/Graph
-0.201/lib
/Graph/Bas
e.pm
There is a full suite of graph handeling modules you can find at:
http://search.cpan.org/sea
rch?dist=G
raph
Among the modules there you can find the BFS and DFS modules and a module to traverse a graph.
Graph::BFS
http://search.cpan.org/doc
/JHI/Graph
-0.201/lib
/Graph/BFS
.pm
Graph::DFS
http://search.cpan.org/doc
/JHI/Graph
-0.201/lib
/Graph/DFS
.pm
Random Solutions
Lotus Notes: "NSD is running" error
Routing Group Connector Problem
serial ports on mstsc
sqlexpress connection string
Special character not showing when using AJAX
ADODB.ActiveConnection error
How to shrink a database?
SPS Portal Restore to New Farm..
internal SMTP server can't send mail to Exchange user
Animated GIFs and Dynamic Layers