Duplicate the nodes that don't have a self-link, such as E1a and E1b. Add the same set of links to both E1a and E1b that you would have added to E1, but don't link E1a to E1b. Now look for a path from E1a to E1b, since it must go out and back first.
-- Randal L. Schwartz, Perl hacker
In reply to •Re: Calculating Shortest Paths with Graph::Directed
by merlyn
in thread Calculating Shortest Paths with Graph::Directed
by arunhorne
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |