14namespace layer4_classification {
15namespace poset_classification {
22std::string &poset_classification::get_problem_label_with_path()
24 return problem_label_with_path;
27std::string &poset_classification::get_problem_label()
32int poset_classification::first_node_at_level(
int i)
47long int *poset_classification::get_S()
52long int *poset_classification::get_set_i(
int i)
57long int *poset_classification::get_set0()
62long int *poset_classification::get_set1()
67long int *poset_classification::get_set3()
72int *poset_classification::get_Elt1()
77int *poset_classification::get_Elt2()
82long int *poset_classification::get_tmp_set_apply_fusion()
84 return tmp_set_apply_fusion;
87int poset_classification::allowed_to_show_group_elements()
89 return f_allowed_to_show_group_elements;
92int poset_classification::do_group_extension_in_upstep()
94 return f_do_group_extension_in_upstep;
124 return Schreier_vector_handler;
127int poset_classification::has_base_case()
132int poset_classification::has_invariant_subset_for_root_node()
134 return f_has_invariant_subset_for_root_node;
137int poset_classification::size_of_invariant_subset_for_root_node()
139 return invariant_subset_for_root_node_size;
142int *poset_classification::get_invariant_subset_for_root_node()
144 return invariant_subset_for_root_node;
154int poset_classification::node_has_schreier_vector(
int node_idx)
164int poset_classification::max_number_of_orbits_to_print()
166 return downstep_orbits_print_max_orbits;
169int poset_classification::max_number_of_points_to_print_in_orbit()
171 return downstep_orbits_print_max_points_per_orbit;
174void poset_classification::invoke_early_test_func(
175 long int *the_set,
int lvl,
176 long int *candidates,
178 long int *good_candidates,
179 int &nb_good_candidates,
192int poset_classification::nb_orbits_at_level(
int level)
197long int poset_classification::nb_flag_orbits_up_at_level(
int level)
207int poset_classification::poset_structure_is_contained(
208 long int *set1,
int sz1,
long int *set2,
int sz2,
211 int f_v = (verbose_level >= 1);
212 int f_vv = (verbose_level >= 2);
218 cout <<
"poset_classification::poset_structure_is_contained" << endl;
237 B2 =
NEW_int((sz1 + sz2) * dim);
239 for (i = 0; i < sz1; i++) {
242 for (i = 0; i < sz2; i++) {
248 cout <<
"poset_classification::poset_structure_is_contained "
249 "rk1 != sz1" << endl;
255 cout <<
"poset_classification::poset_structure_is_contained "
256 "rk2 != sz2" << endl;
275 set1, sz1, set2, sz2);
282 int level,
int verbose_level)
284 int f_v = (verbose_level >= 1);
289 cout <<
"poset_classification::get_orbit_transversal" << endl;
300 cout <<
"poset_classification::get_orbit_transversal "
302 <<
" orbit representatives" << endl;
308 for (orbit_at_level = 0;
315 orbit_at_level, verbose_level);
320 Poset->
A, Poset->
A2, SaS->
data, level,
333 cout <<
"poset_classification::get_orbit_transversal done" << endl;
338int poset_classification::test_if_stabilizer_is_trivial(
339 int level,
int orbit_at_level,
int verbose_level)
348 int level,
int orbit_at_level,
int verbose_level)
350 int f_v = (verbose_level >= 1);
354 cout <<
"poset_classification::get_set_and_stabilizer" << endl;
359 SaS->
init(Poset->
A, Poset->
A2, 0 );
366 level, orbit_at_level, 0 );
372 cout <<
"poset_classification::get_set_and_stabilizer done" << endl;
377void poset_classification::get_set_by_level(
378 int level,
int node,
long int *set)
386 cout <<
"poset_classification::get_set_by_level "
387 "size != level" << endl;
394void poset_classification::get_set(
395 int node,
long int *set,
int &size)
400void poset_classification::get_set(
401 int level,
int orbit,
long int *set,
int &size)
403 Poo->
get_set(level, orbit, set, size);
406int poset_classification::find_poset_orbit_node_for_set(
408 long int *set,
int f_tolerant,
int verbose_level)
411 int f_v = (verbose_level >= 1);
415 cout <<
"poset_classification::find_poset_orbit_node_for_set ";
421 if (len < Base_case->size) {
422 cout <<
"poset_classification::find_poset_orbit_node_for_set "
423 "len < starter_size" << endl;
424 cout <<
"len=" << len << endl;
427 for (i = 0; i < Base_case->
size; i++) {
428 for (j = i; j < len; j++) {
431 cout <<
"found " << i <<
"-th element "
432 "of the starter which is " << Base_case->
orbit_rep[i]
433 <<
" at position " << j << endl;
439 cout <<
"poset_classification::find_poset_orbit_node_for_set "
440 "did not find " << i <<
"-th element "
441 "of the starter" << endl;
443 for (h = j; h > i; h--) {
448 int from = Base_case->
size;
449 int node = Base_case->
size;
451 node, len, set, f_tolerant, verbose_level);
457 node, len, set, f_tolerant, verbose_level);
462 cout <<
"poset_classification::find_poset_orbit_node_for_set ";
464 cout <<
" extension not found, "
465 "we are tolerant, returnning -1" << endl;
470 cout <<
"poset_classification::find_poset_orbit_node_for_set "
471 "we should not be here" << endl;
479int poset_classification::find_poset_orbit_node_for_set_basic(
481 int node,
int len,
long int *set,
int f_tolerant,
486 int f_v = (verbose_level >= 1);
487 int f_vv = (verbose_level >= 1);
490 cout <<
"poset_classification::"
491 "find_poset_orbit_node_for_set_basic "
495 cout <<
"node=" << node << endl;
496 cout <<
"from=" << from << endl;
497 cout <<
"len=" << len << endl;
498 cout <<
"f_tolerant=" << f_tolerant << endl;
500 for (i = from; i < len; i++) {
503 cout <<
"pt=" << pt << endl;
504 cout <<
"calling root[node].find_extension_from_point" << endl;
513 cout <<
"poset_classification::"
514 "find_poset_orbit_node_for_set_basic "
515 "depth " << i <<
" no extension for point "
516 << pt <<
" found" << endl;
520 cout <<
"poset_classification::"
521 "find_poset_orbit_node_for_set_basic "
522 "since we are tolerant, we return -1" << endl;
527 cout <<
"poset_classification::"
528 "find_poset_orbit_node_for_set_basic "
529 "failure in find_extension_from_point" << endl;
532 cout <<
"node=" << node << endl;
533 cout <<
"from=" << from << endl;
534 cout <<
"i=" << i << endl;
535 cout <<
"pt=" << pt << endl;
541 cout <<
"poset_classification::"
542 "find_poset_orbit_node_for_set_basic "
543 "root[node].E[j].pt != pt" << endl;
548 cout <<
"poset_classification::"
549 "find_poset_orbit_node_for_set_basic "
550 "root[node].get_E(j)->type != "
551 "EXTENSION_TYPE_EXTENSION" << endl;
552 cout <<
"root[node].get_E(j)->type="
556 cout <<
"poset_classification::"
557 "find_poset_orbit_node_for_set_basic "
561 cout <<
"node=" << node << endl;
562 cout <<
"from=" << from << endl;
563 cout <<
"i=" << i << endl;
564 cout <<
"node=" << node << endl;
565 cout <<
"f_tolerant=" << f_tolerant << endl;
566 cout <<
"node=" << node << endl;
567 cout <<
"pt=" << pt << endl;
568 cout <<
"j=" << j << endl;
573 cout <<
"depth " << i <<
" extension " << j
574 <<
" n e w node " << node << endl;
581long int poset_classification::count_extension_nodes_at_level(
int lvl)
586double poset_classification::level_progress(
int lvl)
593void poset_classification::count_automorphism_group_orders(
594 int lvl,
int &nb_agos,
598 int f_v = (verbose_level >= 1);
599 int i, l, j, c, h, f_added;
602 int *tmp_multiplicities;
607 cout <<
"collecting the automorphism group orders of "
608 << l <<
" orbits" << endl;
612 multiplicities = NULL;
613 for (i = 0; i < l; i++) {
616 for (j = 0; j < nb_agos; j++) {
626 tmp_multiplicities = multiplicities;
628 multiplicities =
NEW_int(nb_agos + 1);
629 for (h = 0; h < j; h++) {
631 multiplicities[h] = tmp_multiplicities[h];
634 multiplicities[j] = 1;
635 for (h = j; h < nb_agos; h++) {
637 multiplicities[h + 1] = tmp_multiplicities[h];
652 tmp_multiplicities = multiplicities;
654 multiplicities =
NEW_int(nb_agos + 1);
655 for (h = 0; h < nb_agos; h++) {
657 multiplicities[h] = tmp_multiplicities[h];
660 multiplicities[nb_agos] = 1;
670void poset_classification::compute_and_print_automorphism_group_orders(
671 int lvl, ostream &ost)
682 multiplicities,
FALSE);
683 S.
create(0, __FILE__, __LINE__);
685 for (j = 0; j < nb_agos; j++) {
686 N += multiplicities[j];
687 for (h = 0; h < multiplicities[j]; h++) {
688 D.
add(S, agos[j], S1);
696 for (j = 0; j < nb_agos; j++) {
698 if (multiplicities[j] == 1) {
700 else if (multiplicities[j] >= 10) {
701 ost <<
"^{" << multiplicities[j] <<
"}";
704 ost <<
"^" << multiplicities[j];
706 if (j < nb_agos - 1) {
710 ost <<
") average is " << Q <<
" + " << r <<
" / " << N << endl;
720 if (root[node].get_nb_strong_generators()) {
724 go.
create(1, __FILE__, __LINE__);
732void poset_classification::orbit_length(
int orbit_at_level,
742 cout <<
"poset_classification::orbit_length stabilizer order does "
743 "not divide group order" << endl;
748void poset_classification::get_orbit_length_and_stabilizer_order(
760 cout <<
"poset_classification::orbit_length "
762 "does not divide group order" << endl;
767int poset_classification::orbit_length_as_int(
768 int orbit_at_level,
int level)
778void poset_classification::recreate_schreier_vectors_up_to_level(
782 int f_v = (verbose_level >= 1);
786 cout <<
"poset_classification::recreate_"
787 "schreier_vectors_up_to_level "
788 "creating Schreier vectors up to "
789 "level " << lvl << endl;
791 for (i = 0; i <= lvl; i++) {
793 cout <<
"poset_classification::recreate_"
794 "schreier_vectors_up_to_level "
795 "creating Schreier vectors at "
796 "level " << i << endl;
802void poset_classification::recreate_schreier_vectors_at_level(
806 int f_v = (verbose_level >= 1);
809 int f, cur, l, prev, u;
810 int f_recreate_extensions =
FALSE;
811 int f_dont_keep_sv =
FALSE;
814 cout <<
"poset_classification::recreate_schreier_vectors_at_level" << endl;
821 cout <<
"creating Schreier vectors at depth " << i
822 <<
" for " << l <<
" orbits" << endl;
825 cout <<
"poset_classification::recreate_schreier_vectors_at_level "
826 "Testing if a schreier vector file exists" << endl;
831 cout <<
"poset_classification::recreate_schreier_vectors_at_level "
832 "Yes, a schreier vector file exists. "
833 "We will read this file" << endl;
837 f_recreate_extensions, f_dont_keep_sv,
840 cout <<
"read Schreier vectors at depth " << i
841 <<
" from file" << endl;
848 cout <<
"poset_classification::recreate_schreier_vectors_at_level "
849 "No, a schreier vector file does not exists. "
850 "We will create such a file now" << endl;
855 for (u = 0; u < l; u++) {
859 if (f_vv && !f_vvv) {
861 if (((u + 1) % 50) == 0) {
862 cout <<
"; " << u + 1 <<
" / " << l << endl;
864 if (((u + 1) % 1000) == 0) {
865 cout <<
" " << u + 1 << endl;
869 cout <<
"poset_classification::recreate_"
870 "schreier_vectors_at_level "
871 << i <<
" node " << u <<
" / " << l << endl;
879 cout <<
"poset_classification::recreate_schreier_vectors_at_level "
880 "Written a file with Schreier "
881 "vectors at depth " << i << endl;
887 cout <<
"poset_classification::recreate_schreier_vectors_at_level done" << endl;
892void poset_classification::find_node_by_stabilizer_order(
893 int level,
int order,
int verbose_level)
895 int f_v = (verbose_level >= 1);
896 int nb_nodes, node, i, j, elt_order;
901 cout <<
"poset_classification::find_node_by_stabilizer_order" << endl;
904 for (i = 0; i < nb_nodes; i++) {
909 if (ago.
as_int() == order) {
910 cout <<
"found a node whose automorphism group is order "
912 cout <<
"the node is # " << i <<
" at level "
924 for (j = 0; j < Strong_gens->
gens->
len; j++) {
926 cout <<
"poset_classification " << j <<
" of order "
927 << elt_order <<
":" << endl;
928 if (order == elt_order) {
929 cout <<
"CYCLIC" << endl;
932 Strong_gens->
gens->
ith(j), cout);
934 Strong_gens->
gens->
ith(j), cout);
941void poset_classification::get_all_stabilizer_orders_at_level(
int level,
long int *&Ago,
int &nb)
947 for (i = 0; i < nb; i++) {
952void poset_classification::get_stabilizer_order(
int level,
961 if (O->nb_strong_generators == 0) {
962 go.
create(1, __FILE__, __LINE__);
965 longinteger_domain D;
967 D.multiply_up(go, O->tl, Poset->
A->
base_len(), 0 );
974long int poset_classification::get_stabilizer_order_lint(
int level,
983void poset_classification::get_stabilizer_group(
985 int level,
int orbit_at_level,
988 int f_v = (verbose_level >= 1);
994 cout <<
"poset_classification::get_stabilizer_group level=" << level
995 <<
" orbit_at_level=" << orbit_at_level << endl;
1006 G->
init(Poset->
A, verbose_level - 2);
1008 cout <<
"poset_classification::"
1009 "get_stabilizer_group before "
1010 "G->init_strong_generators_by_hdl" << endl;
1013 O->hdl_strong_generators, O->tl,
FALSE);
1026 cout <<
"poset_classification::get_stabilizer_group level=" << level
1027 <<
" orbit_at_level=" << orbit_at_level
1032void poset_classification::get_stabilizer_generators_cleaned_up(
1034 int level,
int orbit_at_level,
int verbose_level)
1036 int f_v = (verbose_level >= 1);
1039 cout <<
"poset_classification::"
1040 "get_stabilizer_generators_cleaned_up level=" << level
1041 <<
" orbit_at_level=" << orbit_at_level << endl;
1046 level, orbit_at_level, verbose_level - 1);
1053 cout <<
"poset_classification::"
1054 "get_stabilizer_generators_cleaned_up level=" << level
1055 <<
" orbit_at_level=" << orbit_at_level
1061void poset_classification::get_stabilizer_generators(
1063 int level,
int orbit_at_level,
int verbose_level)
1065 int f_v = (verbose_level >= 1);
1068 cout <<
"poset_classification::get_stabilizer_generators level=" << level
1069 <<
" orbit_at_level=" << orbit_at_level << endl;
1082 cout <<
"poset_classification::get_stabilizer_generators level=" << level
1083 <<
" orbit_at_level=" << orbit_at_level
1090void poset_classification::orbit_element_unrank(
1092 int orbit_idx,
long int rank,
long int *set,
1095 int f_v = (verbose_level >= 1);
1103 cout <<
"poset_classification::orbit_element_unrank "
1105 <<
" orbit_idx=" << orbit_idx
1106 <<
" rank=" << rank << endl;
1119 Poset->
A2->
map_a_set(the_set, set, depth, Elt2, 0 );
1125 cout <<
"poset_classification::orbit_element_unrank ";
1131void poset_classification::orbit_element_rank(
1133 int &orbit_idx,
long int &rank,
long int *set,
1136 int f_v = (verbose_level >= 1);
1137 int f_vv = (verbose_level >= 2);
1140 long int *canonical_set;
1145 cout <<
"poset_classification::orbit_element_rank "
1146 "depth=" << depth <<
" ";
1154 for (i = 0; i < depth; i++) {
1155 the_set[i] = set[i];
1158 orbit_idx =
trace_set(the_set, depth, depth,
1159 canonical_set, Elt1,
1166 cout <<
"poset_classification::orbit_element_rank "
1168 "orbit_idx = " << orbit_idx << endl;
1169 cout <<
"transporter:" << endl;
1171 cout <<
"as permutation:" << endl;
1175 cout <<
"calling coset_rank" << endl;
1177 rank =
coset_rank(depth, orbit_idx, Elt1, verbose_level);
1179 cout <<
"after coset_rank, rank=" << rank << endl;
1186 cout <<
"poset_classification::orbit_element_rank "
1188 << orbit_idx <<
" rank=" << rank << endl;
1192void poset_classification::coset_unrank(
1193 int depth,
int orbit_idx,
1194 long int rank,
int *Elt,
int verbose_level)
1196 int f_v = (verbose_level >= 1);
1204 cout <<
"poset_classification::coset_unrank "
1206 <<
" orbit_idx=" << orbit_idx << endl;
1207 cout <<
"action A:" << endl;
1209 cout <<
"action A2:" << endl;
1228 cout <<
"the set representing orbit " << orbit_idx
1229 <<
" at level " << depth <<
" is ";
1247long int poset_classification::coset_rank(
1248 int depth,
int orbit_idx,
1249 int *Elt,
int verbose_level)
1251 int f_v = (verbose_level >= 1);
1260 cout <<
"poset_classification::coset_rank "
1262 <<
" orbit_idx=" << orbit_idx << endl;
1263 cout <<
"action A:" << endl;
1265 cout <<
"action A2:" << endl;
1284 cout <<
"the set representing orbit " << orbit_idx
1285 <<
" at level " << depth <<
" is ";
1294 rank = Poset->
A->
coset_rank(G1->
S, G2->
S, Elt, verbose_level);
1304void poset_classification::list_all_orbits_at_level(
1306 int f_has_print_function,
1307 void (*print_function)(ostream &ost,
1308 int len,
long int *S,
void *data),
1309 void *print_function_data,
1310 int f_show_orbit_decomposition,
int f_show_stab,
1311 int f_save_stab,
int f_show_whole_orbit)
1317 cout <<
"poset_classification::list_all_orbits_at_level "
1318 "listing all orbits "
1319 "at depth " << depth <<
":" << endl;
1320 for (i = 0; i < l; i++) {
1321 cout <<
"poset_classification::list_all_orbits_at_level "
1323 << i <<
" / " << l << endl;
1325 f_has_print_function, print_function, print_function_data,
1326 f_show_orbit_decomposition, f_show_stab,
1327 f_save_stab, f_show_whole_orbit);
1331void poset_classification::compute_integer_property_of_selected_list_of_orbits(
1333 int nb_orbits,
int *Orbit_idx,
1334 int (*compute_function)(
int len,
long int *S,
void *data),
1335 void *compute_function_data,
1346 cout <<
"computing integer property for a set of "
1347 << nb_orbits <<
" orbits at depth " << depth <<
":" << endl;
1348 for (j = 0; j < nb_orbits; j++) {
1351 cout <<
"orbit idx is out of range" << endl;
1354 cout <<
"Orbit " << j <<
" / " << nb_orbits
1355 <<
" which is no " << i <<
":" << endl;
1359 d = (*compute_function)(depth, set, compute_function_data);
1366void poset_classification::list_selected_set_of_orbits_at_level(
1368 int nb_orbits,
int *Orbit_idx,
1369 int f_has_print_function,
1370 void (*print_function)(ostream &ost,
1371 int len,
long int *S,
void *data),
1372 void *print_function_data,
1373 int f_show_orbit_decomposition,
int f_show_stab,
1374 int f_save_stab,
int f_show_whole_orbit)
1380 cout <<
"listing a set of " << nb_orbits
1381 <<
" orbits at depth " << depth <<
":" << endl;
1382 for (j = 0; j < nb_orbits; j++) {
1385 cout <<
"orbit idx is out of range" << endl;
1388 cout <<
"Orbit " << j <<
" / " << nb_orbits
1389 <<
" which is no " << i <<
":" << endl;
1391 f_has_print_function, print_function, print_function_data,
1392 f_show_orbit_decomposition, f_show_stab,
1393 f_save_stab, f_show_whole_orbit);
1397void poset_classification::test_property(
int depth,
1398 int (*test_property_function)(
int len,
long int *S,
void *data),
1399 void *test_property_data,
1400 int &nb,
int *&Orbit_idx)
1409 for (i = 0; i < N; i++) {
1411 if ((*test_property_function)(depth, set, test_property_data)) {
1412 Orbit_idx[nb++] = i;
1419void poset_classification::print_schreier_vectors_at_depth(
1420 int depth,
int verbose_level)
1425 for (i = 0; i < l; i++) {
1426 print_schreier_vector(depth, i, verbose_level);
1430void poset_classification::print_schreier_vector(
int depth,
1431 int orbit_idx,
int verbose_level)
1436 longinteger_object Len, L, go;
1449 <<
" (=node " << first_poset_orbit_node_at_level[depth] + orbit_idx
1450 <<
") at depth " << depth <<
" has length " << Len <<
" : ";
1453 int_set_print(cout, set, depth);
1454 cout <<
"_" << go << endl;
1456 cout <<
"schreier tree:" << endl;
1461 sv = root[first_poset_orbit_node_at_level[depth] + orbit_idx].sv;
1464 cout <<
"No schreier vector available" << endl;
1467 schreier_vector_print_tree(sv, 0 );
1471void poset_classification::list_whole_orbit(
1472 int depth,
int orbit_idx,
1473 int f_has_print_function,
1474 void (*print_function)(ostream &ost,
1475 int len,
long int *S,
void *data),
1476 void *print_function_data,
1477 int f_show_orbit_decomposition,
int f_show_stab,
1478 int f_save_stab,
int f_show_whole_orbit)
1490 L.
create(len, __FILE__, __LINE__);
1495 cout <<
"poset_classification::list_whole_orbit "
1497 <<
" orbit " << orbit_idx
1500 <<
") at depth " << depth <<
" has length " << Len <<
" : ";
1504 cout <<
"_" << go <<
" ";
1509 if (f_has_print_function) {
1510 (*print_function)(cout, depth, set, print_function_data);
1516 if (f_show_orbit_decomposition) {
1518 cout <<
"poset_classification::list_whole_orbit "
1519 "orbits on the set:" << endl;
1526 cout <<
"subspace_lattice not yet implemented" << endl;
1529 cout <<
"poset_classification::list_whole_orbit "
1530 "orbits in the original "
1531 "action on the whole space:" << endl;
1537 cout <<
"The stabilizer is generated by:" << endl;
1545 fname.assign(problem_label_with_path);
1546 sprintf(str,
"_stab_%d_%d.bin", depth, orbit_idx);
1549 cout <<
"saving stabilizer poset_classifications "
1550 "to file " << fname << endl;
1555 if (f_show_whole_orbit) {
1565 cout <<
"orbit is too long to show" << endl;
1568 for (rank = 0; rank < max_len; rank++) {
1571 cout << setw(5) << rank <<
" : ";
1575 if (max_len < len) {
1576 cout <<
"output truncated" << endl;
1583 cout <<
"poset_classification::list_whole_orbit done" << endl;
1586void poset_classification::get_whole_orbit(
1587 int depth,
int orbit_idx,
1588 long int *&Orbit,
int &orbit_length,
int verbose_level)
1590 int f_v = (verbose_level >= 1);
1596 cout <<
"poset_classification::get_whole_orbit" << endl;
1603 cout <<
"poset_classification::get_whole_orbit orbit_length=" <<
orbit_length << endl;
1606 cout <<
"poset_classification::get_whole_orbit "
1607 "orbit is too long" << endl;
1614 cout <<
"poset_classification::get_whole_orbit element " << rank <<
" / " <<
orbit_length << endl;
1618 Orbit + rank * depth,
1622 cout <<
"poset_classification::get_whole_orbit done" << endl;
1626void poset_classification::map_to_canonical_k_subset(
1627 long int *the_set,
int set_size,
1628 int subset_size,
int subset_rk,
1629 long int *reduced_set,
int *transporter,
int &local_idx,
1635 int f_v = (verbose_level >= 1);
1639 cout <<
"poset_classification::map_to_canonical_k_subset" << endl;
1643 long int *canonical_subset;
1646 int reduced_set_size;
1651 canonical_subset =
NEW_lint(set_size);
1653 reduced_set_size = set_size - subset_size;
1657 our_set, set_size, subset_size);
1659 cout <<
"poset_classification::map_to_canonical_k_subset our_set=";
1667 for (i = 0; i < set_size; i++) {
1668 if (j < subset_size && our_set[j] == i) {
1672 our_set[subset_size + k] = i;
1676 for (i = 0; i < set_size; i++) {
1677 subset[i] = the_set[our_set[i]];
1678 set[0][i] = subset[i];
1680 for (i = 0; i < sz; i++) {
1681 set[0][i] = subset[i];
1684 cout <<
"poset_classification::map_to_canonical_k_subset subset=";
1695 cout <<
"poset_classification::map_to_canonical_k_subset "
1696 "before trace_set" << endl;
1699 if (set_size > max_set_size) {
1700 cout <<
"poset_classification::map_to_canonical_k_subset set_size > max_set_size" << endl;
1701 cout <<
"poset_classification::map_to_canonical_k_subset set_size = " << set_size << endl;
1702 cout <<
"poset_classification::map_to_canonical_k_subset max_set_size = " << max_set_size << endl;
1707 subset, set_size, subset_size,
1708 canonical_subset, Elt1,
1711 cout <<
"poset_classification::"
1712 "map_to_canonical_k_subset "
1713 "after trace_set local_idx=" << local_idx << endl;
1714 cout <<
"poset_classification::map_to_canonical_k_subset canonical_subset=";
1721 cout <<
"the transporter is" << endl;
1727 for (i = 0; i < reduced_set_size; i++) {
1728 reduced_set[i] = canonical_subset[subset_size + i];
1731 cout <<
"poset_classification::"
1732 "map_to_canonical_k_subset reduced set = ";
1742 cout <<
"poset_classification::"
1743 "map_to_canonical_k_subset done" << endl;
1747void poset_classification::get_representative_of_subset_orbit(
1748 long int *set,
int size,
int local_orbit_no,
1752 int f_v = (verbose_level >= 1);
1753 int f_vv = (verbose_level >= 2);
1758 cout <<
"poset_classification::get_representative_of_subset_orbit "
1759 "verbose_level=" << verbose_level << endl;
1762 node = fst + local_orbit_no;
1764 cout <<
"poset_classification::get_representative_"
1766 "before get_set" << endl;
1770 cout <<
"get_representative_of_subset_orbit: "
1771 "sz != size" << endl;
1777 cout <<
"poset_classification::get_representative_"
1779 "before get_stabilizer_poset_classifications" << endl;
1783 cout <<
"poset_classification::get_representative_of_subset_orbit done" << endl;
1787void poset_classification::find_interesting_k_subsets(
1788 long int *the_set,
int n,
int k,
1789 int *&interesting_sets,
int &nb_interesting_sets,
1793 int f_v = (verbose_level >= 1);
1795 int j, t, f, l, l_min, t_min = 0;
1798 cout <<
"poset_classification::find_interesting_k_subsets "
1799 "n = " << n <<
" k = " << k << endl;
1813 for (t = 0; t < C->
nb_types; t++) {
1821 interesting_sets =
NEW_int(l_min);
1822 nb_interesting_sets = l_min;
1823 for (j = 0; j < l_min; j++) {
1828 cout <<
"poset_classification::find_interesting_k_subsets "
1829 "l_min = " << l_min <<
" t_min = " << t_min
1830 <<
" orbit_idx = " << orbit_idx << endl;
1833 cout <<
"interesting set of size "
1834 << nb_interesting_sets <<
" : ";
1842 cout <<
"poset_classification::find_interesting_k_subsets "
1843 "n = " << n <<
" k = " << k <<
" done" << endl;
1847void poset_classification::classify_k_subsets(
1848 long int *the_set,
int n,
int k,
1851 int f_v = (verbose_level >= 1);
1857 cout <<
"poset_classification::classify_k_subsets "
1858 "n = " << n <<
" k = " << k << endl;
1868 cout <<
"poset_classification::classify_k_subsets "
1869 "n = " << n <<
" k = " << k <<
" done" << endl;
1873void poset_classification::trace_all_k_subsets_and_compute_frequencies(
1875 int n,
int k,
int &nCk,
int *&isotype,
int *&orbit_frequencies,
int &nb_orbits,
1878 int f_v = (verbose_level >= 1);
1883 cout <<
"poset_classification::trace_all_k_subsets_and_compute_frequencies "
1884 "n = " << n <<
" k = " << k <<
" nCk=" << nCk << endl;
1893 orbit_frequencies =
NEW_int(nb_orbits);
1896 for (i = 0; i < nCk; i++) {
1898 orbit_frequencies[a]++;
1902 cout <<
"poset_classification::trace_all_k_subsets_and_compute_frequencies done" << endl;
1906void poset_classification::trace_all_k_subsets(
1908 int n,
int k,
int &nCk,
int *&isotype,
1911 int f_v = (verbose_level >= 1);
1915 long int *canonical_subset;
1917 long int subset_rk, local_idx, i;
1923 cout <<
"poset_classification::trace_all_k_subsets "
1924 "n = " << n <<
" k = " << k
1925 <<
" nCk = " << nCk << endl;
1941 if (
TRUE && ((subset_rk % 10000) == 0)) {
1942 cout <<
"poset_classification::trace_all_k_subsets "
1944 <<
" testing set " << subset_rk <<
" / " << nCk
1945 <<
" = " << 100. * (double) subset_rk /
1946 (
double) nCk <<
" % : ";
1950 for (i = 0; i < k; i++) {
1951 subset[i] = the_set[index_set[i]];
1956 cout <<
"poset_classification::trace_all_k_subsets "
1957 "corresponding to set ";
1969 cout <<
"poset_classification::trace_all_k_subsets "
1970 "before trace_set" << endl;
1973 canonical_subset, Elt,
1976 cout <<
"poset_classification::trace_all_k_subsets "
1977 "after trace_set, local_idx = "
1978 << local_idx << endl;
1982 cout <<
"poset_classification::trace_all_k_subsets "
1983 "local_idx=" << local_idx << endl;
1985 isotype[subset_rk] = local_idx;
1987 cout <<
"poset_classification::trace_all_k_subsets "
1988 "the transporter is" << endl;
1999 if (subset_rk != nCk) {
2000 cout <<
"poset_classification::trace_all_k_subsets "
2001 "subset_rk != nCk" << endl;
2011 cout <<
"poset_classification::trace_all_k_subsets done" << endl;
2015void poset_classification::get_orbit_representatives(
2017 int &nb_orbits,
long int *&Orbit_reps,
int verbose_level)
2019 int f_v = (verbose_level >= 1);
2023 cout <<
"poset_classification::get_orbit_representatives" << endl;
2027 cout <<
"orbits_on_k_sets: we found " << nb_orbits
2028 <<
" orbits on " << level <<
"-sets" << endl;
2030 Orbit_reps =
NEW_lint(nb_orbits * level);
2031 for (i = 0; i < nb_orbits; i++) {
2036 cout <<
"poset_classification::get_orbit_representatives done" << endl;
2040void poset_classification::unrank_point(
int *v,
long int rk)
2045long int poset_classification::rank_point(
int *v)
2053void poset_classification::unrank_basis(
int *Basis,
long int *S,
int len)
2057 for (i = 0; i < len; i++) {
2062void poset_classification::rank_basis(
int *Basis,
long int *S,
int len)
2066 for (i = 0; i < len; i++) {
finite dimensional vector space over a finite field
field_theory::finite_field * F
a collection of combinatorial functions
int first_k_subset(int *set, int n, int k)
void unrank_k_subset(int rk, int *set, int n, int k)
long int int_n_choose_k(int n, int k)
void unrank_k_subset_and_complement(int rk, int *set, int n, int k)
int next_k_subset(int *set, int n, int k)
void set_print(long int *v, int len)
a collection of functions related to sorted vectors
int lint_vec_sort_and_test_if_contained(long int *v1, int len1, long int *v2, int len2)
a statistical analysis of data consisting of single integers
void init(int *data, int data_length, int f_second, int verbose_level)
void print_naked(int f_backwards)
linear_algebra::linear_algebra * Linear_algebra
int Gauss_easy(int *A, int m, int n)
data_structures::lint_vec * Lint_vec
domain to compute with objects of type longinteger
int compare(longinteger_object &a, longinteger_object &b)
void add(longinteger_object &a, longinteger_object &b, longinteger_object &c)
void integral_division_by_int(longinteger_object &a, int b, longinteger_object &q, int &r)
void integral_division(longinteger_object &a, longinteger_object &b, longinteger_object &q, longinteger_object &r, int verbose_level)
int compare_unsigned(longinteger_object &a, longinteger_object &b)
a class to represent arbitrary precision integers
void assign_to(longinteger_object &b)
void create_product(int nb_factors, int *factors)
void create(long int i, const char *file, int line)
void swap_with(longinteger_object &b)
a permutation group in a fixed action.
void coset_unrank(groups::sims *G, groups::sims *U, long int rank, int *Elt, int verbose_level)
void element_print_quick(void *elt, std::ostream &ost)
void element_print(void *elt, std::ostream &ost)
void map_a_set(long int *set, long int *image_set, int n, int *Elt, int verbose_level)
void element_invert(void *a, void *av, int verbose_level)
void element_one(void *elt, int verbose_level)
long int coset_rank(groups::sims *G, groups::sims *U, int *Elt, int verbose_level)
void element_move(void *a, void *b, int verbose_level)
void element_print_as_permutation(void *elt, std::ostream &ost)
int element_order(void *elt)
a container data structure for groups
void schreier_sims(int verbose_level)
void init(actions::action *A, int verbose_level)
void init_strong_generators_by_hdl(int nb_gen, int *gen_hdl, int *tl, int verbose_level)
a set of orbits using a vector of orbit representatives and stabilizers
set_and_stabilizer * Reps
manages access to schreier vectors
a set and its known set stabilizer
ring_theory::longinteger_object target_go
groups::strong_generators * Strong_gens
void init(actions::action *A, actions::action *A2, int verbose_level)
void init_everything(actions::action *A, actions::action *A2, long int *Set, int set_sz, groups::strong_generators *gens, int verbose_level)
void allocate_data(int sz, int verbose_level)
to hold a vector of group elements
a strong generating set for a permutation group with respect to a fixed action
sims * create_sims(int verbose_level)
void compute_and_print_orbits(actions::action *A_given, int verbose_level)
void print_generators(std::ostream &ost)
void init_from_sims(groups::sims *S, int verbose_level)
void write_file(std::string &fname, int verbose_level)
data_structures_groups::vector_ge * gens
void group_order(ring_theory::longinteger_object &go)
represents a known classification with constructive recognition, to be used as base case for poset_cl...
to control the behavior of the poset classification algorithm
void classify_k_subsets(long int *the_set, int n, int k, data_structures::tally *&C, 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 list_whole_orbit(int depth, int orbit_idx, int f_has_print_function, void(*print_function)(std::ostream &ost, int len, long int *S, void *data), void *print_function_data, int f_show_orbit_decomposition, int f_show_stab, int f_save_stab, int f_show_whole_orbit)
void recreate_schreier_vectors_at_level(int i, int verbose_level)
void orbit_length(int orbit_at_level, int level, ring_theory::longinteger_object &len)
int test_sv_level_file_binary(int level, std::string &fname_base)
void orbit_element_unrank(int depth, int orbit_idx, long int rank, long int *set, int verbose_level)
poset_orbit_node * get_node_ij(int level, int node)
int nb_orbits_at_level(int level)
void coset_unrank(int depth, int orbit_idx, long int rank, int *Elt, int verbose_level)
int orbit_length_as_int(int orbit_at_level, int level)
long int rank_point(int *v)
void get_set_by_level(int level, int node, long int *set)
long int coset_rank(int depth, int orbit_idx, int *Elt, int verbose_level)
void get_stabilizer_group(data_structures_groups::group_container *&G, int level, int orbit_at_level, int verbose_level)
void read_sv_level_file_binary(int level, std::string &fname_base, int f_split, int split_mod, int split_case, int f_recreate_extensions, int f_dont_keep_sv, int verbose_level)
long int get_stabilizer_order_lint(int level, int orbit_at_level)
void get_stabilizer_generators(groups::strong_generators *&gens, int level, int orbit_at_level, int verbose_level)
void get_set(int node, long int *set, int &size)
void get_stabilizer_order(int level, int orbit_at_level, ring_theory::longinteger_object &go)
void write_sv_level_file_binary(int level, std::string &fname_base, int f_split, int split_mod, int split_case, int verbose_level)
int find_poset_orbit_node_for_set_basic(int from, int node, int len, long int *set, int f_tolerant, int verbose_level)
void trace_all_k_subsets(long int *the_set, int n, int k, int &nCk, int *&isotype, int verbose_level)
void unrank_point(int *v, long int rk)
void count_automorphism_group_orders(int lvl, int &nb_agos, ring_theory::longinteger_object *&agos, int *&multiplicities, int verbose_level)
the data structure for the poset of orbits in the poset classification algorithm
long int count_extension_nodes_at_level(int lvl)
int find_extension_from_point(int node_idx, long int pt, int verbose_level)
long int nb_flag_orbits_up_at_level(int level)
poset_orbit_node * get_node_ij(int level, int node)
void get_set(int node, long int *set, int &size)
poset_orbit_node * get_node(int node_idx)
int nb_orbits_at_level(int level)
int first_node_at_level(int i)
double level_progress(int lvl)
to represent one poset orbit; related to the class poset_classification
extension * get_E(int idx)
int test_if_stabilizer_is_trivial()
int has_Schreier_vector()
void compute_schreier_vector(poset_classification *gen, int lvl, int verbose_level)
void print_extensions(std::ostream &ost)
void get_stabilizer_generators(poset_classification *PC, groups::strong_generators *&Strong_gens, int verbose_level)
long int get_stabilizer_order_lint(poset_classification *PC)
int depth_of_node(poset_classification *gen)
void get_stabilizer_order(poset_classification *gen, ring_theory::longinteger_object &go)
void get_stabilizer(poset_classification *PC, data_structures_groups::group_container &G, ring_theory::longinteger_object &go_G, int verbose_level)
void store_set_to(poset_classification *gen, int i, long int *to)
a poset with a group action on it
algebra::vector_space * VS
void early_test_func(long int *S, int len, long int *candidates, int nb_candidates, long int *good_candidates, int &nb_good_candidates, int verbose_level)
void unrank_point(int *v, long int rk)
ring_theory::longinteger_object go
long int rank_point(int *v)
#define Lint_vec_copy(A, B, C)
#define Int_vec_zero(A, B)
#define Lint_vec_print(A, B, C)
#define NEW_OBJECTS(type, n)
#define Int_vec_copy(A, B, C)
#define Int_vec_print(A, B, C)
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
void print_extension_type(ostream &ost, int t)
the orbiter library for the classification of combinatorial objects
#define EXTENSION_TYPE_PROCESSING
#define EXTENSION_TYPE_EXTENSION