fnss.topologies.simplemodels.k_ary_tree_topology — FNSS 0.3.2 documentation

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- FNSS 0.3.2 documentation »
- API Reference »
- Functions »

# fnss.topologies.simplemodels.k_ary_tree_topology

`k_ary_tree_topology`(k, h)

  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:math:(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

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- FNSS 0.3.2 documentation »
- API Reference »
- Functions »