Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
Graph.0.69 Module---how to get a DAG from....
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Sean, post: 4807472"] I have a directed graph looks like the following (see the figure). Edges in the original directed graph: [main] -> [foo]; [main] -> [bar]; [foo] -> [trouble]; [trouble] -> [foo]; I want to find all the cycles. After I find a cycle, I want to break it by deleting an edge starting a 'farther' vertice from node [main]---in this case, deleting [trouble] -> [foo] to get the following graph Edges after manipulation: [main] -> [foo]; [main] -> [bar]; [foo] -> [trouble]; --------------------------------------------------------- [main] / \ [foo] [bar] / / / / [trouble] --------------------------------------------------------------- I tried to use @v = $g->connected_component_by_index($i), but it seems to return single nodes (which is deemed as strongly connected component itself), which is not what I want. $g->find_a_cycle does not work either, because it returns same cycle no matter how many times you call it. I am newbie in perl. Can someone give me a suggestion how to utilize the existing APIs in Graph.0.69? [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
Graph.0.69 Module---how to get a DAG from....
Top