pasteur.hierarchy.create_node_to_group_map#
- pasteur.hierarchy.create_node_to_group_map(tree, grouping, ofs=0)[source]#
Traverses tree and creates an array which maps nodes to groups such that:
arr[x] = y, where x is the node and y is its group.
grouping is updated in place to form arr recursively and ofs is used to keep track of the current group number during recursion.