Home
last modified time | relevance | path

Searched refs:childpos (Results 1 – 2 of 2) sorted by relevance

/third_party/python/Modules/
D_heapqmodule.c68 Py_ssize_t startpos, endpos, childpos, limit; in siftup() local
85 childpos = 2*pos + 1; /* leftmost child position */ in siftup()
86 if (childpos + 1 < endpos) { in siftup()
87 PyObject* a = arr[childpos]; in siftup()
88 PyObject* b = arr[childpos + 1]; in siftup()
96 childpos += ((unsigned)cmp ^ 1); /* increment when cmp==0 */ in siftup()
105 tmp1 = arr[childpos]; in siftup()
107 arr[childpos] = tmp2; in siftup()
109 pos = childpos; in siftup()
437 Py_ssize_t startpos, endpos, childpos, limit; in siftup_max() local
[all …]
/third_party/python/Lib/
Dheapq.py263 childpos = 2*pos + 1 # leftmost child position
264 while childpos < endpos:
266 rightpos = childpos + 1
267 if rightpos < endpos and not heap[childpos] < heap[rightpos]:
268 childpos = rightpos
270 heap[pos] = heap[childpos]
271 pos = childpos
272 childpos = 2*pos + 1
299 childpos = 2*pos + 1 # leftmost child position
300 while childpos < endpos:
[all …]