Home
last modified time | relevance | path

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

/external/python/cpython2/Lib/
Dheapq.py300 childpos = 2*pos + 1 # leftmost child position
301 while childpos < endpos:
303 rightpos = childpos + 1
304 if rightpos < endpos and not cmp_lt(heap[childpos], heap[rightpos]):
305 childpos = rightpos
307 heap[pos] = heap[childpos]
308 pos = childpos
309 childpos = 2*pos + 1
336 childpos = 2*pos + 1 # leftmost child position
337 while childpos < endpos:
[all …]
/external/python/cpython2/Modules/
D_heapqmodule.c77 Py_ssize_t startpos, endpos, childpos, rightpos, limit; in _siftup() local
93 childpos = 2*pos + 1; /* leftmost child position */ in _siftup()
94 rightpos = childpos + 1; in _siftup()
97 PyList_GET_ITEM(heap, childpos), in _siftup()
102 childpos = rightpos; in _siftup()
110 tmp1 = PyList_GET_ITEM(heap, childpos); in _siftup()
112 PyList_SET_ITEM(heap, childpos, tmp2); in _siftup()
114 pos = childpos; in _siftup()
418 Py_ssize_t startpos, endpos, childpos, rightpos, limit; in _siftupmax() local
436 childpos = 2*pos + 1; /* leftmost child position */ in _siftupmax()
[all …]