carl
24.04
Computer ARithmetic Library
trivial.cpp
Go to the documentation of this file.
1
#include "
trivial.h
"
2
3
#include <
carl-common/datastructures/Bitset.h
>
4
5
namespace
carl::covering::heuristic
{
6
7
/// Trivial heuristic: select all sets.
8
Bitset
trivial
(
SetCover
& sc) {
9
Bitset
result;
10
result.
set_interval
(0, sc.
set_count
() - 1);
11
return
result;
12
}
13
14
}
Bitset.h
trivial.h
carl::covering::heuristic
Definition:
exact.cpp:11
carl::covering::heuristic::trivial
Bitset trivial(SetCover &sc)
Trivial heuristic: select all sets.
Definition:
trivial.cpp:8
carl::Bitset
This class is a simple wrapper around boost::dynamic_bitset.
Definition:
Bitset.h:20
carl::Bitset::set_interval
Bitset & set_interval(std::size_t start, std::size_t end, bool value=true)
Sets the a range of bits to a value, true by default.
Definition:
Bitset.h:146
carl::covering::SetCover
Represents a set cover problem.
Definition:
SetCover.h:15
carl::covering::SetCover::set_count
std::size_t set_count() const
Returns the number of sets.
Definition:
SetCover.cpp:40
carl-covering
heuristics
trivial.cpp
Generated by
1.9.1