Class PriorityType
STores items in such a way that the item with the highest priority is at the top.

All Subcl's PriorityHeap
Defined in <seqan/misc/priority_type_base.h>
Signature template <[typename TValue[, typename TLess[, typename TSpec]]]> class PriorityType;

Template Parameters

TValue The value type. Default: int.
TLess The less-than comparator. Default: std::less<TValue>.
TSpec The specialization. Default: PriorityHeap.

Interface Function Overview

Interface Functions Detail

void adjustTop(pq);

Adjusts the priority of the first item.

Parameters

pq The PriorityType to adjust.

Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

void clear(pq);

Remove all elements from the PriorityType.

Parameters

pq PriorityType to clear.

Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

bool empty(pq);

Query priority queue for beging empty.

Parameters

pq The PriorityType to query.

Returns

bool true if pq queue is empty.

Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

TSize length(pq);

Return number of elements in priority queue.

Parameters

pq The PriorityType to query.

Returns

TSize Number of elements in priority queue.

Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

void push(pq);

Deletes item with the highest priority and adjusts the priority queue.

Parameters

pq The PriorityType to pop from.

Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

void push(pq, element);

Inserts a new item and adjusts the priority queue if necessary.

Parameters

pq The PriorityType to push to.
element The element to push.

Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

TReference top(pq);

Reference to the item with the highest priority.

Parameters

pq The PriorityType to query.

Returns

TReference The result, reference to Value type.

Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.