TreeGraphFactoryExtension<V, E> extension
Creates m-ary trees (also known as n-ary, k-ary or k-way tree) in which each node has no more than m children.
- on
-
- GraphFactory<
V, E>
- GraphFactory<
Methods
-
completeTree(
{required int vertexCount, int arity = 2}) → Graph< V, E> -
Creates a complete tree with
vertexCount
nodes and a branching factor ofarity
. By definition it is completely filled on every level except for the last one; where all the nodes are as far left as possible. -
prefectTree(
{required int height, int arity = 2}) → Graph< V, E> -
Creates a perfectly balanced tree of
height
and a branching factor ofarity
. In the resulting tree all leaf nodes are at the same depth.