[erlang-questions] How to access digraph vertices
Tue Jun 3 08:28:09 CEST 2014
Lloyd R. Prentice writes:
> The documentation for digraphs tells us that vertices can be any Erlang term.
> How would we retrieve a vertex expressed as a record? E.g., by key. Surely we
> wouldn't want to use or even know the whole record.
Not quite sure what it is you are trying to do here, maybe an example would help us
(or just me) understand what you are up to.
Even though vertex() is term() I would not push a record into the vertex. I would
push the key in as the vertex() type and let the record be the label of the vertex.
But, again, it highly depends on what the use case is... hint, hint!!
Might be that digraph is not the right way to solve your problem.
> Many thanks,,
> Sent from my iPad
> erlang-questions mailing list
Erlang Solutions Ltd.
Tel: +45 25 14 05 38
More information about the erlang-questions