Orbiter 2022
Combinatorial Objects
semifield_classify_with_substructure.cpp
Go to the documentation of this file.
1/*
2 * semifield_classify_with_substructure.cpp
3 *
4 * Created on: May 15, 2019
5 * Author: betten
6 */
7
8
9
10
11#include "orbiter.h"
12
13using namespace std;
14
15namespace orbiter {
16namespace layer5_applications {
17namespace semifields {
18
19static void semifield_print_function_callback(std::ostream &ost, int orbit_idx,
20 invariant_relations::classification_step *Step, void *print_function_data);
21
22
24{
25 Descr = NULL;
26 PA = NULL;
27 Mtx = NULL;
28 //F = NULL;
29 Control = NULL;
30 t0 = 0;
31
34
36 //trace_record_prefix = NULL;
38 //fname_FstLen = NULL;
39 f_Data = FALSE;
40 //fname_Data = NULL;
41
42 p = e = e1 = n = k = q = k2 = 0;
43
44 Sub = NULL;
45 L2 = NULL;
46
47
49 Existing_cases = NULL;
50 Existing_cases_fst = NULL;
51 Existing_cases_len = NULL;
52
53
55 Non_unique_cases = NULL;
59
60 Semifields = NULL;
61
62}
63
65{
66
67}
68
73 int verbose_level)
74{
75 int f_v = (verbose_level >= 1);
76
77 if (f_v) {
78 cout << "semifield_classify_with_substructure::init" << endl;
79 }
81
82
84
88
90 if (f_v) {
91 cout << "order = " << Descr->order << " = " << p << "^" << e << endl;
92 }
93
95 if (e % Descr->dim_over_kernel) {
96 cout << "dim_over_kernel does not divide e" << endl;
97 exit(1);
98 }
100 n = 2 * Descr->dim_over_kernel;
102 q = NT.i_power_j(p, e1);
103 if (f_v) {
104 cout << "order=" << Descr->order << " n=" << n
105 << " k=" << k << " q=" << q << endl;
106 }
107 }
108 else {
109 n = 2 * e;
110 k = e;
111 q = p;
112 if (f_v) {
113 cout << "order=" << Descr->order << " n=" << n
114 << " k=" << k << " q=" << q << endl;
115 }
116 }
117 k2 = k * k;
118
119
120
121
123
124 Sub->SCWS = this;
125 Sub->start_column = 4;
126
127
129
132 Descr->level_two_prefix.assign("L2");
133 }
136 Descr->level_three_prefix.assign("L3");
137 }
138
139 if (f_v) {
140 cout << "semifield_classify_with_substructure::init before Sub->SC->init" << endl;
141 }
142 Sub->SC->init(PA, k, Control,
145 verbose_level - 1);
146 if (f_v) {
147 cout << "semifield_classify_with_substructure::init after Sub->SC->init" << endl;
148 }
149
150
151
152
153 if (Descr->f_test_semifield) {
154 long int *data = NULL;
155 int data_len = 0;
156 int i;
157
158 cout << "semifield_classify_with_substructure::init f_test_semifield" << endl;
159 Lint_vec_scan(Descr->test_semifield_data, data, data_len);
160 cout << "input semifield:" << endl;
161 for (i = 0; i < data_len; i++) {
162 cout << i << " : " << data[i] << endl;
163 }
165 data, data_len, verbose_level)) {
166 cout << "the set satisfies the partial semifield condition" << endl;
167 }
168 else {
169 cout << "the set does not satisfy the partial semifield condition" << endl;
170 }
171 exit(0);
172 }
173
174
176
177 if (f_v) {
178 cout << "semifield_classify_with_substructure::init before L2->init" << endl;
179 }
180 L2->init(Sub->SC, verbose_level);
181 if (f_v) {
182 cout << "semifield_classify_with_substructure::init after L2->init" << endl;
183 }
184
185
186#if 1
187 if (f_v) {
188 cout << "semifield_classify_with_substructure::init before L2->compute_level_two" << endl;
189 }
190 L2->compute_level_two(4, verbose_level);
191 if (f_v) {
192 cout << "semifield_classify_with_substructure::init after L2->compute_level_two" << endl;
193 }
194#else
195 L2->read_level_info_file(verbose_level);
196#endif
197
199
200 if (f_v) {
201 cout << "semifield_classify_with_substructure::init before L3->init_level_three" << endl;
202 }
204 true /* f_prefix */, Sub->SC->level_three_prefix,
205 verbose_level);
206 if (f_v) {
207 cout << "semifield_classify_with_substructure::init after L3->init_level_three" << endl;
208 }
209
210
211
212 if (f_v) {
213 cout << "semifield_classify_with_substructure::init done" << endl;
214 }
215}
216
218{
219 int f_v = (verbose_level >= 1);
221
222 if (f_v) {
223 cout << "semifield_classify_with_substructure::read_data" << endl;
224 }
225
226 if (f_v) {
227 cout << "before reading files " << fname_FstLen
228 << " and " << fname_Data << endl;
229 }
230
231
232
233
235 int mtx_n;
236 int i, a;
237
238
239 // We need 64 bit integers for the Data array
240 // because semifields of order 64 need 6 x 6 matrices,
241 // which need to be encoded using 36 bits.
242
243 if (sizeof(long int) < 8) {
244 cout << "sizeof(long int) < 8" << endl;
245 exit(1);
246 }
248 Sub->FstLen, Sub->nb_orbits_at_level_3, mtx_n, verbose_level);
250 for (i = 0; i < Sub->nb_orbits_at_level_3; i++) {
251 Sub->Len[i] = Sub->FstLen[i * 2 + 1];
252 }
254 Sub->nb_solutions, Sub->data_size, verbose_level);
255
256
257 if (f_v) {
258 cout << "Read " << Sub->nb_solutions
259 << " solutions arising from "
260 << Sub->nb_orbits_at_level_3 << " orbits" << endl;
261 }
262
263
264
265
266
268 if (f_v) {
269 cout << "classification of Len:" << endl;
270 C.print_naked(TRUE);
271 cout << endl;
272 }
273
274 if (f_v) {
275 cout << "computing existing cases:" << endl;
276 }
277
278
281
282 for (i = 0; i < Sub->nb_orbits_at_level_3; i++) {
283 if (Sub->Len[i]) {
285 }
286 }
289 for (i = 0; i < nb_existing_cases; i++) {
290 a = Existing_cases[i];
291 Existing_cases_fst[i] = Sub->FstLen[2 * a + 0];
292 Existing_cases_len[i] = Sub->FstLen[2 * a + 1];
293 }
294 if (f_v) {
295 cout << "There are " << nb_existing_cases
296 << " cases which exist" << endl;
297 }
298
299 if (f_v) {
300 cout << "computing non-unique cases:" << endl;
301 }
302
305 for (i = 0; i < nb_existing_cases; i++) {
306 a = Existing_cases[i];
307 if (Existing_cases_len[i] > 1) {
309 }
310 }
311
312 if (f_v) {
313 cout << "There are " << nb_non_unique_cases
314 << " cases which have more than one solution" << endl;
315 }
319 for (i = 0; i < nb_non_unique_cases; i++) {
320 a = Non_unique_cases[i];
321 Non_unique_cases_fst[i] = Sub->FstLen[2 * a + 0];
322 Non_unique_cases_len[i] = Sub->FstLen[2 * a + 1];
325 }
326
327 {
329
331 if (f_v) {
332 cout << "classification of Len amongst the non-unique cases:" << endl;
333 C.print_naked(TRUE);
334 cout << endl;
335 }
336 }
337 {
339
341 if (f_v) {
342 cout << "classification of group orders amongst "
343 "the non-unique cases:" << endl;
344 C.print_naked(TRUE);
345 cout << endl;
346 }
347 }
348
349
350 if (f_v) {
351 cout << "semifield_classify_with_substructure::read_data "
352 "before Sub->compute_cases" << endl;
353 }
356 verbose_level);
357 if (f_v) {
358 cout << "semifield_classify_with_substructure::read_data "
359 "after Sub->compute_cases" << endl;
360 }
361
362 if (f_v) {
363 cout << "semifield_classify_with_substructure::read_data done" << endl;
364 }
365}
366
368{
369 sprintf(fname, "semifields_%d_classification.bin", Sub->SC->order);
370}
371
373{
374 sprintf(fname, "semifields_%d_flag_orbits.bin", Sub->SC->order);
375}
376
378{
379 int f_v = (verbose_level >= 1);
381
382 if (f_v) {
383 cout << "semifield_classify_with_substructure::classify_semifields" << endl;
384 }
385
387
388 Sub->do_classify(verbose_level);
389
390 {
391 char fname[1000];
393 {
394 ofstream fp(fname, ios::binary);
395
396 Semifields->write_file(fp, verbose_level);
397 }
398 cout << "Written file " << fname << " of size " << Fio.file_size(fname) << endl;
399 }
400
401 {
402 char fname[1000];
404 {
405 ofstream fp(fname, ios::binary);
406
407 Sub->Flag_orbits->write_file(fp, verbose_level);
408 }
409 cout << "Written file " << fname << " of size " << Fio.file_size(fname) << endl;
410 }
411
412 if (f_v) {
413 cout << "semifield_classify_with_substructure::classify_semifields done" << endl;
414 }
415}
416
418{
419 int f_v = (verbose_level >= 1);
421
422 if (f_v) {
423 cout << "semifield_classify_with_substructure::load_classification" << endl;
424 }
425
427
429
430 Sub->SC->A->group_order(go);
431
432
433 {
434 char fname[1000];
436 {
437 ifstream fp(fname, ios::binary);
438
439 cout << "Reading file " << fname << " of size " << Fio.file_size(fname) << endl;
440 Semifields->read_file(fp, Sub->SC->A, Sub->SC->AS, go, verbose_level);
441 }
442 }
443 if (f_v) {
444 cout << "semifield_classify_with_substructure::load_classification "
445 "Semifields->nb_orbits = " << Semifields->nb_orbits << endl;
446 }
447
448
449 if (f_v) {
450 cout << "semifield_classify_with_substructure::load_classification done" << endl;
451 }
452}
453
455{
456 int f_v = (verbose_level >= 1);
458
459 if (f_v) {
460 cout << "semifield_classify_with_substructure::load_flag_orbits" << endl;
461 }
462
463
464
465 {
466 char fname[1000];
468 {
469 ifstream fp(fname, ios::binary);
470
471 cout << "Reading file " << fname << " of size " << Fio.file_size(fname) << endl;
472 Sub->Flag_orbits->read_file(fp, Sub->SC->A, Sub->SC->AS, verbose_level);
473 }
474 }
475 if (f_v) {
476 cout << "semifield_classify_with_substructure::load_flag_orbits "
477 "Sub->Flag_orbits->nb_flag_orbits = "
478 << Sub->Flag_orbits->nb_flag_orbits << endl;
479 }
480
481
482 if (f_v) {
483 cout << "semifield_classify_with_substructure::load_flag_orbits done" << endl;
484 }
485}
486
487
489{
490 int f_v = (verbose_level >= 1);
491 int i;
492
493 if (f_v) {
494 cout << "semifield_classify_with_substructure::identify_semifield" << endl;
495 }
496
498 long int *data = NULL;
499 int data_len = 0;
500 cout << "f_identify_semifield" << endl;
502 cout << "input semifield:" << endl;
503 for (i = 0; i < data_len; i++) {
504 cout << i << " : " << data[i] << endl;
505 }
506
507
508 int t, rk, trace_po, fo, po;
509 int *transporter;
510
511 transporter = NEW_int(Sub->SC->A->elt_size_in_int);
512
513 for (t = 0; t < 6; t++) {
514
515 long int data_out[6];
516
517 cout << "Knuth operation " << t << " / " << 6 << ":" << endl;
519 data, data_out,
520 verbose_level);
521
522 Lint_vec_print(cout, data_out, k);
523 cout << endl;
524 for (i = 0; i < k; i++) {
525 Sub->SC->matrix_unrank(data_out[i], Sub->Basis1 + i * k2);
526 }
528
529 if (Sub->identify(
530 data_out,
531 rk, trace_po, fo, po,
532 transporter,
533 verbose_level)) {
534 cout << "The given semifield has been identified "
535 "as semifield orbit " << po << endl;
536 cout << "rk=" << rk << endl;
537 cout << "trace_po=" << trace_po << endl;
538 cout << "fo=" << fo << endl;
539 cout << "po=" << po << endl;
540 cout << "isotopy:" << endl;
541 Sub->SC->A->element_print_quick(transporter, cout);
542 cout << endl;
543 }
544 else {
545 cout << "The given semifield cannot be identified" << endl;
546 }
547 }
548 }
549 if (f_v) {
550 cout << "semifield_classify_with_substructure::identify_semifield done" << endl;
551 }
552}
553
555 int verbose_level)
556{
557 int f_v = (verbose_level >= 1);
559 int i;
560
561 if (f_v) {
562 cout << "semifield_classify_with_substructure::identify_semifields_from_file" << endl;
563 }
564
566
568 cout << "f_identify_semifield_from_file" << endl;
569
570 long int *Data;
571 int n;
572
574 identify_semifields_from_file_m, n, verbose_level);
575 if (n != Sub->SC->k) {
576 cout << "n != Sub->SC->k" << endl;
577 exit(1);
578 }
579 int t, rk, trace_po, fo, po;
580 int *transporter;
581
582
583 transporter = NEW_int(Sub->SC->A->elt_size_in_int);
585
586 for (i = 0; i < identify_semifields_from_file_m; i++) {
587
588 for (t = 0; t < 6; t++) {
589
590 long int data_out[6];
591
593 Data + i * n, data_out,
594 verbose_level);
595
596
597 if (Sub->identify(
598 data_out,
599 rk, trace_po, fo, po,
600 transporter,
601 verbose_level)) {
602 cout << "Identify " << i << " / " << identify_semifields_from_file_m
603 << " : The given semifield has been identified "
604 "as semifield orbit " << po << endl;
605 cout << "rk=" << rk << endl;
606 cout << "trace_po=" << trace_po << endl;
607 cout << "fo=" << fo << endl;
608 cout << "po=" << po << endl;
609 cout << "isotopy:" << endl;
610 Sub->SC->A->element_print_quick(transporter, cout);
611 cout << endl;
612 identify_semifields_from_file_Po[i * 6 + t] = po;
613 }
614 else {
615 cout << "The given semifield cannot be identified" << endl;
616 identify_semifields_from_file_Po[i * 6 + t] = -1;
617 }
618 }
619
620 }
621 string fname;
623
625 ST.chop_off_extension(fname);
626 fname.append("_identification.csv");
629 }
630 if (f_v) {
631 cout << "semifield_classify_with_substructure::identify_"
632 "semifields_from_file done" << endl;
633 }
634}
635
637 int verbose_level)
638{
639 int f_v = (verbose_level >= 1);
642 int i;
643
644 if (f_v) {
645 cout << "semifield_classify_with_substructure::latex_report" << endl;
646 }
647 char str[1000];
648 char author[1000];
649 char fname[1000];
650 sprintf(str, "Isotopy classes of semifields of order %d", Descr->order);
651
652 string title;
653 title.assign(str);
654
655 sprintf(author, "Orbiter");
656 sprintf(fname, "Semifields_%d.tex", Descr->order);
657
658 if (f_v) {
659 cout << "writing latex file " << fname << endl;
660 }
661
662 {
663 ofstream fp(fname);
665
666
667 //latex_head_easy(fp);
668 L.head(fp,
669 FALSE /* f_book */,
670 TRUE /* f_title */,
671 title.c_str(),
672 author,
673 FALSE /*f_toc */,
674 FALSE /* f_landscape */,
675 FALSE /* f_12pt */,
676 TRUE /*f_enlarged_page */,
677 TRUE /* f_pagenumbers*/,
678 NULL /* extra_praeamble */);
679
680
681 long int *Go;
682
683
685
687 for (i = 0; i < Semifields->nb_orbits; i++) {
689 }
690
692
693 fp << "\\section*{Summary}" << endl;
694 fp << "Classification by stabilizer order:\\\\" << endl;
695 fp << "$$" << endl;
696 C.print_array_tex(fp, TRUE /*f_backwards */);
697 fp << "$$" << endl;
698
699 if (f_v) {
700 cout << "semifield_classify_with_substructure::latex_report "
701 "before L2->print_representatives" << endl;
702 }
703
704 L2->report(fp, verbose_level);
705
706 if (f_v) {
707 cout << "semifield_classify_with_substructure::latex_report "
708 "after L2->print_representatives" << endl;
709 }
710
711 if (f_v) {
712 cout << "semifield_classify_with_substructure::latex_report "
713 "before Semifields->print_latex" << endl;
714 }
715
717 title,
718 TRUE /* f_print_stabilizer_gens */,
719 TRUE,
720 semifield_print_function_callback,
721 Sub);
722
723
724 if (f_v) {
725 cout << "semifield_classify_with_substructure::latex_report "
726 "after Semifields->print_latex" << endl;
727 }
728
730 fp << "\\clearpage" << endl;
731 fp << "\\section*{Identification of Rua types}" << endl;
732 fp << "The $i$-th row, $j$-th column of the table is the number $c$ "
733 "of the isotopy class in the list above which corresponds "
734 "to the $j$-th element in the Knuth orbit of the $i$-th "
735 "class in the R\\'ua labeling.\\\\" << endl;
736 //fp << "$$" << endl;
739 identify_semifields_from_file_m, 6, 40 /* block_width */);
740
741 //print_integer_matrix_with_standard_labels_and_offset_tex(
742 // fp, identify_semifields_from_file_Po, identify_semifields_from_file_m, 6,
743 // 1 /* m_offset */, 1 /* n_offset */);
744 //fp << "$$" << endl;
745 }
746
747
748 if (f_v) {
749 cout << "semifield_classify_with_substructure::latex_report "
750 "substructures of dimension two" << endl;
751 }
752
753 int *Po2;
754 int *PO2;
755 int orbit_idx;
756
757 Po2 = NEW_int(Sub->N2);
758 PO2 = NEW_int(Semifields->nb_orbits * Sub->N2);
759
760 fp << "\\clearpage" << endl;
761 fp << "\\section*{Substructures of dimension two}" << endl;
762 fp << "\\begin{enumerate}" << endl;
763 for (orbit_idx = 0; orbit_idx < Semifields->nb_orbits; orbit_idx++) {
764
765
766 if (f_v) {
767 cout << "orbit " << orbit_idx << " / " << Semifields->nb_orbits << ":" << endl;
768 }
769 Lint_vec_copy(Semifields->Rep_ith(orbit_idx), Sub->data1, Sub->SC->k);
770
771 if (f_v) {
772 cout << "before Sub->all_two_dimensional_subspaces" << endl;
773 }
775 Po2, verbose_level - 3);
776 if (f_v) {
777 cout << "after Sub->all_two_dimensional_subspaces" << endl;
778 }
779
780 Int_vec_copy(Po2, PO2 + orbit_idx * Sub->N2, Sub->N2);
781 fp << "\\item" << endl;
782 fp << orbit_idx << " / " << Semifields->nb_orbits << endl;
783 fp << " has type ";
785
786 C.init(Po2, Sub->N2, FALSE, 0);
787 fp << "$";
788 C.print_naked_tex(fp, FALSE /* f_backwards */);
789 fp << "$";
790 fp << "\\\\" << endl;
791 }
792 fp << "\\end{enumerate}" << endl;
793
794 {
795 char str[1000];
796 string fname;
797
798 sprintf(str, "Semifields_%d_2structure.tex", Descr->order);
799 fname.assign(str);
800 Fio.int_matrix_write_csv(fname, PO2, Semifields->nb_orbits, Sub->N2);
801 }
802 FREE_int(Po2);
803 FREE_int(PO2);
804
805 L.foot(fp);
806 }
807 cout << "Written file " << fname << " of size "
808 << Fio.file_size(fname) << endl;
809
810 if (f_v) {
811 cout << "writing latex file " << fname << " done" << endl;
812 }
813 if (f_v) {
814 cout << "semifield_classify_with_substructure::latex_report" << endl;
815 }
816}
817
819 int verbose_level)
820{
821 int f_v = (verbose_level >= 1);
822
823 if (f_v) {
824 cout << "semifield_classify_with_substructure::generate_source_code" << endl;
825 }
826 string fname_base;
827 char str[1000];
828 sprintf(str, "semifields_%d", Descr->order);
829 fname_base.assign(str);
830
831 if (f_v) {
832 cout << "before Semifields->generate_source_code " << fname_base << endl;
833 }
834
835 Semifields->generate_source_code(fname_base, verbose_level);
836
837 if (f_v) {
838 cout << "after Semifields->generate_source_code " << fname_base << endl;
839 }
840 if (f_v) {
841 cout << "semifield_classify_with_substructure::generate_source_code done" << endl;
842 }
843}
844
845
846
848{
849 int f_v = (verbose_level >= 1);
850
851 if (f_v) {
852 cout << "semifield_classify_with_substructure::decomposition" << endl;
853 }
856 //int N1, N2, N3;
857 int i1, i2, i3;
858 int h1, h2;
859 int po_up;
860 int f_success;
861
862 F1 = Sub->L3->Flag_orbits;
863 F2 = Sub->Flag_orbits;
864 //N1 = L2->nb_orbits;
865 //N2 = Sub->L3->nb_orbits;
866 //N3 = Semifields->nb_orbits;
867 i1 = 8;
868 i3 = 322;
869
870
871#if 0
872 cout << "F1:" << endl;
873 cout << "Sub->L3->nb_flag_orbits=" << Sub->L3->nb_flag_orbits << endl;
874 for (h1 = 0; h1 < Sub->L3->nb_flag_orbits; h1++) {
875 if (F1[h1].f_fusion_node) {
876 int f;
877
878 f = F1[h1].fusion_with;
879 po_up = F1[f].upstep_orbit;
880 }
881 else {
882 po_up = F1[h1].upstep_orbit;
883 }
884 if (h1 > 5576873 - 139) {
885 cout << h1 << " : " << F1[h1].downstep_primary_orbit << " : " << po_up << endl;
886 }
887 }
888
889 cout << "F2:" << endl;
890 for (h2 = 0; h2 < F2->nb_flag_orbits; h2++) {
891 if (F2->Flag_orbit_node[h2].f_fusion_node) {
892 int f;
893
894 f = F2->Flag_orbit_node[h2].fusion_with;
896
897 }
898 else {
900 }
901 cout << h2 << " : " << F2->Flag_orbit_node[h2].downstep_primary_orbit << " : " << po_up << endl;
902
903 }
904#endif
905
906 cout << "searching for chains from i1=" << i1 << " to i3=" << i3 << endl;
907
908 for (h1 = 0; h1 < Sub->L3->nb_flag_orbits; h1++) {
909 if (F1[h1].downstep_primary_orbit != i1) {
910 continue;
911 }
912 if (F1[h1].f_fusion_node) {
913 int f;
914
915 f = F1[h1].fusion_with;
916 po_up = F1[f].upstep_orbit;
917 }
918 else {
919 po_up = F1[h1].upstep_orbit;
920 }
921 i2 = po_up;
922 f_success = FALSE;
923 //cout << "searching i1=" << i1 << " h1=" << h1 << " i2=" << i2 << endl;
924 for (h2 = 0; h2 < F2->nb_flag_orbits; h2++) {
925 if (F2->Flag_orbit_node[h2].downstep_primary_orbit != i2) {
926 continue;
927 }
928 if (F2->Flag_orbit_node[h2].f_fusion_node) {
929 int f;
930
931 f = F2->Flag_orbit_node[h2].fusion_with;
933
934 }
935 else {
937 }
938 if (po_up == i3) {
939 f_success = TRUE;
940 //cout << i1 << " - " << h1 << " - " << i2 << " - " << h2 << " - " << i3 << endl;
941 }
942 }
943 if (f_success) {
944 long int pt;
945
946 pt = F1[h1].pt;
947 cout << "i1=" << i1 << " h1=" << h1 << " i2=" << i2 << " pt=" << pt << endl;
948 if (F1[h1].f_fusion_node) {
949 int f;
950
951 f = F1[h1].fusion_with;
952 cout << "f=" << f << endl;
953 cout << "fusion elt:" << endl;
954 Sub->SC->A->element_print_quick(F1[h1].fusion_elt, cout);
955 }
956 for (h2 = 0; h2 < F2->nb_flag_orbits; h2++) {
957 if (F2->Flag_orbit_node[h2].downstep_primary_orbit != i2) {
958 continue;
959 }
960 if (F2->Flag_orbit_node[h2].f_fusion_node) {
961 int f;
962
963 f = F2->Flag_orbit_node[h2].fusion_with;
965
966 }
967 else {
969 }
970 if (po_up == i3) {
971 cout << i2 << " - " << h2 << " - " << i3 << endl;
972 }
973 }
974
975 }
976 }
977
978
979 if (f_v) {
980 cout << "semifield_classify_with_substructure::decomposition done" << endl;
981 }
982}
983
984//##############################################################################
985// global functions:
986//##############################################################################
987
988
989static void semifield_print_function_callback(ostream &ost, int orbit_idx,
990 invariant_relations::classification_step *Step, void *print_function_data)
991{
992 semifield_substructure *Sub = (semifield_substructure *) print_function_data;
996 long int *R;
997 long int a;
998 int i, j;
999
1000
1001 SC = Sub->SC;
1002 SCWS = Sub->SCWS;
1003 R = Step->Rep_ith(orbit_idx);
1004 for (j = 0; j < Step->representation_sz; j++) {
1005 a = R[j];
1006 SC->matrix_unrank(a, SC->test_Basis);
1007 ost << "$";
1008 ost << "\\left[";
1010 SC->test_Basis, SC->k, SC->k);
1011 ost << "\\right]";
1012 ost << "$";
1013 if (j < Step->representation_sz - 1) {
1014 ost << ", " << endl;
1015 }
1016 }
1017 ost << "\\\\" << endl;
1018 for (j = 0; j < Step->representation_sz; j++) {
1019 a = R[j];
1020 SC->matrix_unrank(a, SC->test_Basis);
1021 ost << "$";
1022 Int_vec_print(ost, SC->test_Basis, SC->k2);
1023 ost << "$";
1024 ost << "\\\\" << endl;
1025 }
1027 ost << "R\\'ua type: ";
1028 for (i = 0; i < SCWS->identify_semifields_from_file_m; i++) {
1029 for (j = 0; j < 6; j++) {
1030 if (SCWS->identify_semifields_from_file_Po[i * 6 + j] == orbit_idx) {
1031 ost << "$" << i << "." << j << "$; ";
1032 }
1033 }
1034 }
1035 ost << "\\\\" << endl;
1036 }
1037
1038 ost << endl;
1039}
1040
1041
1042
1043
1044}}}
1045
1046
functions related to strings and character arrays
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 init_lint(long int *data, int data_length, int f_second, int verbose_level)
Definition: tally.cpp:123
void print_naked_tex(std::ostream &ost, int f_backwards)
Definition: tally.cpp:413
void print_array_tex(std::ostream &ost, int f_backwards)
Definition: tally.cpp:471
void int_matrix_write_csv(std::string &fname, int *M, int m, int n)
Definition: file_io.cpp:1300
void int_matrix_read_csv(std::string &fname, int *&M, int &m, int &n, int verbose_level)
Definition: file_io.cpp:1477
void lint_matrix_read_csv(std::string &fname, long int *&M, int &m, int &n, int verbose_level)
Definition: file_io.cpp:1558
void print_integer_matrix_tex_block_by_block(std::ostream &ost, int *p, int m, int n, int block_width)
void print_integer_matrix_tex(std::ostream &ost, int *p, int m, int n)
void head(std::ostream &ost, int f_book, int f_title, const char *title, const char *author, int f_toc, int f_landscape, int f_12pt, int f_enlarged_page, int f_pagenumbers, const char *extras_for_preamble)
a class to represent arbitrary precision integers
Definition: ring_theory.h:366
void element_print_quick(void *elt, std::ostream &ost)
Definition: action_cb.cpp:353
void group_order(ring_theory::longinteger_object &go)
Definition: action.cpp:2223
groups::matrix_group * get_matrix_group()
Definition: action.cpp:2986
a single step classification of combinatorial objects
Definition: classify.h:29
void generate_source_code(std::string &fname_base, int verbose_level)
void print_latex(std::ostream &ost, std::string &title, int f_print_stabilizer_gens, int f_has_print_function, void(*print_function)(std::ostream &ost, int i, classification_step *Step, void *print_function_data), void *print_function_data)
void read_file(std::ifstream &fp, actions::action *A, actions::action *A2, ring_theory::longinteger_object &go, int verbose_level)
stores the set of flag orbits; related to the class classification_step
Definition: classify.h:75
void read_file(std::ifstream &fp, actions::action *A, actions::action *A2, int verbose_level)
void write_file(std::ofstream &fp, int verbose_level)
to control the behavior of the poset classification algorithm
projective space PG(n,q) with automorphism group PGGL(n+1,q)
description of a semifield classification problem
Definition: semifields.h:24
projective_geometry::projective_space_with_action * PA
Definition: semifields.h:74
poset_classification::poset_classification_control * Control
Definition: semifields.h:77
void init(semifield_classify_description *Descr, projective_geometry::projective_space_with_action *PA, poset_classification::poset_classification_control *Control, int verbose_level)
classification of semifields using poset classification
Definition: semifields.h:144
void knuth_operation(int t, long int *data_in, long int *data_out, 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
void init(semifield_classify *SC, int verbose_level)
One step of lifting for classifying semifields.
Definition: semifields.h:465
void init_level_three(semifield_level_two *L2, int f_prefix, std::string &prefix, int verbose_level)
auxiliary class for classifying semifields using a three-dimensional substructure
Definition: semifields.h:645
int identify(long int *data, int &rk, int &trace_po, int &fo, int &po, int *transporter, int verbose_level)
void compute_cases(int nb_non_unique_cases, int *Non_unique_cases, long int *Non_unique_cases_go, int verbose_level)
#define Lint_vec_copy(A, B, C)
Definition: foundations.h:694
#define FREE_int(p)
Definition: foundations.h:640
#define Lint_vec_scan(A, B, C)
Definition: foundations.h:717
#define NEW_OBJECT(type)
Definition: foundations.h:638
#define Lint_vec_print(A, B, C)
Definition: foundations.h:686
#define NEW_int(n)
Definition: foundations.h:625
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#define Int_vec_copy(A, B, C)
Definition: foundations.h:693
#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