Package org.jheaps

Interface ValueHeap<K,​V>

  • Type Parameters:
    K - the type of keys maintained by this heap
    V - the type of values maintained by this heap
    All Superinterfaces:
    Heap<K>
    All Known Implementing Classes:
    BinaryArrayIntegerValueHeap

    public interface ValueHeap<K,​V>
    extends Heap<K>
    A heap with values.
    Author:
    Dimitrios Michail
    • Method Detail

      • insert

        void insert​(K key,
                    V value)
        Insert an element into the heap.
        Parameters:
        key - the key to insert
        value - the value to insert
      • findMinValue

        V findMinValue()
        Find the value of an element with the minimum key.
        Returns:
        the value of an element with the minimum key
        Throws:
        NoSuchElementException - if the heap is empty