bartz.grove.node_to_leaf_index

bartz.grove.node_to_leaf_index(node)[source]

Return the index in TreeHeaps.leaf_tree of the value of a node.

Parameters:

node (Integer[Array, '*shape']) – The index of the node in the heap, not 0.

Returns:

Integer[Array, '*shape'] – The index, which is node shifted right until its lowest set bit is dropped.