Reaktoro  v2.11.0
A unified framework for modeling chemically reactive systems

Public Member Functions

 PriorityQueue ()
 Construct a default instance of PriorityQueue.
 
auto size () const -> Index
 Return the size of the priority queue.
 
auto reset () -> void
 Reset the priorities of the tracked entities.
 
auto increment (Index identity) -> void
 Increment the priority of a tracked entity. More...
 
auto extend () -> void
 Extend the queue with the introduction of a new tracked entity.
 
auto priorities () const -> Deque< Index > const &
 Return the current priorities of each tracked entity in the queue.
 
auto order () const -> Deque< Index > const &
 Return the current order of the tracked entities in the queue.
 

Static Public Member Functions

static auto withInitialSize (Index size) -> PriorityQueue
 Return a PriorityQueue instance with given initial size.
 
static auto withInitialPriorities (Deque< Index > const &priorities) -> PriorityQueue
 Return a PriorityQueue instance with given initial priorities.
 
static auto withInitialOrder (Deque< Index > const &order) -> PriorityQueue
 Return a PriorityQueue instance with an initial order and zero priorities.
 
static auto withInitialPrioritiesAndOrder (Deque< Index > const &priorities, Deque< Index > const &order) -> PriorityQueue
 Return a PriorityQueue instance with given initial priorities and order. More...
 

Member Function Documentation

◆ withInitialPrioritiesAndOrder()

static auto withInitialPrioritiesAndOrder ( Deque< Index > const &  priorities,
Deque< Index > const &  order 
) -> PriorityQueue
static

Return a PriorityQueue instance with given initial priorities and order.

Note
A stable sort algorithm is applied to ensure consistency between given order and priorities.

◆ increment()

auto increment ( Index  identity) -> void

Increment the priority of a tracked entity.

Parameters
identityThe index of the tracked entity.

The documentation for this class was generated from the following file: