noc.core.topology.layout.tree

Module Contents

class noc.core.topology.layout.tree.TreeLayout

Bases: noc.core.topology.layout.base.LayoutBase

TREE_DX
TREE_DY
CHILDREN_PER_LEVEL = 10.0
MAX_LEVELS
get_layout(self)
static get_tree_width(G, node, uplink=None)

Calculate children tree width (in columns) :param G: Graph instance :param node: Tree root :param uplink: Exclude uplink direction for recursive descent :returns: Tree width

classmethod get_tree_pos(cls, G, node, x0=0, total_w=0, level=0, offset=0.0)

Calculate tree nodes positions. Tree must be precalculated with get_tree_width function :param G: Graph instance :param node: root node :param x0: x coordinate offset :param total_w: total tree width :param level: current level :return: dict of node -> np.array