Class PriorityQueueEntry<KEY,​ITEM>

java.lang.Object
org.drip.graph.heap.PriorityQueueEntry<KEY,​ITEM>

public class PriorityQueueEntry<KEY,​ITEM>
extends java.lang.Object
PriorityQueueEntry holds the Key/Value Pair of a Priority Queue Entry. The References are:

  • Brodal, G. S. (1996): Priority Queue on Parallel Machines Scandinavian Workshop on Algorithm Theory – SWAT ’96 416-427
  • Cormen, T., C. E. Leiserson, R. Rivest, and C. Stein (2009): Introduction to Algorithms 3rd Edition MIT Press
  • Sanders, P., K. Mehlhorn, M. Dietzfelbinger, and R. Dementiev (2019): Sequential and Parallel Algorithms and Data Structures – A Basic Toolbox Springer
  • Sundell, H., and P. Tsigas (2005): Fast and Lock-free Concurrent Priority Queues for Multi-threaded Systems Journal of Parallel and Distributed Computing 65 (5) 609-627
  • Wikipedia (2020): Priority Queue https://en.wikipedia.org/wiki/Priority_queue




Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    PriorityQueueEntry​(KEY key, ITEM item)
    PriorityQueueEntry Constructor
  • Method Summary

    Modifier and Type Method Description
    PriorityQueueEntry<KEY,​ITEM> clone()  
    ITEM item()
    Retrieve the Item
    KEY key()
    Retrieve the Key
    boolean setItem​(ITEM item)
    Set the Item
    boolean setKey​(KEY key)
    Set the Key
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PriorityQueueEntry

      public PriorityQueueEntry​(KEY key, ITEM item) throws java.lang.Exception
      PriorityQueueEntry Constructor
      Parameters:
      key - Key
      item - Item
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • key

      public KEY key()
      Retrieve the Key
      Returns:
      The Key
    • item

      public ITEM item()
      Retrieve the Item
      Returns:
      The Item
    • setKey

      public boolean setKey​(KEY key)
      Set the Key
      Parameters:
      key - The Key
      Returns:
      TRUE - The Key successfully set
    • setItem

      public boolean setItem​(ITEM item)
      Set the Item
      Parameters:
      item - The Item
      Returns:
      TRUE - The Value successfully set
    • clone

      public PriorityQueueEntry<KEY,​ITEM> clone()
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object