Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Finding a Path

by Thelonius (Priest)
on Jan 24, 2007 at 14:27 UTC ( [id://596258]=note: print w/replies, xml ) Need Help??

in reply to Develop a Tree

There's a Graph module on CPAN. I haven't used it, but it looks like it's depth-first traversal would do for you.

Of course there's not usually just one path from a user's workstation to a server and the actual path depends on the state of each router's tables as the packet passes through them. But often--usually--the shortest path (in terms of # of edges or nodes) is the one taken.

Replies are listed 'Best First'.
Re^2: Finding a Path
by Herkum (Parson) on Jan 24, 2007 at 15:29 UTC

    I have taken a look at Graph before. The problem I have is that I cannot find any tutorials on how to use it. Most of what I seen in the way of examples, the programmer refers to everything in a way that imply you know what he is talking about.

    If you could point me at a tutorial for Graph I would certainly appreciate it.

      The tutorial for the Graph module is Mastering Algorithms with Perl by Jon Orwant, Jarkko Hietaniemi, and John Macdonald. I enjoyed this book very much and I use it as a reference for the Graph modules, which I use a lot.

      It should work perfectly the first time! - toma

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://596258]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-05-21 22:58 GMT
Find Nodes?
    Voting Booth?

    No recent polls found