# 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

- `void adjustTop(pq);`
  Adjusts the priority of the first item.
- `void clear(pq);`
  Remove all elements from the PriorityType.
- `bool empty(pq);`
  Query priority queue for beging empty.
- `TSize length(pq);`
  Return number of elements in priority queue.
- `void push(pq);`
  Deletes item with the highest priority and adjusts the priority queue.
- `void push(pq, element);`
  Inserts a new item and adjusts the priority queue if necessary.
- `TReference top(pq);`
  Reference to the item with the highest priority.

## Interface Functions Detail

### `void adjustTop(pq);`

Adjusts the priority of the first item.

#### Parameters

`pq` | The PriorityType to adjust.

#### Data Races

Thread safety unknown!

### `void clear(pq);`

Remove all elements from the PriorityType.

#### Parameters

`pq` | PriorityType to clear.

#### Data Races

Thread safety unknown!

### `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

Thread safety unknown!

### `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

Thread safety unknown!

### `void push(pq);`

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

#### Parameters

`pq` | The PriorityType to pop from.

#### Data Races

Thread safety unknown!

### `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

Thread safety unknown!

### `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

Thread safety unknown!

#### Dox Sources

    /*!
     * @class PriorityType
     *
     * @headerfile <seqan/misc/priority_type_base.h>
     *
     * @brief STores items in such a way that the item with the highest priority is
     *        at the top.
     *
     * @signature template <[typename TValue[, typename TLess[, typename TSpec]]]>
     *            class PriorityType;
     *
     * @tparam TValue The value type. Default: <tt>int</tt>.
     * @tparam TLess The less-than comparator. Default:
     *               <tt>std::less&lt;TValue&gt;</tt>.
     * @tparam TSpec The specialization. Default: <tt>PriorityHeap</tt>.
     *
     * @fn PriorityType#clear
     *
     * @brief Remove all elements from the PriorityType.
     *
     * @signature void clear(pq);
     *
     * @param[in,out] pq PriorityType to clear.
     *
     * @fn PriorityType#empty
     *
     * @headerfile <seqan/misc/priority_type_heap.h>
     *
     * @brief Query priority queue for beging empty.
     *
     * @signature bool empty(pq);
     *
     * @param[in] pq The @link PriorityType @endlink to query.
     *
     * @return bool <tt>true</tt> if <tt>pq</tt> queue is empty.
     *
     * @fn PriorityType#length
     *
     * @headerfile <seqan/misc/priority_type_heap.h>
     *
     * @brief Return number of elements in priority queue.
     *
     * @signature TSize length(pq);
     *
     * @param[in] pq The PriorityType to query.
     *
     * @return TSize Number of elements in priority queue.
     *
     * @fn PriorityType#top
     *
     * @brief Reference to the item with the highest priority.
     *
     * @signature TReference top(pq);
     *
     * @param[in] pq The PriorityType to query.
     *
     * @return TReference The result, reference to Value type.
     *
     * @fn PriorityType#adjustTop
     *
     * @brief Adjusts the priority of the first item.
     *
     * @signature void adjustTop(pq);
     *
     * @param[in,out] pq The PriorityType to adjust.
     *
     * @fn PriorityType#push
     *
     * @brief Inserts a new item and adjusts the priority queue if necessary.
     *
     * @signature void push(pq, element);
     *
     * @param[in,out] pq The PriorityType to push to.
     * @param[in] element The element to push.
     *
     * @fn PriorityType#pop
     *
     * @brief Deletes item with the highest priority and adjusts the priority queue.
     *
     * @signature void push(pq);
     *
     * @param[in,out] pq The PriorityType to pop from.
     */