Lines Matching full:childpos
263 childpos = 2*pos + 1 # leftmost child position
264 while childpos < endpos:
265 # Set childpos to index of smaller child.
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:
301 # Set childpos to index of larger child.
302 rightpos = childpos + 1
303 if rightpos < endpos and not heap[rightpos] < heap[childpos]:
304 childpos = rightpos
306 heap[pos] = heap[childpos]
307 pos = childpos
308 childpos = 2*pos + 1