Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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)]
19
pub fn parent(i: usize) -> usize {
20
((i + 1) >> 1) - 1
21
}
Callers
4
heap_fix
Function · 0.85
parent
Method · 0.85
build
Function · 0.85
expand_sharp
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected