Orbiter 2022
Combinatorial Objects
linear_set_classify.cpp
Go to the documentation of this file.
1/*
2 * linear_set_classify.cpp
3 *
4 * Created on: Oct 28, 2019
5 * Author: betten
6 */
7
8
9
10
11#include "orbiter.h"
12
13using namespace std;
14
15namespace orbiter {
16namespace layer5_applications {
17namespace apps_geometry {
18
19
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);
22#if 0
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);
31#endif
32
33
35{
36 s = n = m = q = Q = depth = 0;
40 f_debug = FALSE;
42 extra_test_func = NULL;
44 Basis = NULL;
45 base_cols = NULL;
46
47 Fq = NULL;
48 FQ = NULL;
49 SubS = NULL;
50 P = NULL;
51 Aq = NULL;
52 AQ = NULL;
53 A_PGLQ = NULL;
54 VS = NULL;
55 Control1 = NULL;
56 Poset1 = NULL;
57 Gen = NULL;
59 Strong_gens = NULL;
60 D = NULL;
61 n1 = 0;
62 m1 = 0;
63 D1 = NULL;
64 spread_embedding = NULL;
65
67 k = 0;
68 order = 0;
69 T = NULL;
70
77
78
79 Control_stab = NULL;
80 Poset_stab = NULL;
81 Gen_stab = NULL;
82 Control2 = NULL;
83 Poset2 = NULL;
84 Gen2 = NULL;
85 is_allowed = NULL;
86
87}
88
90{
91 freeself();
92}
93
95{
96}
97
99{
100 int f_v = FALSE;
101
102 if (VS) {
103 if (f_v) {
104 cout << "linear_set_classify::freeself before delete VS" << endl;
105 }
107 }
108 if (Poset1) {
109 if (f_v) {
110 cout << "linear_set_classify::freeself before delete Poset1" << endl;
111 }
113 }
114 if (Gen) {
115 if (f_v) {
116 cout << "linear_set_classify::freeself before delete Gen" << endl;
117 }
119 }
120 if (Strong_gens) {
121 if (f_v) {
122 cout << "linear_set_classify::freeself before delete Strong_gens" << endl;
123 }
125 }
126 if (D) {
127 if (f_v) {
128 cout << "linear_set_classify::freeself before delete D" << endl;
129 }
130 FREE_OBJECT(D);
131 }
132 if (D1) {
133 if (f_v) {
134 cout << "linear_set_classify::freeself before delete D1" << endl;
135 }
137 }
138 if (spread_embedding) {
139 if (f_v) {
140 cout << "linear_set_classify::freeself before delete spread_embedding" << endl;
141 }
143 }
144 if (P) {
145 if (f_v) {
146 cout << "linear_set_classify::freeself before delete P" << endl;
147 }
148 FREE_OBJECT(P);
149 }
150 if (Aq) {
151 if (f_v) {
152 cout << "linear_set_classify::freeself before delete Aq" << endl;
153 }
155 }
156 if (AQ) {
157 if (f_v) {
158 cout << "linear_set_classify::freeself before delete AQ" << endl;
159 }
161 }
162 if (A_PGLQ) {
163 if (f_v) {
164 cout << "linear_set_classify::freeself before delete A_PGLQ" << endl;
165 }
167 }
168 if (SubS) {
169 if (f_v) {
170 cout << "linear_set_classify::freeself before delete SubS" << endl;
171 }
173 }
174 if (Fq) {
175 if (f_v) {
176 cout << "linear_set_classify::freeself before delete Fq" << endl;
177 }
179 }
180 if (FQ) {
181 if (f_v) {
182 cout << "linear_set_classify::freeself before delete FQ" << endl;
183 }
185 }
186 if (Basis) {
188 }
189 if (base_cols) {
191 }
192 if (Poset2) {
194 }
195 if (Gen2) {
197 }
198 if (is_allowed) {
200 }
201 if (T) {
202 FREE_OBJECT(T);
203 }
204 null();
205}
206
208 int s, int n, int q, std::string &poly_q, std::string &poly_Q,
209 int depth, int f_identify, int verbose_level)
210// Q = q^s and n = m * s
211{
212 int f_v = (verbose_level >= 1);
213 int f_vv = (verbose_level >= 2);
215
216 if (f_v) {
217 cout << "linear_set_classify::init" << endl;
218 }
219
225 if (f_v) {
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;
231 }
232
233
234 Q = NT.i_power_j(q, s);
235 m = n / s;
236 if (m * s != n) {
237 cout << "linear_set_classify::init s must divide n" << endl;
238 exit(1);
239 }
240 if (f_v) {
241 cout << "linear_set_classify::init m=" << m << endl;
242 cout << "linear_set_classify::init Q=" << Q << endl;
243 }
244
246 if (NT.is_prime(q)) {
248 }
249 else {
251 }
252
254 if (f_v) {
255 cout << "linear_set_classify::init before Fq->init" << endl;
256 }
257 Fq->init_override_polynomial(q, poly_q, FALSE /* f_without_tables */, 0);
258
260 if (f_v) {
261 cout << "linear_set_classify::init before FQ->init" << endl;
262 }
263 FQ->init_override_polynomial(Q, poly_Q, FALSE /* f_without_tables */, 0);
264
266 if (f_v) {
267 cout << "linear_set_classify::init before SubS->init" << endl;
268 }
269 SubS->init(FQ, Fq, verbose_level);
270
271 if (f_v) {
272 cout << "Field-basis: ";
273 Int_vec_print(cout, SubS->Basis, s);
274 cout << endl;
275 }
276
277
279 if (f_v) {
280 cout << "linear_set_classify::init before P->projective_space_init" << endl;
281 }
283 FALSE /* f_init_incidence_structure */,
284 0 /*verbose_level*/);
285 if (f_v) {
286 cout << "linear_set_classify::init after P->projective_space_init" << endl;
287 }
288
289
290 if (f_v) {
291 cout << "linear_set_classify::init before init_general_linear_group "
292 "GL(" << n << "," << Fq->q << ")" << endl;
293 }
294
296
299 FALSE /* f_semilinear */,
300 TRUE /* f_basis */, TRUE /* f_init_sims */,
301 nice_gens,
302 verbose_level - 2);
303 FREE_OBJECT(nice_gens);
304
305 if (f_v) {
306 cout << "linear_set_classify::init after init_general_linear_group "
307 "GL(" << n << "," << Fq->q << ")" << endl;
308 }
309
310
312
313 if (f_v) {
314 cout << "linear_set_classify::init before init_general_linear_group "
315 "GL(" << m << "," << FQ->q << ")" << endl;
316 }
318 FALSE /* f_semilinear */,
319 TRUE /* f_basis */, TRUE /* f_init_sims */,
320 nice_gens,
321 verbose_level - 2);
322 FREE_OBJECT(nice_gens);
323 if (f_v) {
324 cout << "linear_set_classify::init after init_general_linear_group "
325 "GL(" << m << "," << FQ->q << ")" << endl;
326 }
327
328 if (f_vv) {
329 cout << "Strong generators are:" << endl;
332 }
333
334
336 if (f_v) {
337 cout << "linear_set_classify::init before init_projective_group "
338 "PGL(" << m << "," << FQ->q << ")" << endl;
339 }
341 FALSE /* f_semilinear */,
342 TRUE /* f_basis */, TRUE /* f_init_sims */,
343 nice_gens,
344 verbose_level - 2);
345 FREE_OBJECT(nice_gens);
346 if (f_v) {
347 cout << "linear_set_classify::init after init_projective_group "
348 "PGL(" << m << "," << FQ->q << ")" << endl;
349 }
350
351
352 if (f_v) {
353 cout << "linear_set_classify::init before linear_set_lift_generators_"
354 "to_subfield_structure" << endl;
355 }
356
358
361 verbose_level);
362
363 if (f_v) {
364 cout << "linear_set_classify::init after linear_set_lift_generators_"
365 "to_subfield_structure" << endl;
366 }
367
368 if (f_v) {
369 cout << "After lift, strong generators are:" << endl;
372 }
373
374
375
378
379
381 if (f_v) {
382 cout << "linear_set_classify::init before D->init" << endl;
383 }
384 D->init(n, m, s,
385 SubS,
386 verbose_level);
387 if (f_v) {
388 cout << "linear_set_classify::init after D->init" << endl;
389 }
390
391 m1 = m + 1;
392 n1 = s * m1; // = n + s
394 if (f_v) {
395 cout << "linear_set_classify::init before D1->init" << endl;
396 }
397 D1->init(n1, m1, s,
398 SubS,
399 0 /*verbose_level*/);
400 if (f_v) {
401 cout << "linear_set_classify::init after D1->init" << endl;
402 }
403
404 int *vec;
405 int i, j;
406
407 if (f_v) {
408 cout << "linear_set_classify::init computing spread_embedding" << endl;
409 }
411 vec = NEW_int(m1);
412 for (i = 0; i < D->N; i++) {
413 FQ->PG_element_unrank_modified(vec, 1, m, i);
414 vec[m] = 0;
415 FQ->PG_element_rank_modified(vec, 1, m1, j);
416 spread_embedding[i] = j;
417 }
418
419 FREE_int(vec);
420 if (f_v) {
421 cout << "linear_set_classify::init computing spread_embedding done" << endl;
422 }
423
425 VS->init(P->F, vector_space_dimension /* dimension */,
426 verbose_level - 1);
428 linear_set_classify_rank_point_func,
429 linear_set_classify_unrank_point_func,
430 this,
431 verbose_level - 1);
432
433
437
438
439
442
444 verbose_level);
445
446
447 if (f_v) {
448 cout << "linear_set_classify::init before Gen->init" << endl;
449 }
450 Gen->initialize_and_allocate_root_node(Control1, Poset1, depth /* sz */, verbose_level);
451 if (f_v) {
452 cout << "linear_set_classify::init after Gen->init" << endl;
453 }
454
455
458 f_debug = FALSE;
459
460
461 if (f_identify) {
463
464 //int f_recoordinatize = TRUE;
465
466 k = n >> 1;
467 order = NT.i_power_j(q, k);
468
469 if (f_v) {
470 cout << "Classifying spreads of order " << order << endl;
471 }
472
473 //int max_depth = order + 1;
476
479
480 T->init(PA, k,
481 TRUE /* f_recoordinatize */,
482 verbose_level - 2);
483
484 T->init2(Control, verbose_level);
485
486#if 0
487 T->init(order, n, k, max_depth,
488 Fq, f_recoordinatize,
489 "SPREADS_STARTER", "Spreads", order + 1,
490 argc, argv,
491 MINIMUM(verbose_level - 1, 2));
492#endif
493
494 //T->read_arguments(argc, argv);
495
496 //T->init2(Control, verbose_level);
497
498 if (f_v) {
499 cout << "Classifying spreads planes of order "
500 << order << ":" << endl;
501 }
502 T->compute(0 /*verbose_level*/);
503 if (f_v) {
504 cout << "Spreads of order " << order
505 << " have been classified" << endl;
506 }
507 }
508
509 if (f_v) {
510 cout << "linear_set_classify::init done" << endl;
511 }
512}
513
514void linear_set_classify::do_classify(int verbose_level)
515{
516 int f_v = (verbose_level >= 1);
517
518 if (f_v) {
519 cout << "linear_set_classify::do_classify" << endl;
520 }
521
522 //int t0 = os_ticks();
523
524 if (f_v) {
525 cout << "linear_set_classify::do_classify calling generator_main" << endl;
526 cout << "A=";
527 Gen->get_A()->print_info();
528 cout << "A2=";
529 Gen->get_A2()->print_info();
530 }
531
532 int schreier_depth = depth;
534
535
537 verbose_level);
538
539#if 0
540 Gen->main(t0,
543 f_lex,
544 f_debug,
545 verbose_level - 1);
546#endif
547
548 int nb_orbits;
549
550 if (f_v) {
551 cout << "linear_set_classify::do_classify done with generator_main" << endl;
552 }
553 nb_orbits = Gen->nb_orbits_at_level(depth);
554 if (f_v) {
555 cout << "linear_set_classify::do_classify we found " << nb_orbits
556 << " orbits at depth " << depth<< endl;
557 }
558
559
560 if (f_v) {
561 cout << "linear_set_classify::do_classify done" << endl;
562 }
563}
564
565int linear_set_classify::test_set(int len, long int *S, int verbose_level)
566{
567 int f_v = (verbose_level >= 1);
568 int f_vv = (verbose_level >= 2);
569 int ret = TRUE;
570 int i, rk;
571
572 if (f_v) {
573 cout << "linear_set_classify::test_set" << endl;
574 cout << "Testing set ";
575 Lint_vec_print(cout, S, len);
576 cout << endl;
577 }
578 for (i = 0; i < len; i++) {
582 }
583 if (f_vv) {
584 cout << "coordinate matrix:" << endl;
587 Fq->log10_of_q);
588 }
590 base_cols, 0 /*verbose_level - 2*/);
591 if (f_v) {
592 cout << "the matrix has rank " << rk << endl;
593 }
594 if (rk < len) {
595 ret = FALSE;
596 }
597 if (ret) {
599 ret = (*extra_test_func)(this, len, S,
600 extra_test_func_data, verbose_level);
601 }
602 }
603
604 if (ret) {
605 if (f_v) {
606 cout << "OK" << endl;
607 }
608 }
609 else {
610 if (f_v) {
611 cout << "not OK" << endl;
612 }
613 }
614 return ret;
615}
616
618 int &nb_nodes, int *&Intersection_dimensions, int verbose_level)
619{
620 int f_v = (verbose_level >= 1);
621 int node, i;
622 long int *set;
623
624 if (f_v) {
625 cout << "linear_set_classify::compute_intersection_types_at_level" << endl;
626 }
627
628 set = NEW_lint(level);
629
630 nb_nodes = Gen->nb_orbits_at_level(level);
631 Intersection_dimensions = NEW_int(nb_nodes * D->N);
632 for (node = 0; node < nb_nodes; node++) {
633 Gen->get_set_by_level(level, node, set);
634 for (i = 0; i < level; i++) {
635 Fq->PG_element_unrank_modified(Basis + i * n, 1, n, set[i]);
636 }
638 Intersection_dimensions + node * D->N, 0 /*verbose_level - 1*/);
639 }
640
641
642 FREE_lint(set);
643
644 if (f_v) {
645 cout << "linear_set_classify::compute_intersection_types_at_level done" << endl;
646 }
647}
648
649void linear_set_classify::calculate_intersections(int depth, int verbose_level)
650{
651 int f_v = (verbose_level >= 1);
652
653 if (f_v) {
654 cout << "linear_set_classify::calculate_intersections" << endl;
655 }
656
657 int level;
658 int *Nb_nodes;
659 int **Intersection_dimensions;
660 long int ***Sets;
661 int **Set_sz;
663 int i, h, j;
664
665 Nb_nodes = NEW_int(depth + 1);
666 Intersection_dimensions = NEW_pint(depth + 1);
667 Sets = NEW_pplint(depth + 1);
668 Set_sz = NEW_pint(depth + 1);
669
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],
675 verbose_level - 1);
676 cout << "nb_nodes=" << Nb_nodes[level] << endl;
677 }
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 << " : ";
683 Int_vec_print(cout,
684 Intersection_dimensions[level] + i * D->N, D->N);
685 cout << " : ";
686 {
688
689 C.init(Intersection_dimensions[level] + i * D->N, D->N, FALSE, 0);
690 C.print_naked(TRUE);
691 }
692 cout << " : ";
693 Gen->get_stabilizer_order(level, i, go);
694 cout << go;
695 cout << endl;
696 }
697 //int_matrix_print(Intersection_dimensions[level],
698 // Nb_nodes[level], LS->D->N);
699 }
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++) {
705 int *I;
706
707 I = Intersection_dimensions[level] + h * D->N;
708 Set_sz[level][h] = 0;
709 for (i = 0; i < D->N; i++) {
710 if (I[i]) {
711 Set_sz[level][h]++;
712 }
713 }
714 Sets[level][h] = NEW_lint(Set_sz[level][h]);
715 j = 0;
716 for (i = 0; i < D->N; i++) {
717 if (I[i]) {
718 Sets[level][h][j++] = i;
719 }
720 }
721 cout << h << " : ";
722 Lint_vec_print(cout, Sets[level][h], Set_sz[level][h]);
723 cout << endl;
724 }
725 }
726
727
728 for (level = 0; level <= depth; level++) {
729 for (h = 0; h < Nb_nodes[level]; h++) {
730 FREE_lint(Sets[level][h]);
731 }
732 FREE_plint(Sets[level]);
733 FREE_int(Set_sz[level]);
734 FREE_int(Intersection_dimensions[level]);
735 }
736 FREE_pplint(Sets);
737 FREE_pint(Set_sz);
738 FREE_pint(Intersection_dimensions);
739 FREE_int(Nb_nodes);
740
741 if (f_v) {
742 cout << "linear_set_classify::calculate_intersections done" << endl;
743 }
744}
745
746void linear_set_classify::read_data_file(int depth, int verbose_level)
747{
748 int f_v = (verbose_level >= 1);
749 int depth_completed;
750 string fname;
751 char str[1000];
752
753 if (f_v) {
754 cout << "linear_set_classify::read_data_file" << endl;
755 }
756 fname.assign(Gen->get_problem_label_with_path());
757 sprintf(str, "_%d.data", depth);
758 fname.append(str);
759
760 Gen->read_data_file(depth_completed, fname, 0 /*verbose_level - 1*/);
761 if (f_v) {
762 cout << "linear_set_classify::read_data_file after read_data_file" << endl;
763 }
764
765 int level;
766 string prefix;
767
768
769 prefix.assign(Gen->get_problem_label_with_path());
770 prefix.append("b");
771 for (level = 0; level < depth; level++) {
772 if (f_v) {
773 cout << "linear_set_classify::read_data_file before "
774 "read_sv_level_file_binary level=" << level << endl;
775 }
776 Gen->read_sv_level_file_binary(level, prefix,
777 FALSE /* f_split */, 0 /* split_mod */, 0 /*split_case*/,
778 FALSE /*f_recreate_extensions*/, FALSE /* f_dont_keep_sv */,
779 verbose_level - 2);
780 }
781
782#if 0
783 cout << "before print_tree" << endl;
784 Gen->print_tree();
785
786 cout << "before draw_poset" << endl;
787 Gen->draw_poset("test",
788 depth, 0 /* data1 */,
789 TRUE /* f_embedded */,
790 10 /* gen->verbose_level */);
791#endif
792
793 if (f_v) {
794 cout << "linear_set_classify::read_data_file done" << endl;
795 }
796}
797
798
800{
801 int len, orbit_at_level, i;
803 long int *set;
804 int *Basis;
805
806 set = NEW_lint(level);
807 Basis = NEW_int(level * n);
808
809 len = Gen->nb_orbits_at_level(level);
810 for (orbit_at_level = 0; orbit_at_level < len; orbit_at_level++) {
811 Gen->get_set_by_level(level, orbit_at_level, set);
812 for (i = 0; i < level; i++) {
813 Fq->PG_element_unrank_modified(Basis + i * n, 1, n, set[i]);
814 }
815 Gen->get_stabilizer_order(level, orbit_at_level, go);
816 cout << "orbit " << orbit_at_level << " / " << len
817 << " stabilizer order " << go << ":" << endl;
818 cout << "set: ";
819 Lint_vec_print(cout, set, level);
820 cout << endl;
821 cout << "Basis:" << endl;
822 Int_matrix_print(Basis, level, n);
823 }
824
825 FREE_lint(set);
827
828}
829
830void linear_set_classify::classify_secondary(int argc, const char **argv,
831 int level, int orbit_at_level,
832 groups::strong_generators *strong_gens,
833 int verbose_level)
834{
835 int f_v = (verbose_level >= 1);
836 int i, nb_allowed;
837 long int *set;
838
839 if (f_v) {
840 cout << "linear_set_classify::classify_secondary" << endl;
841 }
842
843 secondary_level = level;
844 secondary_orbit_at_level = orbit_at_level;
845
846 set = NEW_lint(level);
848
849 Gen->get_set_by_level(level, orbit_at_level, set);
850 for (i = 0; i < level; i++) {
851 Fq->PG_element_unrank_modified(Basis + i * n, 1, n, set[i]);
852 }
853 cout << "set: ";
854 Lint_vec_print(cout, set, level);
855 cout << endl;
856 cout << "Basis:" << endl;
857 Int_matrix_print(Basis, level, n);
858
859
860
861 D->compute_shadow(Basis, level, is_allowed, verbose_level - 1);
862 for (i = 0; i < Aq->degree; i++) {
863 is_allowed[i] = !is_allowed[i];
864 }
865
866
867 nb_allowed = 0;
868 for (i = 0; i < Aq->degree; i++) {
869 if (is_allowed[i]) {
870 nb_allowed++;
871 }
872 }
873
874 cout << "degree=" << Aq->degree << endl;
875 cout << "nb_allowed=" << nb_allowed << endl;
876
877
878#if 0
879 int *candidates;
880 int nb_candidates;
881 int a;
882 char fname_candidates[1000];
883
884 Gen->make_fname_candidates_file_default(fname_candidates, level);
885
886 cout << "reading file " << fname_candidates << endl;
887
888 generator_read_candidates_of_orbit(fname_candidates, orbit_at_level,
889 candidates, nb_candidates, verbose_level);
890
891 int *good_candidates;
892 int nb_good_candidates;
893
894 good_candidates = NEW_int(nb_candidates);
895 nb_good_candidates = 0;
896 for (i = 0; i < nb_candidates; i++) {
897 a = candidates[i];
898 if (is_allowed[a]) {
899 good_candidates[nb_good_candidates++] = a;
900 }
901 }
902 cout << "Out of " << nb_candidates << " candidates, "
903 << nb_good_candidates << " survive" << endl;
904
905 int *good_candidates;
906 int nb_good_candidates;
907
908 good_candidates = NEW_int(nb_candidates);
909 nb_good_candidates = 0;
910 for (i = 0; i < nb_candidates; i++) {
911 a = candidates[i];
912 if (is_allowed[a]) {
913 good_candidates[nb_good_candidates++] = a;
914 }
915 }
916
917#endif
918
919 long int *candidates;
920 int nb_candidates;
921
922 candidates = NEW_lint(nb_allowed);
923 nb_candidates = 0;
924 for (i = 0; i < Aq->degree; i++) {
925 if (is_allowed[i]) {
926 candidates[nb_candidates++] = i;
927 }
928 }
929 cout << "candidates:" << nb_candidates << endl;
930 Lint_vec_print(cout, candidates, nb_candidates);
931 cout << endl;
932
933
934#if 0
935 strong_generators *Strong_gens_previous;
936
937 Gen->get_stabilizer_generators(Strong_gens_previous,
938 level, orbit_at_level, verbose_level);
939#endif
940
941 init_secondary(argc, argv,
942 candidates, nb_candidates,
943 strong_gens /* Strong_gens_previous*/,
944 verbose_level);
945
946
947
948 FREE_lint(set);
949 //FREE_int(is_allowed);
950 // don't free is_allowed,
951 // it is part of linear_set now.
952 FREE_lint(candidates);
953}
954
955void linear_set_classify::init_secondary(int argc, const char **argv,
956 long int *candidates, int nb_candidates,
957 groups::strong_generators *Strong_gens_previous,
958 int verbose_level)
959{
960 int f_v = (verbose_level >= 1);
961
962 if (f_v) {
963 cout << "linear_set_classify::init_secondary" << endl;
964 }
965
966 secondary_candidates = candidates;
967 secondary_nb_candidates = nb_candidates;
968
972
974
977
978
979 char label[1000]; // ToDo
980
981 sprintf(label, "subspaces_%d_%d_%d_secondary_%d_%d", n, q, s,
983
984
985 if (f_v) {
986 cout << "linear_set_classify::init_secondary "
987 "secondary_level = " << secondary_level << endl;
988 cout << "linear_set_classify::init_secondary "
989 "secondary_depth = " << secondary_depth << endl;
990 }
991
992
993 if (f_v) {
994 cout << "linear_set_classify::init_secondary generators are:" << endl;
995 Strong_gens_previous->print_generators(cout);
996 //Strong_gens_previous->print_generators_as_permutations();
997 }
998
999 cout << "linear_set_classify::init_secondary before Gen2->initialize_and_allocate_root_node" << endl;
1001 Strong_gens_previous, VS,
1002 verbose_level);
1004 secondary_depth /* sz */,
1005 verbose_level);
1006 cout << "linear_set_classify::init_secondary after Gen2->initialize_and_allocate_root_node" << endl;
1007
1008
1009#if 0
1010 // ToDo
1011 Gen2->init_early_test_func(
1012 linear_set_classify_secondary_early_test_func,
1013 this /*void *data */,
1014 verbose_level);
1015#endif
1016
1017
1019 //f_use_invariant_subset_if_available = TRUE;
1020 //f_lex = FALSE;
1021 //f_debug = FALSE;
1022
1023
1024
1025 // the following works only for actions on subsets:
1026#if 0
1027 if (f_v) {
1028 cout << "linear_set_classify::init_secondary before "
1029 "Gen2->init_root_node_invariant_subset" << endl;
1030 }
1033 if (f_v) {
1034 cout << "linear_set_classify::init_secondary after "
1035 "Gen2->init_root_node_invariant_subset" << endl;
1036 }
1037#endif
1038
1039 if (f_v) {
1040 cout << "linear_set_classify::init_secondary before "
1041 "do_classify_secondary" << endl;
1042 }
1043 do_classify_secondary(verbose_level);
1044 if (f_v) {
1045 cout << "linear_set_classify::init_secondary after "
1046 "do_classify_secondary" << endl;
1047 }
1048 if (f_v) {
1049 cout << "linear_set_classify::init_secondary done" << endl;
1050 }
1051
1052}
1053
1055{
1056 int f_v = (verbose_level >= 1);
1058
1059 if (f_v) {
1060 cout << "linear_set_classify::do_classify_secondary" << endl;
1061 }
1062
1063 int t0 = Os.os_ticks();
1064
1065 if (f_v) {
1066 cout << "linear_set_classify::do_classify_secondary "
1067 "calling generator_main" << endl;
1068 cout << "A=";
1069 Gen2->get_A()->print_info();
1070 cout << "A2=";
1071 Gen2->get_A2()->print_info();
1072 }
1073 Gen2->main(t0,
1076 f_debug,
1077 verbose_level - 1);
1078
1079 int nb_orbits;
1080
1081 if (f_v) {
1082 cout << "linear_set_classify::do_classify_secondary "
1083 "done with generator_main" << endl;
1084 }
1086 if (f_v) {
1087 cout << "linear_set_classify::do_classify_secondary we found "
1088 << nb_orbits << " orbits at depth " << secondary_depth<< endl;
1089 }
1090
1091 int h, i;
1092
1093 long int *set1;
1094 long int *set2;
1095 int *Basis1;
1096 int *Basis2;
1097
1098 set1 = NEW_lint(secondary_level);
1099 set2 = NEW_lint(secondary_depth);
1100 Basis1 = NEW_int(secondary_level * n);
1101 Basis2 = NEW_int(secondary_depth * n);
1102
1104 for (i = 0; i < secondary_level; i++) {
1105 Fq->PG_element_unrank_modified(Basis1 + i * n, 1, n, set1[i]);
1106 }
1107 cout << "set1: ";
1108 Lint_vec_print(cout, set1, secondary_level);
1109 cout << endl;
1110 cout << "Basis1:" << endl;
1112
1113
1114 int *Intersection_dimensions;
1115
1116 Intersection_dimensions = NEW_int(D->N);
1117
1118 for (h = 0; h < nb_orbits; h++) {
1119 cout << "Orbit " << h << " / " << nb_orbits << ":" << endl;
1121 for (i = 0; i < secondary_depth; i++) {
1122 Fq->PG_element_unrank_modified(Basis2 + i * n, 1, n, set2[i]);
1123 }
1124 cout << "set2: ";
1125 Lint_vec_print(cout, set2, secondary_depth);
1126 cout << endl;
1127 cout << "Basis2:" << endl;
1129
1130
1132 Intersection_dimensions, 0 /*verbose_level - 1*/);
1133
1134 cout << "Intersection_dimensions:";
1135 Int_vec_print(cout, Intersection_dimensions, D->N);
1136 cout << endl;
1137
1138 groups::strong_generators *Strong_gens2;
1140
1141 Gen2->get_stabilizer_generators(Strong_gens2,
1142 secondary_depth, h, 0 /*verbose_level*/);
1143
1144 Strong_gens2->group_order(go);
1145
1146 cout << "The stabilizer has order " << go
1147 << " and is generated by:" << endl;
1148 Strong_gens2->print_generators(cout);
1149
1150 FREE_OBJECT(Strong_gens2);
1151 }
1152
1153 FREE_int(Intersection_dimensions);
1154
1155
1156 if (f_v) {
1157 cout << "linear_set_classify::do_classify_secondary done" << endl;
1158 }
1159}
1160
1161int linear_set_classify::test_set_secondary(int len, long int *S, int verbose_level)
1162{
1163 int f_v = (verbose_level >= 1);
1164 int f_vv = (verbose_level >= 2);
1165 int ret = TRUE;
1166 int i, rk;
1167 int *v;
1168 int *w;
1169 int nb;
1170
1171 if (f_v) {
1172 cout << "linear_set_classify::test_set_secondary" << endl;
1173 cout << "Testing set ";
1174 Lint_vec_print(cout, S, len);
1175 cout << endl;
1176 }
1177 for (i = 0; i < len; i++) {
1181 }
1182
1183 if (f_vv) {
1184 cout << "coordinate matrix:" << endl;
1188 }
1189
1190 rk = Fq->Linear_algebra->Gauss_simple(Basis, len,
1192 0 /*verbose_level - 2*/);
1193 if (f_v) {
1194 cout << "the matrix has rank " << rk << endl;
1195 }
1196 if (rk < len) {
1197 ret = FALSE;
1198 }
1199
1200 if (ret) {
1201 // need to make sure that the whole space
1202 // consists of allowable vectors:
1203
1205
1206 v = NEW_int(len);
1207 w = NEW_int(n);
1208 nb = Gg.nb_PG_elements(len - 1, q);
1209
1210
1211 for (i = 0; i < nb; i++) {
1212 Fq->PG_element_unrank_modified(v, 1, len, i);
1214 Fq->PG_element_rank_modified(w, 1, n, rk);
1215 if (is_allowed[rk] == FALSE) {
1216 ret = FALSE;
1217 break;
1218 }
1219 }
1220
1221 FREE_int(v);
1222 FREE_int(w);
1223 }
1224
1225 if (ret) {
1227 ret = (*extra_test_func)(this, len, S,
1228 extra_test_func_data, verbose_level);
1229 }
1230 }
1231
1232 if (ret) {
1233 if (f_v) {
1234 cout << "OK" << endl;
1235 }
1236 }
1237 else {
1238 if (f_v) {
1239 cout << "not OK" << endl;
1240 }
1241 }
1242 return ret;
1243}
1244
1246 int argc, const char **argv,
1247 int level, int orbit_at_level,
1248 groups::strong_generators *&strong_gens,
1249 int verbose_level)
1250{
1251 int f_v = (verbose_level >= 1);
1252 int i, nb_allowed;
1253 long int *set;
1254
1255 if (f_v) {
1256 cout << "linear_set_classify::compute_stabilizer_of_linear_set" << endl;
1257 }
1258
1259 set = NEW_lint(level);
1261
1262 Gen->get_set_by_level(level, orbit_at_level, set);
1263 for (i = 0; i < level; i++) {
1264 Fq->PG_element_unrank_modified(Basis + i * n, 1, n, set[i]);
1265 }
1266 cout << "set: ";
1267 Lint_vec_print(cout, set, level);
1268 cout << endl;
1269 cout << "Basis:" << endl;
1270 Int_matrix_print(Basis, level, n);
1271
1272
1273
1274 D->compute_shadow(Basis, level, is_allowed, verbose_level - 1);
1275
1276#if 0
1277 for (i = 0; i < Aq->degree; i++) {
1278 is_allowed[i] = !is_allowed[i];
1279 }
1280#endif
1281
1282 nb_allowed = 0;
1283 for (i = 0; i < Aq->degree; i++) {
1284 if (is_allowed[i]) {
1285 nb_allowed++;
1286 }
1287 }
1288
1289 cout << "degree=" << Aq->degree << endl;
1290 cout << "nb_allowed=" << nb_allowed << endl;
1291
1292
1293
1294 long int *candidates;
1295 int nb_candidates;
1296
1297 candidates = NEW_lint(nb_allowed);
1298 nb_candidates = 0;
1299 for (i = 0; i < Aq->degree; i++) {
1300 if (is_allowed[i]) {
1301 candidates[nb_candidates++] = i;
1302 }
1303 }
1304 cout << "candidates:" << nb_candidates << endl;
1305 Lint_vec_print(cout, candidates, nb_candidates);
1306 cout << endl;
1307
1308
1309 groups::strong_generators *Strong_gens_previous;
1310
1311 Gen->get_stabilizer_generators(Strong_gens_previous,
1312 level, orbit_at_level, verbose_level);
1313
1314
1315 init_compute_stabilizer(argc, argv,
1316 level, orbit_at_level,
1317 candidates, nb_candidates,
1318 Strong_gens_previous,
1319 strong_gens,
1320 verbose_level);
1321
1322
1323 FREE_lint(set);
1324 //FREE_int(is_allowed);
1325 // don't free is_allowed,
1326 //it is part of linear_set now.
1327 FREE_lint(candidates);
1328}
1329
1330void linear_set_classify::init_compute_stabilizer(int argc, const char **argv,
1331 int level, int orbit_at_level,
1332 long int *candidates, int nb_candidates,
1333 groups::strong_generators *Strong_gens_previous,
1334 groups::strong_generators *&strong_gens,
1335 int verbose_level)
1336{
1337 int f_v = (verbose_level >= 1);
1338
1339 if (f_v) {
1340 cout << "linear_set_classify::init_compute_stabilizer" << endl;
1341 }
1342
1345
1346
1348 Control_stab->depth = level;
1349
1350
1351 char label[1000];
1352
1353 sprintf(label,
1354 "subspaces_%d_%d_%d_stabilizer_%d_%d", n, q, s,
1355 level, orbit_at_level);
1356
1357
1358 if (f_v) {
1359 cout << "linear_set_classify::init_compute_stabilizer "
1360 "depth = " << level << endl;
1361 }
1362
1363
1364 if (f_v) {
1365 cout << "linear_set_classify::init_compute_stabilizer "
1366 "generators are:" << endl;
1367 Strong_gens_previous->print_generators(cout);
1368 //Strong_gens_previous->print_generators_as_permutations();
1369 }
1370
1371 cout << "linear_set_classify::init_compute_stabilizer "
1372 "before Gen_stab->init" << endl;
1374 Strong_gens_previous, VS,
1375 verbose_level);
1376
1378
1380 Poset_stab,
1381 level /* sz */,
1382 verbose_level);
1383 cout << "linear_set_classify::init_compute_stabilizer "
1384 "after Gen_stab->init" << endl;
1385
1386
1387#if 0
1388 Gen_stab->init_check_func(
1389 subspace_orbits_test_func,
1390 this /* candidate_check_data */);
1391#endif
1392
1393
1394#if 0
1395 // ToDo
1396 Gen_stab->init_early_test_func(
1397 linear_set_classify_secondary_early_test_func,
1398 this /*void *data */,
1399 verbose_level);
1400#endif
1401
1402 // we can use the same test function:
1403 // test if the whole subspace consists of allowed vectors
1404
1405 //Gen_stab->init_incremental_check_func(
1406 //check_mindist_incremental,
1407 //this /* candidate_check_data */);
1408
1409#if 0
1410 Gen_stab->init_vector_space_action(vector_space_dimension,
1411 P->F,
1412 linear_set_rank_point_func,
1413 linear_set_unrank_point_func,
1414 this,
1415 verbose_level);
1416#endif
1417#if 0
1418 Gen->f_print_function = TRUE;
1419 Gen->print_function = print_set;
1420 Gen->print_function_data = this;
1421#endif
1422
1423
1424
1425 // the following works only for actions on subsets:
1426#if 0
1427 if (f_v) {
1428 cout << "linear_set_classify::init_secondary before "
1429 "Gen_stab->init_root_node_invariant_subset" << endl;
1430 }
1433 if (f_v) {
1434 cout << "linear_set_classify::init_secondary after "
1435 "Gen_stab->init_root_node_invariant_subset" << endl;
1436 }
1437#endif
1438
1439 if (f_v) {
1440 cout << "linear_set_classify::init_compute_stabilizer "
1441 "before do_compute_stabilizer" << endl;
1442 }
1443 do_compute_stabilizer(level, orbit_at_level,
1444 candidates, nb_candidates,
1445 strong_gens,
1446 verbose_level);
1447 if (f_v) {
1448 cout << "linear_set_classify::init_compute_stabilizer "
1449 "after do_compute_stabilizer" << endl;
1450 }
1451 if (f_v) {
1452 cout << "linear_set_classify::init_compute_stabilizer done" << endl;
1453 }
1454
1455}
1456
1458 int level, int orbit_at_level,
1459 long int *candidates, int nb_candidates,
1460 groups::strong_generators *&strong_gens,
1461 int verbose_level)
1462{
1463 int f_v = (verbose_level >= 1);
1465
1466 if (f_v) {
1467 cout << "linear_set_classify::do_compute_stabilizer" << endl;
1468 }
1469
1470 int t0 = Os.os_ticks();
1471
1472 if (f_v) {
1473 cout << "linear_set_classify::do_compute_stabilizer "
1474 "calling generator_main" << endl;
1475 cout << "A=";
1477 cout << "A2=";
1479 }
1480 Gen_stab->main(t0,
1481 level,
1483 f_debug,
1484 verbose_level - 1);
1485
1486 int nb_orbits;
1487
1488 if (f_v) {
1489 cout << "linear_set_classify::do_compute_stabilizer "
1490 "done with generator_main" << endl;
1491 }
1492 nb_orbits = Gen_stab->nb_orbits_at_level(level);
1493 if (f_v) {
1494 cout << "linear_set_classify::do_compute_stabilizer we found "
1495 << nb_orbits << " orbits at depth "
1496 << level << endl;
1497 }
1498
1499 long int *set1;
1500 long int *set2;
1501 long int *set3;
1502 int *Basis1;
1503 int *Basis2;
1504 int i, h, orbit;
1505
1506 set1 = NEW_lint(level);
1507 set2 = NEW_lint(level);
1508 set3 = NEW_lint(level);
1509 Basis1 = NEW_int(level * n);
1510 Basis2 = NEW_int(level * n);
1511
1512
1513 Gen->get_set_by_level(level, orbit_at_level, set1);
1514 for (i = 0; i < level; i++) {
1515 Fq->PG_element_unrank_modified(Basis1 + i * n, 1, n, set1[i]);
1516 }
1517 cout << "set1: ";
1518 Lint_vec_print(cout, set1, level);
1519 cout << endl;
1520 cout << "Basis1:" << endl;
1521 Int_matrix_print(Basis1, level, n);
1522
1523
1524 long int *linear_set;
1525 int linear_set_sz;
1526
1527 D->compute_linear_set(Basis1, level,
1528 linear_set, linear_set_sz,
1529 verbose_level);
1530
1531#if 0
1532 int *Intersection_dimensions1;
1533 int *linear_set;
1534 int linear_set_sz, j;
1535
1536 Intersection_dimensions1 = NEW_int(D->N);
1537
1538 D->compute_intersection_type(level, Basis1,
1539 Intersection_dimensions1, 0 /*verbose_level - 1*/);
1540
1541 linear_set_sz = 0;
1542 for (i = 0; i < D->N; i++) {
1543 if (Intersection_dimensions1[i]) {
1544 linear_set_sz++;
1545 }
1546 }
1547 linear_set = NEW_int(linear_set_sz);
1548 j = 0;
1549 for (i = 0; i < D->N; i++) {
1550 if (Intersection_dimensions1[i]) {
1551 linear_set[j++] = i;
1552 }
1553 }
1554 cout << "The linear set is: ";
1555 int_vec_print(cout, linear_set, linear_set_sz);
1556 cout << endl;
1557#endif
1558
1559
1560 int *Intersection_dimensions;
1561 int *Elt1;
1563 groups::strong_generators *Strong_gens_previous;
1564 int group_index, orbit_len, go_int;
1566
1567 Gen->get_stabilizer_generators(Strong_gens_previous,
1568 level, orbit_at_level, verbose_level);
1569
1570 Strong_gens_previous->group_order(go);
1571 go_int = go.as_int();
1572
1573
1574 Elt1 = NEW_int(Aq->elt_size_in_int);
1575 Intersection_dimensions = NEW_int(D->N);
1577
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++) {
1581 Aq->element_move(Strong_gens_previous->gens->ith(i),
1582 aut_gens->ith(i), 0);
1583 }
1584
1585
1586 group_index = 0;
1587 for (h = 0; h < nb_orbits; h++) {
1588 orbit_len = Gen_stab->orbit_length_as_int(h, level);
1589 cout << h << " / " << nb_orbits << " orbit if length "
1590 << orbit_len << ":" << endl;
1591 Gen_stab->get_set_by_level(level, h, set2);
1592 for (i = 0; i < level; i++) {
1593 Fq->PG_element_unrank_modified(Basis2 + i * n, 1, n, set2[i]);
1594 }
1595 cout << "set2: ";
1596 Lint_vec_print(cout, set2, level);
1597 cout << endl;
1598 cout << "Basis2:" << endl;
1599 Int_matrix_print(Basis2, level, n);
1600
1601 D->compute_intersection_type(level, Basis2,
1602 Intersection_dimensions, 0 /*verbose_level - 1*/);
1603
1604 cout << "Intersection_dimensions:";
1605 Int_vec_print(cout, Intersection_dimensions, D->N);
1606 cout << endl;
1607
1608 //int f_lex = TRUE;
1609
1610 orbit = Gen->trace_set(set2, level, level,
1611 set3 /* canonical_set */, Elt1 /* *Elt_transporter */,
1612 0 /*verbose_level */);
1613
1614 if (orbit == orbit_at_level) {
1615 if (f_v) {
1616 cout << "linear_set_classify::do_compute_stabilizer orbit "
1617 << h << " leads to an automorphism" << endl;
1618 Aq->element_print_quick(Elt1, cout);
1619 }
1620 if (!Aq->test_if_set_stabilizes(Elt1,
1621 nb_candidates, candidates, 0 /* verbose_level */)) {
1622 cout << "The automorphism does not "
1623 "stabilize the candidate set" << endl;
1624 exit(1);
1625 }
1626 else {
1627 if (f_v) {
1628 cout << "The automorphism is OK" << endl;
1629 }
1630 }
1631 aut_gens->append(Elt1, verbose_level - 2);
1632 groups::strong_generators *Strong_gens_next;
1633
1634 Gen_stab->get_stabilizer_generators(Strong_gens_next,
1635 level, h, verbose_level);
1636
1637 for (i = 0; i < Strong_gens_next->gens->len; i++) {
1638 aut_gens->append(Strong_gens_next->gens->ith(i), verbose_level - 2);
1639 }
1640 FREE_OBJECT(Strong_gens_next);
1641 group_index += orbit_len;
1642
1643 }
1644 }
1645
1646 cout << "old stabilizer order = " << go_int << endl;
1647 cout << "group_index = " << group_index << endl;
1648
1649 groups::sims *Aut;
1650 int target_go;
1651
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;
1658
1659 //strong_generators *Aut_gens;
1660
1661 //Aut_gens = NEW_OBJECT(strong_generators);
1662
1664
1665 strong_gens->init_from_sims(Aut, 0);
1666 cout << "Generators for the stabilizer of order "
1667 << target_go << " are:" << endl;
1668 strong_gens->print_generators(cout);
1669
1671
1672
1674 AG.retract_generators(strong_gens->gens, gensQ,
1675 AQ, SubS, n, verbose_level);
1676
1677 cout << "Generators over FQ:" << endl;
1678 gensQ->print_quick(cout);
1679
1680
1681#if 0
1682 set_stabilizer_compute *STAB;
1683 sims *StabQ;
1684 //int t0;
1685 int nb_backtrack_nodes;
1686 longinteger_object goQ;
1687
1688 t0 = os_ticks();
1689
1690 StabQ = NEW_OBJECT(sims);
1691 STAB = NEW_OBJECT(set_stabilizer_compute);
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;
1696
1697 FREE_OBJECT(STAB);
1698#endif
1699
1700
1701 FREE_lint(linear_set);
1702 FREE_OBJECT(gensQ);
1703
1704 FREE_lint(set1);
1705 FREE_lint(set2);
1706 FREE_lint(set3);
1707 FREE_int(Basis1);
1708 FREE_int(Basis2);
1709 FREE_int(Intersection_dimensions);
1710 FREE_int(Elt1);
1711 FREE_OBJECT(Strong_gens_previous);
1712
1713 if (f_v) {
1714 cout << "linear_set_classify::do_classify_secondary done" << endl;
1715 }
1716}
1717
1718void linear_set_classify::construct_semifield(int orbit_for_W, int verbose_level)
1719{
1720 int f_v = (verbose_level >= 1);
1721 int f_vv = (verbose_level >= 2);
1722 int f_v3 = (verbose_level >= 3);
1724
1725 if (f_v) {
1726 cout << "linear_set_classify::construct_semifield orbit_for_W=" << orbit_for_W << endl;
1727 }
1728
1729 long int *set1;
1730 long int *set2;
1731 int dimU, dimW;
1732 int *Basis1;
1733 int *Basis2;
1734 int *BasisU;
1735 int *BasisW;
1736 int i;
1737
1738 set1 = NEW_lint(secondary_level);
1739 set2 = NEW_lint(secondary_depth);
1740 dimU = secondary_level + 1;
1741 dimW = secondary_depth;
1742 Basis1 = NEW_int(secondary_level * n);
1743 Basis2 = NEW_int(secondary_depth * n);
1744 BasisU = NEW_int(dimU * n1);
1745 BasisW = NEW_int(dimW * n1);
1746
1747 Int_vec_zero(BasisU, dimU * n1);
1748 Int_vec_zero(BasisW, dimW * n1);
1749
1751 for (i = 0; i < secondary_level; i++) {
1752 Fq->PG_element_unrank_modified(Basis1 + i * n, 1, n, set1[i]);
1753 }
1754 for (i = 0; i < secondary_level; i++) {
1755 Fq->PG_element_unrank_modified(BasisU + i * n1, 1, n, set1[i]);
1756 }
1757 BasisU[secondary_level * n1 + n] = 1; // the vector v
1758 if (f_vv) {
1759 cout << "set1: ";
1760 Lint_vec_print(cout, set1, secondary_level);
1761 cout << endl;
1762 cout << "Basis1:" << endl;
1764 cout << "BasisU:" << endl;
1765 Int_matrix_print(BasisU, dimU, n1);
1766 }
1767
1768
1769 Gen2->get_set_by_level(secondary_depth, orbit_for_W, set2);
1770 for (i = 0; i < secondary_depth; i++) {
1771 Fq->PG_element_unrank_modified(Basis2 + i * n, 1, n, set2[i]);
1772 }
1773 for (i = 0; i < secondary_depth; i++) {
1774 Fq->PG_element_unrank_modified(BasisW + i * n1, 1, n, set2[i]);
1775 }
1776
1777 if (f_vv) {
1778 cout << "set2: ";
1779 Lint_vec_print(cout, set2, secondary_depth);
1780 cout << endl;
1781 cout << "Basis2:" << endl;
1783 cout << "BasisW:" << endl;
1784 Int_matrix_print(BasisW, dimW, n1);
1785 }
1786
1787
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;
1794
1795 D1->compute_linear_set(BasisU, dimU,
1796 large_linear_set, large_linear_set_sz,
1797 0 /*verbose_level*/);
1798
1799 if (f_vv) {
1800 cout << "The large linear set of size "
1801 << large_linear_set_sz << " is ";
1802 Lint_vec_print(cout, large_linear_set, large_linear_set_sz);
1803 cout << endl;
1804 D1->print_linear_set_tex(large_linear_set, large_linear_set_sz);
1805 cout << endl;
1806 }
1807
1809 small_linear_set, small_linear_set_sz,
1810 0 /*verbose_level*/);
1811 if (f_vv) {
1812 cout << "The small linear set of size "
1813 << small_linear_set_sz << " is ";
1814 Lint_vec_print(cout, small_linear_set, small_linear_set_sz);
1815 cout << endl;
1816 D->print_linear_set_tex(small_linear_set, small_linear_set_sz);
1817 cout << endl;
1818 }
1819
1820
1822 small_linear_set_W, small_linear_set_W_sz,
1823 0 /*verbose_level*/);
1824 if (f_vv) {
1825 cout << "The small linear set for W of size "
1826 << small_linear_set_W_sz << " is ";
1827 Lint_vec_print(cout, small_linear_set_W, small_linear_set_W_sz);
1828 cout << endl;
1829 D->print_linear_set_tex(small_linear_set_W, small_linear_set_W_sz);
1830 cout << endl;
1831 }
1832
1833 int *is_deleted;
1834 int a, b, idx;
1835
1836 for (i = 0; i < small_linear_set_sz; i++) {
1837 a = small_linear_set[i];
1838 b = spread_embedding[a];
1839 small_linear_set[i] = b;
1840 }
1841 if (f_vv) {
1842 cout << "After embedding, the small linear set of size "
1843 << small_linear_set_sz << " is ";
1844 Lint_vec_print(cout, small_linear_set, small_linear_set_sz);
1845 cout << endl;
1846 D1->print_linear_set_tex(small_linear_set, small_linear_set_sz);
1847 cout << endl;
1848 }
1849
1850
1851 is_deleted = NEW_int(large_linear_set_sz);
1852 for (i = 0; i < large_linear_set_sz; i++) {
1853 is_deleted[i] = FALSE;
1854 }
1855
1856 for (i = 0; i < small_linear_set_sz; i++) {
1857 a = small_linear_set[i];
1858 if (!Sorting.lint_vec_search(large_linear_set,
1859 large_linear_set_sz, a, idx, 0)) {
1860 cout << "Cannot find embedded spread element "
1861 "in large linear set, something is wrong" << endl;
1862 exit(1);
1863 }
1864 is_deleted[idx] = TRUE;
1865 }
1866
1867 long int *linear_set;
1868 int linear_set_sz;
1869 int j;
1870
1871 linear_set_sz = 0;
1872 for (i = 0; i < large_linear_set_sz; i++) {
1873 if (!is_deleted[i]) {
1874 linear_set_sz++;
1875 }
1876 }
1877 linear_set = NEW_lint(linear_set_sz);
1878 j = 0;
1879 for (i = 0; i < large_linear_set_sz; i++) {
1880 if (!is_deleted[i]) {
1881 linear_set[j++] = large_linear_set[i];
1882 }
1883 }
1884 if (f_vv) {
1885 cout << "The linear set of size " << linear_set_sz << " is ";
1886 Lint_vec_print(cout, linear_set, linear_set_sz);
1887 cout << endl;
1888 D1->print_linear_set_tex(linear_set, linear_set_sz);
1889 cout << endl;
1890 }
1891
1892
1893 int *base_cols;
1894 int *kernel_cols;
1895 int *Spread_element_basis;
1896 int *Basis_elt;
1897 int *Basis_infinity;
1898 int h;
1899 int *v1, *v2;
1900 int n2;
1901
1902 n2 = n1 - dimW;
1903 Spread_element_basis = NEW_int(D1->spread_element_size);
1904 Basis_infinity = NEW_int(s * n2);
1905 Basis_elt = NEW_int(dimW * n2);
1906 base_cols = NEW_int(n1);
1907 kernel_cols = NEW_int(n1);
1908 if (Fq->Linear_algebra->Gauss_simple(BasisW, dimW, n1, base_cols,
1909 0/* verbose_level*/) != dimW) {
1910 cout << "BasisW does not have the correct rank" << endl;
1911 exit(1);
1912 }
1913 if (f_vv) {
1914 cout << "BasisW:" << endl;
1915 Int_matrix_print(BasisW, dimW, n1);
1916 cout << "base_cols:";
1917 Int_vec_print(cout, base_cols, dimW);
1918 cout << endl;
1919 }
1920
1921 Fq->Linear_algebra->kernel_columns(n1, dimW, base_cols, kernel_cols);
1922 if (f_vv) {
1923 cout << "kernel_cols:";
1924 Int_vec_print(cout, kernel_cols, n2);
1925 cout << endl;
1926 }
1927
1928
1929
1930 Int_vec_zero(Basis_infinity, s * n2);
1931 for (i = 0; i < s; i++) {
1932 //a = kernel_cols[i] - s;
1933 Basis_infinity[i * n2 + i] = 1;
1934 }
1935 if (f_vv) {
1936 cout << "Basis element infinity:" << endl;
1937 Int_matrix_print(Basis_infinity, s, n2);
1938 }
1939
1940
1941 int nb_components;
1942 int **Components;
1943 int *Spread_set;
1944
1945 nb_components = linear_set_sz + 1;
1946 Components = NEW_pint(nb_components);
1947 Spread_set = NEW_int(linear_set_sz * s * s);
1948
1949
1950 Components[0] = NEW_int(s * n2);
1951 Int_vec_copy(Basis_infinity, Components[0], s * n2);
1952
1953 for (h = 0; h < linear_set_sz; h++) {
1954 if (f_v3) {
1955 cout << "spread element " << h << " / "
1956 << linear_set_sz << ":" << endl;
1957 }
1958 a = linear_set[h];
1961 Spread_element_basis, D1->spread_element_size);
1962 if (f_v3) {
1963 cout << "Spread element " << a << " is:" << endl;
1964 Int_matrix_print(Spread_element_basis, s, n1);
1965 }
1966
1967 for (i = 0; i < dimW; i++) {
1968 a = base_cols[i];
1969 v1 = BasisW + i * n1;
1970 for (j = 0; j < s; j++) {
1971 v2 = Spread_element_basis + j * n1;
1972 if (v2[a]) {
1973 Fq->Linear_algebra->Gauss_step(v1, v2, n1, a, 0 /* verbose_level*/);
1974 }
1975 }
1976 }
1977 if (f_v3) {
1978 cout << "Basis after reduction mod W:" << endl;
1979 Int_matrix_print(Spread_element_basis, s, n1);
1980 }
1981
1982 for (i = 0; i < dimW; i++) {
1983 for (j = 0; j < n2; j++) {
1984 a = kernel_cols[j];
1985 Basis_elt[i * n2 + j] = Spread_element_basis[i * n1 + a];
1986 }
1987 }
1988
1989 if (f_v3) {
1990 cout << "Basis element:" << endl;
1991 Int_matrix_print(Basis_elt, s, n2);
1992 }
1993
1994 Fq->Linear_algebra->Gauss_easy(Basis_elt, s, n2);
1995
1996 if (f_v3) {
1997 cout << "Basis element after RREF:" << endl;
1998 Int_matrix_print(Basis_elt, s, n2);
1999 }
2000
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;
2005 }
2006 }
2007
2008 Components[h + 1] = NEW_int(s * n2);
2009 Int_vec_copy(Basis_elt, Components[h + 1], s * n2);
2010 }
2011
2012 if (f_v3) {
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;
2017 Int_matrix_print(Components[h], s, n2);
2018 }
2019 }
2020
2021 int h2;
2022
2023 h2 = 0;
2024 for (h = 0; h < linear_set_sz + 1; h++) {
2025 if (h == 1) {
2026 continue;
2027 }
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;
2032 }
2033 }
2034
2035 h2++;
2036 }
2037
2038 int h1, k3;
2039 int *Intersection;
2040
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 /* verbose_level */);
2047 if (k3) {
2048 cout << "Components " << h1 << " and "
2049 << h2 << " intersect non-trivially!" << endl;
2050 cout << "Component " << h1 << " / "
2051 << nb_components << ":" << endl;
2052 Int_matrix_print(Components[h1], s, n2);
2053 cout << "Component " << h2 << " / "
2054 << nb_components << ":" << endl;
2055 Int_matrix_print(Components[h2], s, n2);
2056 }
2057 }
2058 }
2059 if (f_vv) {
2060 cout << "The components are disjoint!" << endl;
2061 }
2062
2063
2064 int rk;
2065
2066 if (f_v3) {
2067 cout << "The spread_set is:" << endl;
2068 Int_matrix_print(Spread_set, linear_set_sz, s * s);
2069 }
2070 rk = Fq->Linear_algebra->Gauss_easy(Spread_set, linear_set_sz, s * s);
2071 if (f_v) {
2072 cout << "rank = " << rk << endl;
2073 }
2074 if (f_v3) {
2075 cout << "The spread_set basis is:" << endl;
2076 Int_matrix_print(Spread_set, rk, s * s);
2077 for (h = 0; h < rk; h++) {
2078 cout << "basis elt " << h << " / " << rk << ":" << endl;
2079 Int_matrix_print(Spread_set + h * s * s, s, s);
2080 }
2081 }
2082
2083
2084
2085 if (f_v3) {
2086 cout << "opening grassmann:" << endl;
2087 }
2088 geometry::grassmann *Grass;
2090 Grass->init(n2, s, Fq, 0 /*verbose_level*/);
2091
2092 long int *spread_elements_numeric;
2093
2094 spread_elements_numeric = NEW_lint(nb_components);
2095 for (h = 0; h < nb_components; h++) {
2096 spread_elements_numeric[h] =
2097 Grass->rank_lint_here(Components[h], 0);
2098 }
2099
2100 if (f_vv) {
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;
2105 }
2106 }
2107
2108 if (f_identify) {
2109 cout << "linear_set::construct_semifield "
2110 "before T->identify" << endl;
2111
2112 if (nb_components != order + 1) {
2113 cout << "nb_components != order + 1" << endl;
2114 exit(1);
2115 }
2116
2117 int *transporter;
2118 int f_implicit_fusion = FALSE;
2119 int final_node;
2120
2121 transporter = NEW_int(T->gen->get_A()->elt_size_in_int);
2122
2123 T->gen->recognize(
2124 spread_elements_numeric, nb_components,
2125 transporter, f_implicit_fusion,
2126 final_node, 0 /*verbose_level*/);
2127 //T->identify(spread_elements_numeric, nb_components, verbose_level);
2128
2130 int lvl;
2131 int orbit_at_lvl;
2132
2133 lvl = order + 1;
2134 orbit_at_lvl = final_node - T->gen->first_node_at_level(lvl);
2135
2136 T->gen->get_stabilizer_order(lvl, orbit_at_lvl, go);
2137
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;
2143 T->gen->get_A()->element_print_quick(transporter, cout);
2144
2145 FREE_int(transporter);
2146 }
2147
2148#if 0
2149 andre_construction *Andre;
2150
2151 Andre = NEW_OBJECT(andre_construction);
2152
2153 cout << "Creating the projective plane using "
2154 "the Andre construction:" << endl;
2155 Andre->init(Fq, s, spread_elements_numeric, 0 /*verbose_level*/);
2156 cout << "Done creating the projective plane using "
2157 "the Andre construction." << endl;
2158#endif
2159
2160
2161 FREE_lint(large_linear_set);
2162 FREE_lint(small_linear_set);
2163 FREE_lint(linear_set);
2164 FREE_lint(small_linear_set_W);
2165 FREE_lint(set1);
2166 FREE_lint(set2);
2167 FREE_int(Basis1);
2168 FREE_int(Basis2);
2169 FREE_int(BasisU);
2170 FREE_int(BasisW);
2171}
2172
2173
2174// #############################################################################
2175// global functions:
2176// #############################################################################
2177
2178
2179static long int linear_set_classify_rank_point_func(int *v, void *data)
2180{
2182 long int rk;
2184
2185 LS = (linear_set_classify *) data;
2186 rk = Gg.AG_element_rank(LS->Fq->q, v, 1, LS->vector_space_dimension);
2187 //PG_element_rank_modified(*LS->Fq, v, 1,
2188 //LS->vector_space_dimension, rk);
2189 return rk;
2190}
2191
2192static void linear_set_classify_unrank_point_func(int *v, long int rk, void *data)
2193{
2194 linear_set_classify *LS;
2196
2197 LS = (linear_set_classify *) data;
2198 Gg.AG_element_unrank(LS->Fq->q, v, 1, LS->vector_space_dimension, rk);
2199 //PG_element_unrank_modified(*LS->Fq, v, 1,
2200 //LS->vector_space_dimension, rk);
2201}
2202
2203#if 0
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)
2208{
2209 verbose_level = 2;
2210
2211 linear_set_classify *LS;
2212 int f_v = (verbose_level >= 1);
2213 int f_vv = (verbose_level >= 2);
2214 int i;
2215
2216 LS = (linear_set_classify *) data;
2217
2218 if (f_v) {
2219 cout << "linear_set_classify_early_test_func" << endl;
2220 cout << "testing " << nb_candidates << " candidates" << endl;
2221 }
2222 nb_good_candidates = 0;
2223 for (i = 0; i < nb_candidates; i++) {
2224 S[len] = candidates[i];
2225 if (candidates[i] != 0) {
2226 // avoid the zero vector for subspace computations
2227 // recall that the group is not projective
2228 if (LS->test_set(len + 1, S, verbose_level - 1)) {
2229 good_candidates[nb_good_candidates++] = candidates[i];
2230 if (f_vv) {
2231 cout << "candidate " << i << " / " << nb_candidates
2232 << " which is " << candidates[i]
2233 << " is accepted" << endl;
2234 }
2235 }
2236 else {
2237 if (f_vv) {
2238 cout << "candidate " << i << " / " << nb_candidates
2239 << " which is " << candidates[i]
2240 << " is rejected" << endl;
2241 }
2242 }
2243 }
2244 }
2245 if (f_v) {
2246 cout << "linear_set_classify_early_test_func" << endl;
2247 cout << "Out of " << nb_candidates << " candidates, "
2248 << nb_good_candidates << " survive" << endl;
2249 }
2250}
2251
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)
2256{
2257 //verbose_level = 1;
2258
2259 linear_set_classify *LS;
2260 int f_v = (verbose_level >= 1);
2261 int i;
2262
2263 LS = (linear_set_classify *) data;
2264
2265 if (f_v) {
2266 cout << "linear_set_classify_secondary_early_test_func" << endl;
2267 cout << "testing " << nb_candidates << " candidates" << endl;
2268 }
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];
2275 }
2276 }
2277 }
2278 if (f_v) {
2279 cout << "linear_set_classify_secondary_early_test_func" << endl;
2280 cout << "Out of " << nb_candidates << " candidates, "
2281 << nb_good_candidates << " survive" << endl;
2282 }
2283}
2284#endif
2285
2286
2287
2288}}}
2289
finite dimensional vector space over a finite field
Definition: algebra.h:688
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)
Definition: sorting.cpp:1157
a statistical analysis of data consisting of single integers
void init(int *data, int data_length, int f_second, int verbose_level)
Definition: tally.cpp:72
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)
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)
various functions related to geometries
Definition: geometry.h:721
void AG_element_unrank(int q, int *v, int stride, int len, long int a)
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
Definition: geometry.h:892
long int rank_lint_here(int *Mtx, int verbose_level)
Definition: grassmann.cpp:275
void init(int n, int k, field_theory::finite_field *F, int verbose_level)
Definition: grassmann.cpp:70
projective space PG(n,q) of dimension n over Fq
Definition: geometry.h:1916
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)
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)
a class to represent arbitrary precision integers
Definition: ring_theory.h:366
global functions related to group actions
Definition: actions.h:1015
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.
Definition: actions.h:99
void element_print_quick(void *elt, std::ostream &ost)
Definition: action_cb.cpp:353
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
Definition: actions.h:130
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)
Definition: action.cpp:622
void element_move(void *a, void *b, int verbose_level)
Definition: action_cb.cpp:335
groups::sims * create_sims_from_generators_with_target_group_order_lint(data_structures_groups::vector_ge *gens, long int target_go, int verbose_level)
void init(actions::action *A, int verbose_level)
Definition: vector_ge.cpp:55
a permutation group represented via a stabilizer chain
Definition: groups.h:1273
a strong generating set for a permutation group with respect to a fixed action
Definition: groups.h:1703
void init_from_sims(groups::sims *S, int verbose_level)
data_structures_groups::vector_ge * gens
Definition: groups.h:1708
void group_order(ring_theory::longinteger_object &go)
to control the behavior of 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)
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)
int main(int t0, int schreier_depth, int f_use_invariant_subset_if_available, int f_debug, 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)
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)
void init_subspace_lattice(actions::action *A, actions::action *A2, groups::strong_generators *Strong_gens, algebra::vector_space *VS, int verbose_level)
poset_classification::poset_classification_control * Control2
Definition: tl_geometry.h:542
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)
poset_classification::poset_classification * Gen
Definition: tl_geometry.h:508
poset_classification::poset_classification_control * Control_stab
Definition: tl_geometry.h:538
poset_classification::poset_classification * Gen2
Definition: tl_geometry.h:544
void init_secondary(int argc, const char **argv, long int *candidates, int nb_candidates, groups::strong_generators *Strong_gens_previous, int verbose_level)
int(* extra_test_func)(void *, int len, long int *S, void *extra_test_func_data, int verbose_level)
Definition: tl_geometry.h:485
int test_set_secondary(int len, long int *S, int verbose_level)
poset_classification::poset_classification_control * Control1
Definition: tl_geometry.h:506
void init(int s, int n, int q, std::string &poly_q, std::string &poly_Q, int depth, int f_identify, int verbose_level)
poset_classification::poset_classification * Gen_stab
Definition: tl_geometry.h:540
poset_classification::poset_with_group_action * Poset2
Definition: tl_geometry.h:543
poset_classification::poset_with_group_action * Poset_stab
Definition: tl_geometry.h:539
void compute_intersection_types_at_level(int level, int &nb_nodes, int *&Intersection_dimensions, int verbose_level)
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
Definition: tl_geometry.h:507
void do_compute_stabilizer(int level, int orbit_at_level, long int *candidates, int nb_candidates, groups::strong_generators *&strong_gens, 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
Definition: spreads.h:106
poset_classification::poset_classification * gen
Definition: spreads.h:154
void init(projective_geometry::projective_space_with_action *PA, int k, int f_recoordinatize, int verbose_level)
void init2(poset_classification::poset_classification_control *Control, int verbose_level)
#define FREE_pplint(p)
Definition: foundations.h:645
#define NEW_plint(n)
Definition: foundations.h:629
#define MINIMUM(x, y)
Definition: foundations.h:216
#define FREE_int(p)
Definition: foundations.h:640
#define Int_vec_zero(A, B)
Definition: foundations.h:713
#define NEW_pint(n)
Definition: foundations.h:627
#define FREE_plint(p)
Definition: foundations.h:643
#define NEW_OBJECT(type)
Definition: foundations.h:638
#define Lint_vec_print(A, B, C)
Definition: foundations.h:686
#define FREE_OBJECT(p)
Definition: foundations.h:651
#define NEW_int(n)
Definition: foundations.h:625
#define Int_vec_print_integer_matrix_width(A, B, C, D, E, F)
Definition: foundations.h:691
#define Int_matrix_print(A, B, C)
Definition: foundations.h:707
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#define Int_vec_copy(A, B, C)
Definition: foundations.h:693
#define FREE_lint(p)
Definition: foundations.h:642
#define NEW_lint(n)
Definition: foundations.h:628
#define NEW_pplint(n)
Definition: foundations.h:631
#define FREE_pint(p)
Definition: foundations.h:641
#define Int_vec_print(A, B, C)
Definition: foundations.h:685
the orbiter library for the classification of combinatorial objects