Function rusty_tree::octree::compute_level_information[][src]

pub fn compute_level_information(
    particle_keys: ArrayView1<'_, usize>
) -> (usize, HashSet<usize>, HashMap<usize, HashSet<usize>>)
Expand description

Given an array of keys. Return the level information of the tree.

The function returns a 3-tuple (max_level, all_keys, level_keys). max_level us a usize that contains the maximum level of the keys. The set all_keys contains all keys from the tree by completing the tree from the leaf onwards to the top and storing all parent keys along the way. The map level_keys is a map from a given level to the set of all keys contained in the level.