Abstract base class for independent set algorithms.
Subclassed by NetworKit::Luby
Public Functions
-
virtual ~IndependentSetFinder() = default
Default destructor
-
virtual std::vector<bool> run(const Graph &G) = 0
Returns a boolean vector of length n where vec[v] is true
iff v is in the independent sets.
- Parameters:
G – [in] The graph.
- Returns:
A boolean vector of length n.
-
bool isIndependentSet(const std::vector<bool> &set, const Graph &G) const
Checks whether a set is independent.
- Parameters:
-
- Returns:
true
iff set is independent.