Goonstation 13 - Modules - TypesProc Details

/datum/heap

Procs

get_greater_childReturns the greater (relative to the comparison proc) of a node children or 0 if there's no child
insertinsert and place at its position a new node in the heap
popremoves and returns the first element of the heap (i.e the max or the min dependant on the comparison function)
resortReplaces a given node so it verify the heap condition
sinkGet a node down to its right position in the heap
swimGet a node up to its right position in the heap

Proc Details

get_greater_child

Returns the greater (relative to the comparison proc) of a node children or 0 if there's no child

insert

insert and place at its position a new node in the heap

pop

removes and returns the first element of the heap (i.e the max or the min dependant on the comparison function)

resort

Replaces a given node so it verify the heap condition

sink

Get a node down to its right position in the heap

swim

Get a node up to its right position in the heap