function Heap._HeapifyBottomUp(z,S)local J=math.floor(S/2)while z[J]and z.Comparator(z[S],z[J])do z[J],z[S]=z[S],z[J]S=J J=math.floor(S/2)end end
--[[ @brief Reshuffles the heap if a given index is smaller than its parent.
--]]
function Heap:_HeapifyBottomUp(i)
	local parent = math.floor(i / 2)
	while self[parent] and self.Comparator(self[i], self[parent]) do
		self[parent], self[i] = self[i], self[parent]
		i = parent
		parent = math.floor(i / 2)
	end
end
