35 #ifndef COSTMAP_QUEUE_MAP_BASED_QUEUE_H
36 #define COSTMAP_QUEUE_MAP_BASED_QUEUE_H
60 template <
class item_t>
90 void enqueue(
const double priority, item_t item)
101 auto map_item = std::make_pair(priority, std::move(std::vector<item_t>()));
104 std::pair<ItemMapIterator, bool> insert_result =
item_bins_.insert(std::move(map_item));
139 throw std::out_of_range(
"front() called on empty costmap_queue::MapBasedQueue!");
142 return iter_->second.back();
152 iter_->second.pop_back();
156 auto not_empty = [](
const typename ItemMap::value_type& key_val) {
return !key_val.second.empty(); };
161 using ItemMap = std::map<double, std::vector<item_t>>;
173 #endif // COSTMAP_QUEUE_MAP_BASED_QUEUE_H