tree.h
Go to the documentation of this file.
33 const auto child_rank = (child_key + size_ - root_) % size_; // cyclically shifted key such that root's key is 0
35 (child_rank == 0 ? -1 : (((child_rank - 1) >> 1) + root_) % size_); // Parent's key in binary tree
a binary spanning tree of integers in the [0,size) interval
Definition: tree.h:17
~BinarySpanningTree()=default
BinarySpanningTree(int size, int root)
Definition: tree.h:19
std::pair< int, int > child_keys(const int parent_key) const
Definition: tree.h:40