Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^4: How do I use Graph::Traversal?

by thor (Priest)
on Jul 07, 2005 at 18:17 UTC ( [id://473179]=note: print w/replies, xml ) Need Help??


in reply to Re^3: How do I use Graph::Traversal?
in thread How do I use Graph::Traversal?

As it turns out, a topological sort is good enough for my purposes. The actual scenario is thus: I have a series of batch jobs that are related by dependencies. I noticed that some jobs submitted before the jobs on which they depend submit. So, for each job, I want to find the earliest possible submittal time such that at submittal time, the given job has a chance to run. As you said, a topological sort returns parents before children, this'll suffice for the given task. Thanks for your help!

Incidentally, I was originally going to go with a breadth-first search. I ran in to the same sort of problem that I did with depth-first: the nodes weren't returning in the order that I expected. It was in the trial and error that I tried to do anything with depth-first at all.

thor

Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-04-23 15:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found