in reply to Knowledge of the Graph distribution
Now when I run this, I getuse Graph::Directed; my $g = Graph::Directed->new(); # Each pair is a pair of vertices qw|a b| indicating # a directed edge from a to b # graph: lineitem <-> invioce <-> claim <-> insurer $g->add_edges( qw| lineitem invoice invoice lineitem invoice claim insurer claim claim invoice claim insurer|); print "Strongly connected components: ", $g->strongly_connected_graph, + "\n";
Which doesn't seem right; the graph above clearly has one strongly connected component. If I take out the invoice->claim edge, I getStrongly connected components:
which makes sense to me. Adding edges cannot reduce the connectivity of a graph, so Graph looks buggy to me.Strongly connected components: insurer+claim-lineitem+invoice
Do others concur?
-Mark
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Knowledge of the Graph distribution
by dragonchild (Archbishop) on Apr 02, 2004 at 17:44 UTC | |
|
Re: Re: Knowledge of the Graph distribution
by toma (Vicar) on Apr 04, 2004 at 15:10 UTC |