Previous topic

fnss.topologies.simplemodels.full_mesh_topology

Next topic

fnss.topologies.simplemodels.line_topology

fnss.topologies.simplemodels.k_ary_tree_topology

k_ary_tree_topology(k, h)[source]

Return a balanced k-ary tree topology of with depth h

Each node has two attributes:
  • type: which can either be ‘root’, ‘intermediate’ or ‘leaf’
  • depth (0, h) the height of the node in the tree, where 0 is the root and h are leaves.
Parameters :

k : int

The branching factor of the tree

h : int

The height or depth of the tree

Returns :

topology : A Topology object