[erlang-questions] graphs and trees
Richard Carlsson
richardc@REDACTED
Thu Dec 20 12:32:50 CET 2007
mats cronqvist wrote:
> so i've made a directad acyclic graph by calling various functions in
> the digraph module. i theory, the resulting graph should be a tree. is
> there some snazzy graph theory trick to show that the graph is indeed a
> tree?
> disclaimer; i am by training a physicist, and as such uncomfortable
> with all data structures more complicated than the fixed-size array. so
> no big words please :>
If you get a single component from digraph_utils:components(Graph)
and digraph_utils:is_acyclic(Graph) returns true, you have a tree.
/Richard
More information about the erlang-questions
mailing list