Interface SmartGeneralPriorityQueue<E,​K extends Comparable<K>>

    • Method Detail

      • add

        ElementReference add​(E elem,
                             K key)
        Inserts an element with the specified key.
        Parameters:
        elem - the element to insert.
        key - the key for this element.
        Returns:
        the reference to the inserted element.
      • setDefaultKey

        void setDefaultKey​(K defaultKey)
        Sets the default key, which is used for elements that are inserted with no explicit key specified.
        Parameters:
        defaultKey - the new default key.
      • changeKey

        void changeKey​(ElementReference ref,
                       K newKey)
        Changes the key of an element in the priority key.
        Parameters:
        ref - reference to the element whose key is to be changed.
        newKey - the new key of this element.