15namespace layer4_classification {
16namespace poset_classification {
19int poset_classification::find_isomorphism(
20 long int *set1,
long int *set2,
int sz,
21 int *transporter,
int &orbit_idx,
24 int f_v = (verbose_level >= 1);
25 long int *set1_canonical;
26 long int *set2_canonical;
35 cout <<
"poset_classification::find_isomorphism" << endl;
70 cout <<
"poset_classification::find_isomorphism done" << endl;
76 long int *set,
int sz,
int *transporter,
80 int f_v = (verbose_level >= 1);
87 cout <<
"poset_classification::identify_and_get_stabilizer" << endl;
90 cout <<
"poset_classification::identify_and_get_stabilizer "
91 "identifying the set ";
97 orbit_at_level, verbose_level - 2);
106 cout <<
"poset_classification::identify_and_get_stabilizer "
110 cout <<
"poset_classification::identify_and_get_stabilizer "
116 cout <<
"poset_classification::identify_and_get_stabilizer "
117 "the sets do not agree" << endl;
123 cout <<
"poset_classification::identify_and_get_stabilizer "
129void poset_classification::identify(
long int *data,
int sz,
130 int *transporter,
int &orbit_at_level,
133 int f_v = (verbose_level >= 1);
134 int f_implicit_fusion =
FALSE;
138 cout <<
"poset_classification::identify" << endl;
141 cout <<
"poset_classification::identify identifying the set ";
147 cout <<
"poset_classification::identify before recognize" << endl;
151 transporter, f_implicit_fusion,
156 cout <<
"poset_classification::identify after recognize" << endl;
165 cout <<
"poset_classification::identify trace returns "
166 "final_node = " << final_node <<
" which is "
167 "isomorphism type " << orbit_at_level
168 <<
" with ago=" << go << endl;
171 cout <<
"poset_classification::identify transporter:" << endl;
176 cout <<
"poset_classification::identify done" << endl;
181void poset_classification::test_identify(
int level,
int nb_times,
184 int f_v = (verbose_level >= 1);
186 int f_implicit_fusion =
FALSE;
189 int nb_orbits, cnt, r, r2;
197 cout <<
"poset_classification::test_identify, "
199 <<
" nb_times = " << nb_times << endl;
213 cout <<
"poset_classification::test_identify "
214 "Group of order " << go <<
" has been created" << endl;
219 for (cnt = 0; cnt < nb_times; cnt++) {
222 cout <<
"random orbit " << r <<
" / " << nb_orbits << endl;
226 cout <<
"random orbit " << r <<
" / "
227 << nb_orbits <<
" is represented by ";
235 cout <<
"mapped set is ";
240 recognize(set2, level, transporter, f_implicit_fusion,
241 final_node, verbose_level);
245 cout <<
"recognition fails" << endl;
250 cout <<
"recognition is successful" << endl;
261 cout <<
"poset_classification::test_identify done" << endl;
268void poset_classification::poset_classification_apply_isomorphism_no_transporter(
269 int cur_level,
int size,
int cur_node,
int cur_ex,
270 long int *set_in,
long int *set_out,
277 int f_v = (verbose_level >= 1);
280 cout <<
"poset_classification::poset_classification_apply_isomorphism_"
281 "no_transporter" << endl;
290 set_in, set_out, set_tmp,
300 cout <<
"poset_classification::poset_classification_apply_isomorphism_"
301 "no_transporter done" << endl;
307int poset_classification::poset_classification_apply_isomorphism(
309 int current_node,
int current_extension,
310 long int *set_in,
long int *set_out,
long int *set_tmp,
311 int *transporter_in,
int *transporter_out,
316 int f_v = (verbose_level >= 1);
325 cout <<
"poset_classification::poset_"
326 "classification_apply_isomorphism "
327 "current_node=" << current_node
328 <<
" current_extension=" << current_extension << endl;
329 cout <<
"level=" << level << endl;
330 cout <<
"applying fusion element to the set ";
338 cout <<
"poset_classification::poset_"
339 "classification_apply_isomorphism "
340 "applying fusion element" << endl;
342 cout <<
"in action " << Poset->
A2->
label <<
":" << endl;
344 cout <<
"to the set ";
348 Poset->
A2->
map_a_set(set_in, set_tmp, size, Elt1, 0);
350 cout <<
"poset_classification::poset_"
351 "classification_apply_isomorphism "
362 Poset->
A2->
move(Elt2, transporter_out);
366 level + 1, verbose_level - 1);
373 cout <<
"poset_classification::poset_"
374 "classification_apply_isomorphism "
378 cout <<
"poset_classification::poset_"
379 "classification_apply_isomorphism "
380 "calling find_poset_orbit_node_for_set: ";
386 set_out, f_tolerant, 0);
391 cout <<
"poset_classification::poset_"
392 "classification_apply_isomorphism from ";
396 cout <<
", which is node " << next_node << endl;
397 cout <<
"we are done" << endl;
403int poset_classification::trace_set_recursion(
404 int cur_level,
int cur_node,
406 long int *canonical_set,
long int *tmp_set1,
long int *tmp_set2,
407 int *Elt_transporter,
int *tmp_Elt1,
415 int f_v = (verbose_level >= 1);
417 int current_extension, i, t, next_node;
418 int f_failure_to_find_point;
423 cout <<
"poset_classification::trace_set_recursion "
424 "cur_level = " << cur_level
425 <<
" cur_node = " << cur_node <<
" : ";
429 pt = canonical_set[cur_level];
431 cout <<
"tracing point " << pt << endl;
434 cout <<
"poset_classification::trace_set_recursion "
435 "before O->trace_next_point_in_place" << endl;
438 cur_level, cur_node, size,
439 canonical_set, tmp_set1,
440 Elt_transporter, tmp_Elt1,
442 f_failure_to_find_point,
443 verbose_level - 1)) {
446 cout <<
"poset_classification::trace_set_recursion "
447 "cur_level = " << cur_level
448 <<
" cur_node = " << cur_node <<
" : ";
449 cout <<
"O->trace_next_point_in_place returns FALSE, "
450 "sorting and restarting" << endl;
459 cout <<
"poset_classification::trace_set_recursion "
460 "before trace_set_recursion" << endl;
466 canonical_set, tmp_set1, tmp_set2,
467 Elt_transporter, tmp_Elt1,
471 cout <<
"poset_classification::trace_set_recursion "
472 "after trace_set_recursion, r = " << r << endl;
477 if (f_failure_to_find_point) {
478 cout <<
"poset_classification::trace_set_recursion: "
479 "f_failure_to_find_point" << endl;
482 pt0 = canonical_set[cur_level];
484 cout <<
"poset_classification::trace_set_recursion "
485 "cur_level = " << cur_level
486 <<
" cur_node = " << cur_node <<
" : ";
488 cout <<
" point " << pt
489 <<
" has been mapped to " << pt0 << endl;
492 cout <<
"poset_classification::trace_set_recursion "
493 "before O->find_extension_from_point" << endl;
498 cout <<
"poset_classification::trace_set_recursion "
499 "after O->find_extension_from_point "
500 "current_extension=" << current_extension<< endl;
503 if (current_extension < 0) {
504 cout <<
"poset_classification::trace_set_recursion: "
505 "did not find point" << endl;
512 cout <<
"poset_classification::trace_set_recursion "
513 "EXTENSION_TYPE_EXTENSION" << endl;
517 cout <<
"poset_classification::trace_set_recursion "
518 "cur_level = " << cur_level
519 <<
" cur_node = " << cur_node <<
" : ";
521 cout <<
" point " << pt <<
" has been mapped to "
522 << pt0 <<
" next node is node " << next_node << endl;
524 if (cur_level + 1 == level) {
531 cout <<
"poset_classification::trace_set_recursion "
532 "before trace_set_recursion" << endl;
535 size, level, canonical_set, tmp_set1, tmp_set2,
536 Elt_transporter, tmp_Elt1,
540 cout <<
"poset_classification::trace_set_recursion "
541 "after trace_set_recursion" << endl;
549 cout <<
"poset_classification::trace_set_recursion "
550 "EXTENSION_TYPE_FUSION" << endl;
554 cout <<
"poset_classification::trace_set_recursion "
555 "cur_level = " << cur_level
556 <<
" cur_node = " << cur_node <<
" : ";
557 cout <<
"before poset_classification_apply_isomorphism" << endl;
560 cur_node, current_extension,
561 canonical_set, tmp_set1, tmp_set2,
562 Elt_transporter, tmp_Elt1,
566 cout <<
"poset_classification::trace_set_recursion "
567 "cur_level = " << cur_level
568 <<
" cur_node = " << cur_node <<
" : ";
569 cout <<
"after poset_classification_apply_isomorphism" << endl;
572 cout <<
"poset_classification::trace_set_recursion "
573 "cur_level = " << cur_level
574 <<
" cur_node = " << cur_node <<
" : "
575 <<
" current_extension = " << current_extension
576 <<
" : fusion from ";
580 cout <<
" : we continue with node " << next_node << endl;
584 if (next_node == -1) {
586 cout <<
"poset_classification::trace_set_recursion "
587 "cur_level = " << cur_level
588 <<
" cur_node = " << cur_node <<
" : "
589 <<
" current_extension = " << current_extension
590 <<
" : fusion from ";
594 cout <<
"we stop tracing" << endl;
600 for (i = 0; i < size; i++) {
601 canonical_set[i] = tmp_set1[i];
604 if (cur_level + 1 == level) {
611 cout <<
"poset_classification::trace_set_recursion "
612 "before trace_set_recursion" << endl;
615 size, level, canonical_set, tmp_set1, tmp_set2,
616 Elt_transporter, tmp_Elt1,
621 cout <<
"poset_classification::trace_set_recursion "
622 "after trace_set_recursion" << endl;
630 canonical_set, tmp_set1, tmp_set2,
631 Elt_transporter, tmp_Elt1,
632 f_implicit_fusion, verbose_level);
635 cout <<
"poset_classification::trace_set_recursion "
636 "unknown type " << t << endl;
640int poset_classification::trace_set(
643 long int *canonical_set,
int *Elt_transporter,
649 int f_v = (verbose_level >= 1);
650 long int *tmp_set1, *tmp_set2;
658 cout <<
"poset_classification::trace_set" << endl;
659 cout <<
"tracing set ";
662 cout <<
"verbose_level=" << verbose_level << endl;
663 cout <<
"level=" << level << endl;
664 cout <<
"f_lex=" << Control->
f_lex << endl;
672 cout <<
"poset_classification::trace_set "
673 "before trace_set_recursion" << endl;
678 canonical_set, tmp_set1, tmp_set2,
679 Elt_transporter, tmp_Elt,
683 cout <<
"poset_classification::trace_set "
684 "after trace_set_recursion" << endl;
685 cout <<
"n = " << n << endl;
691 cout <<
"poset_classification::trace_set, "
692 "case_nb < 0, case_nb = " << case_nb << endl;
693 cout <<
"poset_classification::trace_set, "
694 "level = " << level << endl;
695 cout <<
"poset_classification::trace_set, "
705long int poset_classification::find_node_for_subspace_by_rank(
706 long int *set,
int len,
int verbose_level)
708 int f_v = (verbose_level >= 1);
709 int f_vv = (verbose_level >= 2);
712 long int rk, node, i, j, pt;
715 cout <<
"poset_classification::find_node_for_subspace_by_rank for set ";
719 v = tmp_find_node_for_subspace_by_rank1;
720 basis = tmp_find_node_for_subspace_by_rank2;
727 cout <<
"poset_classification::find_node_for_subspace_by_rank "
732 for (i = 0; i < len; i++) {
747 cout <<
"poset_classification::find_node_for_subspace_by_rank "
748 "at node " << node <<
" extension " << j
749 <<
" with point " << pt <<
" to node "
757 cout <<
"poset_classification::find_node_for_subspace_by_rank "
758 "at node " << node <<
" fatal, "
759 "could not find extension" << endl;
764 cout <<
"poset_classification::find_node_for_subspace_by_rank "
765 "the canonical set is ";
767 cout <<
" at node " << node << endl;
782 return "found_automorphism";
785 return "not_canonical";
788 return "no_result_extension_not_found";
791 return "no_result_fusion_node_installed";
794 return "no_result_fusion_node_already_installed";
797 return "unkown trace result";
int is_contained_in_subspace(int *v, int *basis, int k)
int RREF_and_rank(int *basis, int k)
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)
int compare_sets_lint(long int *set1, long int *set2, int sz1, int sz2)
data_structures::lint_vec * Lint_vec
interface to system functions
int random_integer(int p)
a class to represent arbitrary precision integers
void element_print_quick(void *elt, std::ostream &ost)
void element_retrieve(int hdl, void *elt, int verbose_level)
void map_a_set(long int *set, long int *image_set, int n, int *Elt, int verbose_level)
void element_mult(void *a, void *b, void *ab, int verbose_level)
void random_element(groups::sims *S, int *Elt, int verbose_level)
void element_invert(void *a, void *av, int verbose_level)
void element_one(void *elt, int verbose_level)
void element_move(void *a, void *b, int verbose_level)
void element_print_as_permutation(void *elt, std::ostream &ost)
void map_a_set_and_reorder(long int *set, long int *image_set, int n, int *Elt, int verbose_level)
void move(void *a, void *b)
a set and its known set stabilizer
void apply_to_self(int *Elt, int verbose_level)
a permutation group represented via a stabilizer chain
void group_order(ring_theory::longinteger_object &go)
sims * create_sims(int verbose_level)
int poset_classification_apply_isomorphism(int level, int size, int current_node, int current_extension, long int *set_in, long int *set_out, long int *set_tmp, int *transporter_in, int *transporter_out, int f_tolerant, int verbose_level)
int trace_set(long int *set, int size, int level, long int *canonical_set, int *Elt_transporter, int verbose_level)
data_structures_groups::set_and_stabilizer * get_set_and_stabilizer(int level, int orbit_at_level, int verbose_level)
void unrank_basis(int *Basis, long int *S, int len)
int nb_orbits_at_level(int level)
poset_orbit_node * get_node(int node_idx)
void get_set_by_level(int level, int node, long int *set)
void identify(long int *data, int sz, int *transporter, int &orbit_at_level, int verbose_level)
void get_stabilizer_order(int level, int orbit_at_level, ring_theory::longinteger_object &go)
int find_poset_orbit_node_for_set(int len, long int *set, int f_tolerant, int verbose_level)
int trace_set_recursion(int cur_level, int cur_node, int size, int level, long int *canonical_set, long int *tmp_set1, long int *tmp_set2, int *Elt_transporter, int *tmp_Elt1, int f_tolerant, int verbose_level)
void unrank_point(int *v, long int rk)
void recognize(std::string &set_to_recognize, int h, int nb_to_recognize, int verbose_level)
long int find_node_for_subspace_by_rank(long int *set, int len, int verbose_level)
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_in_place(poset_classification *gen, int lvl, int current_node, int size, long int *cur_set, long int *tmp_set, int *cur_transporter, int *tmp_transporter, int f_implicit_fusion, int &f_failure_to_find_point, int verbose_level)
int find_extension_from_point(poset_classification *gen, long int pt, int verbose_level)
int get_nb_of_extensions()
algebra::vector_space * VS
groups::strong_generators * Strong_gens
#define Lint_vec_copy(A, B, C)
#define Lint_vec_print(A, B, C)
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
const char * trace_result_as_text(trace_result r)
int trace_result_is_no_result(trace_result r)
@ no_result_fusion_node_installed
@ no_result_extension_not_found
@ no_result_fusion_node_already_installed
the orbiter library for the classification of combinatorial objects
#define EXTENSION_TYPE_FUSION
#define EXTENSION_TYPE_EXTENSION