Function flat_tree::count_with_depth
source · Expand description
Returns how many nodes are in the tree that the node spans, with a depth.
Examples
assert_eq!(flat_tree::count_with_depth(0, 0), 1);
assert_eq!(flat_tree::count_with_depth(1, 1), 3);
assert_eq!(flat_tree::count_with_depth(3, 2), 7);
assert_eq!(flat_tree::count_with_depth(5, 1), 3);
assert_eq!(flat_tree::count_with_depth(23, 3), 15);
assert_eq!(flat_tree::count_with_depth(27, 2), 7);