Orbiter 2022
Combinatorial Objects
semifield_classify.cpp
Go to the documentation of this file.
1/*
2 * semifield_classify.cpp
3 *
4 * Created on: Apr 17, 2019
5 * Author: betten
6 */
7
8
9#include "orbiter.h"
10
11using namespace std;
12
13namespace orbiter {
14namespace layer5_applications {
15namespace semifields {
16
17
18static void semifield_classify_early_test_func(long int *S, int len,
19 long int *candidates, int nb_candidates,
20 long int *good_candidates, int &nb_good_candidates,
21 void *data, int verbose_level);
22static long int semifield_classify_rank_point_func(int *v, void *data);
23static void semifield_classify_unrank_point_func(int *v, long int rk, void *data);
24static long int canonial_form_rank_vector_callback(int *v,
25 int n, void *data, int verbose_level);
26static void canonial_form_unrank_vector_callback(long int rk,
27 int *v, int n, void *data, int verbose_level);
28static void canonial_form_compute_image_of_vector_callback(
29 int *v, int *w, int *Elt, void *data,
30 int verbose_level);
31
32
34{
35 PA = NULL;
36 n = 0;
37 k = 0;
38 k2 = 0;
39
40 //LG = NULL;
41 Mtx = NULL;
42 //F = NULL;
43 //f_semilinear = FALSE;
44
45 q = 0;
46 order = 0;
47
48 //f_level_two_prefix = FALSE;
49 //level_two_prefix = NULL;
50
51 //f_level_three_prefix = FALSE;
52 //level_three_prefix = NULL;
53
54 T = NULL;
55
56 A = NULL;
57 Elt1 = NULL;
58 G = NULL;
59
60 A0 = NULL;
61 A0_linear = NULL;
62
63 A_on_S = NULL;
64 AS = NULL;
65
66 Strong_gens = NULL;
67
68 Poset = NULL;
69 Control = NULL;
70
71 Gen = NULL;
72 Symmetry_group = NULL;
73
76
77 // for test_partial_semifield:
78 test_base_cols = NULL;
79 test_v = NULL;
80 test_w = NULL;
81 test_Basis = NULL;
82 Basis1 = NULL;
83 Basis2 = NULL;
84 desired_pivots = NULL;
85 //null();
86
87}
88
90{
91 freeself();
92}
93
95{
96
97
98}
99
101{
102 int verbose_level = 1;
103 int f_v = (verbose_level >= 1);
104
105 if (f_v) {
106 cout << "semifield_classify::freeself" << endl;
107 }
108 if (A0) {
110 }
111
112 if (f_v) {
113 cout << "semifield_classify::freeself before A0_linear" << endl;
114 }
115 if (A0_linear) {
117 }
118 if (f_v) {
119 cout << "semifield_classify::freeself before T" << endl;
120 }
121 if (T) {
122 FREE_OBJECT(T);
123 }
124 if (f_v) {
125 cout << "semifield_classify::freeself before Elt1" << endl;
126 }
127 if (Elt1) {
128 FREE_int(Elt1);
129 }
130 if (f_v) {
131 cout << "semifield_classify::freeself before Symmetry_group" << endl;
132 }
133 if (Symmetry_group) {
135 }
136 if (f_v) {
137 cout << "semifield_classify::freeself before Poset" << endl;
138 }
139 if (Poset) {
141 }
142 if (f_v) {
143 cout << "semifield_classify::freeself before Gen" << endl;
144 }
145 if (Gen) {
147 }
148 if (f_v) {
149 cout << "semifield_classify::freeself before test_base_cols" << endl;
150 }
151 if (test_base_cols) {
153 }
154 if (test_v) {
156 }
157 if (test_w) {
159 }
160 if (test_Basis) {
162 }
163 if (f_v) {
164 cout << "semifield_classify::freeself before Basis1" << endl;
165 }
166 if (Basis1) {
168 }
169 if (Basis2) {
171 }
172 if (f_v) {
173 cout << "semifield_classify::freeself before desired_pivots" << endl;
174 }
175 if (desired_pivots) {
177 }
178 null();
179 if (f_v) {
180 cout << "semifield_classify::freeself done" << endl;
181 }
182}
183
186 int k,
188 std::string &level_two_prefix,
189 std::string &level_three_prefix,
190 int verbose_level)
191{
192 int f_v = (verbose_level >= 1);
195
196 if (f_v) {
197 cout << "semifield_classify::init" << endl;
198 }
199
202
204
205 A = PA->A;
207
209 //semifield_classify::F = Mtx->GFq;
210 //f_semilinear = A->is_semilinear_matrix_group();
211 q = PA->F->q;
212 order = NT.i_power_j(q, k);
213
214 k2 = k * k;
215 //semifield_classify::order = order;
216 if (order != NT.i_power_j(q, k)) {
217 cout << "semifield_classify::init "
218 "order != i_power_j(q, k)" << endl;
219 exit(1);
220 }
221
222 if ((int)sizeof(long int) * 8 - 1 < k2) {
223 cout << "sizeof(long int) * 8 - 1 < k2, overflow will happen" << endl;
224 cout << "sizeof(long int)=" << sizeof(long int) << endl;
225 cout << "k2=" << k2 << endl;
226 exit(1);
227 }
228
229 if (f_v) {
230 cout << "semifield_classify::init q=" << q << endl;
231 cout << "semifield_classify::init k=" << k << endl;
232 cout << "semifield_classify::init n=" << n << endl;
233 cout << "semifield_classify::init order=" << order << endl;
234 }
235
236#if 0
237 for (i = 1; i < argc; i++) {
238 if (strcmp(argv[i], "-level2_prefix") == 0) {
239 f_level_two_prefix = TRUE;
240 level_two_prefix = argv[++i];
241 cout << "-level2_prefix " << level_two_prefix << endl;
242 }
243 else if (strcmp(argv[i], "-level3_prefix") == 0) {
244 f_level_three_prefix = TRUE;
245 level_three_prefix = argv[++i];
246 cout << "-level3_prefix " << level_three_prefix << endl;
247 }
248 }
249#endif
252
253
255
256 // for test_partial_semifield:
258 test_v = NEW_int(n);
259 test_w = NEW_int(k2);
260 test_Basis = NEW_int(k * k2);
261 Basis1 = NEW_int(k * k2);
262 Basis2 = NEW_int(k * k2);
263
264
266
267 //T->read_arguments(argc, argv);
268
269 if (f_v) {
270 cout << "semifield_classify::init before T->init" << endl;
271 }
272
273 //int max_depth = k + 1;
274
275 T->init(PA, k, //Control,
276 FALSE /* f_recoordinatize */,
277 0 /*verbose_level - 2*/);
278
279 if (f_v) {
280 cout << "semifield_classify::init after T->init" << endl;
281 }
282
283 if (f_v) {
284 cout << "semifield_classify::init before T->init2" << endl;
285 }
286
287 T->init2(Control, verbose_level);
288
289 if (f_v) {
290 cout << "semifield_classify::init after T->init2" << endl;
291 }
292
294 //int f_semilinear = TRUE;
295
296#if 0
297 if (NT.is_prime(q)) {
298 f_semilinear = FALSE;
299 }
300#endif
301
304
305 if (f_v) {
306 cout << "semifield_classify::init "
307 "before A0->init_projective_group" << endl;
308 }
309
311
314 TRUE /* f_basis */, TRUE /* f_init_sims */,
315 nice_gens,
316 0 /* verbose_level */);
317 FREE_OBJECT(nice_gens);
318
319 if (f_v) {
320 cout << "semifield_classify::init "
321 "after init_projective_group, "
322 "checking group order of Sims of A0" << endl;
323 }
324 A0->Sims->group_order(go);
325 if (f_v) {
326 cout << "semifield_classify::init "
327 "after init_projective_group "
328 "group of order " << go << " has been created" << endl;
329 }
330
331
332
333 A0->group_order(go1);
334 if (f_v) {
335 cout << "semifield_classify::init "
336 "target_go=" << go1
337 << " = order of PGGL(" << k << "," << q << ")" << endl;
338 cout << "action A0 created: ";
339 A0->print_info();
340 }
341
343 Mtx->GFq, FALSE /*f_semilinear */,
344 TRUE /* f_basis */, TRUE /* f_init_sims */,
345 nice_gens,
346 0 /* verbose_level */);
347 FREE_OBJECT(nice_gens);
348
349 if (f_v) {
350 cout << "semifield_classify::init "
351 "after init_projective_group, "
352 "checking group order of Sims of A0_linear" << endl;
353 }
355 if (f_v) {
356 cout << "semifield_classify::init "
357 "after init_projective_group "
358 "group of order " << go << " has been created" << endl;
359 }
360
362 if (f_v) {
363 cout << "semifield_classify::init order of PGL(" << k << ","
364 << q << ") is " << go2 << endl;
365 cout << "action A0_linear created: ";
367 }
368
369
370
371
372 A = T->A;
373
375
376 G = A0_linear->Sims;
377
378
379
380
382
383 if (f_v) {
384 cout << "semifield_classify::init "
385 "before A_on_S->init" << endl;
386 }
387 A_on_S->init(T->A /* A_PGL_n_q */,
388 A0 /* A_PGL_k_q */,
389 A0_linear->Sims /* G_PGL_k_q */,
390 k, Mtx->GFq,
391 verbose_level - 2);
392 if (f_v) {
393 cout << "semifield_classify::init "
394 "after A_on_S->init" << endl;
395 }
396
397
398
399
401
402 if (f_v) {
403 cout << "semifield_classify::init "
404 "before induced_action_on_spread_set" << endl;
405 }
407 A_on_S,
408 FALSE /* f_induce_action */,
409 NULL /* old_G */,
410 verbose_level - 2);
411 if (f_v) {
412 cout << "semifield_classify::init "
413 "after induced_action_on_spread_set "
414 "the degree of the induced action "
415 "is " << AS->degree << endl;
416 }
417
418
419 if (f_v) {
420 cout << "semifield_classify::init "
421 "before list_points" << endl;
422 }
423 list_points();
424 if (f_v) {
425 cout << "semifield_classify::init "
426 "after list_points" << endl;
427 }
428
429
430
431 if (f_v) {
432 cout << "semifield_classify::init "
433 "before Strong_gens->generators_for_"
434 "the_stabilizer_of_two_components" << endl;
435 }
438 T->A /* A_PGL_n_q */,
439 T->A->G.matrix_grp /* Mtx*/,
440 0 /*verbose_level*/);
441
442 if (f_v) {
443 cout << "semifield_classify::init "
444 "after Strong_gens->generators_for_"
445 "the_stabilizer_of_two_components" << endl;
446 }
447
448
449 if (f_v) {
450 cout << "semifield_classify::init "
451 "before Strong_gens->create_sims" << endl;
452 }
453 Symmetry_group = Strong_gens->create_sims(0 /*verbose_level*/);
454 if (f_v) {
455 cout << "semifield_classify::init "
456 "after Strong_gens->create_sims" << endl;
457 }
458
459
460
461
462 if (f_v) {
463 cout << "semifield_classify::init "
464 "before init_desired_pivots" << endl;
465 }
466 init_desired_pivots(verbose_level - 2);
467 if (f_v) {
468 cout << "semifield_classify::init "
469 "after init_desired_pivots" << endl;
470 }
471
472
473 if (f_v) {
474 cout << "semifield_classify::init done" << endl;
475 }
476}
477
478void semifield_classify::report(std::ostream &ost, int level,
482 int verbose_level)
483{
484 int f_v = (verbose_level >= 1);
486 int i;
488
489 if (f_v) {
490 cout << "semifield_classify::report level = " << level << endl;
491 }
492
493 ost << "Semifields of order " << order << "\\\\" << endl;
494
495 Mtx->GFq->report(ost, verbose_level);
496
497 ost << endl;
498 ost << "\\bigskip" << endl;
499 ost << endl;
500
501 ost << "\\section*{The Group}" << endl;
502
503 A0_linear->report(ost, TRUE /* f_sims */, G,
504 TRUE /* f_strong_gens */, A0_linear->Strong_gens,
505 draw_options,
506 verbose_level);
507
508 ost << endl;
509 ost << "\\bigskip" << endl;
510 ost << endl;
511
512 A_on_S->report(ost, verbose_level);
513
514 ost << endl;
515 ost << "\\bigskip" << endl;
516 ost << endl;
517
518 ost << "Stabilizer of two components:\\\\" << endl;
520
521
522 ost << endl;
523 ost << "\\bigskip" << endl;
524 ost << endl;
525
526 ost << "\\section*{Summary of orbits}" << endl;
527
528 ost << endl;
529 ost << "$$" << endl;
530 ost << "\\begin{array}{|r|r|l|}" << endl;
531 ost << "\\hline" << endl;
532 ost << "\\mbox{Level} & \\mbox{Orbits} & \\mbox{Ago}\\\\" << endl;
533 ost << "\\hline" << endl;
534 ost << "\\hline" << endl;
535
536 {
539
540 ost << "1 & 1 & " << go << "\\\\" << endl;
541 }
542 ost << "\\hline" << endl;
543
544 if (level >= 2) {
545
546 ost << "1.5 & " << L2->nb_flag_orbits << " & ";
547
548 {
549 long int *Go;
550 Go = NEW_lint(L2->nb_flag_orbits);
551 for (i = 0; i < L2->nb_flag_orbits; i++) {
553 }
554 {
556
557 C.init_lint(Go, L2->nb_flag_orbits, FALSE, 0);
558 C.print_file_tex(ost, TRUE /* f_backwards */);
559 }
560 FREE_lint(Go);
561 }
562
563
564 ost << "\\\\" << endl;
565 ost << "\\hline" << endl;
566 ost << 2 << " & " << L2->nb_orbits << " & ";
567 {
569
570 C.init_lint(L2->Go, L2->nb_orbits, FALSE, 0);
571 C.print_file_tex(ost, TRUE /* f_backwards */);
572 }
573 ost << "\\\\" << endl;
574 ost << "\\hline" << endl;
575
576 }
577
578
579 if (level >= 2) {
580
581 ost << "2.5 & " << L3->nb_flag_orbits << " & ";
582
583 {
584 int po, so, f, ol;
585 long int *Go;
586 Go = NEW_lint(L3->nb_flag_orbits);
587 f = 0;
588 for (po = 0; po < L3->prev_level_nb_orbits; po++) {
589
590
592
593 L2->Stabilizer_gens[po].group_order(go);
594
595
596 for (so = 0; so < L3->Downstep_nodes[po].Sch->nb_orbits; so++) {
597
598 ol = L3->Downstep_nodes[po].Sch->orbit_len[so];
599
600
601 Go[f] = go.as_lint() / ol;
602 f++;
603 }
604 }
605 if (f != L3->nb_flag_orbits) {
606 cout << "f != L3->nb_flag_orbits" << endl;
607 }
608 {
610
611 C.init_lint(Go, L3->nb_flag_orbits, FALSE, 0);
612 C.print_file_tex_we_are_in_math_mode(ost, TRUE /* f_backwards */);
613 }
614 FREE_lint(Go);
615 }
616
617
618 ost << "\\\\" << endl;
619 ost << "\\hline" << endl;
620 ost << 3 << " & " << L3->nb_orbits << " & ";
621 {
622 long int *Go;
623 Go = NEW_lint(L3->nb_orbits);
624
625 for (i = 0; i < L3->nb_orbits; i++) {
627 L3->Stabilizer_gens[i].group_order(go);
628 Go[i] = go.as_lint();
629 }
630
632
633 C.init_lint(Go, L3->nb_orbits, FALSE, 0);
634 C.print_file_tex_we_are_in_math_mode(ost, TRUE /* f_backwards */);
635 FREE_lint(Go);
636
637 }
638 ost << "\\\\" << endl;
639 ost << "\\hline" << endl;
640
641 }
642
643
644 ost << "\\end{array}" << endl;
645 ost << "$$" << endl;
646
647
648
649 if (f_v) {
650 cout << "semifield_classify::report done" << endl;
651 }
652}
653
654
657 int verbose_level)
658{
659 int f_v = (verbose_level >= 1);
661
662 if (f_v) {
663 cout << "semifield_classify::init_poset_classification" << endl;
664 }
665
667
671 verbose_level);
673 semifield_classify_rank_point_func,
674 semifield_classify_unrank_point_func,
675 this,
676 verbose_level);
677
678#if 0
681 verbose_level);
682#endif
685 VS,
686 verbose_level);
687
688 if (f_v) {
689 cout << "semifield_classify::init before "
690 "Poset->add_testing_without_group" << endl;
691 }
693 semifield_classify_early_test_func,
694 this /* void *data */,
695 verbose_level);
696
697
698
700
701 //Gen->read_arguments(argc, argv, 0);
702
703 //Gen->prefix[0] = 0;
704 //sprintf(Gen->fname_base, "%s", prefix);
705
706
707 //Gen->depth = k;
708
709 if (f_v) {
710 cout << "semifield_classify::init before Gen->init" << endl;
711 }
713 k /* sz */,
714 verbose_level - 2);
715 if (f_v) {
716 cout << "semifield_classify::init after Gen->init" << endl;
717 }
718
719
720
722
723 if (f_v) {
724 cout << "semifield_classify::init_poset_classification done" << endl;
725 }
726}
727
728
729void semifield_classify::compute_orbits(int depth, int verbose_level)
730{
731 int f_v = (verbose_level >= 1);
733 int t0 = Os.os_ticks();
735
736 if (f_v) {
737 cout << "semifield_classify::compute_orbits "
738 "calling generator_main" << endl;
739 cout << "A=";
740 Gen->get_A()->print_info();
741 cout << "A2=";
742 Gen->get_A2()->print_info();
743 }
744 //Gen->depth = depth;
745 Gen->main(t0,
747 FALSE /*f_use_invariant_subset_if_available*/,
748 FALSE /*f_debug*/,
749 verbose_level - 1);
750
751 int nb_orbits;
752
753 if (f_v) {
754 cout << "semifield_classify::compute_orbits "
755 "done with generator_main" << endl;
756 }
757 nb_orbits = Gen->nb_orbits_at_level(depth);
758 if (f_v) {
759 cout << "semifield_classify::compute_orbits "
760 "we found " << nb_orbits
761 << " orbits at depth " << depth << endl;
762 }
763
764 char str[1000];
765 string fname;
766
767 sprintf(str, "semifield_list_order%d.csv", order);
768 fname.assign(str);
769 {
770 long int *set;
771 long int *Table;
772 int *v;
773 int i, j;
774
775 set = NEW_lint(k);
776 Table = NEW_lint(nb_orbits * k);
777 v = NEW_int(k2);
778 for (i = 0; i < nb_orbits; i++) {
779 Gen->get_set_by_level(k, i, set);
780 for (j = 0; j < k; j++) {
781 unrank_point(v, set[j], 0/* verbose_level*/);
782 set[j] = matrix_rank(v);
783 }
784 Lint_vec_copy(set, Table + i * k, k);
785 }
786 Fio.lint_matrix_write_csv(fname, Table, nb_orbits, k);
787
788 FREE_lint(set);
789 FREE_lint(Table);
790 FREE_int(v);
791 }
792 cout << "Written file " << fname << " of size "
793 << Fio.file_size(fname) << endl;
794}
795
796
798{
799 int *v;
800 int rk;
802 int goi;
803
804 cout << "semifield_classify::list_points" << endl;
805 v = NEW_int(k2);
806 G->group_order(go);
807 goi = go.as_int();
808 cout << "semifield_classify::list_points go=" << goi << endl;
809 if (goi < 1000) {
810 for (rk = 0; rk < goi; rk++) {
811 unrank_point(v, rk, 0 /* verbose_level */);
812 cout << rk << " / " << goi << ":" << endl;
813 Int_matrix_print(v, k, k);
814 cout << endl;
815 }
816 }
817 else {
818 cout << "too many points to list" << endl;
819 }
820 FREE_int(v);
821}
822
823long int semifield_classify::rank_point(int *v, int verbose_level)
824{
825 int f_v = (verbose_level >= 1);
826 int f_vv = (verbose_level >= 2);
827 long int /*r,*/ rk;
828
829 if (f_v) {
830 cout << "semifield_classify::rank_point" << endl;
831 }
833 G->A->make_element(Elt1, A_on_S->mtx1, 0);
834 if (f_vv) {
835 cout << "semifield_classify::rank_point "
836 "The rank of" << endl;
838 }
839 rk = G->element_rank_lint(Elt1);
840 if (f_vv) {
841 cout << "is " << rk << endl;
842 }
843 if (f_v) {
844 cout << "semifield_classify::rank_point done" << endl;
845 }
846 return rk;
847}
848
849void semifield_classify::unrank_point(int *v, long int rk, int verbose_level)
850{
851 int f_v = (verbose_level >= 1);
852 int f_vv = (verbose_level >= 2);
853
854 if (f_v) {
855 cout << "semifield_classify::unrank_point" << endl;
856 }
857 if (rk >= AS->degree) {
858 cout << "semifield_classify::unrank_point "
859 "rk >= AS->degree" << endl;
860 cout << "rk=" << rk << endl;
861 cout << "degree=" << AS->degree << endl;
862 exit(1);
863 }
865 Int_vec_copy(Elt1, v, k2);
866 if (f_vv) {
867 cout << "semifield_classify::unrank_point "
868 "The element of "
869 "rank " << rk << " is " << endl;
870 Int_matrix_print(v, k, k);
871 }
872 if (f_v) {
873 cout << "semifield_classify::unrank_point done" << endl;
874 }
875}
876
877void semifield_classify::early_test_func(long int *S, int len,
878 long int *candidates, int nb_candidates,
879 long int *good_candidates, int &nb_good_candidates,
880 int verbose_level)
881{
882 int f_v = (verbose_level >= 1);
883 int f_vv = (verbose_level >= 2);
884 int *M;
885 int *v, *w;
886 int i, j, N, r;
889
890 if (f_v) {
891 cout << "semifield_classify::early_test_func" << endl;
892 cout << "testing " << nb_candidates << " candidates" << endl;
893 }
894 if (len == 0) {
895 nb_good_candidates = 0;
896 for (i = 0; i < nb_candidates; i++) {
897 good_candidates[nb_good_candidates++] = candidates[i];
898 }
899 return;
900 }
901 //M = NEW_int((len + 1) * k2);
902 //v = NEW_int(len + 1);
903 //w = NEW_int(k2);
904 v = test_v; // [n]
905 w = test_w; // [k2]
906 M = test_Basis; // [k * k2]
907
908 N = NT.i_power_j(q, len);
909 for (i = 0; i < len; i++) {
910 unrank_point(M + i * k2, S[i], 0 /*verbose_level - 2*/);
911 }
912 if (f_vv) {
913 cout << "semifield_classify::early_test_func current set:" << endl;
914 for (i = 0; i < len; i++) {
915 cout << "matrix " << i << " / " << len << ":" << endl;
916 Int_matrix_print(M + i * k2, k, k);
917 }
918 }
919 if (f_vv) {
920 cout << "semifield_classify::early_test_func testing candidates:" << endl;
921 }
922 nb_good_candidates = 0;
923 for (i = 0; i < nb_candidates; i++) {
924 if ((i % 5000) == 0) {
925 cout << i << " / " << nb_candidates
926 << " nb_good_candidates = "
927 << nb_good_candidates << endl;
928 }
929 unrank_point(M + len * k2, candidates[i], 0 /*verbose_level - 2*/);
930 for (j = 0; j < N; j++) {
931 if (len) {
932 Gg.AG_element_unrank(q, v, 1, len, j);
933 }
934 v[len] = 1;
935 Mtx->GFq->Linear_algebra->mult_matrix_matrix(v, M, w, 1, len + 1, k2,
936 0 /* verbose_level */);
937 r = A_on_S->F->Linear_algebra->Gauss_easy(w, k, k);
938 if (r != k) {
939 break;
940 }
941 }
942 if (j == N) {
943 if (FALSE) {
944 cout << "The candidate " << i << " / " << nb_candidates
945 << " which is " << candidates[i]
946 << " survives" << endl;
947 }
948 good_candidates[nb_good_candidates++] = candidates[i];
949 }
950 else {
951 if (FALSE) {
952 cout << "The candidate " << i << " / " << nb_candidates
953 << " which is " << candidates[i]
954 << " is eliminated" << endl;
955 }
956 }
957 }
958 if (f_vv) {
959 cout << "The " << nb_good_candidates
960 << " accepted candidates are:" << endl;
961 for (i = 0; i < nb_good_candidates; i++) {
962 unrank_point(M, good_candidates[i], 0 /*verbose_level - 2*/);
963 cout << i << " / " << nb_good_candidates << " is "
964 << good_candidates[i] << ":" << endl;
965 Int_matrix_print(M, k, k);
966 }
967 }
968 //FREE_int(M);
969 //FREE_int(v);
970 //FREE_int(w);
971 if (f_v) {
972 cout << "semifield_classify::early_test_func done" << endl;
973 cout << "Out of " << nb_candidates << " candidates, "
974 << nb_good_candidates << " survive" << endl;
975 }
976}
977
979 int **Mtx_stack, int stack_size, int *M,
980 int verbose_level)
981{
982 int f_v = (verbose_level >= 1);
983 int ret = TRUE;
984 int *v;
985 int *w;
986 int *base_cols;
987 int N, h, i, j, a, b, c, r;
990
991 if (f_v) {
992 cout << "semifield_classify::test_candidate" << endl;
993 }
994 if (stack_size > k) {
995 cout << "semifield_classify::test_candidate "
996 "stack_size > k" << endl;
997 exit(1);
998 }
999 base_cols = test_base_cols;
1000 v = test_v;
1001 w = test_w;
1002 //base_cols = NEW_int(k);
1003 //v = NEW_int(stack_size);
1004 //w = NEW_int(k2);
1005 N = NT.i_power_j(q, stack_size);
1006 for (h = 0; h < N; h++) {
1007 Gg.AG_element_unrank(q, v, 1, stack_size, h);
1008 for (i = 0; i < k2; i++) {
1009 c = 0;
1010 for (j = 0; j < stack_size; j++) {
1011 a = v[j];
1012 b = Mtx->GFq->mult(a, Mtx_stack[j][i]);
1013 c = Mtx->GFq->add(c, b);
1014 }
1015 w[i] = Mtx->GFq->add(c, M[i]);
1016 }
1017 r = A_on_S->F->Linear_algebra->Gauss_easy_memory_given(w, k, k, base_cols);
1018 if (r != k) {
1019 ret = FALSE;
1020 break;
1021 }
1022 }
1023 //FREE_int(base_cols);
1024 //FREE_int(v);
1025 //FREE_int(w);
1026 if (f_v) {
1027 cout << "semifield_classify::test_candidate done" << endl;
1028 }
1029 return ret;
1030}
1031
1033 long int *data, int data_sz, int verbose_level)
1034{
1035 int f_v = (verbose_level >= 1);
1036 int f_vv = (verbose_level >= 2);
1037 int *Basis;
1038 int ret, i;
1039
1040 if (f_v) {
1041 cout << "semifield_classify::test_partial_semifield_numerical_data" << endl;
1042 }
1043 if (data_sz > k) {
1044 cout << "semifield_classify::test_partial_semifield_numerical_data data_sz > k" << endl;
1045 exit(1);
1046 }
1047 Basis = test_Basis;
1048 //Basis = NEW_int(data_sz * k2);
1049 for (i = 0; i < data_sz; i++) {
1050 matrix_unrank(data[i], Basis + i * k2);
1051 }
1052 if (f_vv) {
1053 for (i = 0; i < data_sz; i++) {
1054 cout << "Basis element " << i << " is "
1055 << data[i] << ":" << endl;
1056 Int_matrix_print(Basis + i * k2, k, k);
1057 cout << endl;
1058 }
1059 }
1060
1062 Basis, data_sz, verbose_level - 1);
1063
1064
1065 //FREE_int(Basis);
1066 if (f_v) {
1067 cout << "semifield_classify::test_partial_semifield_numerical_data done" << endl;
1068 }
1069 return ret;
1070}
1071
1072
1074 int *Basis, int sz, int verbose_level)
1075{
1076 int f_v = (verbose_level >= 1);
1077 int ret = TRUE;
1078 int N, h, i, j, a, b, c, r;
1079 int *base_cols;
1080 int *v;
1081 int *w;
1084
1085 if (f_v) {
1086 cout << "semifield_classify::test_partial_semifield" << endl;
1087 }
1088 base_cols = test_base_cols;
1089 v = test_v;
1090 w = test_w;
1091
1092 //base_cols = NEW_int(n);
1093 //v = NEW_int(n);
1094 //w = NEW_int(k2);
1095
1096 N = NT.i_power_j(q, sz);
1097 for (h = 1; h < N; h++) {
1098 Gg.AG_element_unrank(q, v, 1, k, h);
1099 for (i = 0; i < k2; i++) {
1100 c = 0;
1101 for (j = 0; j < sz; j++) {
1102 a = v[j];
1103 b = Mtx->GFq->mult(a, Basis[j * k2 + i]);
1104 c = Mtx->GFq->add(c, b);
1105 }
1106 w[i] = c;
1107 }
1108 r = Mtx->GFq->Linear_algebra->Gauss_easy_memory_given(w, k, k, base_cols);
1109 if (r != k) {
1110 ret = FALSE;
1111 if (TRUE) {
1112 cout << "semifield_classify::test_partial_semifield "
1113 "fail for vector h=" << h << " / " << N << " : ";
1114 cout << "r=" << r << endl;
1115 cout << "v=";
1116 Int_vec_print(cout, v, sz);
1117 cout << endl;
1118 basis_print(Basis, sz);
1119 cout << "linear combination:" << endl;
1120 for (i = 0; i < k2; i++) {
1121 c = 0;
1122 for (j = 0; j < sz; j++) {
1123 a = v[j];
1124 b = Mtx->GFq->mult(a, Basis[j * k2 + i]);
1125 c = Mtx->GFq->add(c, b);
1126 }
1127 w[i] = c;
1128 }
1129 Int_matrix_print(w, k, k);
1130 }
1131 break;
1132 }
1133 }
1134 //FREE_int(base_cols);
1135 //FREE_int(v);
1136 //FREE_int(w);
1137 if (f_v) {
1138 cout << "semifield_classify::test_partial_semifield done" << endl;
1139 }
1140 return ret;
1141}
1142
1144{
1145 int *Mtx;
1146 int r1, r2;
1148
1149 Mtx = NEW_int(k2);
1150 for (r1 = 0; r1 < NT.i_power_j(q, k2); r1++) {
1151 matrix_unrank(r1, Mtx);
1152 r2 = matrix_rank(Mtx);
1153 if (r1 != r2) {
1154 cout << "semifield_classify::test_rank_unrank "
1155 "r1 != r2" << endl;
1156 exit(1);
1157 }
1158 }
1159}
1160
1161void semifield_classify::matrix_unrank(long int rk, int *Mtx)
1162{
1163 int i, j, a;
1164
1165 for (j = k - 1; j >= 0; j--) {
1166 for (i = k - 1; i >= 0; i--) {
1167 a = rk % q;
1168 if (a) {
1169 Mtx[i * k + j] = 1;
1170 }
1171 else {
1172 Mtx[i * k + j] = 0;
1173 }
1174 rk /= q;
1175 }
1176 }
1177}
1178
1180{
1181 int i, j;
1182 long int rk;
1183
1184 rk = 0;
1185 for (j = 0; j < k; j++) {
1186 for (i = 0; i < k; i++) {
1187 rk *= q;
1188 rk += Mtx[i * k + j];
1189 }
1190 }
1191 return rk;
1192}
1193
1195{
1196 int i, j;
1197 long int rk;
1198
1199 rk = 0;
1200 for (j = 1; j < k; j++) {
1201 for (i = 0; i < k; i++) {
1202 rk *= q;
1203 rk += Mtx[i * k + j];
1204 }
1205 }
1206 return rk;
1207}
1208
1210{
1211 int i;
1212 long int *A;
1213
1214 cout << "Basis of size " << sz << ":" << endl;
1215 A = NEW_lint(sz);
1216 for (i = 0; i < sz; i++) {
1217 cout << "Elt " << i << ":" << endl;
1218 Int_matrix_print(Mtx + i * k2, k, k);
1219 A[i] = matrix_rank(Mtx + i * k2);
1220 }
1221 Lint_vec_print(cout, A, sz);
1222 cout << endl;
1223 FREE_lint(A);
1224}
1225
1227{
1228 int i;
1229
1230 cout << "Basis of size " << sz << ":" << endl;
1231 for (i = 0; i < sz; i++) {
1232 cout << "Elt " << i << ":" << endl;
1233 matrix_print_numeric(Rk[i]);
1234 }
1235 Lint_vec_print(cout, Rk, sz);
1236 cout << endl;
1237}
1238
1240{
1242}
1243
1245{
1246 int *Mtx;
1247
1248 Mtx = NEW_int(k2);
1249 matrix_unrank(rk, Mtx);
1251 FREE_int(Mtx);
1252}
1253
1255 long int *Rk, int nb)
1256{
1257 int *Mtx;
1258 int i;
1259
1260 Mtx = NEW_int(k2);
1261 for (i = 0; i < nb; i++) {
1262 cout << "Matrix " << i << " / " << nb << " has rank "
1263 << Rk[i] << ":" << endl;
1264 matrix_unrank(Rk[i], Mtx);
1266 }
1267 FREE_int(Mtx);
1268}
1269
1271 int *basis_in, int *basis_out,
1272 int first, int last_plus_one, int verbose_level)
1273{
1274 int f_v = (verbose_level >= 1);
1275 int i;
1276
1277 if (f_v) {
1278 cout << "semifield_classify::apply_element" << endl;
1279 }
1280 for (i = first; i < last_plus_one; i++) {
1282 basis_in + i * k2,
1283 basis_out + i * k2,
1284 0 /* verbose_level */);
1285 }
1286 if (f_v) {
1287 cout << "semifield_classify::apply_element done" << endl;
1288 }
1289}
1290
1292 int *basis_in, int *basis_out,
1293 int first, int last_plus_one, int verbose_level)
1294{
1295 int f_v = (verbose_level >= 1);
1296
1297 if (f_v) {
1298 cout << "semifield_classify::apply_element_and_copy_back" << endl;
1299 }
1300 apply_element(Elt,
1301 basis_in, basis_out,
1302 first, last_plus_one, verbose_level);
1303 Int_vec_copy(basis_out + first * k2,
1304 basis_in + first * k2,
1305 (last_plus_one - first) * k2);
1306 if (f_v) {
1307 cout << "semifield_classify::apply_element_and_copy_back done" << endl;
1308 }
1309}
1310
1311
1313{
1314 int *v = test_v;
1315 int i;
1316
1317 for (i = 0; i < k; i++) {
1318 v[i] = Basis[2 * k2 + i * k + 0];
1319 }
1320 if (!Mtx->GFq->Linear_algebra->is_unit_vector(v, k, k - 1)) {
1321 return FALSE;
1322 }
1323 return TRUE;
1324}
1325
1327 long int *Input_set, int input_set_sz,
1328 int window_bottom, int window_size,
1329 long int **&Set, int *&Set_sz, int &Nb_sets,
1330 int verbose_level)
1331{
1332 int f_v = (verbose_level >= 1);
1333 int f_vv = (verbose_level >= 2);
1334 int *window;
1335 int *Mtx;
1336 int *Tmp_sz;
1337 int h, u, i, t, w;
1338 long int a;
1341
1342
1343 if (f_v) {
1344 cout << "semifield_classify::candidates_classify_by_first_column "
1345 "input_set_sz = " << input_set_sz << endl;
1346 }
1347 Nb_sets = NT.i_power_j(q, window_size);
1348 window = NEW_int(window_size);
1349 Mtx = NEW_int(k * k);
1350 Set_sz = NEW_int(Nb_sets);
1351 Tmp_sz = NEW_int(Nb_sets);
1352 Int_vec_zero(Set_sz, Nb_sets);
1353 Int_vec_zero(Tmp_sz, Nb_sets);
1354 for (h = 0; h < input_set_sz; h++) {
1355 if ((h % (256 * 1024)) == 0) {
1356 cout << "semifield_classify::candidates_classify_by_first_column " << h << " / "
1357 << input_set_sz << endl;
1358 }
1359 a = Input_set[h];
1360 matrix_unrank(a, Mtx);
1361 for (u = 0; u < window_size; u++) {
1362 t = Mtx[(window_bottom - u) * k + 0];
1363 window[u] = t;
1364 }
1365 w = Gg.AG_element_rank(q, window, 1, window_size);
1366 Set_sz[w]++;
1367 }
1368 if (f_vv) {
1369 cout << "semifield_classify::candidates_classify_by_first_column" << endl;
1370 cout << "a : #" << endl;
1371 for (u = 0; u < Nb_sets; u++) {
1372 cout << u << " : " << Set_sz[u] << endl;
1373 }
1374 }
1375
1376 if (f_vv) {
1377 cout << "semifield_classify::candidates_classify_by_first_column "
1378 "computing efficient "
1379 "representations input_set_sz = " << input_set_sz << endl;
1380 }
1381 Set = NEW_plint(Nb_sets);
1382 for (u = 0; u < Nb_sets; u++) {
1383 Set[u] = NEW_lint(Set_sz[u]);
1384 }
1385 for (h = 0; h < input_set_sz; h++) {
1386 if ((h % (256 * 1024)) == 0) {
1387 cout << "semifield_classify::candidates_classify_by_first_column "
1388 << h << " / " << input_set_sz << endl;
1389 }
1390 a = Input_set[h];
1391 matrix_unrank(a, Mtx);
1392 for (u = 0; u < window_size; u++) {
1393 t = Mtx[(window_bottom - u) * k + 0];
1394 window[u] = t;
1395 }
1396 w = Gg.AG_element_rank(q, window, 1, window_size);
1397
1398 // zero out the first column to make it fit into a machine word:
1399
1400 for (i = 0; i < k; i++) {
1401 Mtx[i * k + 0] = 0;
1402 }
1403 a = matrix_rank(Mtx);
1404
1405
1406 Set[w][Tmp_sz[w]++] = a; //Input_set[h];
1407 }
1408 for (u = 0; u < Nb_sets; u++) {
1409 if (Tmp_sz[u] != Set_sz[u]) {
1410 cout << "semifield_classify::candidates_classify_by_first_column "
1411 "Tmp_sz[u] != Set_sz[u]" << endl;
1412 exit(1);
1413 }
1414 }
1415
1416
1417 FREE_int(window);
1418 FREE_int(Mtx);
1419 FREE_int(Tmp_sz);
1420 if (f_v) {
1421 cout << "semifield_classify::candidates_classify_by_first_column "
1422 "done" << endl;
1423 }
1424}
1425
1427 std::string &fname, int orbit)
1428{
1429 fname.assign(level_two_prefix);
1430 char str[1000];
1431 sprintf(str, "L2_orbit%d_cand_int8.bin", orbit);
1432 fname.append(str);
1433
1434 //sprintf(fname, "%sL2_orbit%d_cand_int8.bin", level_two_prefix, orbit);
1435}
1436
1438 std::string &fname, int orbit)
1439{
1440 fname.assign(level_two_prefix);
1441 char str[1000];
1442 sprintf(str, "L2_orbit%d_cand.txt", orbit);
1443 fname.append(str);
1444
1445 //sprintf(fname, "%sL2_orbit%d_cand.txt", level_two_prefix, orbit);
1446}
1447
1449 std::string &fname, int orbit)
1450{
1451 fname.assign(level_three_prefix);
1452 char str[1000];
1453 sprintf(str, "L3_orbit%d_cand_int8", orbit);
1454 fname.append(str);
1455
1456 //sprintf(fname, "%sL3_orbit%d_cand_int8", level_three_prefix, orbit);
1457}
1458
1460 std::string &fname, int orbit, int h)
1461{
1462 fname.assign(level_two_prefix);
1463 char str[1000];
1464 sprintf(str, "L2_orbit%d_type%d_cand_int8.bin", orbit, h);
1465 fname.append(str);
1466}
1467
1468
1469
1471 long int *input_data,
1472 groups::strong_generators *stabilizer_gens,
1473 orbit_of_subspaces *&Orb,
1474 int verbose_level)
1475// allocates an orbit_of_subspaces data structure in Orb
1476{
1477 int f_v = (verbose_level >= 1);
1478
1479 if (f_v) {
1480 cout << "semifield_classify::compute_orbit_of_subspaces" << endl;
1481 }
1482
1484
1485
1486 Orb->init_lint(A, AS, Mtx->GFq,
1487 input_data, k, k2 /* n */,
1488 TRUE /* f_has_desired_pivots */, desired_pivots,
1489 TRUE /* f_has_rank_functions */, this /* rank_unrank_data */,
1490 canonial_form_rank_vector_callback,
1491 canonial_form_unrank_vector_callback,
1492 canonial_form_compute_image_of_vector_callback,
1493 this /* compute_image_of_vector_callback_data */,
1494 stabilizer_gens->gens,
1495 verbose_level - 1);
1496
1497
1498 if (f_v) {
1499 cout << "semifield_classify::compute_orbit_of_subspaces done" << endl;
1500 }
1501}
1502
1503
1504
1506{
1507 int f_v = (verbose_level >= 1);
1508 int f_vv = (verbose_level >= 2);
1509 int i;
1510
1511 if (f_v) {
1512 cout << "semifield_classify::init_desired_pivots" << endl;
1513 }
1515
1516 for (i = 0; i < k; i++) {
1517 if (i < 2) {
1518 desired_pivots[i] = i * k;
1519 }
1520 else {
1521 desired_pivots[i] = (k - 1 - (i - 2)) * k;
1522 }
1523 }
1524 if (f_vv) {
1525 cout << "semifield_classify::init_desired_pivots "
1526 "desired_pivots: ";
1528 cout << endl;
1529 }
1530 if (f_v) {
1531 cout << "semifield_classify::init_desired_pivots done" << endl;
1532 }
1533}
1534
1536 long int *data_in, long int *data_out,
1537 int verbose_level)
1538{
1539 int f_v = (verbose_level >= 1);
1540 int i, a;
1541 static int perm[] = {
1542 0,1,2,
1543 0,2,1,
1544 1,0,2,
1545 1,2,0,
1546 2,0,1,
1547 2,1,0
1548 };
1549 int I[3], J[3];
1550
1551 if (f_v) {
1552 cout << "semifield_classify::knuth_operation" << endl;
1553 }
1554 for (i = 0; i < k; i++) {
1555 matrix_unrank(data_in[i], Basis1 + i * k2);
1556 }
1557 for (I[0] = 0; I[0] < k; I[0]++) {
1558 for (I[1] = 0; I[1] < k; I[1]++) {
1559 for (I[2] = 0; I[2] < k; I[2]++) {
1560 J[0] = I[perm[t * 3 + 0]];
1561 J[1] = I[perm[t * 3 + 1]];
1562 J[2] = I[perm[t * 3 + 2]];
1563 a = Basis1[J[0] * k2 + J[1] * k + J[2]];
1564 Basis2[I[0] * k2 + I[1] * k + I[2]] = a;
1565 }
1566 }
1567 }
1568 for (i = 0; i < k; i++) {
1569 data_out[i] = matrix_rank(Basis2 + i * k2);
1570 }
1571 if (f_v) {
1572 cout << "semifield_classify::knuth_operation done" << endl;
1573 }
1574}
1575
1576
1577//##############################################################################
1578// global function:
1579//##############################################################################
1580
1581static void semifield_classify_early_test_func(long int *S, int len,
1582 long int *candidates, int nb_candidates,
1583 long int *good_candidates, int &nb_good_candidates,
1584 void *data, int verbose_level)
1585{
1586 semifield_classify *Semi;
1587 int f_v = (verbose_level >= 1);
1588
1589 Semi = (semifield_classify *) data;
1590
1591 if (f_v) {
1592 cout << "semifield_classify_early_test_func" << endl;
1593 cout << "testing " << nb_candidates << " candidates" << endl;
1594 }
1595
1596 Semi->early_test_func(S, len,
1597 candidates, nb_candidates,
1598 good_candidates, nb_good_candidates,
1599 verbose_level);
1600
1601 if (f_v) {
1602 cout << "semifield_classify_early_test_func" << endl;
1603 cout << "Out of " << nb_candidates << " candidates, "
1604 << nb_good_candidates << " survive" << endl;
1605 }
1606}
1607
1608
1609
1610static long int semifield_classify_rank_point_func(int *v, void *data)
1611{
1612 int verbose_level = 0;
1613 int f_v = (verbose_level >= 1);
1614 semifield_classify *Semi;
1615 long int rk;
1616
1617 if (f_v) {
1618 cout << "semifield_classify_rank_point_func" << endl;
1619 }
1620 Semi = (semifield_classify *) data;
1621 rk = Semi->rank_point(v, verbose_level - 1);
1622 if (f_v) {
1623 cout << "semifield_classify_rank_point_func done" << endl;
1624 }
1625 return rk;
1626}
1627
1628static void semifield_classify_unrank_point_func(int *v, long int rk, void *data)
1629{
1630 int verbose_level = 0;
1631 int f_v = (verbose_level >= 1);
1632 semifield_classify *Semi;
1633
1634 if (f_v) {
1635 cout << "semifield_classify_unrank_point_func" << endl;
1636 }
1637 Semi = (semifield_classify *) data;
1638
1639 Semi->unrank_point(v, rk, verbose_level);
1640
1641 if (f_v) {
1642 cout << "semifield_classify_unrank_point_func done" << endl;
1643 }
1644}
1645
1646
1647static long int canonial_form_rank_vector_callback(int *v,
1648 int n, void *data, int verbose_level)
1649{
1650 semifield_classify *SC = (semifield_classify *) data;
1651 long int r;
1652
1653 r = SC->matrix_rank(v);
1654 return r;
1655}
1656
1657static void canonial_form_unrank_vector_callback(long int rk,
1658 int *v, int n, void *data, int verbose_level)
1659{
1660 semifield_classify *SC = (semifield_classify *) data;
1661
1662 SC->matrix_unrank(rk, v);
1663}
1664
1665static void canonial_form_compute_image_of_vector_callback(
1666 int *v, int *w, int *Elt, void *data,
1667 int verbose_level)
1668{
1669 semifield_classify *SC = (semifield_classify *) data;
1670
1671
1672 SC->A_on_S->compute_image_low_level(Elt, v, w,
1673 0 /* verbose_level */);
1674}
1675
1676
1677
1678
1679
1680
1681
1682}}}
1683
1684
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 statistical analysis of data consisting of single integers
void print_file_tex(std::ostream &ost, int f_backwards)
Definition: tally.cpp:338
void print_file_tex_we_are_in_math_mode(std::ostream &ost, int f_backwards)
Definition: tally.cpp:358
void init_lint(long int *data, int data_length, int f_second, int verbose_level)
Definition: tally.cpp:123
void report(std::ostream &ost, 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)
options for drawing an object of type layered_graph
Definition: graphics.h:457
void mult_matrix_matrix(int *A, int *B, int *C, int m, int n, int o, int verbose_level)
int Gauss_easy_memory_given(int *A, int m, int n, int *base_cols)
void lint_matrix_write_csv(std::string &fname, long int *M, int m, int n)
Definition: file_io.cpp:1323
a class to represent arbitrary precision integers
Definition: ring_theory.h:366
a permutation group in a fixed action.
Definition: actions.h:99
void report(std::ostream &ost, int f_sims, groups::sims *S, int f_strong_gens, groups::strong_generators *SG, graphics::layered_graph_draw_options *LG_Draw_options, int verbose_level)
Definition: action_io.cpp:22
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)
void make_element(int *Elt, int *data, int verbose_level)
Definition: action.cpp:1875
void group_order(ring_theory::longinteger_object &go)
Definition: action.cpp:2223
groups::matrix_group * get_matrix_group()
Definition: action.cpp:2986
void induced_action_on_spread_set(action *A_old, induced_actions::action_on_spread_set *AS, int f_induce_action, groups::sims *old_G, int verbose_level)
void group_order(ring_theory::longinteger_object &go)
Definition: sims.cpp:951
void element_unrank_lint(long int rk, int *Elt, int verbose_level)
Definition: sims.cpp:1326
a strong generating set for a permutation group with respect to a fixed action
Definition: groups.h:1703
void generators_for_the_stabilizer_of_two_components(actions::action *A_PGL_n_q, matrix_group *Mtx, int verbose_level)
data_structures_groups::vector_ge * gens
Definition: groups.h:1708
void group_order(ring_theory::longinteger_object &go)
induced action on a spread set via the associated spread
void compute_image_low_level(int *Elt, int *input, int *output, int verbose_level)
void init(actions::action *A_PGL_n_q, actions::action *A_PGL_k_q, groups::sims *G_PGL_k_q, int k, field_theory::finite_field *F, int verbose_level)
orbit of subspaces using a Schreier tree
Definition: orbits.h:175
void init_lint(actions::action *A, actions::action *A2, field_theory::finite_field *F, long int *subspace_by_rank, int k, int n, int f_has_desired_pivots, int *desired_pivots, int f_has_rank_functions, void *rank_unrank_data, long int(*rank_vector_lint_callback)(int *v, int n, void *data, int verbose_level), void(*unrank_vector_lint_callback)(long int rk, int *v, int n, void *data, int verbose_level), void(*compute_image_of_vector_callback)(int *v, int *w, int *Elt, void *data, int verbose_level), void *compute_image_of_vector_callback_data, data_structures_groups::vector_ge *gens, int verbose_level)
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 main(int t0, int schreier_depth, int f_use_invariant_subset_if_available, int f_debug, int verbose_level)
void init_subset_lattice(actions::action *A, actions::action *A2, groups::strong_generators *Strong_gens, 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)
void add_testing_without_group(void(*func)(long int *S, int len, long int *candidates, int nb_candidates, long int *good_candidates, int &nb_good_candidates, void *data, int verbose_level), void *data, int verbose_level)
projective space PG(n,q) with automorphism group PGGL(n+1,q)
classification of semifields using poset classification
Definition: semifields.h:144
induced_actions::action_on_spread_set * A_on_S
Definition: semifields.h:174
void unrank_point(int *v, long int rk, int verbose_level)
poset_classification::poset_with_group_action * Poset
Definition: semifields.h:182
int test_partial_semifield(int *Basis, int n, int verbose_level)
void compute_orbit_of_subspaces(long int *input_data, groups::strong_generators *stabilizer_gens, orbit_of_subspaces *&Orb, int verbose_level)
poset_classification::poset_classification * Gen
Definition: semifields.h:185
void knuth_operation(int t, long int *data_in, long int *data_out, int verbose_level)
void make_fname_candidates_at_level_two_orbit_txt(std::string &fname, int orbit)
void make_fname_candidates_at_level_three_orbit(std::string &fname, int orbit)
int test_candidate(int **Mtx_stack, int stack_size, int *M, int verbose_level)
void apply_element(int *Elt, int *basis_in, int *basis_out, int first, int last_plus_one, int verbose_level)
void make_fname_candidates_at_level_two_orbit(std::string &fname, int orbit)
void candidates_classify_by_first_column(long int *Input_set, int input_set_sz, int window_bottom, int window_size, long int **&Set, int *&Set_sz, int &Nb_sets, int verbose_level)
void make_fname_candidates_at_level_two_orbit_by_type(std::string &fname, int orbit, int h)
void apply_element_and_copy_back(int *Elt, int *basis_in, int *basis_out, int first, int last_plus_one, int verbose_level)
void init_poset_classification(poset_classification::poset_classification_control *Control, int verbose_level)
projective_geometry::projective_space_with_action * PA
Definition: semifields.h:147
void report(std::ostream &ost, int level, semifield_level_two *L2, semifield_lifting *L3, graphics::layered_graph_draw_options *draw_options, int verbose_level)
poset_classification::poset_classification_control * Control
Definition: semifields.h:183
void early_test_func(long int *S, int len, long int *candidates, int nb_candidates, long int *good_candidates, int &nb_good_candidates, int verbose_level)
int test_partial_semifield_numerical_data(long int *data, int data_sz, int verbose_level)
void init(projective_geometry::projective_space_with_action *PA, int k, poset_classification::poset_classification_control *Control, std::string &level_two_prefix, std::string &level_three_prefix, int verbose_level)
The first and second steps in classifying semifields.
Definition: semifields.h:290
One step of lifting for classifying semifields.
Definition: semifields.h:465
to classify spreads of PG(k-1,q) in PG(n-1,q) where k divides n
Definition: spreads.h:106
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 Lint_vec_copy(A, B, C)
Definition: foundations.h:694
#define NEW_plint(n)
Definition: foundations.h:629
#define FREE_int(p)
Definition: foundations.h:640
#define Int_vec_zero(A, B)
Definition: foundations.h:713
#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_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 Int_vec_print(A, B, C)
Definition: foundations.h:685
the orbiter library for the classification of combinatorial objects