14#ifndef LLVM_ADT_PRIORITYQUEUE_H
15#define LLVM_ADT_PRIORITYQUEUE_H
27 class Compare = std::less<typename Sequence::value_type> >
31 const Sequence &sequence = Sequence())
32 :
std::priority_queue<
T, Sequence, Compare>(compare, sequence)
35 template<
class Iterator>
37 const Compare &compare = Compare(),
38 const Sequence &sequence = Sequence())
39 :
std::priority_queue<
T, Sequence, Compare>(begin, end, compare, sequence)
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);
PriorityQueue - This class behaves like std::priority_queue and provides a few additional convenience...
PriorityQueue(Iterator begin, Iterator end, const Compare &compare=Compare(), const Sequence &sequence=Sequence())
void clear()
clear - Erase all elements from the queue.
void reheapify()
reheapify - If an element in the queue has changed in a way that affects its standing in the comparis...
PriorityQueue(const Compare &compare=Compare(), const Sequence &sequence=Sequence())
void erase_one(const T &t)
erase_one - Erase one element from the queue, regardless of its position.
Sequence
A sequence of states that a pointer may go through in which an objc_retain and objc_release are actua...
This is an optimization pass for GlobalISel generic memory operations.
auto find(R &&Range, const T &Val)
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.