Struct IndependentSetImprovement::Pair¶
Defined in File IndependentSetImprovement.h
Nested Relationships¶
This struct is a nested type of Class IndependentSetImprovement.
Struct Documentation¶
-
struct IndependentSetImprovement::Pair
We use a priority queue to efficiently find / manage the smallest weights. Each item is identified by its weight and index in the summary.
Public Functions
-
inline Pair(data_t _weight, unsigned int _idx)
Creates a new Pair object with the given weight and index.
- Parameters
_weight – The weight of the element
_idx – The position / index in the summary
-
inline bool operator<(const Pair &other) const
Implementation of the comparison operator for sorting into the priority queue. Sorting is done on the basis of the objects weight: this->weight > other.weight.
- Parameters
&other – The other object this object is compared against.
-
inline Pair(data_t _weight, unsigned int _idx)