16namespace layer5_applications {
17namespace apps_geometry {
20static long int linear_set_classify_rank_point_func(
int *v,
void *data);
21static void linear_set_classify_unrank_point_func(
int *v,
long int rk,
void *data);
23static void linear_set_classify_early_test_func(
long int *S,
int len,
24 long int *candidates,
int nb_candidates,
25 long int *good_candidates,
int &nb_good_candidates,
26 void *data,
int verbose_level);
27static void linear_set_classify_secondary_early_test_func(
long int *S,
int len,
28 long int *candidates,
int nb_candidates,
29 long int *good_candidates,
int &nb_good_candidates,
30 void *data,
int verbose_level);
104 cout <<
"linear_set_classify::freeself before delete VS" << endl;
110 cout <<
"linear_set_classify::freeself before delete Poset1" << endl;
116 cout <<
"linear_set_classify::freeself before delete Gen" << endl;
122 cout <<
"linear_set_classify::freeself before delete Strong_gens" << endl;
128 cout <<
"linear_set_classify::freeself before delete D" << endl;
134 cout <<
"linear_set_classify::freeself before delete D1" << endl;
140 cout <<
"linear_set_classify::freeself before delete spread_embedding" << endl;
146 cout <<
"linear_set_classify::freeself before delete P" << endl;
152 cout <<
"linear_set_classify::freeself before delete Aq" << endl;
158 cout <<
"linear_set_classify::freeself before delete AQ" << endl;
164 cout <<
"linear_set_classify::freeself before delete A_PGLQ" << endl;
170 cout <<
"linear_set_classify::freeself before delete SubS" << endl;
176 cout <<
"linear_set_classify::freeself before delete Fq" << endl;
182 cout <<
"linear_set_classify::freeself before delete FQ" << endl;
208 int s,
int n,
int q, std::string &poly_q, std::string &poly_Q,
209 int depth,
int f_identify,
int verbose_level)
212 int f_v = (verbose_level >= 1);
213 int f_vv = (verbose_level >= 2);
217 cout <<
"linear_set_classify::init" << endl;
226 cout <<
"linear_set_classify::init s=" <<
s << endl;
227 cout <<
"linear_set_classify::init n=" <<
n << endl;
228 cout <<
"linear_set_classify::init q=" <<
q << endl;
229 cout <<
"linear_set_classify::init depth=" <<
depth << endl;
230 cout <<
"linear_set_classify::init f_identify=" <<
f_identify << endl;
237 cout <<
"linear_set_classify::init s must divide n" << endl;
241 cout <<
"linear_set_classify::init m=" <<
m << endl;
242 cout <<
"linear_set_classify::init Q=" <<
Q << endl;
255 cout <<
"linear_set_classify::init before Fq->init" << endl;
261 cout <<
"linear_set_classify::init before FQ->init" << endl;
267 cout <<
"linear_set_classify::init before SubS->init" << endl;
272 cout <<
"Field-basis: ";
280 cout <<
"linear_set_classify::init before P->projective_space_init" << endl;
286 cout <<
"linear_set_classify::init after P->projective_space_init" << endl;
291 cout <<
"linear_set_classify::init before init_general_linear_group "
292 "GL(" <<
n <<
"," <<
Fq->
q <<
")" << endl;
306 cout <<
"linear_set_classify::init after init_general_linear_group "
307 "GL(" <<
n <<
"," <<
Fq->
q <<
")" << endl;
314 cout <<
"linear_set_classify::init before init_general_linear_group "
315 "GL(" <<
m <<
"," <<
FQ->
q <<
")" << endl;
324 cout <<
"linear_set_classify::init after init_general_linear_group "
325 "GL(" <<
m <<
"," <<
FQ->
q <<
")" << endl;
329 cout <<
"Strong generators are:" << endl;
337 cout <<
"linear_set_classify::init before init_projective_group "
338 "PGL(" <<
m <<
"," <<
FQ->
q <<
")" << endl;
347 cout <<
"linear_set_classify::init after init_projective_group "
348 "PGL(" <<
m <<
"," <<
FQ->
q <<
")" << endl;
353 cout <<
"linear_set_classify::init before linear_set_lift_generators_"
354 "to_subfield_structure" << endl;
364 cout <<
"linear_set_classify::init after linear_set_lift_generators_"
365 "to_subfield_structure" << endl;
369 cout <<
"After lift, strong generators are:" << endl;
382 cout <<
"linear_set_classify::init before D->init" << endl;
388 cout <<
"linear_set_classify::init after D->init" << endl;
395 cout <<
"linear_set_classify::init before D1->init" << endl;
401 cout <<
"linear_set_classify::init after D1->init" << endl;
408 cout <<
"linear_set_classify::init computing spread_embedding" << endl;
412 for (i = 0; i <
D->
N; i++) {
421 cout <<
"linear_set_classify::init computing spread_embedding done" << endl;
428 linear_set_classify_rank_point_func,
429 linear_set_classify_unrank_point_func,
448 cout <<
"linear_set_classify::init before Gen->init" << endl;
452 cout <<
"linear_set_classify::init after Gen->init" << endl;
470 cout <<
"Classifying spreads of order " <<
order << endl;
484 T->
init2(Control, verbose_level);
488 Fq, f_recoordinatize,
489 "SPREADS_STARTER",
"Spreads",
order + 1,
491 MINIMUM(verbose_level - 1, 2));
499 cout <<
"Classifying spreads planes of order "
500 <<
order <<
":" << endl;
504 cout <<
"Spreads of order " <<
order
505 <<
" have been classified" << endl;
510 cout <<
"linear_set_classify::init done" << endl;
516 int f_v = (verbose_level >= 1);
519 cout <<
"linear_set_classify::do_classify" << endl;
525 cout <<
"linear_set_classify::do_classify calling generator_main" << endl;
551 cout <<
"linear_set_classify::do_classify done with generator_main" << endl;
555 cout <<
"linear_set_classify::do_classify we found " << nb_orbits
556 <<
" orbits at depth " <<
depth<< endl;
561 cout <<
"linear_set_classify::do_classify done" << endl;
567 int f_v = (verbose_level >= 1);
568 int f_vv = (verbose_level >= 2);
573 cout <<
"linear_set_classify::test_set" << endl;
574 cout <<
"Testing set ";
578 for (i = 0; i < len; i++) {
584 cout <<
"coordinate matrix:" << endl;
592 cout <<
"the matrix has rank " << rk << endl;
599 ret = (*extra_test_func)(
this, len, S,
606 cout <<
"OK" << endl;
611 cout <<
"not OK" << endl;
618 int &nb_nodes,
int *&Intersection_dimensions,
int verbose_level)
620 int f_v = (verbose_level >= 1);
625 cout <<
"linear_set_classify::compute_intersection_types_at_level" << endl;
631 Intersection_dimensions =
NEW_int(nb_nodes *
D->
N);
632 for (node = 0; node < nb_nodes; node++) {
634 for (i = 0; i < level; i++) {
638 Intersection_dimensions + node *
D->
N, 0 );
645 cout <<
"linear_set_classify::compute_intersection_types_at_level done" << endl;
651 int f_v = (verbose_level >= 1);
654 cout <<
"linear_set_classify::calculate_intersections" << endl;
659 int **Intersection_dimensions;
670 for (level = 0; level <=
depth; level++) {
671 cout <<
"Computing intersection types at level " << level
672 <<
" / " <<
depth <<
":" << endl;
674 Nb_nodes[level], Intersection_dimensions[level],
676 cout <<
"nb_nodes=" << Nb_nodes[level] << endl;
678 for (level = 0; level <=
depth; level++) {
679 cout <<
"Intersection types at level " << level <<
" / "
680 <<
depth <<
" with " << Nb_nodes[level] <<
" orbits:" << endl;
681 for (i = 0; i < Nb_nodes[level]; i++) {
682 cout << setw(3) << i <<
" : ";
684 Intersection_dimensions[level] + i *
D->
N,
D->
N);
689 C.
init(Intersection_dimensions[level] + i *
D->
N,
D->
N,
FALSE, 0);
700 for (level = 0; level <=
depth; level++) {
701 cout <<
"Level " << level <<
":" << endl;
702 Sets[level] =
NEW_plint(Nb_nodes[level]);
703 Set_sz[level] =
NEW_int(Nb_nodes[level]);
704 for (h = 0; h < Nb_nodes[level]; h++) {
707 I = Intersection_dimensions[level] + h *
D->
N;
708 Set_sz[level][h] = 0;
709 for (i = 0; i <
D->
N; i++) {
714 Sets[level][h] =
NEW_lint(Set_sz[level][h]);
716 for (i = 0; i <
D->
N; i++) {
718 Sets[level][h][j++] = i;
728 for (level = 0; level <=
depth; level++) {
729 for (h = 0; h < Nb_nodes[level]; h++) {
734 FREE_int(Intersection_dimensions[level]);
742 cout <<
"linear_set_classify::calculate_intersections done" << endl;
748 int f_v = (verbose_level >= 1);
754 cout <<
"linear_set_classify::read_data_file" << endl;
757 sprintf(str,
"_%d.data",
depth);
762 cout <<
"linear_set_classify::read_data_file after read_data_file" << endl;
771 for (level = 0; level <
depth; level++) {
773 cout <<
"linear_set_classify::read_data_file before "
774 "read_sv_level_file_binary level=" << level << endl;
783 cout <<
"before print_tree" << endl;
786 cout <<
"before draw_poset" << endl;
794 cout <<
"linear_set_classify::read_data_file done" << endl;
801 int len, orbit_at_level, i;
810 for (orbit_at_level = 0; orbit_at_level < len; orbit_at_level++) {
812 for (i = 0; i < level; i++) {
816 cout <<
"orbit " << orbit_at_level <<
" / " << len
817 <<
" stabilizer order " << go <<
":" << endl;
821 cout <<
"Basis:" << endl;
831 int level,
int orbit_at_level,
835 int f_v = (verbose_level >= 1);
840 cout <<
"linear_set_classify::classify_secondary" << endl;
850 for (i = 0; i < level; i++) {
856 cout <<
"Basis:" << endl;
874 cout <<
"degree=" <<
Aq->
degree << endl;
875 cout <<
"nb_allowed=" << nb_allowed << endl;
882 char fname_candidates[1000];
886 cout <<
"reading file " << fname_candidates << endl;
888 generator_read_candidates_of_orbit(fname_candidates, orbit_at_level,
889 candidates, nb_candidates, verbose_level);
891 int *good_candidates;
892 int nb_good_candidates;
894 good_candidates =
NEW_int(nb_candidates);
895 nb_good_candidates = 0;
896 for (i = 0; i < nb_candidates; i++) {
899 good_candidates[nb_good_candidates++] = a;
902 cout <<
"Out of " << nb_candidates <<
" candidates, "
903 << nb_good_candidates <<
" survive" << endl;
905 int *good_candidates;
906 int nb_good_candidates;
908 good_candidates =
NEW_int(nb_candidates);
909 nb_good_candidates = 0;
910 for (i = 0; i < nb_candidates; i++) {
913 good_candidates[nb_good_candidates++] = a;
919 long int *candidates;
926 candidates[nb_candidates++] = i;
929 cout <<
"candidates:" << nb_candidates << endl;
935 strong_generators *Strong_gens_previous;
938 level, orbit_at_level, verbose_level);
942 candidates, nb_candidates,
956 long int *candidates,
int nb_candidates,
960 int f_v = (verbose_level >= 1);
963 cout <<
"linear_set_classify::init_secondary" << endl;
981 sprintf(label,
"subspaces_%d_%d_%d_secondary_%d_%d",
n,
q,
s,
986 cout <<
"linear_set_classify::init_secondary "
988 cout <<
"linear_set_classify::init_secondary "
994 cout <<
"linear_set_classify::init_secondary generators are:" << endl;
999 cout <<
"linear_set_classify::init_secondary before Gen2->initialize_and_allocate_root_node" << endl;
1001 Strong_gens_previous,
VS,
1006 cout <<
"linear_set_classify::init_secondary after Gen2->initialize_and_allocate_root_node" << endl;
1011 Gen2->init_early_test_func(
1012 linear_set_classify_secondary_early_test_func,
1028 cout <<
"linear_set_classify::init_secondary before "
1029 "Gen2->init_root_node_invariant_subset" << endl;
1034 cout <<
"linear_set_classify::init_secondary after "
1035 "Gen2->init_root_node_invariant_subset" << endl;
1040 cout <<
"linear_set_classify::init_secondary before "
1041 "do_classify_secondary" << endl;
1045 cout <<
"linear_set_classify::init_secondary after "
1046 "do_classify_secondary" << endl;
1049 cout <<
"linear_set_classify::init_secondary done" << endl;
1056 int f_v = (verbose_level >= 1);
1060 cout <<
"linear_set_classify::do_classify_secondary" << endl;
1066 cout <<
"linear_set_classify::do_classify_secondary "
1067 "calling generator_main" << endl;
1082 cout <<
"linear_set_classify::do_classify_secondary "
1083 "done with generator_main" << endl;
1087 cout <<
"linear_set_classify::do_classify_secondary we found "
1110 cout <<
"Basis1:" << endl;
1114 int *Intersection_dimensions;
1116 Intersection_dimensions =
NEW_int(
D->
N);
1118 for (h = 0; h < nb_orbits; h++) {
1119 cout <<
"Orbit " << h <<
" / " << nb_orbits <<
":" << endl;
1127 cout <<
"Basis2:" << endl;
1132 Intersection_dimensions, 0 );
1134 cout <<
"Intersection_dimensions:";
1146 cout <<
"The stabilizer has order " << go
1147 <<
" and is generated by:" << endl;
1157 cout <<
"linear_set_classify::do_classify_secondary done" << endl;
1163 int f_v = (verbose_level >= 1);
1164 int f_vv = (verbose_level >= 2);
1172 cout <<
"linear_set_classify::test_set_secondary" << endl;
1173 cout <<
"Testing set ";
1177 for (i = 0; i < len; i++) {
1184 cout <<
"coordinate matrix:" << endl;
1194 cout <<
"the matrix has rank " << rk << endl;
1211 for (i = 0; i < nb; i++) {
1227 ret = (*extra_test_func)(
this, len, S,
1234 cout <<
"OK" << endl;
1239 cout <<
"not OK" << endl;
1246 int argc,
const char **argv,
1247 int level,
int orbit_at_level,
1251 int f_v = (verbose_level >= 1);
1256 cout <<
"linear_set_classify::compute_stabilizer_of_linear_set" << endl;
1263 for (i = 0; i < level; i++) {
1269 cout <<
"Basis:" << endl;
1289 cout <<
"degree=" <<
Aq->
degree << endl;
1290 cout <<
"nb_allowed=" << nb_allowed << endl;
1294 long int *candidates;
1301 candidates[nb_candidates++] = i;
1304 cout <<
"candidates:" << nb_candidates << endl;
1312 level, orbit_at_level, verbose_level);
1316 level, orbit_at_level,
1317 candidates, nb_candidates,
1318 Strong_gens_previous,
1331 int level,
int orbit_at_level,
1332 long int *candidates,
int nb_candidates,
1337 int f_v = (verbose_level >= 1);
1340 cout <<
"linear_set_classify::init_compute_stabilizer" << endl;
1354 "subspaces_%d_%d_%d_stabilizer_%d_%d",
n,
q,
s,
1355 level, orbit_at_level);
1359 cout <<
"linear_set_classify::init_compute_stabilizer "
1360 "depth = " << level << endl;
1365 cout <<
"linear_set_classify::init_compute_stabilizer "
1366 "generators are:" << endl;
1371 cout <<
"linear_set_classify::init_compute_stabilizer "
1372 "before Gen_stab->init" << endl;
1374 Strong_gens_previous,
VS,
1383 cout <<
"linear_set_classify::init_compute_stabilizer "
1384 "after Gen_stab->init" << endl;
1389 subspace_orbits_test_func,
1397 linear_set_classify_secondary_early_test_func,
1412 linear_set_rank_point_func,
1413 linear_set_unrank_point_func,
1419 Gen->print_function = print_set;
1420 Gen->print_function_data =
this;
1428 cout <<
"linear_set_classify::init_secondary before "
1429 "Gen_stab->init_root_node_invariant_subset" << endl;
1434 cout <<
"linear_set_classify::init_secondary after "
1435 "Gen_stab->init_root_node_invariant_subset" << endl;
1440 cout <<
"linear_set_classify::init_compute_stabilizer "
1441 "before do_compute_stabilizer" << endl;
1444 candidates, nb_candidates,
1448 cout <<
"linear_set_classify::init_compute_stabilizer "
1449 "after do_compute_stabilizer" << endl;
1452 cout <<
"linear_set_classify::init_compute_stabilizer done" << endl;
1458 int level,
int orbit_at_level,
1459 long int *candidates,
int nb_candidates,
1463 int f_v = (verbose_level >= 1);
1467 cout <<
"linear_set_classify::do_compute_stabilizer" << endl;
1473 cout <<
"linear_set_classify::do_compute_stabilizer "
1474 "calling generator_main" << endl;
1489 cout <<
"linear_set_classify::do_compute_stabilizer "
1490 "done with generator_main" << endl;
1494 cout <<
"linear_set_classify::do_compute_stabilizer we found "
1495 << nb_orbits <<
" orbits at depth "
1514 for (i = 0; i < level; i++) {
1520 cout <<
"Basis1:" << endl;
1524 long int *linear_set;
1528 linear_set, linear_set_sz,
1532 int *Intersection_dimensions1;
1534 int linear_set_sz, j;
1536 Intersection_dimensions1 =
NEW_int(
D->
N);
1539 Intersection_dimensions1, 0 );
1542 for (i = 0; i <
D->
N; i++) {
1543 if (Intersection_dimensions1[i]) {
1547 linear_set =
NEW_int(linear_set_sz);
1549 for (i = 0; i <
D->
N; i++) {
1550 if (Intersection_dimensions1[i]) {
1551 linear_set[j++] = i;
1554 cout <<
"The linear set is: ";
1555 int_vec_print(cout, linear_set, linear_set_sz);
1560 int *Intersection_dimensions;
1564 int group_index, orbit_len, go_int;
1568 level, orbit_at_level, verbose_level);
1575 Intersection_dimensions =
NEW_int(
D->
N);
1578 aut_gens->
init(
Aq, verbose_level - 2);
1579 aut_gens->
allocate(Strong_gens_previous->
gens->
len, verbose_level - 2);
1580 for (i = 0; i < Strong_gens_previous->
gens->
len; i++) {
1582 aut_gens->
ith(i), 0);
1587 for (h = 0; h < nb_orbits; h++) {
1589 cout << h <<
" / " << nb_orbits <<
" orbit if length "
1590 << orbit_len <<
":" << endl;
1592 for (i = 0; i < level; i++) {
1598 cout <<
"Basis2:" << endl;
1602 Intersection_dimensions, 0 );
1604 cout <<
"Intersection_dimensions:";
1614 if (orbit == orbit_at_level) {
1616 cout <<
"linear_set_classify::do_compute_stabilizer orbit "
1617 << h <<
" leads to an automorphism" << endl;
1621 nb_candidates, candidates, 0 )) {
1622 cout <<
"The automorphism does not "
1623 "stabilize the candidate set" << endl;
1628 cout <<
"The automorphism is OK" << endl;
1631 aut_gens->
append(Elt1, verbose_level - 2);
1635 level, h, verbose_level);
1637 for (i = 0; i < Strong_gens_next->
gens->
len; i++) {
1638 aut_gens->
append(Strong_gens_next->
gens->
ith(i), verbose_level - 2);
1641 group_index += orbit_len;
1646 cout <<
"old stabilizer order = " << go_int << endl;
1647 cout <<
"group_index = " << group_index << endl;
1652 target_go = go_int * group_index;
1653 cout <<
"target_go = " << target_go << endl;
1654 cout <<
"creating group of order " << target_go <<
":" << endl;
1656 aut_gens, target_go, verbose_level);
1657 cout <<
"Stabilizer created successfully" << endl;
1666 cout <<
"Generators for the stabilizer of order "
1667 << target_go <<
" are:" << endl;
1677 cout <<
"Generators over FQ:" << endl;
1682 set_stabilizer_compute *STAB;
1685 int nb_backtrack_nodes;
1686 longinteger_object goQ;
1692 STAB->init(
A_PGLQ, StabQ, linear_set, linear_set_sz, verbose_level);
1693 STAB->compute_set_stabilizer(t0, nb_backtrack_nodes, verbose_level);
1694 StabQ->group_order(goQ);
1695 cout <<
"order of stabilizer in PGL(m,q)=" << goQ << endl;
1714 cout <<
"linear_set_classify::do_classify_secondary done" << endl;
1720 int f_v = (verbose_level >= 1);
1721 int f_vv = (verbose_level >= 2);
1722 int f_v3 = (verbose_level >= 3);
1726 cout <<
"linear_set_classify::construct_semifield orbit_for_W=" << orbit_for_W << endl;
1762 cout <<
"Basis1:" << endl;
1764 cout <<
"BasisU:" << endl;
1781 cout <<
"Basis2:" << endl;
1783 cout <<
"BasisW:" << endl;
1788 long int *large_linear_set;
1789 int large_linear_set_sz;
1790 long int *small_linear_set;
1791 int small_linear_set_sz;
1792 long int *small_linear_set_W;
1793 int small_linear_set_W_sz;
1796 large_linear_set, large_linear_set_sz,
1800 cout <<
"The large linear set of size "
1801 << large_linear_set_sz <<
" is ";
1809 small_linear_set, small_linear_set_sz,
1812 cout <<
"The small linear set of size "
1813 << small_linear_set_sz <<
" is ";
1822 small_linear_set_W, small_linear_set_W_sz,
1825 cout <<
"The small linear set for W of size "
1826 << small_linear_set_W_sz <<
" is ";
1836 for (i = 0; i < small_linear_set_sz; i++) {
1837 a = small_linear_set[i];
1839 small_linear_set[i] = b;
1842 cout <<
"After embedding, the small linear set of size "
1843 << small_linear_set_sz <<
" is ";
1851 is_deleted =
NEW_int(large_linear_set_sz);
1852 for (i = 0; i < large_linear_set_sz; i++) {
1853 is_deleted[i] =
FALSE;
1856 for (i = 0; i < small_linear_set_sz; i++) {
1857 a = small_linear_set[i];
1859 large_linear_set_sz, a, idx, 0)) {
1860 cout <<
"Cannot find embedded spread element "
1861 "in large linear set, something is wrong" << endl;
1864 is_deleted[idx] =
TRUE;
1867 long int *linear_set;
1872 for (i = 0; i < large_linear_set_sz; i++) {
1873 if (!is_deleted[i]) {
1877 linear_set =
NEW_lint(linear_set_sz);
1879 for (i = 0; i < large_linear_set_sz; i++) {
1880 if (!is_deleted[i]) {
1881 linear_set[j++] = large_linear_set[i];
1885 cout <<
"The linear set of size " << linear_set_sz <<
" is ";
1895 int *Spread_element_basis;
1897 int *Basis_infinity;
1905 Basis_elt =
NEW_int(dimW * n2);
1910 cout <<
"BasisW does not have the correct rank" << endl;
1914 cout <<
"BasisW:" << endl;
1916 cout <<
"base_cols:";
1923 cout <<
"kernel_cols:";
1931 for (i = 0; i <
s; i++) {
1933 Basis_infinity[i * n2 + i] = 1;
1936 cout <<
"Basis element infinity:" << endl;
1945 nb_components = linear_set_sz + 1;
1946 Components =
NEW_pint(nb_components);
1947 Spread_set =
NEW_int(linear_set_sz *
s *
s);
1953 for (h = 0; h < linear_set_sz; h++) {
1955 cout <<
"spread element " << h <<
" / "
1956 << linear_set_sz <<
":" << endl;
1963 cout <<
"Spread element " << a <<
" is:" << endl;
1967 for (i = 0; i < dimW; i++) {
1969 v1 = BasisW + i *
n1;
1970 for (j = 0; j <
s; j++) {
1971 v2 = Spread_element_basis + j *
n1;
1978 cout <<
"Basis after reduction mod W:" << endl;
1982 for (i = 0; i < dimW; i++) {
1983 for (j = 0; j < n2; j++) {
1985 Basis_elt[i * n2 + j] = Spread_element_basis[i *
n1 + a];
1990 cout <<
"Basis element:" << endl;
1997 cout <<
"Basis element after RREF:" << endl;
2001 for (i = 0; i <
s; i++) {
2002 for (j = 0; j <
s; j++) {
2003 a = Basis_elt[i * n2 +
s + j];
2004 Spread_set[h *
s *
s + i *
s + j] = a;
2008 Components[h + 1] =
NEW_int(
s * n2);
2013 cout <<
"The components are:" << endl;
2014 for (h = 0; h < linear_set_sz + 1; h++) {
2015 cout <<
"Component " << h <<
" / "
2016 << linear_set_sz <<
":" << endl;
2024 for (h = 0; h < linear_set_sz + 1; h++) {
2028 for (i = 0; i <
s; i++) {
2029 for (j = 0; j <
s; j++) {
2030 a = Components[h][i * n2 +
s + j];
2031 Spread_set[h2 *
s *
s + i *
s + j] = a;
2041 Intersection =
NEW_int(n2 * n2);
2042 for (h1 = 0; h1 < nb_components; h1++) {
2043 for (h2 = h1 + 1; h2 < nb_components; h2++) {
2045 Components[h1],
s, Components[h2],
2046 k3, Intersection, 0 );
2048 cout <<
"Components " << h1 <<
" and "
2049 << h2 <<
" intersect non-trivially!" << endl;
2050 cout <<
"Component " << h1 <<
" / "
2051 << nb_components <<
":" << endl;
2053 cout <<
"Component " << h2 <<
" / "
2054 << nb_components <<
":" << endl;
2060 cout <<
"The components are disjoint!" << endl;
2067 cout <<
"The spread_set is:" << endl;
2072 cout <<
"rank = " << rk << endl;
2075 cout <<
"The spread_set basis is:" << endl;
2077 for (h = 0; h < rk; h++) {
2078 cout <<
"basis elt " << h <<
" / " << rk <<
":" << endl;
2086 cout <<
"opening grassmann:" << endl;
2092 long int *spread_elements_numeric;
2094 spread_elements_numeric =
NEW_lint(nb_components);
2095 for (h = 0; h < nb_components; h++) {
2096 spread_elements_numeric[h] =
2101 cout <<
"spread elements numeric:" << endl;
2102 for (i = 0; i < nb_components; i++) {
2103 cout << setw(3) << i <<
" : "
2104 << spread_elements_numeric[i] << endl;
2109 cout <<
"linear_set::construct_semifield "
2110 "before T->identify" << endl;
2112 if (nb_components !=
order + 1) {
2113 cout <<
"nb_components != order + 1" << endl;
2118 int f_implicit_fusion =
FALSE;
2124 spread_elements_numeric, nb_components,
2125 transporter, f_implicit_fusion,
2138 cout <<
"linear_set::construct_semifield after recognize" << endl;
2139 cout <<
"final_node=" << final_node
2140 <<
" which is isomorphism type " << orbit_at_lvl
2141 <<
" with stabilizer order " << go << endl;
2142 cout <<
"transporter=" << endl;
2149 andre_construction *Andre;
2153 cout <<
"Creating the projective plane using "
2154 "the Andre construction:" << endl;
2155 Andre->init(
Fq,
s, spread_elements_numeric, 0 );
2156 cout <<
"Done creating the projective plane using "
2157 "the Andre construction." << endl;
2179static long int linear_set_classify_rank_point_func(
int *v,
void *data)
2192static void linear_set_classify_unrank_point_func(
int *v,
long int rk,
void *data)
2194 linear_set_classify *LS;
2197 LS = (linear_set_classify *) data;
2204static void linear_set_classify_early_test_func(
long int *S,
int len,
2205 long int *candidates,
int nb_candidates,
2206 long int *good_candidates,
int &nb_good_candidates,
2207 void *data,
int verbose_level)
2211 linear_set_classify *LS;
2212 int f_v = (verbose_level >= 1);
2213 int f_vv = (verbose_level >= 2);
2216 LS = (linear_set_classify *) data;
2219 cout <<
"linear_set_classify_early_test_func" << endl;
2220 cout <<
"testing " << nb_candidates <<
" candidates" << endl;
2222 nb_good_candidates = 0;
2223 for (i = 0; i < nb_candidates; i++) {
2224 S[len] = candidates[i];
2225 if (candidates[i] != 0) {
2228 if (LS->test_set(len + 1, S, verbose_level - 1)) {
2229 good_candidates[nb_good_candidates++] = candidates[i];
2231 cout <<
"candidate " << i <<
" / " << nb_candidates
2232 <<
" which is " << candidates[i]
2233 <<
" is accepted" << endl;
2238 cout <<
"candidate " << i <<
" / " << nb_candidates
2239 <<
" which is " << candidates[i]
2240 <<
" is rejected" << endl;
2246 cout <<
"linear_set_classify_early_test_func" << endl;
2247 cout <<
"Out of " << nb_candidates <<
" candidates, "
2248 << nb_good_candidates <<
" survive" << endl;
2252static void linear_set_classify_secondary_early_test_func(
long int *S,
int len,
2253 long int *candidates,
int nb_candidates,
2254 long int *good_candidates,
int &nb_good_candidates,
2255 void *data,
int verbose_level)
2259 linear_set_classify *LS;
2260 int f_v = (verbose_level >= 1);
2263 LS = (linear_set_classify *) data;
2266 cout <<
"linear_set_classify_secondary_early_test_func" << endl;
2267 cout <<
"testing " << nb_candidates <<
" candidates" << endl;
2269 nb_good_candidates = 0;
2270 for (i = 0; i < nb_candidates; i++) {
2271 S[len] = candidates[i];
2272 if (LS->is_allowed[candidates[i]]) {
2273 if (LS->test_set_secondary(len + 1, S, verbose_level - 1)) {
2274 good_candidates[nb_good_candidates++] = candidates[i];
2279 cout <<
"linear_set_classify_secondary_early_test_func" << endl;
2280 cout <<
"Out of " << nb_candidates <<
" candidates, "
2281 << nb_good_candidates <<
" survive" << endl;
finite dimensional vector space over a finite field
void init(field_theory::finite_field *F, int dimension, int verbose_level)
void init_rank_functions(long int(*rank_point_func)(int *v, void *data), void(*unrank_point_func)(int *v, long int rk, void *data), void *data, int verbose_level)
a collection of functions related to sorted vectors
int lint_vec_search(long int *v, int len, long int a, int &idx, int verbose_level)
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)
void PG_element_rank_modified(int *v, int stride, int len, int &a)
void PG_element_unrank_modified(int *v, int stride, int len, int a)
void init_override_polynomial(int q, std::string &poly, int f_without_tables, int verbose_level)
linear_algebra::linear_algebra * Linear_algebra
a finite field as a vector space over a subfield
void init(finite_field *FQ, finite_field *Fq, int verbose_level)
void compute_shadow(int *Basis, int basis_sz, int *is_in_shadow, int verbose_level)
void init(int n, int m, int s, field_theory::subfield_structure *SubS, int verbose_level)
void compute_linear_set(int *Basis, int basis_sz, long int *&the_linear_set, int &the_linear_set_sz, int verbose_level)
void compute_intersection_type(int k, int *subspace, int *intersection_dimensions, int verbose_level)
void print_linear_set_tex(long int *set, int sz)
various functions related to geometries
void AG_element_unrank(int q, int *v, int stride, int len, long int a)
long int nb_PG_elements(int n, int q)
long int AG_element_rank(int q, int *v, int stride, int len)
to rank and unrank subspaces of a fixed dimension in F_q^n
long int rank_lint_here(int *Mtx, int verbose_level)
void init(int n, int k, field_theory::finite_field *F, int verbose_level)
projective space PG(n,q) of dimension n over Fq
field_theory::finite_field * F
void projective_space_init(int n, field_theory::finite_field *F, int f_init_incidence_structure, int verbose_level)
void mult_vector_from_the_left(int *v, int *A, int *vA, int m, int n)
void kernel_columns(int n, int nb_base_cols, int *base_cols, int *kernel_cols)
int Gauss_easy(int *A, int m, int n)
void Gauss_step(int *v1, int *v2, int len, int idx, int verbose_level)
int Gauss_simple(int *A, int m, int n, int *base_cols, int verbose_level)
int intersect_subspaces(int n, int k1, int *A, int k2, int *B, int &k3, int *intersection, int verbose_level)
basic number theoretic functions
int i_power_j(int i, int j)
interface to system functions
a class to represent arbitrary precision integers
global functions related to group actions
void retract_generators(data_structures_groups::vector_ge *gens_in, data_structures_groups::vector_ge *&gens_out, action *AQ, field_theory::subfield_structure *S, int n, int verbose_level)
void lift_generators_to_subfield_structure(int n, int s, field_theory::subfield_structure *S, action *Aq, action *AQ, groups::strong_generators *&Strong_gens, int verbose_level)
a permutation group in a fixed action.
void element_print_quick(void *elt, std::ostream &ost)
void init_general_linear_group(int n, field_theory::finite_field *F, int f_semilinear, int f_basis, int f_init_sims, data_structures_groups::vector_ge *&nice_gens, int verbose_level)
groups::strong_generators * Strong_gens
void init_projective_group(int n, field_theory::finite_field *F, int f_semilinear, int f_basis, int f_init_sims, data_structures_groups::vector_ge *&nice_gens, int verbose_level)
int test_if_set_stabilizes(int *Elt, int size, long int *set, int verbose_level)
void element_move(void *a, void *b, int verbose_level)
groups::sims * create_sims_from_generators_with_target_group_order_lint(data_structures_groups::vector_ge *gens, long int target_go, int verbose_level)
to hold a vector of group elements
void append(int *elt, int verbose_level)
void allocate(int length, int verbose_level)
void init(actions::action *A, int verbose_level)
void print_quick(std::ostream &ost)
a permutation group represented via a stabilizer chain
a strong generating set for a permutation group with respect to a fixed action
void print_generators_tex()
void print_generators(std::ostream &ost)
void init_from_sims(groups::sims *S, int verbose_level)
data_structures_groups::vector_ge * gens
void group_order(ring_theory::longinteger_object &go)
to control the behavior of the poset classification algorithm
the poset classification algorithm
void initialize_and_allocate_root_node(poset_classification_control *PC_control, poset_with_group_action *Poset, int depth, int verbose_level)
actions::action * get_A2()
int compute_orbits(int from_level, int to_level, int schreier_depth, int f_use_invariant_subset_if_available, int verbose_level)
void init_root_node_invariant_subset(int *invariant_subset, int invariant_subset_size, int verbose_level)
int trace_set(long int *set, int size, int level, long int *canonical_set, int *Elt_transporter, int verbose_level)
actions::action * get_A()
void make_fname_candidates_file_default(char *fname2000, int level)
int main(int t0, int schreier_depth, int f_use_invariant_subset_if_available, int f_debug, int verbose_level)
int first_node_at_level(int i)
int nb_orbits_at_level(int level)
std::string & get_problem_label_with_path()
int orbit_length_as_int(int orbit_at_level, int level)
void get_set_by_level(int level, int node, long int *set)
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)
void get_stabilizer_generators(groups::strong_generators *&gens, int level, int orbit_at_level, int verbose_level)
void get_stabilizer_order(int level, int orbit_at_level, ring_theory::longinteger_object &go)
void draw_poset(std::string &fname_base, int depth, int data, graphics::layered_graph_draw_options *LG_Draw_options, int verbose_level)
void recognize(std::string &set_to_recognize, int h, int nb_to_recognize, int verbose_level)
void read_data_file(int &depth_completed, std::string &fname, int verbose_level)
a poset with a group action on it
void init_subspace_lattice(actions::action *A, actions::action *A2, groups::strong_generators *Strong_gens, algebra::vector_space *VS, int verbose_level)
classification of linear sets
geometry::desarguesian_spread * D1
geometry::desarguesian_spread * D
int secondary_nb_candidates
poset_classification::poset_classification_control * Control2
void construct_semifield(int orbit_for_W, int verbose_level)
void init_compute_stabilizer(int argc, const char **argv, int level, int orbit_at_level, long int *candidates, int nb_candidates, groups::strong_generators *Strong_gens_previous, groups::strong_generators *&strong_gens, int verbose_level)
geometry::projective_space * P
void read_data_file(int depth, int verbose_level)
field_theory::finite_field * FQ
poset_classification::poset_classification * Gen
groups::strong_generators * Strong_gens
poset_classification::poset_classification_control * Control_stab
poset_classification::poset_classification * Gen2
void init_secondary(int argc, const char **argv, long int *candidates, int nb_candidates, groups::strong_generators *Strong_gens_previous, int verbose_level)
void calculate_intersections(int depth, int verbose_level)
int(* extra_test_func)(void *, int len, long int *S, void *extra_test_func_data, int verbose_level)
int test_set_secondary(int len, long int *S, int verbose_level)
spreads::spread_classify * T
int secondary_schreier_depth
poset_classification::poset_classification_control * Control1
void init(int s, int n, int q, std::string &poly_q, std::string &poly_Q, int depth, int f_identify, int verbose_level)
field_theory::subfield_structure * SubS
int test_set(int len, long int *S, int verbose_level)
poset_classification::poset_classification * Gen_stab
long int * secondary_candidates
algebra::vector_space * VS
poset_classification::poset_with_group_action * Poset2
void print_orbits_at_level(int level)
poset_classification::poset_with_group_action * Poset_stab
void compute_intersection_types_at_level(int level, int &nb_nodes, int *&Intersection_dimensions, int verbose_level)
int f_has_extra_test_func
void compute_stabilizer_of_linear_set(int argc, const char **argv, int level, int orbit_at_level, groups::strong_generators *&strong_gens, int verbose_level)
void classify_secondary(int argc, const char **argv, int level, int orbit_at_level, groups::strong_generators *strong_gens, int verbose_level)
poset_classification::poset_with_group_action * Poset1
void do_classify(int verbose_level)
int vector_space_dimension
void * extra_test_func_data
field_theory::finite_field * Fq
void do_compute_stabilizer(int level, int orbit_at_level, long int *candidates, int nb_candidates, groups::strong_generators *&strong_gens, int verbose_level)
int secondary_orbit_at_level
int f_use_invariant_subset_if_available
void do_classify_secondary(int verbose_level)
projective space PG(n,q) with automorphism group PGGL(n+1,q)
to classify spreads of PG(k-1,q) in PG(n-1,q) where k divides n
poset_classification::poset_classification * gen
void init(projective_geometry::projective_space_with_action *PA, int k, int f_recoordinatize, int verbose_level)
void compute(int verbose_level)
void init2(poset_classification::poset_classification_control *Control, int verbose_level)
#define Int_vec_zero(A, B)
#define Lint_vec_print(A, B, C)
#define Int_vec_print_integer_matrix_width(A, B, C, D, E, F)
#define Int_matrix_print(A, B, C)
#define Int_vec_copy(A, B, C)
#define Int_vec_print(A, B, C)
the orbiter library for the classification of combinatorial objects