Method: Containers::MinHeap#min

Defined in:
lib/containers/heap.rb

#minObject

call-seq:

min -> value
min -> nil

Returns the item with the smallest key, but does not remove it from the heap.

minheap = MinHeap.new([1, 2, 3, 4])
minheap.min #=> 1


478
479
480
# File 'lib/containers/heap.rb', line 478

def min
  self.next
end