Properties

Link copied to clipboard

Iterable that is a view on elements of the heap.

Link copied to clipboard
open override val isDisposed: Boolean

Flag of being disposed.

Link copied to clipboard

Reified set that is a view on nodes of that heap.

Link copied to clipboard

Iterable that is a view on priorities of the heap.

Link copied to clipboard
Link copied to clipboard
open override val size: UInt

Number of elements in the collection.

Functions

Link copied to clipboard
open override fun add(element: Element, priority: Priority): HeapNode<Element, Priority>

Adds the element with corresponding priority to the heap and returns constructed node that corresponds to the element and the priority.

Link copied to clipboard
open override fun dispose()

Disposes the structure and its dependent ones.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Legacy equality operation. Must return the result of referential equality.

Link copied to clipboard
open override fun hashCode(): Int

Legacy hash computation operation. Must return any Int value.

Link copied to clipboard

Checks if the heap is empty.

Link copied to clipboard

Checks if the heap is not empty.

Link copied to clipboard
open override fun popMinimum(): HeapNode<Element, Priority>

Retrieves the root node and removes it from the heap. It is a node with the minimum priority.

Link copied to clipboard
open override fun takeMinimum(): HeapNode<Element, Priority>

Retrieves the root node. It is a node with the minimum priority.

Link copied to clipboard
open override fun toString(): String

Represents the heap as a string. Must return a string in the following form.