function Heap.HeapifyObject(U,q)for j=1,#U,1 do if U[j]==q then U:_HeapifyBottomUp(j)break end end end function Heap.new()return setmetatable({},Heap.Meta)end return Heap
--[[ @brief Finds the object in the heap and reduces its value.
     @details Note: this is not an efficient operation. It runs in O(n) time where n is the size of the heap.
--]]
function Heap:HeapifyObject(element)
	for i = 1, #self do
		if self[i] == element then
			self:_HeapifyBottomUp(i)
			break
		end
	end
end

function Heap.new()
	return setmetatable({}, Heap.Meta)
end

return Heap
