Packages

c

com.nvidia.spark.rapids

HashedPriorityQueue

final class HashedPriorityQueue[T] extends AbstractQueue[T]

Implements a priority queue based on a heap. Like many priority queue implementations, this provides logarithmic time for inserting elements and removing the top element. However unlike many implementations, this provides logarithmic rather than linear time for the random-access contains and remove methods. The queue also provides a mechanism for updating the heap after an element's priority has changed via the priorityUpdated method instead of requiring the element to be removed and re-inserted.

The queue is NOT thread-safe.

The iterator does NOT return elements in priority order.

Linear Supertypes
AbstractQueue[T], Queue[T], AbstractCollection[T], Collection[T], Iterable[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HashedPriorityQueue
  2. AbstractQueue
  3. Queue
  4. AbstractCollection
  5. Collection
  6. Iterable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new HashedPriorityQueue(initialHeapSize: Int, comparator: Comparator[_ >: T])
    Annotations
    @SuppressWarnings()
  2. new HashedPriorityQueue(comparator: Comparator[_ >: T])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def add(arg0: T): Boolean
    Definition Classes
    AbstractQueue → Queue → AbstractCollection → Collection
  5. def addAll(arg0: Collection[_ <: T]): Boolean
    Definition Classes
    AbstractQueue → AbstractCollection → Collection
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clear(): Unit
    Definition Classes
    HashedPriorityQueue → AbstractQueue → AbstractCollection → Collection
    Annotations
    @Override()
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  9. def contains(obj: Any): Boolean
    Definition Classes
    HashedPriorityQueue → AbstractCollection → Collection
    Annotations
    @Override()
  10. def containsAll(arg0: Collection[_]): Boolean
    Definition Classes
    AbstractCollection → Collection
  11. def element(): T
    Definition Classes
    AbstractQueue → Queue
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def forEach(arg0: Consumer[_ >: T]): Unit
    Definition Classes
    Iterable
  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def isEmpty(): Boolean
    Definition Classes
    AbstractCollection → Collection
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. def iterator(): Iterator[T]

    NOTE: This iterator DOES NOT iterate elements in priority order.

    NOTE: This iterator DOES NOT iterate elements in priority order.

    Definition Classes
    HashedPriorityQueue → AbstractCollection → Collection → Iterable
    Annotations
    @Override()
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. def offer(obj: T): Boolean
    Definition Classes
    HashedPriorityQueue → Queue
    Annotations
    @Override()
  24. def parallelStream(): Stream[T]
    Definition Classes
    Collection
  25. def peek(): T
    Definition Classes
    HashedPriorityQueue → Queue
    Annotations
    @Override()
  26. def poll(): T
    Definition Classes
    HashedPriorityQueue → Queue
    Annotations
    @Override()
  27. def priorityUpdated(obj: T): Unit

    When an object in the heap changes priority, this must be called to restore proper ordering of the heap.

    When an object in the heap changes priority, this must be called to restore proper ordering of the heap. After an object's priority changes, this method must be called before any elements are added or removed from the priority queue.

  28. def remove(o: Any): Boolean
    Definition Classes
    HashedPriorityQueue → AbstractCollection → Collection
    Annotations
    @SuppressWarnings() @Override()
  29. def remove(): T
    Definition Classes
    AbstractQueue → Queue
  30. def removeAll(arg0: Collection[_]): Boolean
    Definition Classes
    AbstractCollection → Collection
  31. def removeIf(arg0: Predicate[_ >: T]): Boolean
    Definition Classes
    Collection
  32. def retainAll(arg0: Collection[_]): Boolean
    Definition Classes
    AbstractCollection → Collection
  33. def size(): Int
    Definition Classes
    HashedPriorityQueue → AbstractCollection → Collection
    Annotations
    @Override()
  34. def spliterator(): Spliterator[T]
    Definition Classes
    Collection → Iterable
  35. def stream(): Stream[T]
    Definition Classes
    Collection
  36. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  37. def toArray[T1](a: Array[T1]): Array[T1]
    Annotations
    @SuppressWarnings() @Override()
  38. def toArray(): Array[AnyRef]
    Definition Classes
    HashedPriorityQueue → AbstractCollection → Collection
    Annotations
    @Override()
  39. def toArray[T](arg0: IntFunction[Array[T]]): Array[T]
    Definition Classes
    Collection
  40. def toString(): String
    Definition Classes
    AbstractCollection → AnyRef → Any
  41. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  43. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from AbstractQueue[T]

Inherited from Queue[T]

Inherited from AbstractCollection[T]

Inherited from Collection[T]

Inherited from Iterable[T]

Inherited from AnyRef

Inherited from Any

Ungrouped