Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for siftDown (0.1 sec)

  1. src/sort/zsortinterface.go

    	for i := a + 1; i < b; i++ {
    		for j := i; j > a && data.Less(j, j-1); j-- {
    			data.Swap(j, j-1)
    		}
    	}
    }
    
    // siftDown implements the heap property on data[lo:hi].
    // first is an offset into the array where the root of the heap lies.
    func siftDown(data Interface, lo, hi, first int) {
    	root := lo
    	for {
    		child := 2*root + 1
    		if child >= hi {
    			break
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 13 20:16:24 UTC 2022
    - 11.2K bytes
    - Viewed (0)
  2. src/sort/gen_sort_variants.go

    	for i := a + 1; i < b; i++ {
    		for j := i; j > a && {{Less "data" "j" "j-1"}}; j-- {
    			{{Swap "data" "j" "j-1"}}
    		}
    	}
    }
    
    // siftDown{{.FuncSuffix}} implements the heap property on data[lo:hi].
    // first is an offset into the array where the root of the heap lies.
    func siftDown{{.FuncSuffix}}{{.TypeParam}}(data {{.DataType}}, lo, hi, first int {{.ExtraParam}}) {
    	root := lo
    	for {
    		child := 2*root + 1
    		if child >= hi {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:27 UTC 2023
    - 19.6K bytes
    - Viewed (0)
  3. src/runtime/time.go

    			break
    		}
    		heap[i] = heap[p]
    		i = p
    	}
    	if heap[i].timer != tw.timer {
    		heap[i] = tw
    	}
    }
    
    // siftDown puts the timer at position i in the right place
    // in the heap by moving it down toward the bottom of the heap.
    func (ts *timers) siftDown(i int) {
    	heap := ts.heap
    	n := len(heap)
    	if i >= n {
    		badTimer()
    	}
    	if i*timerHeapN+1 >= n {
    		return
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 14:36:24 UTC 2024
    - 37.5K bytes
    - Viewed (0)
Back to top