Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Graph.pm: How do I represent one-way dependency?

by LanX (Saint)
on Feb 18, 2018 at 02:45 UTC ( [id://1209407]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1209407]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-19 14:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found