9 bool has_selected =
true;
10 while (has_selected) {
15 for (std::size_t s = 0; (s < sc.
set_count()) && (num <= 1); ++s) {
Bitset select_essential(SetCover &sc)
Preprocessing heuristic: Selects essential sets which are the only once covering some element.
This class is a simple wrapper around boost::dynamic_bitset.
Bitset & set(std::size_t n, bool value=true)
Sets the given bit to a value, true by default.
Represents a set cover problem.
const auto & get_set(std::size_t set) const
Returns the given set.
void select_set(std::size_t s)
Selects the given set and purges the covered elements from all other sets.
std::size_t set_count() const
Returns the number of sets.
std::size_t element_count() const
Returns the number of elements.