Interface Heap<E>

Heap interface.
These heaps implement a decreaseKey operation, which requires
a separate Object to Index map, and for objects to be unique in the Heap.

An interface cannot specify constructors, but it is nevertheless
expected that an implementation of this interface has a constructor
that takes a Comparator, which is used for ordering ("scoring")
objects:
public Heap(Comparator cmp) {}

size

isEmpty

decreaseKey

Raises the priority of an object in the heap. This works in a
somewhat unusual way -- the object o should have
changed with respect to the comparator passed in to the heap on
construction. However, it should NOT have changed with respect
to its equals() method. This is unlike the Java SortedSet where
the comparator should be consistent with equals(); here they
should not match.