Function flat_tree::index
[−]
[src]
pub fn index(depth: u64, offset: u64) -> u64
Returns the flat-tree of the tree node at the specified depth and offset.
Examples
assert_eq!(flat_tree::index(0, 0), 0); assert_eq!(flat_tree::index(0, 1), 2); assert_eq!(flat_tree::index(0, 2), 4);