14 #ifndef LLVM_ADT_PRIORITYQUEUE_H
15 #define LLVM_ADT_PRIORITYQUEUE_H
27 class Compare = std::less<typename Sequence::value_type> >
28 class PriorityQueue :
public std::priority_queue<T, Sequence, Compare> {
35 template<
class Iterator>
49 typename Sequence::size_type
i =
find(this->c, t) - this->c.begin();
53 typename Sequence::size_type parent = (i - 1) / 2;
54 this->c[
i] = this->c[parent];
71 std::make_heap(this->c.begin(), this->c.end(), this->comp);
const_iterator end(StringRef path)
Get end iterator over path.
const_iterator begin(StringRef path)
Get begin iterator over path.
void reheapify()
reheapify - If an element in the queue has changed in a way that affects its standing in the comparis...
void erase_one(const T &t)
erase_one - Erase one element from the queue, regardless of its position.
PriorityQueue(Iterator begin, Iterator end, const Compare &compare=Compare(), const Sequence &sequence=Sequence())
auto find(R &&Range, const T &Val) -> decltype(std::begin(Range))
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly...
Sequence
A sequence of states that a pointer may go through in which an objc_retain and objc_release are actua...
int compare(DigitsT LDigits, int16_t LScale, DigitsT RDigits, int16_t RScale)
Compare two scaled numbers.
void clear()
clear - Erase all elements from the queue.
PriorityQueue(const Compare &compare=Compare(), const Sequence &sequence=Sequence())
PriorityQueue - This class behaves like std::priority_queue and provides a few additional convenience...