MCPcopy
hub / github.com/CodebuffAI/codebuff / getParentIndex

Method getParentIndex

common/src/util/min-heap.ts:7–9  ·  view source on GitHub ↗
(index: number)

Source from the content-addressed store, hash-verified

5 private heap: { item: T; score: number }[] = []
6
7 private getParentIndex(index: number): number {
8 return Math.floor((index - 1) / 2)
9 }
10
11 private getLeftChildIndex(index: number): number {
12 return 2 * index + 1

Callers 1

siftUpMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected