ArrayIndexedPriorityQueue

This class implements the indexed priority queue through an Array.

Type Parameters

T

concentration type

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val next: Reaction<T>?

The next reaction to be executed, or null if there is none.

Link copied to clipboard

The binary heap backing this queue, in array form.

Functions

Link copied to clipboard
open override fun addReaction(reaction: Reaction<T>)

Adds reaction to the data structure.

Link copied to clipboard
open override fun removeReaction(reaction: Reaction<T>)

Removes reaction from the structure. Fails if the reaction is not present.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun updateReaction(reaction: Reaction<T>)

Notifies the structure that reaction has changed. The whole structure will be rearranged to ensure consistency.