digraph(T,r)
A rooted tree can be represented by an object of class LeafTree and a choice of vertex to be the root. This function converts such a representation of a rooted tree into an object of class Digraph with edges oriented away from the root.
The internal vertices of an object of class LeafTree are not named, so each vertex is specified by the partition of the set of leaves formed by removing the vertex. Each partition is given as a list of sets. This is also how the root vertex should be passed to the function.
|
|
|
|