10 template<
typename T,
typename Compare = std::less<T>>
11 class PriorityQueue:
public std::priority_queue<T,std::vector<T>,Compare> {
12 using super = std::priority_queue<T,std::vector<T>,Compare>;
22 auto find(
const T& t)
const {
26 return data().begin();
29 return data().begin();
37 auto erase(
typename std::vector<T>::const_iterator it) {
38 return data().erase(it);
40 auto erase(
typename std::vector<T>::const_iterator it,
typename std::vector<T>::const_iterator
end) {
56 template<
typename TT,
typename C>
59 for (
auto it = pq.
data().begin(); it != pq.
data().end(); it++) {
60 if (it != pq.
data().begin()) os <<
", ";
66 template<
typename T,
typename Compare = std::less<T>>
83 c(std::move(_seq)),
comp(_comp)
85 std::make_heap(
c.begin(),
c.end(),
comp);
89 std::make_heap(
c.begin(),
c.end(),
comp);
106 std::push_heap(
c.begin(),
c.end(),
comp);
110 c.push_back(std::move(t));
111 std::push_heap(
c.begin(),
c.end(),
comp);
114 template<
typename... Args>
116 c.emplace_back(std::forward<Args>(args)...);
117 std::push_heap(
c.begin(),
c.end(),
comp);
121 std::pop_heap(
c.begin(),
c.end(),
comp);
DynamicPriorityQueue(const Compare &_comp=Compare())
typename Sequence::value_type value_type
void emplace(Args &&... args)
DynamicPriorityQueue(Sequence &&_seq, const Compare &_comp=Compare())
std::vector< T > Sequence
PriorityQueue(const Compare &comp)
auto erase(typename std::vector< T >::const_iterator it, typename std::vector< T >::const_iterator end)
const auto & data() const
auto find(const T &t) const
auto erase(typename std::vector< T >::const_iterator it)
std::priority_queue< T, std::vector< T >, Compare > super
static bool find(V &ts, const T &t)
Class to create the formulas for axioms.
std::ostream & operator<<(std::ostream &os, CMakeOptionPrinter cmop)