MCPcopy Index your code
hub / github.com/douchuan/algorithm / parent

Function parent

src/common/binary_tree.rs:19–21  ·  view source on GitHub ↗
(i: usize)

Source from the content-addressed store, hash-verified

17/// parent of i
18#[inline(always)]
19pub fn parent(i: usize) -> usize {
20 ((i + 1) >> 1) - 1
21}

Callers 4

heap_fixFunction · 0.85
parentMethod · 0.85
buildFunction · 0.85
expand_sharpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected