Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for heapSiftDown (0.09 sec)

  1. src/internal/trace/batchcursor.go

    	heap = heap[:len(heap)-1]
    	// Sift the root down.
    	heapSiftDown(heap, 0)
    	return heap
    }
    
    func heapSiftUp(heap []*batchCursor, i int) int {
    	for i > 0 && heap[(i-1)/2].ev.time > heap[i].ev.time {
    		heap[(i-1)/2], heap[i] = heap[i], heap[(i-1)/2]
    		i = (i - 1) / 2
    	}
    	return i
    }
    
    func heapSiftDown(heap []*batchCursor, i int) int {
    	for {
    		m := min3(heap, i, 2*i+1, 2*i+2)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 4.1K bytes
    - Viewed (0)
Back to top