Ask a Question related to PERL Modules, Design and Development.
-
ctcgag@hotmail.com #1
Re: Finding cycles and Graph::Base
William Goedicke <goedicke@goedsole.com> wrote:
I don't know Graph::Base specifically, but an easy way to find> Dear Y'all -
>
> Has anybody come up with a way of finding cycles in graphs created
> with Graph::Base?
cycles, if performance isn't a huge concern, is:
foreach $e (edge()) {
my ($v1,$v2)=get_vertices($e);
delete($e);
if (is_path($v1,$v2)) {
restore($e);
edge_is_in_cycle($e);
}
else {
restore($e);
};
};
--
-------------------- [url]http://NewsReader.Com/[/url] --------------------
Usenet Newsgroup Service New Rate! $9.95/Month 50GB
ctcgag@hotmail.com Guest
-
Graph.0.69 Module---how to get a DAG from graph with cycles
Here I use an example to illustrate the problem I met when using Graph Theory Module: I have a directed graph looks like the following (see the... -
How to add a trendline in a bar graph
Hi spuyear Have you been able to find a solution to your query ? Prayank -
GD::Graph - how to get rid of leading gap in line graph?
Is there a way to get rid of the leading gap to the left of a line graph? Therefore, I want the graph line to start on the Y-axis, not the... -
ANNOUNCE: Graph::Timeline and Graph::Timeline::GD 1.0
Graph::Timeline - Render timeline data This document refers to verion 0.1 of Graph::Timeline, released November 11, 2003 This class takes a... -
Web graph ?????
I've a couple of tricks to generate bar charts on the fly, using GD in one instance, and spacer images/TD cells in the other Using GD /... -
ctcgag@hotmail.com #2
Re: Finding cycles and Graph::Base
William Goedicke <goedicke@goedsole.com> wrote:
I don't know Graph::Base specifically, but an easy way to find> Dear Y'all -
>
> Has anybody come up with a way of finding cycles in graphs created
> with Graph::Base?
cycles, if performance isn't a huge concern, is:
foreach $e (edge()) {
my ($v1,$v2)=get_vertices($e);
delete($e);
if (is_path($v1,$v2)) {
restore($e);
edge_is_in_cycle($e);
}
else {
restore($e);
};
};
--
-------------------- [url]http://NewsReader.Com/[/url] --------------------
Usenet Newsgroup Service New Rate! $9.95/Month 50GB
ctcgag@hotmail.com Guest
-
ctcgag@hotmail.com #3
Re: Finding cycles and Graph::Base
[email]ctcgag@hotmail.com[/email] wrote:
Maybe I should clarify, the below-used subs are just names I made> William Goedicke <goedicke@goedsole.com> wrote:>> > Dear Y'all -
> >
> > Has anybody come up with a way of finding cycles in graphs created
> > with Graph::Base?
> I don't know Graph::Base specifically, but an easy way to find
> cycles, if performance isn't a huge concern, is:
up to describe the necessary funtionality, not actually existing subs
in any package I know of (and is_path() would have been better called
are_connected()). Although I suspect all of the functionality
would be available in some way or another through Graph::Base.
-->
> foreach $e (edge()) {
> my ($v1,$v2)=get_vertices($e);
> delete($e);
> if (is_path($v1,$v2)) {
> restore($e);
> edge_is_in_cycle($e);
> }
> else {
> restore($e);
> };
> };
-------------------- [url]http://NewsReader.Com/[/url] --------------------
Usenet Newsgroup Service New Rate! $9.95/Month 50GB
ctcgag@hotmail.com Guest
-
ctcgag@hotmail.com #4
Re: Finding cycles and Graph::Base
[email]ctcgag@hotmail.com[/email] wrote:
Maybe I should clarify, the below-used subs are just names I made> William Goedicke <goedicke@goedsole.com> wrote:>> > Dear Y'all -
> >
> > Has anybody come up with a way of finding cycles in graphs created
> > with Graph::Base?
> I don't know Graph::Base specifically, but an easy way to find
> cycles, if performance isn't a huge concern, is:
up to describe the necessary funtionality, not actually existing subs
in any package I know of (and is_path() would have been better called
are_connected()). Although I suspect all of the functionality
would be available in some way or another through Graph::Base.
-->
> foreach $e (edge()) {
> my ($v1,$v2)=get_vertices($e);
> delete($e);
> if (is_path($v1,$v2)) {
> restore($e);
> edge_is_in_cycle($e);
> }
> else {
> restore($e);
> };
> };
-------------------- [url]http://NewsReader.Com/[/url] --------------------
Usenet Newsgroup Service New Rate! $9.95/Month 50GB
ctcgag@hotmail.com Guest



Reply With Quote

