[erlang-questions] how to get labels on digraphs

Aggelos Giantsios aggelgian@REDACTED
Fri Jan 18 19:09:35 CET 2013

On Fri, Jan 18, 2013 at 7:36 PM, Rustom Mody <rustompmody@REDACTED> wrote:

> The add_edge/4 routine in digraph claims to have labels that are arbitrary
> erlang terms.
> However nothing I do seems to show me the label I created the edge with.


You can retrieve the label information of edge E in a digraph G with the
function digraph:edge(G, E).

Here's the output of my interpreter (R15B03)

1> G = digraph:new().
2> digraph:add_vertex(G, v1).
3> digraph:add_vertex(G, v2).
4> digraph:add_edge(G, e1, v1, v2, my_label).
5> digraph:edge(G, e1).

I hope that helps!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130118/3338ffc9/attachment.htm>

More information about the erlang-questions mailing list