A pair combining a priority and a value, supporting comparison by priority. More...
#include <util.h>
Public Member Functions | |
| PriorityPair (P priority, T value) | |
| Constructs a PriorityPair with given priority and value. | |
| bool | operator> (const PriorityPair &right) const |
| Greater-than operator comparing by priority. | |
Public Attributes | |
| P | priority |
| The priority value used for ordering. | |
| T | value |
| The associated value. | |
A pair combining a priority and a value, supporting comparison by priority.
This utility struct is useful in priority queues or other data structures where elements need to be ordered by a priority key.
| P | Type of the priority; should support comparison operators. |
| T | Type of the stored value. |
|
inlineexplicit |
Constructs a PriorityPair with given priority and value.
| priority | The priority associated with the value. |
| value | The value stored in the pair. |
|
inline |
Greater-than operator comparing by priority.
Enables sorting PriorityPairs by their priority in descending order.
| right | The other PriorityPair to compare against. |
| P GraphLib::Internal::PriorityPair< P, T >::priority |
| T GraphLib::Internal::PriorityPair< P, T >::value |