Orbiter 2022
Combinatorial Objects
surface_domain.cpp
Go to the documentation of this file.
1// surface_domain.cpp
2//
3// Anton Betten
4// Jul 25, 2016
5//
6//
7//
8//
9
10#include "foundations.h"
11
12
13using namespace std;
14
15
16namespace orbiter {
17namespace layer1_foundations {
18namespace algebraic_geometry {
19
20
22{
23 v = NULL;
24 v2 = NULL;
25 w2 = NULL;
26 P = NULL;
27 P2 = NULL;
28 Gr = NULL;
29 Gr3 = NULL;
30 O = NULL;
31 Klein = NULL;
32
33 Schlaefli = NULL;
34
35 Poly1 = NULL;
36 Poly2 = NULL;
37 Poly3 = NULL;
38 Poly1_x123 = NULL;
39 Poly2_x123 = NULL;
40 Poly3_x123 = NULL;
41 Poly4_x123 = NULL;
42 Poly1_4 = NULL;
43 Poly2_4 = NULL;
44 Poly3_4 = NULL;
45
46 Partials = NULL;
47
49 Poly2_27 = NULL;
50 Poly4_27 = NULL;
51 Poly6_27 = NULL;
52 Poly3_24 = NULL;
53
54 Clebsch_Pij = NULL;
55 Clebsch_P = NULL;
56 Clebsch_P3 = NULL;
57 Clebsch_coeffs = NULL;
58 CC = NULL;
59
60 null();
61}
62
64{
65 freeself();
66}
67
69{
70 int f_v = FALSE;
71
72 if (f_v) {
73 cout << "surface_domain::freeself" << endl;
74 }
75 if (v) {
76 FREE_int(v);
77 }
78 if (v2) {
79 FREE_int(v2);
80 }
81 if (w2) {
82 FREE_int(w2);
83 }
84 if (P) {
86 }
87 if (P2) {
89 }
90 if (Gr) {
92 }
93 if (Gr3) {
95 }
96 if (O) {
98 }
99 if (Klein) {
101 }
102
103 if (Schlaefli) {
105 }
106
107 if (f_v) {
108 cout << "before Poly1" << endl;
109 }
110
111 if (Poly1) {
113 }
114 if (Poly2) {
116 }
117 if (Poly3) {
119 }
120 if (Poly1_x123) {
122 }
123 if (Poly2_x123) {
125 }
126 if (Poly3_x123) {
128 }
129 if (Poly4_x123) {
131 }
132 if (Poly1_4) {
134 }
135 if (Poly2_4) {
137 }
138 if (Poly3_4) {
140 }
141
142 if (Partials) {
144 }
145
147 if (Poly2_27) {
149 }
150 if (Poly4_27) {
152 }
153 if (Poly6_27) {
155 }
156 if (Poly3_24) {
158 }
159 }
160 if (Clebsch_Pij) {
162 }
163 if (Clebsch_P) {
165 }
166 if (Clebsch_P3) {
168 }
169 if (Clebsch_coeffs) {
171 }
172 if (CC) {
173 FREE_pint(CC);
174 }
175 null();
176 if (f_v) {
177 cout << "surface_domain::freeself done" << endl;
178 }
179}
180
182{
183}
184
186{
187 int f_v = (verbose_level >= 1);
188
189 if (f_v) {
190 cout << "surface_domain::init" << endl;
191 }
192
193 n = 4;
194 n2 = 2 * n;
196 q = F->q;
197 nb_pts_on_surface_with_27_lines = q * q + 7 * q + 1;
198 if (f_v) {
199 cout << "surface::init nb_pts_on_surface_with_27_lines = "
201 }
202
203 v = NEW_int(n);
204 v2 = NEW_int(6);
205 w2 = NEW_int(6);
206
208 if (f_v) {
209 cout << "surface::init before P->projective_space_init" << endl;
210 }
212 TRUE /*f_init_incidence_structure */,
213 verbose_level - 2);
214 if (f_v) {
215 cout << "surface::init after P->projective_space_init" << endl;
216 }
217
219 if (f_v) {
220 cout << "surface::init before P2->projective_space_init" << endl;
221 }
223 TRUE /*f_init_incidence_structure */,
224 verbose_level - 2);
225 if (f_v) {
226 cout << "surface::init after P2->projective_space_init" << endl;
227 }
228
230 Gr->init(n, 2, F, 0 /* verbose_level */);
232 if (f_v) {
233 cout << "surface::init nb_lines_PG_3 = "
234 << nb_lines_PG_3 << endl;
235 }
236
238 Gr3->init(4, 3, F, 0 /* verbose_level*/);
239
240
241 if (f_v) {
242 cout << "surface::init "
243 "initializing orthogonal" << endl;
244 }
246 O->init(1 /* epsilon */, 6 /* n */, F, verbose_level - 2);
247 if (f_v) {
248 cout << "surface::init "
249 "initializing orthogonal done" << endl;
250 }
251
253
254 if (f_v) {
255 cout << "surface::init before Klein->init" << endl;
256 }
257 Klein->init(F, O, verbose_level - 2);
258 if (f_v) {
259 cout << "surface::init after Klein->init" << endl;
260 }
261
262
263
264 if (f_v) {
265 cout << "surface::init before init_polynomial_domains" << endl;
266 }
267 init_polynomial_domains(verbose_level);
268 if (f_v) {
269 cout << "surface::init after init_polynomial_domains" << endl;
270 }
271
272 //init_large_polynomial_domains(verbose_level);
273
274
275
276 if (f_v) {
277 cout << "surface::init before init_Schlaefli" << endl;
278 }
279 init_Schlaefli(verbose_level);
280 if (f_v) {
281 cout << "surface::init after init_Schlaefli" << endl;
282 }
283
284
285
286 //clebsch_cubics(verbose_level);
287
288 if (f_v) {
289 cout << "surface::init done" << endl;
290 }
291}
292
293
295{
296 int f_v = (verbose_level >= 1);
297
298 if (f_v) {
299 cout << "surface_domain::init_polynomial_domains" << endl;
300 }
304
305 if (f_v) {
306 cout << "surface_domain::init_polynomial_domains before Poly1->init" << endl;
307 }
308 Poly1->init(F,
309 3 /* nb_vars */, 1 /* degree */,
310 FALSE /* f_init_incidence_structure */,
311 t_PART,
312 verbose_level);
313 if (f_v) {
314 cout << "surface_domain::init_polynomial_domains after Poly1->init" << endl;
315 }
316 if (f_v) {
317 cout << "surface_domain::init_polynomial_domains before Poly2->init" << endl;
318 }
319 Poly2->init(F,
320 3 /* nb_vars */, 2 /* degree */,
321 FALSE /* f_init_incidence_structure */,
322 t_PART,
323 verbose_level);
324 if (f_v) {
325 cout << "surface_domain::init_polynomial_domains after Poly2->init" << endl;
326 }
327 if (f_v) {
328 cout << "surface_domain::init_polynomial_domains before Poly3->init" << endl;
329 }
330 Poly3->init(F,
331 3 /* nb_vars */, 3 /* degree */,
332 FALSE /* f_init_incidence_structure */,
333 t_PART,
334 verbose_level);
335 if (f_v) {
336 cout << "surface_domain::init_polynomial_domains after Poly3->init" << endl;
337 }
338
343 if (f_v) {
344 cout << "surface_domain::init_polynomial_domains before Poly1_x123->init" << endl;
345 }
347 3 /* nb_vars */, 1 /* degree */,
348 FALSE /* f_init_incidence_structure */,
349 t_PART,
350 verbose_level);
351 if (f_v) {
352 cout << "surface_domain::init_polynomial_domains after Poly1_x123->init" << endl;
353 }
354 if (f_v) {
355 cout << "surface_domain::init_polynomial_domains before Poly2_x123->init" << endl;
356 }
358 3 /* nb_vars */, 2 /* degree */,
359 FALSE /* f_init_incidence_structure */,
360 t_PART,
361 verbose_level);
362 if (f_v) {
363 cout << "surface_domain::init_polynomial_domains after Poly2_x123->init" << endl;
364 }
365 if (f_v) {
366 cout << "surface_domain::init_polynomial_domains before Poly3_x123->init" << endl;
367 }
369 3 /* nb_vars */, 3 /* degree */,
370 FALSE /* f_init_incidence_structure */,
371 t_PART,
372 verbose_level);
373 if (f_v) {
374 cout << "surface_domain::init_polynomial_domains after Poly3_x123->init" << endl;
375 }
376 if (f_v) {
377 cout << "surface_domain::init_polynomial_domains before Poly4_x123->init" << endl;
378 }
380 3 /* nb_vars */, 4 /* degree */,
381 FALSE /* f_init_incidence_structure */,
382 t_PART,
383 verbose_level);
384 if (f_v) {
385 cout << "surface_domain::init_polynomial_domains after Poly4_x123->init" << endl;
386 }
387
388
389 label_variables_3(Poly1, 0 /* verbose_level */);
390 label_variables_3(Poly2, 0 /* verbose_level */);
391 label_variables_3(Poly3, 0 /* verbose_level */);
392
393 label_variables_x123(Poly1_x123, 0 /* verbose_level */);
394 label_variables_x123(Poly2_x123, 0 /* verbose_level */);
395 label_variables_x123(Poly3_x123, 0 /* verbose_level */);
396 label_variables_x123(Poly4_x123, 0 /* verbose_level */);
397
401 if (f_v) {
402 cout << "surface_domain::init_polynomial_domains before Poly1_4->init" << endl;
403 }
404 Poly1_4->init(F,
405 4 /* nb_vars */, 1 /* degree */,
406 FALSE /* f_init_incidence_structure */,
407 t_PART,
408 verbose_level);
409 if (f_v) {
410 cout << "surface_domain::init_polynomial_domains after Poly1_4->init" << endl;
411 }
412 if (f_v) {
413 cout << "surface_domain::init_polynomial_domains before Poly2_4->init" << endl;
414 }
415 Poly2_4->init(F,
416 4 /* nb_vars */, 2 /* degree */,
417 FALSE /* f_init_incidence_structure */,
418 t_PART,
419 verbose_level);
420 if (f_v) {
421 cout << "surface_domain::init_polynomial_domains after Poly2_4->init" << endl;
422 }
423 if (f_v) {
424 cout << "surface_domain::init_polynomial_domains before Poly3_4->init" << endl;
425 }
426 Poly3_4->init(F,
427 4 /* nb_vars */, 3 /* degree */,
428 FALSE /* f_init_incidence_structure */,
429 t_PART,
430 verbose_level);
431 if (f_v) {
432 cout << "surface_domain::init_polynomial_domains after Poly3_4->init" << endl;
433 }
434
435 if (f_v) {
436 cout << "surface_domain::init_polynomial_domains before label_variables_4" << endl;
437 }
438 label_variables_4(Poly1_4, 0 /* verbose_level */);
439 label_variables_4(Poly2_4, 0 /* verbose_level */);
440 label_variables_4(Poly3_4, 0 /* verbose_level */);
441 if (f_v) {
442 cout << "surface_domain::init_polynomial_domains after label_variables_4" << endl;
443 }
444
446
447 if (f_v) {
448 cout << "Poly3_4->nb_monomials = " << nb_monomials << endl;
449 cout << "Poly2_4->nb_monomials = " << Poly2_4->get_nb_monomials() << endl;
450 }
451
452
453
455
456 int i;
457
458 if (f_v) {
459 cout << "surface_domain::init_polynomial_domains initializing partials" << endl;
460 }
461 for (i = 0; i < 4; i++) {
462 Partials[i].init(Poly3_4, Poly2_4, i, verbose_level);
463 }
464 if (f_v) {
465 cout << "surface_domain::init_polynomial_domains initializing partials done" << endl;
466 }
467
468
469
470
471 if (f_v) {
472 cout << "surface_domain::init_polynomial_domains done" << endl;
473 }
474}
475
477{
478 int f_v = (verbose_level >= 1);
479
480 if (f_v) {
481 cout << "surface_domain::init_large_polynomial_domains" << endl;
482 }
488
489 Poly2_27->init(F,
490 27 /* nb_vars */, 2 /* degree */,
491 FALSE /* f_init_incidence_structure */,
492 t_PART,
493 verbose_level);
494 Poly4_27->init(F,
495 27 /* nb_vars */, 4 /* degree */,
496 FALSE /* f_init_incidence_structure */,
497 t_PART,
498 verbose_level);
499 Poly6_27->init(F,
500 27 /* nb_vars */, 6 /* degree */,
501 FALSE /* f_init_incidence_structure */,
502 t_PART,
503 verbose_level);
504 Poly3_24->init(F,
505 24 /* nb_vars */, 3 /* degree */,
506 FALSE /* f_init_incidence_structure */,
507 t_PART,
508 verbose_level);
509
514
515 label_variables_27(Poly2_27, 0 /* verbose_level */);
516 label_variables_27(Poly4_27, 0 /* verbose_level */);
517 label_variables_27(Poly6_27, 0 /* verbose_level */);
518 label_variables_24(Poly3_24, 0 /* verbose_level */);
519
520 if (f_v) {
521 cout << "nb_monomials2 = " << nb_monomials2 << endl;
522 cout << "nb_monomials4 = " << nb_monomials4 << endl;
523 cout << "nb_monomials6 = " << nb_monomials6 << endl;
524 cout << "nb_monomials3 = " << nb_monomials3 << endl;
525 }
526
527 if (f_v) {
528 cout << "surface_domain::init_large_polynomial_domains "
529 "before clebsch_cubics" << endl;
530 }
531 clebsch_cubics(verbose_level - 1);
532 if (f_v) {
533 cout << "surface_domain::init_large_polynomial_domains "
534 "after clebsch_cubics" << endl;
535 }
536
537 if (f_v) {
538 cout << "surface::init_large_polynomial_domains done" << endl;
539 }
540}
541
544 int verbose_level)
545{
546 int f_v = (verbose_level >= 1);
547
548 if (f_v) {
549 cout << "surface_domain::label_variables_3" << endl;
550 }
551 if (HPD->nb_variables != 3) {
552 cout << "surface_domain::label_variables_3 HPD->nb_variables != 3" << endl;
553 exit(1);
554 }
555
556 HPD->remake_symbols(0 /* symbol_offset */,
557 "y_%d", "y_{%d}", verbose_level);
558
559 if (f_v) {
560 cout << "surface_domain::label_variables_3 done" << endl;
561 }
562}
563
566 int verbose_level)
567{
568 int f_v = (verbose_level >= 1);
569
570 if (f_v) {
571 cout << "surface_domain::label_variables_x123" << endl;
572 }
573 if (HPD->nb_variables != 3) {
574 cout << "surface_domain::label_variables_x123 "
575 "HPD->nb_variables != 3" << endl;
576 exit(1);
577 }
578
579
580 HPD->remake_symbols(1 /* symbol_offset */,
581 "x_%d", "x_{%d}", verbose_level);
582
583 if (f_v) {
584 cout << "surface_domain::label_variables_x123 done" << endl;
585 }
586}
587
590 int verbose_level)
591{
592 int f_v = (verbose_level >= 1);
593 //int i, l;
594 //char label[1000];
595
596 if (f_v) {
597 cout << "surface_domain::label_variables_4" << endl;
598 }
599 if (HPD->nb_variables != 4) {
600 cout << "surface_domain::label_variables_4 HPD->nb_variables != 4" << endl;
601 exit(1);
602 }
603
604
605 HPD->remake_symbols(0 /* symbol_offset */,
606 "X_%d", "X_{%d}", verbose_level);
607
608
609 if (f_v) {
610 cout << "surface::label_variables_4 done" << endl;
611 }
612
613}
614
617 int verbose_level)
618{
619 int f_v = (verbose_level >= 1);
620
621 if (f_v) {
622 cout << "surface_domain::label_variables_27" << endl;
623 }
624 if (HPD->nb_variables != 27) {
625 cout << "surface_domain::label_variables_27 HPD->n != 27" << endl;
626 exit(1);
627 }
628
629 HPD->remake_symbols_interval(0 /* symbol_offset */,
630 0, 3,
631 "y_%d", "y_{%d}",
632 verbose_level);
633 HPD->remake_symbols_interval(0 /* symbol_offset */,
634 3, 4,
635 "f_0%d", "f_{0%d}",
636 verbose_level);
637 HPD->remake_symbols_interval(0 /* symbol_offset */,
638 7, 4,
639 "f_1%d", "f_{1%d}",
640 verbose_level);
641 HPD->remake_symbols_interval(0 /* symbol_offset */,
642 11, 4,
643 "f_2%d", "f_{2%d}",
644 verbose_level);
645 HPD->remake_symbols_interval(0 /* symbol_offset */,
646 15, 4,
647 "g_0%d", "g_{0%d}",
648 verbose_level);
649 HPD->remake_symbols_interval(0 /* symbol_offset */,
650 19, 4,
651 "g_1%d", "g_{1%d}",
652 verbose_level);
653 HPD->remake_symbols_interval(0 /* symbol_offset */,
654 23, 4,
655 "g_2%d", "g_{2%d}",
656 verbose_level);
657
658 if (f_v) {
659 cout << "surface_domain::label_variables_27 done" << endl;
660 }
661}
662
665 int verbose_level)
666{
667 int f_v = (verbose_level >= 1);
668
669 if (f_v) {
670 cout << "surface_domain::label_variables_24" << endl;
671 }
672 if (HPD->nb_variables != 24) {
673 cout << "surface_domain::label_variables_24 HPD->n != 24" << endl;
674 exit(1);
675 }
676
677 HPD->remake_symbols_interval(0 /* symbol_offset */,
678 0, 4,
679 "f_0%d", "f_{0%d}",
680 verbose_level);
681 HPD->remake_symbols_interval(0 /* symbol_offset */,
682 4, 4,
683 "f_1%d", "f_{1%d}",
684 verbose_level);
685 HPD->remake_symbols_interval(0 /* symbol_offset */,
686 8, 4,
687 "f_2%d", "f_{2%d}",
688 verbose_level);
689 HPD->remake_symbols_interval(0 /* symbol_offset */,
690 12, 4,
691 "g_0%d", "g_{0%d}",
692 verbose_level);
693 HPD->remake_symbols_interval(0 /* symbol_offset */,
694 16, 4,
695 "g_1%d", "g_{1%d}",
696 verbose_level);
697 HPD->remake_symbols_interval(0 /* symbol_offset */,
698 20, 4,
699 "g_2%d", "g_{2%d}",
700 verbose_level);
701
702 if (f_v) {
703 cout << "surface_domain::label_variables_24 done" << endl;
704 }
705}
706
707
709{
710 return Poly3_4->index_of_monomial(v);
711}
712
713void surface_domain::unrank_point(int *v, long int rk)
714{
715 P->unrank_point(v, rk);
716}
717
719{
720 long int rk;
721
722 rk = P->rank_point(v);
723 return rk;
724}
725
726void surface_domain::unrank_plane(int *v, long int rk)
727{
728 Gr3->unrank_lint_here(v, rk, 0 /* verbose_level */);
729}
730
732{
733 long int rk;
734
735 rk = Gr3->rank_lint_here(v, 0 /* verbose_level */);
736 return rk;
737}
738
740 std::vector<long int> &Pts,
741 int verbose_level)
742{
743 int f_v = (verbose_level >= 1);
744
745 if (f_v) {
746 cout << "surface_domain::enumerate_points" << endl;
747 }
748
749 Poly3_4->enumerate_points(coeff, Pts, verbose_level);
750 if (f_v) {
751 cout << "surface_domain::enumerate_points done" << endl;
752 }
753}
754
756 int *coeff_in, int *coeff_out,
757 int f_semilinear, int frob, int *Mtx_inv,
758 int verbose_level)
759{
760 int f_v = (verbose_level >= 1);
761
762 if (f_v) {
763 cout << "surface_domain::substitute_semilinear" << endl;
764 }
765 Poly3_4->substitute_semilinear(coeff_in, coeff_out,
766 f_semilinear, frob, Mtx_inv, verbose_level);
767 if (f_v) {
768 cout << "surface_domain::substitute_semilinear done" << endl;
769 }
770}
771
773 long int *Lines, int nb_lines,
774 data_structures::set_of_sets *line_intersections, int *&Table, int &N,
775 int verbose_level)
776{
777 int f_v = (verbose_level >= 1);
778 int subset[5];
779 long int subset2[5];
780 long int S3[6];
781 int N1, nCk, h;
782 int i, j, r;
784
785 if (f_v) {
786 cout << "surface_domain::list_starter_configurations" << endl;
787 }
788
789 N = 0;
790 for (i = 0; i < nb_lines; i++) {
791 if (line_intersections->Set_size[i] < 5) {
792 continue;
793 }
794 nCk = Combi.int_n_choose_k(line_intersections->Set_size[i], 5);
795 for (j = 0; j < nCk; j++) {
796 Combi.unrank_k_subset(j, subset,
797 line_intersections->Set_size[i], 5);
798 for (h = 0; h < 5; h++) {
799 subset2[h] =
800 line_intersections->Sets[i][subset[h]];
801 S3[h] = Lines[subset2[h]];
802 }
803 S3[5] = Lines[i];
804 r = rank_of_system(6, S3, 0 /*verbose_level*/);
805 if (r == 19) {
806 N++;
807 }
808 }
809 }
810 if (f_v) {
811 cout << "surface_domain::list_starter_configurations We found "
812 << N << " starter configurations on this surface"
813 << endl;
814 }
815 Table = NEW_int(N * 2);
816 N1 = 0;
817 for (i = 0; i < nb_lines; i++) {
818 if (line_intersections->Set_size[i] < 5) {
819 continue;
820 }
821 nCk = Combi.int_n_choose_k(line_intersections->Set_size[i], 5);
822 for (j = 0; j < nCk; j++) {
823 Combi.unrank_k_subset(j, subset,
824 line_intersections->Set_size[i], 5);
825 for (h = 0; h < 5; h++) {
826 subset2[h] =
827 line_intersections->Sets[i][subset[h]];
828 S3[h] = Lines[subset2[h]];
829 }
830 S3[5] = Lines[i];
831 r = rank_of_system(6, S3, 0 /*verbose_level*/);
832 if (r == 19) {
833 Table[N1 * 2 + 0] = i;
834 Table[N1 * 2 + 1] = j;
835 N1++;
836 }
837 }
838 }
839 if (N1 != N) {
840 cout << "N1 != N" << endl;
841 exit(1);
842 }
843 if (f_v) {
844 cout << "surface_domain::list_starter_configurations done" << endl;
845 }
846}
847
849 int line_idx, int subset_idx,
850 data_structures::set_of_sets *line_neighbors, long int *Lines, long int *S,
851 int verbose_level)
852{
853 int f_v = (verbose_level >= 1);
854 int subset[5];
855 int subset2[5];
856 int h; //, nCk;
858
859 if (f_v) {
860 cout << "surface_domain::create_starter_configuration" << endl;
861 }
862 //nCk = int_n_choose_k(line_neighbors->Set_size[line_idx], 5);
863 Combi.unrank_k_subset(subset_idx, subset,
864 line_neighbors->Set_size[line_idx], 5);
865 for (h = 0; h < 5; h++) {
866 subset2[h] = line_neighbors->Sets[line_idx][subset[h]];
867 S[h] = Lines[subset2[h]];
868 }
869 S[5] = Lines[line_idx];
870 if (f_v) {
871 cout << "surface_domain::create_starter_configuration done" << endl;
872 }
873}
874
876{
877 F->wedge_to_klein(W, K);
878#if 0
879 K[0] = W[0];
880 K[1] = W[5];
881 K[2] = W[1];
882 K[3] = F->negate(W[4]);
883 K[4] = W[2];
884 K[5] = W[3];
885#endif
886}
887
889{
890 F->klein_to_wedge(K, W);
891#if 0
892 W[0] = K[0];
893 W[1] = K[2];
894 W[2] = K[4];
895 W[3] = K[5];
896 W[4] = F->negate(K[3]);
897 W[5] = K[1];
898#endif
899}
900
901long int surface_domain::line_to_wedge(long int line_rk)
902{
903 long int a, b;
904
905 a = Klein->line_to_point_on_quadric(line_rk, 0 /* verbose_level*/);
906 O->unrank_point(w2, 1, a, 0 /* verbose_level*/);
908 F->PG_element_rank_modified_lint(v2, 1, 6 /*wedge_dimension*/, b);
909 //b = AW->rank_point(v);
910 return b;
911}
912
914 long int *Line_rk, long int *Wedge_rk, int len)
915{
916 int i;
917
918 for (i = 0; i < len; i++) {
919 Wedge_rk[i] = line_to_wedge(Line_rk[i]);
920 }
921}
922
924 long int *Line_rk, long int *Klein_rk, int len)
925{
926 //int_vec_apply(Line_rk, Klein->Line_to_point_on_quadric,
927 // Klein_rk, len);
928 //from through to
929 //for (i = 0; i < len; i++) {
930 // to[i] = through[from[i]];
931 // }
932 int i;
933
934 for (i = 0; i < len; i++) {
935 Klein_rk[i] = Klein->line_to_point_on_quadric(Line_rk[i], 0 /* verbose_level*/);
936 }
937}
938
939long int surface_domain::klein_to_wedge(long int klein_rk)
940{
941 long int b;
942
943 O->unrank_point(w2, 1, klein_rk, 0 /* verbose_level*/);
945 F->PG_element_rank_modified_lint(v2, 1, 6 /*wedge_dimension*/, b);
946 //b = AW->rank_point(v);
947 return b;
948}
949
951 long int *Klein_rk, long int *Wedge_rk, int len)
952{
953 int i;
954
955 for (i = 0; i < len; i++) {
956 Wedge_rk[i] = klein_to_wedge(Klein_rk[i]);
957 }
958}
959
961 long int *Lines_wedge, long int *Lines, long int *Lines_klein, int nb_lines)
962{
964
966 Lines_wedge, Lines, Lines_klein, nb_lines,
967 0 /* verbose_level */);
968
969 Sp->save(fname_csv, 0 /*verbose_level*/);
970 FREE_OBJECT(Sp);
971}
972
973
975{
976 int f_v = (verbose_level >= 1);
977
978 if (f_v) {
979 cout << "surface_domain::build_surface_from_double_six_and_count_Eckardt_points" << endl;
980 }
981 if (f_v) {
982 cout << "surface_domain::build_surface_from_double_six_and_count_Eckardt_points before Surf->build_cubic_surface_from_lines" << endl;
983 }
984
985 int coeffs20[20];
986 long int Lines27[27];
987 int nb_E;
988
990 12, double_six,
991 coeffs20, 0/* verbose_level*/);
992
993 if (f_v) {
994 cout << "surface_domain::build_surface_from_double_six_and_count_Eckardt_points after Surf->build_cubic_surface_from_lines" << endl;
995 }
996
997 if (f_v) {
998 cout << "surface_domain::build_surface_from_double_six_and_count_Eckardt_points "
999 "coeffs20:" << endl;
1000 Int_vec_print(cout, coeffs20, 20);
1001 cout << endl;
1002
1003 Poly3_4->print_equation(cout, coeffs20);
1004 cout << endl;
1005 }
1006
1007
1008 Lint_vec_copy(double_six, Lines27, 12);
1009
1010
1011 if (f_v) {
1012 cout << "surface_domain::build_surface_from_double_six_and_count_Eckardt_points before Surf->create_the_fifteen_other_lines" << endl;
1013 }
1015 Lines27 + 12, verbose_level);
1016 if (f_v) {
1017 cout << "surface_domain::build_surface_from_double_six_and_count_Eckardt_points after Surf->create_the_fifteen_other_lines" << endl;
1018 }
1019
1020
1021
1022 surface_object *SO;
1023
1025
1026 if (f_v) {
1027 cout << "surface_domain::build_surface_from_double_six_and_count_Eckardt_points before SO->init_with_27_lines" << endl;
1028 }
1029
1030 SO->init_with_27_lines(this,
1031 Lines27, coeffs20,
1032 FALSE /* f_find_double_six_and_rearrange_lines */,
1033 verbose_level);
1034 if (f_v) {
1035 cout << "surface_domain::build_surface_from_double_six_and_count_Eckardt_points after SO->init_with_27_lines" << endl;
1036 }
1037
1038 nb_E = SO->SOP->nb_Eckardt_points;
1039 if (f_v) {
1040 cout << "surface_domain::build_surface_from_double_six_and_count_Eckardt_points the surface has " << nb_E << " Eckardt points" << endl;
1041 }
1042
1043
1044 if (f_v) {
1045 cout << "surface_domain::build_surface_from_double_six_and_count_Eckardt_points done" << endl;
1046 }
1047 return nb_E;
1048
1049}
1050
1051
1052
1053}}}
1054
ring_theory::homogeneous_polynomial_domain * Poly3_x123
int build_surface_from_double_six_and_count_Eckardt_points(long int *double_six, int verbose_level)
void label_variables_27(ring_theory::homogeneous_polynomial_domain *HPD, int verbose_level)
void label_variables_3(ring_theory::homogeneous_polynomial_domain *HPD, int verbose_level)
ring_theory::homogeneous_polynomial_domain * Poly4_x123
void line_to_wedge_vec(long int *Line_rk, long int *Wedge_rk, int len)
ring_theory::homogeneous_polynomial_domain * Poly1_4
void create_the_fifteen_other_lines(long int *double_six, long int *fifteen_other_lines, int verbose_level)
Given a double six in double_six[12], compute the 15 remaining lines cij.
void save_lines_in_three_kinds(std::string &fname_csv, long int *Lines_wedge, long int *Lines, long int *Lines_klein, int nb_lines)
void make_spreadsheet_of_lines_in_three_kinds(data_structures::spreadsheet *&Sp, long int *Wedge_rk, long int *Line_rk, long int *Klein_rk, int nb_lines, int verbose_level)
void klein_to_wedge_vec(long int *Klein_rk, long int *Wedge_rk, int len)
ring_theory::homogeneous_polynomial_domain * Poly3_24
ring_theory::homogeneous_polynomial_domain * Poly3_4
void list_starter_configurations(long int *Lines, int nb_lines, data_structures::set_of_sets *line_intersections, int *&Table, int &N, int verbose_level)
void enumerate_points(int *coeff, std::vector< long int > &Pts, int verbose_level)
void label_variables_4(ring_theory::homogeneous_polynomial_domain *HPD, int verbose_level)
ring_theory::homogeneous_polynomial_domain * Poly1_x123
void line_to_klein_vec(long int *Line_rk, long int *Klein_rk, int len)
ring_theory::homogeneous_polynomial_domain * Poly6_27
ring_theory::homogeneous_polynomial_domain * Poly2_4
void label_variables_x123(ring_theory::homogeneous_polynomial_domain *HPD, int verbose_level)
ring_theory::homogeneous_polynomial_domain * Poly2_27
void create_starter_configuration(int line_idx, int subset_idx, data_structures::set_of_sets *line_neighbors, long int *Lines, long int *S, int verbose_level)
void substitute_semilinear(int *coeff_in, int *coeff_out, int f_semilinear, int frob, int *Mtx_inv, int verbose_level)
ring_theory::homogeneous_polynomial_domain * Poly4_27
void build_cubic_surface_from_lines(int len, long int *S, int *coeff, int verbose_level)
void label_variables_24(ring_theory::homogeneous_polynomial_domain *HPD, int verbose_level)
void init(field_theory::finite_field *F, int verbose_level)
ring_theory::homogeneous_polynomial_domain * Poly2_x123
a particular cubic surface in PG(3,q), given by its equation
void init_with_27_lines(surface_domain *Surf, long int *Lines27, int *eqn, int f_find_double_six_and_rearrange_lines, int verbose_level)
void save(std::string &fname, int verbose_level)
void PG_element_rank_modified_lint(int *v, int stride, int len, long int &a)
to rank and unrank subspaces of a fixed dimension in F_q^n
Definition: geometry.h:892
ring_theory::longinteger_object * nCkq
Definition: geometry.h:895
long int rank_lint_here(int *Mtx, int verbose_level)
Definition: grassmann.cpp:275
void unrank_lint_here(int *Mtx, long int rk, int verbose_level)
Definition: grassmann.cpp:269
void init(int n, int k, field_theory::finite_field *F, int verbose_level)
Definition: grassmann.cpp:70
the Klein correspondence between lines in PG(3,q) and points on the Klein quadric
Definition: geometry.h:1353
void init(field_theory::finite_field *F, orthogonal_geometry::orthogonal *O, int verbose_level)
long int line_to_point_on_quadric(long int line_rk, int verbose_level)
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 unrank_point(int *v, int stride, long int rk, int verbose_level)
void init(int epsilon, int n, field_theory::finite_field *F, int verbose_level)
Definition: orthogonal.cpp:312
homogeneous polynomials of a given degree in a given number of variables over a finite field GF(q)
Definition: ring_theory.h:88
void init(field_theory::finite_field *F, int nb_vars, int degree, int f_init_incidence_structure, monomial_ordering_type Monomial_ordering_type, int verbose_level)
void enumerate_points(int *coeff, std::vector< long int > &Pts, int verbose_level)
void remake_symbols(int symbol_offset, const char *symbol_mask, const char *symbol_mask_latex, int verbose_level)
void substitute_semilinear(int *coeff_in, int *coeff_out, int f_semilinear, int frob_power, int *Mtx_inv, int verbose_level)
void remake_symbols_interval(int symbol_offset, int from, int len, const char *symbol_mask, const char *symbol_mask_latex, int verbose_level)
partial derivative connects two homogeneous polynomial domains
Definition: ring_theory.h:432
void init(homogeneous_polynomial_domain *H, homogeneous_polynomial_domain *Hd, int variable_idx, int verbose_level)
#define Lint_vec_copy(A, B, C)
Definition: foundations.h:694
#define FREE_OBJECTS(p)
Definition: foundations.h:652
#define FREE_int(p)
Definition: foundations.h:640
#define NEW_OBJECT(type)
Definition: foundations.h:638
#define FREE_OBJECT(p)
Definition: foundations.h:651
#define NEW_int(n)
Definition: foundations.h:625
#define NEW_OBJECTS(type, n)
Definition: foundations.h:639
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#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