MCPcopy Create free account
hub / github.com/Xtra-Computing/thundersvm / IterablePriorityQueue

Class IterablePriorityQueue

include/thundersvm/util/log.h:2853–2867  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2851/// @brief Implements IterableContainer and provides iterable std::priority_queue class
2852template<typename T, typename Container = std::vector<T>, typename Comparator = std::less<typename Container::value_type>>
2853class IterablePriorityQueue : public IterableContainer<T, Container>,
2854 public std::priority_queue<T, Container, Comparator> {
2855 public:
2856 IterablePriorityQueue(std::priority_queue<T, Container, Comparator> queue_) {
2857 std::size_t count_ = 0;
2858 while (++count_ < base::consts::kMaxLogPerContainer && !queue_.empty()) {
2859 this->push(queue_.top());
2860 queue_.pop();
2861 }
2862 }
2863 private:
2864 inline Container& getContainer(void) {
2865 return this->c;
2866 }
2867};
2868/// @brief Implements IterableContainer and provides iterable std::queue class
2869template<typename T, typename Container = std::deque<T>>
2870class IterableQueue : public IterableContainer<T, Container>, public std::queue<T, Container> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected