MCPcopy Create free account
hub / github.com/google/codesearch / siftUp

Method siftUp

index/write.go:440–450  ·  view source on GitHub ↗
(j int)

Source from the content-addressed store, hash-verified

438}
439
440func (h *postHeap) siftUp(j int) {
441 ch := h.ch
442 for {
443 i := (j - 1) / 2
444 if i == j || ch[i].e < ch[j].e {
445 break
446 }
447 ch[i], ch[j] = ch[j], ch[i]
448 j = i
449 }
450}
451
452// A bufWriter is a convenience wrapper: a closeable bufio.Writer.
453type bufWriter struct {

Callers 1

pushMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected