DisiPriorityQueue

A priority queue of DocIdSetIterators that orders by current doc ID. This specialization is needed over PriorityQueue because the pluggable comparison function makes the rebalancing quite slow.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun add(entry: DisiWrapper): DisiWrapper

Add a DisiWrapper to this queue and return the top entry.

Link copied to clipboard
open fun addAll(entries: Array<DisiWrapper>, offset: Int, len: Int)

Bulk add.

Link copied to clipboard
abstract fun clear()

Clear the heap.

Link copied to clipboard
abstract operator fun iterator(): Iterator<DisiWrapper?>
Link copied to clipboard
abstract fun pop(): DisiWrapper?

Remove the top entry and return it.

Link copied to clipboard
abstract fun size(): Int

Return the number of entries in this heap.

Link copied to clipboard
abstract fun top(): DisiWrapper?

Return top value in this heap, or null if the heap is empty.

Link copied to clipboard
abstract fun top2(): DisiWrapper?

Return the 2nd least value in this heap, or null if the heap contains less than 2 values.

Link copied to clipboard
abstract fun topList(): DisiWrapper?

Get the list of scorers which are on the current doc.

Link copied to clipboard
abstract fun updateTop(): DisiWrapper

Rebalance this heap and return the top entry.

abstract fun updateTop(topReplacement: DisiWrapper): DisiWrapper

Replace the top entry with the given entry, rebalance the heap, and return the new top entry.