15namespace layer4_classification {
16namespace poset_classification {
19void poset_classification::recognize_start_over(
20 int size,
int f_implicit_fusion,
21 int lvl,
int current_node,
22 int &final_node,
int verbose_level)
27 int f_v = (verbose_level >= 1);
28 int f_vv = (verbose_level >= 2);
32 cout <<
"poset_classification::recognize_start_over" << endl;
35 if (lvl == size - 1) {
37 cout <<
"poset_classification::recognize_start_over "
38 "lvl == size - 1" << endl;
40 final_node = current_node;
54 transporter->
ith(lvl + 1),
57 cout <<
"poset_classification::recognize_start_over "
58 "before recognize_recursion" << endl;
61 size, f_implicit_fusion,
65 cout <<
"poset_classification::recognize_start_over "
66 "after recognize_recursion" << endl;
69 cout <<
"poset_classification::recognize_start_over done" << endl;
73void poset_classification::recognize_recursion(
74 int size,
int f_implicit_fusion,
75 int lvl,
int current_node,
int &final_node,
82 int pt0, current_extension;
83 int f_v = (verbose_level >= 1);
86 int f_vvv = (verbose_level >= 3);
87 int f_v4 = (verbose_level >= 3);
88 int f_v5 = (verbose_level >= 3);
89 int f_failure_to_find_point;
97 cout <<
"poset_classification::recognize_recursion at ";
98 cout <<
"(" << lvl <<
"/" << node <<
")" << endl;
104 cout <<
"poset_classification::recognize_recursion at ";
105 cout <<
"(" << lvl <<
"/" << node <<
") "
106 "lvl == size, terminating" << endl;
108 final_node = current_node;
117 cout <<
"poset_classification::recognize_recursion"
119 <<
" current_node = " << current_node
120 <<
" verbose_level = " << verbose_level
123 <<
" pt=" << O->
get_pt() << endl;
139 cout <<
"upstep_work::recognize_recursion: "
140 "node and set inconsistent, the node "
141 "corresponds to" << endl;
143 int_set_print(cout, set3, lvl);
150 if (lvl == 0 && f_base_case) {
151 long int *cur_set = set[0];
152 long int *next_set = set[0 + Base_case->
size];
153 int *cur_transporter = transporter->
ith(0);
154 int *next_transporter = transporter->
ith(0 + Base_case->
size);
158 cur_transporter, next_transporter,
161 cout <<
"poset_classification::recognize_recursion at ";
162 cout <<
"(" << lvl <<
"/" << node <<
") "
163 "after trace_starter, "
164 "calling recognize_recursion" << endl;
167 size, f_implicit_fusion,
168 Base_case->
size, Base_case->
size, final_node,
172 cout <<
"poset_classification::recognize_recursion at ";
173 cout <<
"(" << lvl <<
"/" << node <<
") "
174 "after recognize_recursion" << endl;
181 cout <<
"poset_classification::recognize_recursion at ";
182 cout <<
"(" << lvl <<
"/" << node <<
") "
183 "before O->trace_next_point_wrapper" << endl;
186 lvl, current_node, size - 1 ,
187 f_implicit_fusion, f_failure_to_find_point,
195 cout <<
"poset_classification::recognize_recursion at ";
196 cout <<
"(" << lvl <<
"/" << node
197 <<
") O->trace_next_point_wrapper "
198 "returns FALSE, starting over" << endl;
203 size, f_implicit_fusion,
204 lvl, current_node, final_node,
207 cout <<
"poset_classification::recognize_recursion at ";
208 cout <<
"(" << lvl <<
"/" << node <<
") "
209 "O->trace_next_point_wrapper "
210 "returns FALSE, after over" << endl;
215 cout <<
"poset_classification::recognize_recursion at ";
216 cout <<
"(" << lvl <<
"/" << node <<
") after "
217 "O->trace_next_point_wrapper" << endl;
220 if (f_failure_to_find_point) {
221 cout <<
"poset_classification::recognize_recursion "
222 "failure to find point" << endl;
226 pt0 = set[lvl + 1][lvl];
229 cout <<
"poset_classification::recognize_recursion at ";
230 cout <<
"(" << lvl <<
"/" << node <<
") trying to find "
231 "extension for point pt0=" << pt0 << endl;
240 cout <<
"poset_classification::recognize_recursion at ";
241 cout <<
"(" << lvl <<
"/" << node <<
"/" << current_extension
242 <<
") current_extension=" << current_extension << endl;
244 if (current_extension == -1) {
246 cout <<
"poset_classification::recognize_recursion failure in "
247 "find_extension_from_point" << endl;
249 cout <<
"poset_classification::recognize_recursion "
250 "the original set is" << endl;
257 cout <<
"poset_classification::recognize_recursion "
258 "the current set is" << endl;
265 cout <<
"poset_classification::recognize_recursion "
266 "the node corresponds to" << endl;
271 cout <<
"poset_classification::recognize_recursion "
272 "lvl = " << lvl << endl;
273 cout <<
"poset_classification::recognize_recursion "
274 "current_node = " << current_node << endl;
283 cout <<
"poset_classification::recognize_recursion point " << pt0
284 <<
" is extension no " << current_extension << endl;
286 if (f_allowed_to_show_group_elements && f_v4) {
287 int *transporter1 = transporter->
ith(lvl + 1);
288 cout <<
"recognize_recursion transporter element:" << endl;
302 cout <<
"poset_classification::recognize_recursion at ";
303 cout <<
"(" << lvl <<
"/" << node <<
"/"
304 << current_extension <<
")";
305 cout <<
" fusion node " << O->
get_node() << endl;
309 current_extension, size - 1 ,
310 FALSE , verbose_level - 6);
313 cout <<
"poset_classification::recognize_recursion "
314 "lvl " << lvl <<
" at ";
315 cout <<
"(" << lvl <<
"/" << node <<
"/"
316 << current_extension <<
")";
317 cout <<
" fusion from " << O->
get_node() <<
" to "
318 << next_node << endl;
320 if (next_node == -1) {
321 cout <<
"poset_classification::recognize_recursion "
322 "next_node == -1" << endl;
326 cout <<
"poset_classification::recognize_recursion at ";
327 cout <<
"(" << lvl <<
"/" << node <<
"/"
328 << current_extension <<
")";
329 cout <<
" after apply_isomorphism, "
330 "next_node=" << next_node << endl;
333 if (next_node < path[lvl + 1]) {
335 cout <<
"poset_classification::recognize_recursion "
336 "lvl " << lvl <<
" not canonical" << endl;
337 cout <<
"next_node=" << next_node << endl;
347 size, f_implicit_fusion,
348 lvl + 1, next_node, final_node,
358 cout <<
"poset_classification::recognize_recursion "
359 "extension node" << endl;
363 cout <<
"poset_classification::recognize_recursion at ";
364 cout <<
"(" << lvl <<
"/" << node <<
"/"
365 << current_extension <<
")";
366 cout <<
" extension from " << O->
get_node() <<
" to "
367 << next_node << endl;
371 size, f_implicit_fusion,
372 lvl + 1, next_node, final_node,
378 cout <<
"poset_classification::recognize_recursion "
380 "this should not happen" << endl;
384 cout <<
"poset_classification::recognize_recursion "
386 "this should not happen" << endl;
389 cout <<
"poset_classification::recognize_recursion "
390 "unknown type of extension" << endl;
394void poset_classification::recognize(
395 long int *the_set,
int size,
int *transporter,
396 int f_implicit_fusion,
397 int &final_node,
int verbose_level)
417 int f_v = (verbose_level >= 1);
418 int f_vv = (verbose_level >= 2);
419 int f_vvv = (verbose_level >= 3);
422 cout <<
"poset_classification::recognize" << endl;
430 Poset->
A->
element_one(poset_classification::transporter->ith(0), 0);
441 cout <<
"poset_classification::recognize size > sz" << endl;
442 cout <<
"size=" << size << endl;
443 cout <<
"gen->sz=" << sz << endl;
453 size, f_implicit_fusion,
459 cout <<
"poset_classification::recognize "
460 "after recognize_recursion, "
461 "copying transporter" << endl;
466 poset_classification::transporter->ith(size),
471 cout <<
"poset_classification::recognize done" << endl;
void set_print(long int *v, int len)
a collection of functions related to sorted vectors
void lint_vec_heapsort(long int *v, int len)
data_structures::lint_vec * Lint_vec
void element_print_quick(void *elt, std::ostream &ost)
void element_one(void *elt, int verbose_level)
void element_move(void *a, void *b, int verbose_level)
void recognize_start_over(int size, int f_implicit_fusion, int lvl, int current_node, int &final_node, int verbose_level)
void recognize_recursion(int size, int f_implicit_fusion, int lvl, int current_node, int &final_node, int verbose_level)
void print_level_extension_coset_info(int prev_level, int prev, int cur_extension, int coset, int nb_cosets)
poset_orbit_node * get_node(int node_idx)
int first_node_at_level(int i)
to represent one poset orbit; related to the class poset_classification
extension * get_E(int idx)
int trace_next_point_wrapper(poset_classification *gen, int lvl, int current_node, int len, int f_implicit_fusion, int &f_failure_to_find_point, int verbose_level)
int check_node_and_set_consistency(poset_classification *gen, int i, long int *set)
int apply_isomorphism(poset_classification *gen, int lvl, int current_node, int current_extension, int len, int f_tolerant, int verbose_level)
void trace_starter(poset_classification *gen, int size, long int *cur_set, long int *next_set, int *cur_transporter, int *next_transporter, int verbose_level)
int find_extension_from_point(poset_classification *gen, long int pt, int verbose_level)
void store_set_to(poset_classification *gen, int i, long int *to)
void * print_function_data
void(* print_function)(std::ostream &ost, int len, long int *S, void *data)
#define Lint_vec_copy(A, B, C)
#define Lint_vec_print(A, B, C)
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
the orbiter library for the classification of combinatorial objects
#define EXTENSION_TYPE_PROCESSING
#define EXTENSION_TYPE_FUSION
#define EXTENSION_TYPE_UNPROCESSED
#define EXTENSION_TYPE_EXTENSION