16 template<
typename Callback>
27 using queue_entry = std::tuple<Subproblem, Subproblem, Subproblem>;
28 std::vector<queue_entry> worklist;
29 worklist.emplace_back(C,
X,
T);
31 while (not worklist.empty()) {
32 auto [C,
X,
T] = worklist.back();
42 if (N_T.
size() <= 1) {
60 if (C.
size() + 1 >= S.
size())
continue;
64 for (
auto it = N_C.
begin(); it != N_C.
end(); ++it) {
66 worklist.emplace_back(C | v, X_tmp, T_tmp | v);
72 template<
typename Callback>
80 std::forward<Callback>(callback),
An adjacency matrix for a given query graph.
SmallBitset reachable(SmallBitset src) const
Computes the set of nodes reachable from src, i.e. the set of nodes reachable from any node in src.
bool is_connected(SmallBitset S) const
Returns true iff the subproblem S is connected.
SmallBitset neighbors(SmallBitset S) const
Computes the neighbors of S.
void min_cut_advanced_generate_and_test(const AdjacencyMatrix &M, Callback &&callback, const Subproblem S, const Subproblem C, const Subproblem X, const Subproblem T) const
void partition(const AdjacencyMatrix &M, Callback &&callback, const Subproblem S) const
Implements a small and efficient set over integers in the range of 0 to 63 (including).
bool is_singleton() const
std::size_t size() const
Returns the number of elements in this SmallBitset.
bool empty() const
Returns true if there are no elements in this SmallBitset.
bool is_subset(SmallBitset other) const
Returns true if the set represented by this is a subset of other, i.e. this ⊆ other.