class PriorityQueue

Declaration

template <class T,
          class Sequence = std::vector<T>,
          class Compare = std::less<typename Sequence::value_type>>
class PriorityQueue { /* full declaration omitted */ };

Description

PriorityQueue - This class behaves like std::priority_queue and provides a few additional convenience functions.

Declared at: llvm/include/llvm/ADT/PriorityQueue.h:27

Templates

T
Sequence = std::vector<T>
Compare = std::less<typename Sequence::value_type>

Method Overview

Methods

PriorityQueue<T, Sequence, Compare>(
    const Compare& compare = type - parameter -
                             0 - 2(),
    const Sequence& sequence = type - parameter -
                               0 - 1())

Declared at: llvm/include/llvm/ADT/PriorityQueue.h:29

Parameters

const Compare& compare = type-parameter-0-2()
const Sequence& sequence = type-parameter-0-1()

template <class Iterator>
PriorityQueue<T, Sequence, Compare>(
    Iterator begin,
    Iterator end,
    const Compare& compare = type - parameter -
                             0 - 2(),
    const Sequence& sequence = type - parameter -
                               0 - 1())

Declared at: llvm/include/llvm/ADT/PriorityQueue.h:35

Templates

Iterator

Parameters

Iterator begin
Iterator end
const Compare& compare = type-parameter-0-2()
const Sequence& sequence = type-parameter-0-1()

void clear()

Description

clear - Erase all elements from the queue.

Declared at: llvm/include/llvm/ADT/PriorityQueue.h:75

void erase_one(const T& t)

Description

erase_one - Erase one element from the queue, regardless of its position. This operation performs a linear search to find an element equal to t, but then uses all logarithmic-time algorithms to do the erase operation.

Declared at: llvm/include/llvm/ADT/PriorityQueue.h:46

Parameters

const T& t

void reheapify()

Description

reheapify - If an element in the queue has changed in a way that affects its standing in the comparison function, the queue's internal state becomes invalid. Calling reheapify() resets the queue's state, making it valid again. This operation has time complexity proportional to the number of elements in the queue, so don't plan to use it a lot.

Declared at: llvm/include/llvm/ADT/PriorityQueue.h:69