in reply to Graph.pm: How do I represent one-way dependency?

Directed graph doesn't mean that you are not allowed to add an edge in the opposite direction.

Think of people with the directed relation "likes".

I know many couples where it goes in both directions.

update

you probably want to test is_acyclic to guaranty meaningful "dependencies".

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^2: Graph.pm: How do I represent one-way dependency?
by jkeenan1 (Deacon) on Feb 18, 2018 at 03:02 UTC
    Thanks. My vertex and edge data is all dummy data, so I can easily guarantee that it passes both is_acyclic() and is_directed_acyclic_graph. :-)
    Jim Keenan
        Actually this was not totally accurate

        The smallest possible graph with a cycle is (if allowed)

        x -------------> x

        Unfortunately I can't draw it better, please print it out and bend the paper till both x match. ;)

        Cheers Rolf
        (addicted to the Perl Programming Language and ☆☆☆☆ :)
        Wikisyntax for the Monastery