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> {
31 const Sequence &sequence =
Sequence())
32 :
std::priority_queue<
T, Sequence, Compare>(
compare, sequence)
35 template<
class Iterator>
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);
const_iterator end(StringRef path)
Get end iterator over path.
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
This class represents lattice values for constants.
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.
auto find(R &&Range, const T &Val) -> decltype(adl_begin(Range))
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly...
PriorityQueue(Iterator begin, Iterator end, const Compare &compare=Compare(), const Sequence &sequence=Sequence())
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...