15 std::size_t
max_jet (
const std::vector<std::size_t>& siblings,
17 std::vector<std::size_t> inds;
18 for (
const auto&
s : siblings) {
19 inds.insert(inds.end(),
20 satisfiedBy.at(
s).cbegin(),
21 satisfiedBy.at(
s).cend());
24 auto iter = std::max_element(inds.begin(), inds.end());
25 if (iter == inds.end()) {
return 0;}
32 const std::vector<std::size_t>& condMult){
34 for (
const auto&
s : siblings) {
35 if (satisfiedBy.at(
s).empty()) {
return false;}
38 std::vector<std::vector<std::size_t>> ind_stack;
40 for (
const auto&
s : siblings) {
41 auto repeat = condMult.at(
s);
42 for (std::size_t
i = 0;
i != repeat; ++
i) {
43 auto c_inds = satisfiedBy.at(
s);
44 ind_stack.emplace_back(c_inds);
49 std::sort (ind_stack.begin(), ind_stack.end(),
50 [](
const auto&
v0,
const auto& v1) {
51 return v0.size() < v1.size();
54 auto max_ind =
max_jet(siblings, satisfiedBy);
56 std::vector<bool>
mask(max_ind+1,
false);
58 for (
const auto&
v : ind_stack){
60 for (
const auto&
e :
v) {
67 if (!
found) {
return false;}
72 std::unique_ptr<IJetGroupProduct>
75 const std::vector<std::size_t>& condMult,
76 const std::vector<unsigned int>& condCap,
77 const std::vector<int>& condClique,
79 std::size_t parentCap,
100 std::unique_ptr<IJetGroupProduct> jgp (
nullptr);
102 if (siblings.empty()) {
108 for(
const auto&
s : siblings) {
109 if (satisfiedBy.at(
s).empty()) {
116 std::map<int, std::vector<std::size_t>> clique_map;
117 std::for_each(siblings.begin(),
119 [&clique_map, &condClique](std::size_t
s){
120 auto clique = condClique[s];
122 clique_map[clique].push_back(s);}});
129 [&condMult, &condCap](
const auto& sofar,
132 condMult.at(ind)*condCap.at(ind);});
136 for(
const auto&
s: siblings) {
137 if (condCap.at(
s) != 1) {
143 if (simpleTree and cap1) {
144 if (clique_map.size() == 1){
156 for (
const auto&
s : siblings) {
157 if ((satisfiedBy.at(
s)).size() < n_required) {
184 if (parentCap == 0 and siblings.size() == 1) {