[erlang-questions] digraph questions
lloyd@REDACTED
lloyd@REDACTED
Tue Apr 9 01:28:49 CEST 2019
The Erlang digraph library looks like it may provide an interesting way to diagram scenes in a novel.
1> Scene10 = digraph:new().
Imagine:
Setting:"park"
Character1:"Franco"
Character2:"Sophia"
2> digraph:add_vertex(Scene10, "Park", "Night").
3> digraph:add_vertex(Scene10, "Franco", "Old and fat").
4> digraph:add_vertex(Scene10, "Sophia", "Young and beautiful").
5> digraph:add_edge(Scene10, "Franco", "Sophia", "loves").
OK to here EXCEPT command 5 returns:
['$e'|0]
6> digraph:add_edge(Scene10, "Sophia", "Franco", "hates").
OK to here EXCEPT command 5 returns:
['$e'|0]
6> digraph:add_edge(Scene10, "Sophia", "Franco", "hates").
['$e'|1]
Wah!
Question 1: How do I see labels?
Question 2: Be cool to add a sequence of actions. I can probably figure this out, but is there an elegant solution?
Question 3: I'd love to visualize the graph. I see it can be done in Elixir. But I don't know Elixir. Has anyone programmed a way to visualize digraphs in Erlang?
Comment: Digraph is crying out for a comprehensive tutorial. I'd love to do it, but just don't know enough yet.
Many thanks,
LRP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190408/23e789d5/attachment.htm>
More information about the erlang-questions
mailing list