Template Function beluga::clusterizer_detail::make_priority_queue

Function Documentation

template<class Map, class Proj>
auto beluga::clusterizer_detail::make_priority_queue(const Map &map, Proj &&proj)

Create a priority queue from a map using a specified projection.

This function template constructs a priority queue where the elements are ordered by a priority value derived from the map’s values. The elements in the queue will contain a key that belongs to the map and the corresponding priority.

Template Parameters:
  • Map – The type of the associative container.

  • Proj – The type of the projection invocable.

Parameters:
  • map – The map containing the data to be inserted into the priority queue.

  • proj – The projection function used to compute the priority of each element.

Returns:

A priority queue where elements are ordered by the priority computed from the map’s values using the projection function.