Orbiter 2022
Combinatorial Objects
orthogonal.cpp
Go to the documentation of this file.
1// orthogonal.cpp
2//
3// Anton Betten
4// 3/8/7: lines in hyperbolic spaces
5//
6// continued May 2007 with parabolic type
7//
8//
9//
10
11#include "foundations.h"
12
13using namespace std;
14
15
16namespace orbiter {
17namespace layer1_foundations {
18namespace orthogonal_geometry {
19
20
21
23{
24 epsilon = n = m = q = 0;
25 f_even = FALSE;
26 form_c1 = form_c2 = form_c3 = 0;
27
28 //std::string label_txt;
29 //std::string label_tex;
30
31 Poly = NULL;
32 the_quadratic_form = NULL;
33 the_monomial = NULL;
34
35 Gram_matrix = NULL;
36 T1 = NULL;
37 T2 = NULL;
38 T3 = NULL;
39 pt_P = pt_Q = 0;
40 nb_points = 0;
41 nb_lines = 0;
42
43 T1_m = 0;
44 T1_mm1 = 0;
45 T1_mm2 = 0;
46 T2_m = 0;
47 T2_mm1 = 0;
48 T2_mm2 = 0;
49 N1_m = 0;
50 N1_mm1 = 0;
51 N1_mm2 = 0;
52 S_m = 0;
53 S_mm1 = 0;
54 S_mm2 = 0;
55 Sbar_m = 0;
56 Sbar_mm1 = 0;
57 Sbar_mm2 = 0;
58
59 alpha = beta = gamma = 0;
62
64 A = B = P = L = NULL;
65
66 p1 = p2 = p3 = p4 = p5 = p6 = 0;
67 l1 = l2 = l3 = l4 = l5 = l6 = l7 = 0;
68 a11 = a12 = a22 = a23 = a26 = a32 = a34 = a37 = 0;
69 a41 = a43 = a44 = a45 = a46 = a47 = a56 = a67 = 0;
70 b11 = b12 = b22 = b23 = b26 = b32 = b34 = b37 = 0;
71 b41 = b43 = b44 = b45 = b46 = b47 = b56 = b67 = 0;
72
73 p7 = l8 = 0;
74 a21 = a36 = a57 = a22a = a33 = a22b = 0;
75 a32b = a42b = a51 = a53 = a54 = a55 = a66 = a77 = 0;
76 b21 = b36 = b57 = b22a = b33 = b22b = 0;
77 b32b = b42b = b51 = b53 = b54 = b55 = b66 = b77 = 0;
78 a12b = a52a = 0;
79 b12b = b52a = 0;
80 delta = omega = lambda = mu = nu = zeta = 0;
81
82 minus_squares = NULL;
84 minus_nonsquares = NULL;
86 index_minus_square = NULL;
89
90 v1 = NULL;
91 v2 = NULL;
92 v3 = NULL;
93 v4 = NULL;
94 v5 = NULL;
95 v_tmp = NULL;
96 v_tmp2 = NULL;
97 v_neighbor5 = NULL;
98
99 find_root_x = NULL;
100 find_root_y = NULL;
101 find_root_z = NULL;
102 F = NULL;
103
104 rk_pt_v = NULL;
105
106 Sv1 = NULL;
107 Sv2 = NULL;
108 Sv3 = NULL;
109 Sv4 = NULL;
110 Gram2 = NULL;
111 ST_N1 = NULL;
112 ST_N2 = NULL;
113 ST_w = NULL;
114 STr_B = STr_Bv = STr_w = STr_z = STr_x = NULL;
115
116 determine_line_v1 = NULL;
117 determine_line_v2 = NULL;
118 determine_line_v3 = NULL;
119
122
123 subspace = NULL;
124
125 line_pencil = NULL;
126 Perp1 = NULL;
127
128
129}
130
132{
133 if (Poly) {
135 }
136 if (the_quadratic_form) {
138 }
139 if (the_monomial) {
141 }
142 if (Gram_matrix) {
144 }
145
146 if (T1) {
147 FREE_int(T1);
148 }
149 if (T2) {
150 FREE_int(T2);
151 }
152 if (T3) {
153 FREE_int(T3);
154 }
155
156 //cout << "orthogonal::~orthogonal freeing A" << endl;
157 if (A) {
158 FREE_lint(A);
159 }
160 //cout << "orthogonal::~orthogonal freeing B" << endl;
161 if (B) {
162 FREE_lint(B);
163 }
164 //cout << "orthogonal::~orthogonal freeing P" << endl;
165 if (P) {
166 FREE_lint(P);
167 }
168 //cout << "orthogonal::~orthogonal freeing L" << endl;
169 if (L) {
170 FREE_lint(L);
171 }
172
173
174
175 if (minus_squares) {
177 }
180 }
181 if (minus_nonsquares) {
183 }
184 if (f_is_minus_square) {
186 }
187 if (index_minus_square) {
189 }
192 }
195 }
196
197
198
199
200 //cout << "orthogonal::~orthogonal freeing v1" << endl;
201 if (v1) {
202 FREE_int(v1);
203 }
204 //cout << "orthogonal::~orthogonal freeing v2" << endl;
205 if (v2) {
206 FREE_int(v2);
207 }
208 //cout << "orthogonal::~orthogonal freeing v3" << endl;
209 if (v3) {
210 FREE_int(v3);
211 }
212 if (v4) {
213 FREE_int(v4);
214 }
215 if (v5) {
216 FREE_int(v5);
217 }
218 if (v_tmp) {
220 }
221 if (v_tmp2) {
223 }
224 if (v_neighbor5) {
226 }
227 if (find_root_x) {
229 }
230 if (find_root_y) {
232 }
233 if (find_root_z) {
235 }
236
237
238 if (rk_pt_v) {
240 }
241 if (Sv1) {
242 FREE_int(Sv1);
243 }
244 if (Sv2) {
245 FREE_int(Sv2);
246 }
247 if (Sv3) {
248 FREE_int(Sv3);
249 }
250 if (Sv4) {
251 FREE_int(Sv4);
252 }
253 if (Gram2) {
255 }
256 if (ST_N1) {
258 }
259 if (ST_N2) {
261 }
262 if (ST_w) {
263 FREE_int(ST_w);
264 }
265 if (STr_B) {
267 }
268 if (STr_Bv) {
270 }
271 if (STr_w) {
273 }
274 if (STr_z) {
276 }
277 if (STr_x) {
279 }
280 if (determine_line_v1) {
282 }
283 if (determine_line_v2) {
285 }
286 if (determine_line_v3) {
288 }
291 }
294 }
295
296 if (subspace) {
298 }
299
300 if (line_pencil) {
302 }
303 if (Perp1) {
305 }
306 //cout << "orthogonal::~orthogonal finished" << endl;
307}
308
309
310
311
312void orthogonal::init(int epsilon, int n,
313 field_theory::finite_field *F, int verbose_level)
314{
315 int f_v = (verbose_level >= 1);
316 int i, j;
318
319
323
324 q = F->q;
325 m = Gg.Witt_index(epsilon, n - 1);
326
327 char str[1000];
328
329 if (epsilon == 1) {
330 sprintf(str, "Op_%d_%d", n, q);
331 }
332 else if (epsilon == -1) {
333 sprintf(str, "Om_%d_%d", n, q);
334 }
335 else if (epsilon == 0) {
336 sprintf(str, "O_%d_%d", n, q);
337 }
338
339 label_txt.assign(str);
340
341 if (epsilon == 1) {
342 sprintf(str, "O^+(%d,%d)", n, q);
343 }
344 else if (epsilon == -1) {
345 sprintf(str, "O^-(%d,%d)", n, q);
346 }
347 else if (epsilon == 0) {
348 sprintf(str, "O(%d,%d)", n, q);
349 }
350
351
352 label_tex.assign(str);
353
354 if (f_v) {
355 cout << "orthogonal::init: epsilon=" << epsilon
356 << " n=" << n << " (= vector space dimension)"
357 << " m=" << m << " (= Witt index)"
358 << " q=" << q
359 << " label_txt=" << label_txt
360 << " label_tex=" << label_tex
361 << " verbose_level=" << verbose_level
362 << endl;
363 }
364
365 if (EVEN(q)) {
366 f_even = TRUE;
367 }
368 else {
369 f_even = FALSE;
370 }
371
372 allocate();
373
374 if (f_v) {
375 cout << "orthogonal::init before init_form_and_Gram_matrix" << endl;
376 }
377 init_form_and_Gram_matrix(verbose_level - 2);
378 if (f_v) {
379 cout << "orthogonal::init after init_form_and_Gram_matrix" << endl;
380 }
381
382
383 if (f_v) {
384 cout << "orthogonal::init before init_counting_functions" << endl;
385 }
386 init_counting_functions(verbose_level - 2);
387 if (f_v) {
388 cout << "orthogonal::init after init_counting_functions" << endl;
389 }
390
391 if (f_v) {
392 cout << "orthogonal::init before init_decomposition" << endl;
393 }
394 init_decomposition(verbose_level - 2);
395 if (f_v) {
396 cout << "orthogonal::init after init_decomposition" << endl;
397 }
398
399 if (epsilon == -1) {
400 return;
401 }
402
403
404
405
408
409 if (m > 1) {
411 if (f_v) {
412 cout << "orthogonal::init initializing subspace" << endl;
413 }
414 subspace->init(epsilon, n - 2, F, 0 /*verbose_level - 1*/);
415 if (f_v) {
416 cout << "orthogonal::init initializing subspace finished" << endl;
417 cout << "orthogonal::init subspace->epsilon=" << subspace->epsilon << endl;
418 cout << "orthogonal::init subspace->n=" << subspace->n << endl;
419 cout << "orthogonal::init subspace->m=" << subspace->m << endl;
420 }
421 }
422 else {
423 if (f_v) {
424 cout << "orthogonal::init no subspace" << endl;
425 }
426 subspace = NULL;
427 }
428
429 if (f_v) {
430 cout << "orthogonal::init O^" << epsilon << "(" << n << "," << q << ")" << endl;
431 cout << "epsilon=" << epsilon
432 << " n=" << n << " m=" << m << " q=" << q << endl;
433 cout << "pt_P = " << pt_P << endl;
434 cout << "pt_Q=" << pt_Q << endl;
435 cout << "nb_points = " << nb_points << endl;
436 cout << "nb_lines = " << nb_lines << endl;
437 cout << "alpha = " << alpha << endl;
438 cout << "beta = " << beta << endl;
439 cout << "gamma = " << gamma << endl;
440 }
441
442
443 if (f_v) {
444 cout << "orthogonal::init before allocating line_pencil of size " << alpha << endl;
445 }
447 if (f_v) {
448 cout << "orthogonal::init before allocating Perp1 of size "
449 << alpha * (q + 1) << endl;
450 }
451 Perp1 = NEW_lint(alpha * (q + 1));
452 if (f_v) {
453 cout << "orthogonal::init after allocating Perp1" << endl;
454 }
455
456
457
458 if (f_v) {
460 cout << "orthogonal::init Gram matrix:" << endl;
462 Gram_matrix, n, n, n, F->log10_of_q + 1);
463 }
464 if (FALSE) {
465 for (i = 0; i < T1_m; i++) {
467 form_c1, form_c2, form_c3, i, verbose_level);
468 cout << i << " : ";
469 Int_vec_print(cout, v1, n);
471 form_c1, form_c2, form_c3, verbose_level);
472 cout << " : " << j << endl;
473 }
474 }
475 if (FALSE) {
476 if (nb_points < 300) {
477 cout << "points of O^" << epsilon
478 << "(" << n << "," << q << ") by type:" << endl;
479 list_points_by_type(verbose_level);
480 }
481 if (nb_points < 300 && nb_lines < 300) {
482 cout << "points and lines of O^" << epsilon
483 << "(" << n << "," << q << ") by type:" << endl;
484 list_all_points_vs_points(verbose_level);
485 }
486 }
487 if (f_v) {
488 if (subspace) {
489 cout << "orthogonal::init subspace->epsilon=" << subspace->epsilon << endl;
490 cout << "orthogonal::init subspace->n=" << subspace->n << endl;
491 cout << "orthogonal::init subspace->m=" << subspace->m << endl;
492 }
493 cout << "orthogonal::init finished" << endl;
494 }
495}
496
498{
499 v1 = NEW_int(n);
500 v2 = NEW_int(n);
501 v3 = NEW_int(n);
502 v4 = NEW_int(n);
503 v5 = NEW_int(n);
504 v_tmp = NEW_int(n);
505 v_tmp2 = NEW_int(n);
510 T1 = NEW_int(n * n);
511 T2 = NEW_int(n * n);
512 T3 = NEW_int(n * n);
513
514 rk_pt_v = NEW_int(n);
515
516 // for Siegel transformations:
517 Sv1 = NEW_int(n);
518 Sv2 = NEW_int(n);
519 Sv3 = NEW_int(n);
520 Sv4 = NEW_int(n);
521 Gram2 = NEW_int(n * n);
522 ST_N1 = NEW_int(n * n);
523 ST_N2 = NEW_int(n * n);
524 ST_w = NEW_int(n);
525 STr_B = NEW_int(n * n);
526 STr_Bv = NEW_int(n * n);
527 STr_w = NEW_int(n);
528 STr_z = NEW_int(n);
529 STr_x = NEW_int(n);
533
534}
535
537{
538 int f_v = (verbose_level >= 1);
539 int idx;
540
541 if (f_v) {
542 cout << "orthogonal::init_form_and_Gram_matrix" << endl;
543 }
544 form_c1 = 1;
545 form_c2 = 0;
546 form_c3 = 0;
547
549
550 if (f_v) {
551 cout << "orthogonal::init_form_and_Gram_matrix before Poly->init" << endl;
552 }
553 Poly->init(F,
554 n /* nb_vars */, 2 /* degree */, FALSE /* f_init_incidence_structure */,
555 t_LEX,
556 verbose_level);
557 if (f_v) {
558 cout << "orthogonal::init_form_and_Gram_matrix after Poly->init" << endl;
559 }
562
565
566 if (epsilon == -1) {
568 form_c1, form_c2, form_c3, verbose_level);
569
571 the_monomial[n - 2] = 2;
574
576 the_monomial[n - 2] = 1;
577 the_monomial[n - 1] = 1;
580
582 the_monomial[n - 1] = 2;
585
586 }
587 else if (epsilon == 0) {
588
590 the_monomial[0] = 2;
593
594 }
595
596 int i, j, u;
597 int offset;
598
599 if (epsilon == 0) {
600 offset = 1;
601 }
602 else {
603 offset = 0;
604 }
605
606 for (i = 0; i < m; i++) {
607 j = 2 * i;
608 u = offset + j;
609
611 the_monomial[u] = 1;
612 the_monomial[u + 1] = 1;
615
616 // X_u * X_{u+1}
617 }
618
619 if (f_v) {
620 cout << "orthogonal::init_form_and_Gram_matrix the quadratic form is: ";
622 cout << endl;
623 }
624
625
626 if (f_v) {
627 cout << "orthogonal::init_form_and_Gram_matrix computing Gram matrix" << endl;
628 }
630 epsilon, n - 1,
632 verbose_level);
633 if (f_v) {
634 cout << "orthogonal::init_form_and_Gram_matrix "
635 "computing Gram matrix done" << endl;
636 }
637 if (f_v) {
638 cout << "orthogonal::init_form_and_Gram_matrix done" << endl;
639 }
640}
641
643{
644 int f_v = (verbose_level >= 1);
646
647 if (f_v) {
648 cout << "orthogonal::init_counting_functions" << endl;
649 }
650
651 T1_m = Gg.count_T1(epsilon, m, q);
652 if (f_v) {
653 cout << "T1_m(" << epsilon << ","
654 << m << "," << q << ") = " << T1_m << endl;
655 }
656 T1_mm1 = Gg.count_T1(epsilon, m - 1, q);
657 if (f_v) {
658 cout << "T1_mm1(" << epsilon << ","
659 << m - 1 << "," << q << ") = " << T1_mm1 << endl;
660 }
661 if (m > 1) {
662 T1_mm2 = Gg.count_T1(epsilon, m - 2, q);
663 if (f_v) {
664 cout << "T1_mm2(" << epsilon << ","
665 << m - 2 << "," << q << ") = " << T1_mm2 << endl;
666 }
667 }
668 else {
669 T1_mm2 = 0;
670 }
671 T2_m = Gg.count_T2(m, q);
672 T2_mm1 = Gg.count_T2(m - 1, q);
673 if (m > 1) {
674 T2_mm2 = Gg.count_T2(m - 2, q);
675 }
676 else {
677 T2_mm2 = 0;
678 }
679 N1_m = Gg.count_N1(m, q);
680 N1_mm1 = Gg.count_N1(m - 1, q);
681 if (m > 1) {
682 N1_mm2 = Gg.count_N1(m - 2, q);
683 }
684 else {
685 N1_mm2 = 0;
686 }
687 S_m = Gg.count_S(m, q);
688 S_mm1 = Gg.count_S(m - 1, q);
689 if (m > 1) {
690 S_mm2 = Gg.count_S(m - 2, q);
691 }
692 else {
693 S_mm2 = 0;
694 }
695 Sbar_m = Gg.count_Sbar(m, q);
696 Sbar_mm1 = Gg.count_Sbar(m - 1, q);
697 if (m > 1) {
698 Sbar_mm2 = Gg.count_Sbar(m - 2, q);
699 }
700 else {
701 Sbar_mm2 = 0;
702 }
703
704 if (f_v) {
705 cout << "T1(" << m << "," << q << ") = " << T1_m << endl;
706 if (m >= 1) {
707 cout << "T1(" << m - 1 << "," << q << ") = " << T1_mm1 << endl;
708 }
709 if (m >= 2) {
710 cout << "T1(" << m - 2 << "," << q << ") = " << T1_mm2 << endl;
711 }
712 cout << "T2(" << m << "," << q << ") = " << T2_m << endl;
713 if (m >= 1) {
714 cout << "T2(" << m - 1 << "," << q << ") = " << T2_mm1 << endl;
715 }
716 if (m >= 2) {
717 cout << "T2(" << m - 2 << "," << q << ") = " << T2_mm2 << endl;
718 }
719 cout << "nb_pts_N1(" << m << "," << q << ") = " << N1_m << endl;
720 if (m >= 1) {
721 cout << "nb_pts_N1(" << m - 1 << "," << q << ") = "
722 << N1_mm1 << endl;
723 }
724 if (m >= 2) {
725 cout << "nb_pts_N1(" << m - 2 << "," << q << ") = "
726 << N1_mm2 << endl;
727 }
728 cout << "S_m=" << S_m << endl;
729 cout << "S_mm1=" << S_mm1 << endl;
730 cout << "S_mm2=" << S_mm2 << endl;
731 cout << "Sbar_m=" << Sbar_m << endl;
732 cout << "Sbar_mm1=" << Sbar_mm1 << endl;
733 cout << "Sbar_mm2=" << Sbar_mm2 << endl;
734 cout << "N1_m=" << N1_m << endl;
735 cout << "N1_mm1=" << N1_mm1 << endl;
736 cout << "N1_mm2=" << N1_mm2 << endl;
737 }
738 if (f_v) {
739 cout << "orthogonal::init_counting_functions done" << endl;
740 }
741}
742
743void orthogonal::init_decomposition(int verbose_level)
744{
745 int f_v = (verbose_level >= 1);
747 int i;
748
749 if (f_v) {
750 cout << "orthogonal::init_decomposition" << endl;
751 }
752
753 if (epsilon == 1) {
754#if 1
755 long int u;
756
757 u = Gg.nb_pts_Qepsilon(epsilon, 2 * m - 1, q);
758 if (T1_m != u) {
759 cout << "T1_m != nb_pts_Qepsilon" << endl;
760 cout << "T1_m=" << T1_m << endl;
761 cout << "u=" << u << endl;
762 exit(1);
763 }
764#endif
765 if (f_v) {
766 cout << "orthogonal::init_decomposition before init_hyperbolic" << endl;
767 }
768 init_hyperbolic(verbose_level /*- 3*/);
769 if (f_v) {
770 cout << "orthogonal::init_decomposition after init_hyperbolic" << endl;
771 }
772 }
773 else if (epsilon == 0) {
774 if (f_v) {
775 cout << "orthogonal::init_decomposition before init_parabolic" << endl;
776 }
777 init_parabolic(verbose_level /*- 3*/);
778 if (f_v) {
779 cout << "orthogonal::init_decomposition after init_parabolic" << endl;
780 }
781 }
782 else if (epsilon == -1) {
783 nb_points = Gg.nb_pts_Qepsilon(epsilon, n - 1, q);
784 nb_lines = 0;
785 if (f_v) {
786 cout << "nb_points=" << nb_points << endl;
787 }
788 //cout << "elliptic type not yet implemented" << endl;
789 return;
790 //exit(1);
791 }
792 else {
793 cout << "orthogonal::init_decomposition epsilon = " << epsilon << " is illegal" << endl;
794 exit(1);
795 }
796
797 if (f_v) {
798 cout << "orthogonal::init_decomposition Point partition:" << endl;
799 for (i = 0; i < nb_point_classes; i++) {
800 cout << P[i] << endl;
801 }
802 cout << "orthogonal::init_decomposition Line partition:" << endl;
803 for (i = 0; i < nb_line_classes; i++) {
804 cout << L[i] << endl;
805 }
806 }
807 nb_points = 0;
808 for (i = 0; i < nb_point_classes; i++) {
809 nb_points += P[i];
810 }
811 nb_lines = 0;
812 for (i = 0; i < nb_line_classes; i++) {
813 nb_lines += L[i];
814 }
815 if (f_v) {
816 cout << "orthogonal::init_decomposition nb_points = " << nb_points << endl;
817 cout << "orthogonal::init_decomposition nb_lines = " << nb_lines << endl;
818 }
819 if (f_v) {
820 cout << "orthogonal::init_decomposition done" << endl;
821 }
822
823}
824void orthogonal::init_parabolic(int verbose_level)
825{
826 int f_v = (verbose_level >= 1);
827 int i, j;
829
830 //int a, b, c;
831
832 if (f_v) {
833 cout << "init_parabolic m=" << m << " q=" << q << endl;
834 }
835
837 nb_line_classes = 8;
840
845
846 for (i = 0; i < nb_point_classes * nb_line_classes; i++) {
847 A[i] = B[i] = 0;
848 }
849
850 if (f_even) {
851 init_parabolic_even(verbose_level);
852 }
853 else {
854 init_parabolic_odd(verbose_level);
855 }
856
857
858 P[0] = p1;
859 P[1] = p2;
860 P[2] = p3;
861 P[3] = p4;
862 P[4] = p5;
863 P[5] = p6;
864 P[6] = p7;
865 L[0] = l1;
866 L[1] = l2;
867 L[2] = l3;
868 L[3] = l4;
869 L[4] = l5;
870 L[5] = l6;
871 L[6] = l7;
872 L[7] = l8;
873
874 pt_P = Gg.count_T1(1, m - 1, q);
875 pt_Q = pt_P + Gg.count_S(m - 1, q);
876
877 for (j = 0; j < nb_line_classes; j++) {
878 if (L[j] == 0) {
879 for (i = 0; i < nb_point_classes; i++) {
880 B[i * nb_line_classes + j] = 0;
881 }
882 }
883 }
884 if (f_v) {
885 cout << "init_parabolic done" << endl;
886 }
887}
888
889void orthogonal::init_parabolic_even(int verbose_level)
890{
891 int f_v = (verbose_level >= 1);
893
894 if (f_v) {
895 cout << "init_parabolic_even" << endl;
896 }
897 if (m >= 2)
898 beta = Gg.count_T1(0, m - 2, q);
899 else
900 beta = 0;
901 if (m >= 1) {
902 alpha = Gg.count_T1(0, m - 1, q);
903 gamma = alpha * beta / (q + 1);
904 }
905 else {
906 alpha = 0;
907 gamma = 0;
908 }
909 delta = alpha - 1 - q * beta;
910 zeta = alpha - beta - 2 * (q - 1) * beta - q - 1;
911 //cout << "alpha = " << alpha << endl;
912 //cout << "beta = " << beta << endl;
913 //cout << "gamma = " << gamma << endl;
914 //cout << "delta = " << delta << endl;
915 //cout << "zeta = " << zeta << endl;
916
917 p1 = q - 1;
918 p2 = alpha * (q - 1) * (q - 1);
919 p3 = p4 = (q - 1) * alpha;
920 p5 = alpha;
921 p6 = p7 = 1;
922
923 l1 = alpha * (q - 1);
924 l2 = (q - 1) * (q - 1) * alpha * beta;
925 l3 = (q - 1) * alpha * delta;
926 l4 = l5 = alpha * beta * (q - 1);
927 l6 = gamma;
928 l7 = l8 = alpha;
929
930 a11 = alpha;
931 a21 = a36 = a47 = a56 = a57 = 1;
932 a22a = a33 = a44 = q * beta;
933 a22b = a32b = a42b = delta;
934 a51 = q - 1;
935 a52a = zeta;
936 a53 = a54 = (q - 1) * beta;
937 a55 = beta;
938 a66 = a77 = alpha;
939
940 b11 = b51 = b52a = b32b = b42b = b53 = b54 = b56 = b57 = b66 = b77 = 1;
941 b21 = b22b = b36 = b47 = q - 1;
942 b22a = b33 = b44 = q;
943 b55 = q + 1;
944
945
946 fill(A, 1, 1, a11);
947 fill(A, 2, 1, a21);
948 fill(A, 5, 1, a51);
949
950 fill(A, 2, 2, a22a);
951 fill(A, 5, 2, a52a);
952
953 fill(A, 2, 3, a22b);
954 fill(A, 3, 3, a32b);
955 fill(A, 4, 3, a42b);
956
957 fill(A, 3, 4, a33);
958 fill(A, 5, 4, a53);
959
960 fill(A, 4, 5, a44);
961 fill(A, 5, 5, a54);
962
963 fill(A, 5, 6, a55);
964
965 fill(A, 3, 7, a36);
966 fill(A, 5, 7, a56);
967 fill(A, 6, 7, a66);
968
969 fill(A, 4, 8, a47);
970 fill(A, 5, 8, a57);
971 fill(A, 7, 8, a77);
972
973 fill(B, 1, 1, b11);
974 fill(B, 2, 1, b21);
975 fill(B, 5, 1, b51);
976
977 fill(B, 2, 2, b22a);
978 fill(B, 5, 2, b52a);
979
980 fill(B, 2, 3, b22b);
981 fill(B, 3, 3, b32b);
982 fill(B, 4, 3, b42b);
983
984 fill(B, 3, 4, b33);
985 fill(B, 5, 4, b53);
986
987 fill(B, 4, 5, b44);
988 fill(B, 5, 5, b54);
989
990 fill(B, 5, 6, b55);
991
992 fill(B, 3, 7, b36);
993 fill(B, 5, 7, b56);
994 fill(B, 6, 7, b66);
995
996 fill(B, 4, 8, b47);
997 fill(B, 5, 8, b57);
998 fill(B, 7, 8, b77);
999 if (f_v) {
1000 cout << "init_parabolic_even done" << endl;
1001 }
1002}
1003
1004void orthogonal::init_parabolic_odd(int verbose_level)
1005{
1006 long int a, b, c, i, j;
1007 int f_v = (verbose_level >= 1);
1009
1010 if (f_v) {
1011 cout << "init_parabolic_odd" << endl;
1012 cout << "count_N1(" << m - 1 << "," << q << ")=";
1013 cout << Gg.count_N1(m - 1, q) << endl;
1014 cout << "count_S(" << m - 1 << "," << q << ")=";
1015 cout << Gg.count_S(m - 1, q) << endl;
1016 }
1017 a = Gg.count_N1(m - 1, q) * (q - 1) / 2;
1018 b = Gg.count_S(m - 1, q) * (q - 1);
1019 c = (((q - 1) / 2) - 1) * (q - 1) * Gg.count_N1(m - 1, q);
1020 p1 = a + b + c;
1021 p2 = a + ((q - 1) / 2) * (q - 1) * Gg.count_N1(m - 1, q);
1022 if (f_v) {
1023 cout << "a=" << a << endl;
1024 cout << "b=" << b << endl;
1025 cout << "c=" << c << endl;
1026 cout << "p1=" << p1 << endl;
1027 cout << "p2=" << p2 << endl;
1028 }
1029
1030 if (m >= 2)
1031 beta = Gg.count_T1(0, m - 2, q);
1032 else
1033 beta = 0;
1034 if (m >= 1) {
1035 alpha = Gg.count_T1(0, m - 1, q);
1036 gamma = alpha * beta / (q + 1);
1037 }
1038 else {
1039 alpha = 0;
1040 gamma = 0;
1041 }
1042 if (f_v) {
1043 cout << "alpha=" << alpha << endl;
1044 cout << "beta=" << beta << endl;
1045 cout << "gamma=" << gamma << endl;
1046 }
1047 p3 = p4 = (q - 1) * alpha;
1048 p5 = alpha;
1049 p6 = p7 = 1;
1050 if (f_v) {
1051 cout << "p3=" << p3 << endl;
1052 cout << "p5=" << p5 << endl;
1053 cout << "p6=" << p6 << endl;
1054 }
1055
1056 omega = (q - 1) * Gg.count_S(m - 2, q) +
1057 Gg.count_N1(m - 2, q) * (q - 1) / 2 +
1058 Gg.count_N1(m - 2, q) * ((q - 1) / 2 - 1) * (q - 1);
1059 if (f_v) {
1060 cout << "omega=" << omega << endl;
1061 }
1062 zeta = alpha - omega - 2 * (q - 1) * beta - beta - 2;
1063 if (f_v) {
1064 cout << "zeta=" << zeta << endl;
1065 }
1066
1067
1068 a66 = a77 = alpha;
1069 a56 = a57 = a36 = a47 = 1;
1070 a55 = beta;
1071 a53 = a54 = (q - 1) * beta;
1072 a33 = a44 = q * beta;
1073 a32b = a42b = alpha - 1 - q * beta;
1074 a51 = omega;
1075 a52a = zeta;
1076
1077 l1 = p5 * omega;
1078 l2 = p5 * zeta;
1079 l3 = (q - 1) * alpha * (alpha - 1 - q * beta);
1080 l4 = l5 = (q - 1) * alpha * beta;
1081 l6 = gamma;
1082 l7 = l8 = alpha;
1083
1084 if (f_v) {
1085 cout << "l1=" << l1 << endl;
1086 cout << "l2=" << l2 << endl;
1087 cout << "l3=" << l3 << endl;
1088 cout << "l4=" << l4 << endl;
1089 cout << "l5=" << l5 << endl;
1090 cout << "l6=" << l6 << endl;
1091 cout << "l7=" << l7 << endl;
1092 cout << "l8=" << l8 << endl;
1093 }
1094
1095 if (p1) {
1096 lambda = l1 * q / p1;
1097 }
1098 else {
1099 lambda = 0;
1100 }
1101 if (p2) {
1102 delta = l2 * q / p2;
1103 }
1104 else {
1105 delta = 0;
1106 }
1107 a11 = lambda;
1108 a22a = delta;
1109 a12b = alpha - lambda;
1110 a22b = alpha - delta;
1111 mu = alpha - lambda;
1112 nu = alpha - delta;
1113 a12b = mu;
1114 a22b = nu;
1115
1116 b51 = b52a = b32b = b42b = b53 = b54 = b56 = b57 = b66 = b77 = 1;
1117 b11 = b22a = b33 = b44 = q;
1118 b55 = q + 1;
1119 b36 = b47 = q - 1;
1120 if (l3) {
1121 b12b = p1 * mu / l3;
1122 b22b = p2 * nu / l3;
1123 }
1124 else {
1125 b12b = 0;
1126 b22b = 0;
1127 }
1128
1129
1130 fill(A, 1, 1, a11);
1131 fill(A, 5, 1, a51);
1132
1133 fill(A, 2, 2, a22a);
1134 fill(A, 5, 2, a52a);
1135
1136 fill(A, 1, 3, a12b);
1137 fill(A, 2, 3, a22b);
1138 fill(A, 3, 3, a32b);
1139 fill(A, 4, 3, a42b);
1140
1141 fill(A, 3, 4, a33);
1142 fill(A, 5, 4, a53);
1143
1144 fill(A, 4, 5, a44);
1145 fill(A, 5, 5, a54);
1146
1147 fill(A, 5, 6, a55);
1148
1149 fill(A, 3, 7, a36);
1150 fill(A, 5, 7, a56);
1151 fill(A, 6, 7, a66);
1152
1153 fill(A, 4, 8, a47);
1154 fill(A, 5, 8, a57);
1155 fill(A, 7, 8, a77);
1156
1157 fill(B, 1, 1, b11);
1158 fill(B, 5, 1, b51);
1159
1160 fill(B, 2, 2, b22a);
1161 fill(B, 5, 2, b52a);
1162
1163 fill(B, 1, 3, b12b);
1164 fill(B, 2, 3, b22b);
1165 fill(B, 3, 3, b32b);
1166 fill(B, 4, 3, b42b);
1167
1168 fill(B, 3, 4, b33);
1169 fill(B, 5, 4, b53);
1170
1171 fill(B, 4, 5, b44);
1172 fill(B, 5, 5, b54);
1173
1174 fill(B, 5, 6, b55);
1175
1176 fill(B, 3, 7, b36);
1177 fill(B, 5, 7, b56);
1178 fill(B, 6, 7, b66);
1179
1180 fill(B, 4, 8, b47);
1181 fill(B, 5, 8, b57);
1182 fill(B, 7, 8, b77);
1183
1184 minus_squares = NEW_int((q-1)/2);
1185 minus_squares_without = NEW_int((q-1)/2 - 1);
1186 minus_nonsquares = NEW_int((q-1)/2);
1191 a = b = c = 0;
1192 if (f_v) {
1193 cout << "computing minus_squares:" << endl;
1194 }
1195 for (i = 0; i < q; i++) {
1196 index_minus_square[i] = -1;
1198 index_minus_nonsquare[i] = -1;
1200 }
1201 for (i = 0; i < q - 1; i++) {
1202 j = F->alpha_power(i);
1203 if (is_minus_square(i)) {
1204 if (f_v) {
1205 cout << "i=" << i << " j=" << j
1206 << " is minus a square" << endl;
1207 }
1209 minus_squares[a] = j;
1210 index_minus_square[j] = a;
1211 if (j != F->negate(1)) {
1212 minus_squares_without[b] = j;
1214 b++;
1215 }
1216 a++;
1217 }
1218 else {
1219 minus_nonsquares[c] = j;
1220 index_minus_nonsquare[j] = c;
1221 c++;
1222 }
1223 }
1224 if (f_v) {
1225 cout << "minus_squares:" << endl;
1226 for (i = 0; i < a; i++) {
1227 cout << i << " : " << minus_squares[i] << endl;
1228 }
1229 cout << "minus_squares_without:" << endl;
1230 for (i = 0; i < b; i++) {
1231 cout << i << " : " << minus_squares_without[i] << endl;
1232 }
1233 cout << "minus_nonsquares:" << endl;
1234 for (i = 0; i < c; i++) {
1235 cout << i << " : " << minus_nonsquares[i] << endl;
1236 }
1238 }
1239 if (f_v) {
1240 cout << "init_parabolic_odd done" << endl;
1241 }
1242}
1243
1244
1245void orthogonal::init_hyperbolic(int verbose_level)
1246{
1247 int f_v = (verbose_level >= 1);
1248 int i;
1250
1251 if (f_v) {
1252 cout << "orthogonal::init_hyperbolic" << endl;
1253 }
1254
1255 nb_point_classes = 6;
1256 nb_line_classes = 7;
1259
1260 p5 = p6 = 1;
1261 p4 = T1_mm1;
1262 p2 = p3 = (q - 1) * T1_mm1;
1263 p1 = NT.i_power_j_lint(q, 2 * m - 2) - 1 - p2;
1264 l6 = l7 = T1_mm1;
1265 l5 = T2_mm1;
1266 l3 = l4 = (q - 1) * T1_mm2 * T1_mm1;
1267
1268 alpha = T1_mm1;
1269 beta = T1_mm2;
1270 gamma = alpha * beta / (q + 1);
1271
1272 a47 = a46 = a37 = a26 = 1;
1273 b67 = b56 = b47 = b46 = b44 = b43 = b41 = b32 = b22 = 1;
1274 b45 = q + 1;
1275 b37 = b26 = b12 = q - 1;
1276 b34 = b23 = b11 = q;
1277 a67 = a56 = T1_mm1;
1278 a45 = T1_mm2;
1279 a44 = a43 = T1_mm2 * (q - 1);
1280
1281 a41 = (q - 1) * N1_mm2;
1282
1283 a34 = q * T1_mm2;
1284 a23 = q * T1_mm2;
1285 a32 = a22 = T1_mm1 - 1 - a23;
1286
1287 l2 = p2 * a22;
1288 if (p1 == 0) {
1289 //cout << "orthogonal::init_hyperbolic p1 == 0" << endl;
1290 a12 = 0;
1291 }
1292 else {
1293 //a12 = l2 * (q - 1) / p1;
1294 a12 = NT.number_theory_domain::ab_over_c(l2, q - 1, p1);
1295 }
1296 a11 = T1_mm1 - a12;
1297
1298
1299
1300 //l1 = a11 * p1 / q;
1301
1302 l1 = NT.number_theory_domain::ab_over_c(a11, p1, q);
1303 if (f_v) {
1304 cout << "orthogonal::init_hyperbolic a11 = " << a11 << endl;
1305 cout << "orthogonal::init_hyperbolic p1 = " << p1 << endl;
1306 cout << "orthogonal::init_hyperbolic l1 = " << l1 << endl;
1307 }
1308
1309
1310#if 0
1311 if (l1 * q != a11 * p1) {
1312 cout << "orthogonal::init_hyperbolic l1 * q != a11 * p1, overflow" << endl;
1313 exit(1);
1314 }
1315#endif
1316
1317 //a41 = l1 / T1_mm1;
1318
1319
1320 A = NEW_lint(6 * 7);
1321 B = NEW_lint(6 * 7);
1322 P = NEW_lint(6);
1323 L = NEW_lint(7);
1324
1325 for (i = 0; i < 6 * 7; i++) {
1326 A[i] = B[i] = 0;
1327 }
1328 P[0] = p1;
1329 P[1] = p2;
1330 P[2] = p3;
1331 P[3] = p4;
1332 P[4] = p5;
1333 P[5] = p6;
1334 L[0] = l1;
1335 L[1] = l2;
1336 L[2] = l3;
1337 L[3] = l4;
1338 L[4] = l5;
1339 L[5] = l6;
1340 L[6] = l7;
1341 fill(A, 1, 1, a11);
1342 fill(A, 1, 2, a12);
1343 fill(A, 2, 2, a22);
1344 fill(A, 2, 3, a23);
1345 fill(A, 2, 6, a26);
1346 fill(A, 3, 2, a32);
1347 fill(A, 3, 4, a34);
1348 fill(A, 3, 7, a37);
1349 fill(A, 4, 1, a41);
1350 fill(A, 4, 3, a43);
1351 fill(A, 4, 4, a44);
1352 fill(A, 4, 5, a45);
1353 fill(A, 4, 6, a46);
1354 fill(A, 4, 7, a47);
1355 fill(A, 5, 6, a56);
1356 fill(A, 6, 7, a67);
1357
1358 fill(B, 1, 1, b11);
1359 fill(B, 1, 2, b12);
1360 fill(B, 2, 2, b22);
1361 fill(B, 2, 3, b23);
1362 fill(B, 2, 6, b26);
1363 fill(B, 3, 2, b32);
1364 fill(B, 3, 4, b34);
1365 fill(B, 3, 7, b37);
1366 fill(B, 4, 1, b41);
1367 fill(B, 4, 3, b43);
1368 fill(B, 4, 4, b44);
1369 fill(B, 4, 5, b45);
1370 fill(B, 4, 6, b46);
1371 fill(B, 4, 7, b47);
1372 fill(B, 5, 6, b56);
1373 fill(B, 6, 7, b67);
1374
1375 pt_P = p4;
1376 pt_Q = p4 + 1 + p3;
1377
1378 if (f_v) {
1379 cout << "orthogonal::init_hyperbolic done" << endl;
1380 }
1381}
1382
1383void orthogonal::fill(long int *M, int i, int j, long int a)
1384{
1385 M[(i - 1) * nb_line_classes + j - 1] = a;
1386}
1387
1388
1389// #############################################################################
1390//
1391// #############################################################################
1392
1393
1395{
1396 if (epsilon == 1) {
1397 return evaluate_hyperbolic_quadratic_form(v, stride, m);
1398 }
1399 else if (epsilon == 0) {
1400 int a, b, c;
1401
1402 a = evaluate_hyperbolic_quadratic_form(v + stride, stride, m);
1403 //if (f_even)
1404 //return a;
1405 b = F->mult(v[0], v[0]);
1406 c = F->add(a, b);
1407 return c;
1408 }
1409 else if (epsilon == -1) {
1410 int a, x1, x2, b, c, d;
1411
1412 a = evaluate_hyperbolic_quadratic_form(v, stride, m);
1413 x1 = v[2 * m * stride];
1414 x2 = v[(2 * m + 1) * stride];
1415 b = F->mult(x1, x1);
1416 b = F->mult(form_c1, b);
1417 c = F->mult(x1, x2);
1418 c = F->mult(form_c2, c);
1419 d = F->mult(x2, x2);
1420 d = F->mult(form_c3, d);
1421 a = F->add(a, b);
1422 c = F->add(a, c);
1423 c = F->add(d, c);
1424 return c;
1425 }
1426 else {
1427 cout << "evaluate_quadratic_form epsilon = " << epsilon << endl;
1428 exit(1);
1429 }
1430}
1431
1432int orthogonal::evaluate_bilinear_form(int *u, int *v, int stride)
1433{
1434 if (epsilon == 1) {
1435 return evaluate_hyperbolic_bilinear_form(u, v, stride, m);
1436 }
1437 else if (epsilon == 0) {
1438 return evaluate_parabolic_bilinear_form(u, v, stride, m);
1439 }
1440 else if (epsilon == -1) {
1442 u, v, n, Gram_matrix);
1443 }
1444 else {
1445 cout << "evaluate_bilinear_form epsilon = " << epsilon << endl;
1446 exit(1);
1447 }
1448}
1449
1451{
1452 unrank_point(v1, 1, i, 0);
1453 unrank_point(v2, 1, j, 0);
1454 return evaluate_bilinear_form(v1, v2, 1);
1455}
1456
1458 long int line_rk, long int *line, int verbose_level)
1459{
1460 long int p1, p2;
1461
1462 unrank_line(p1, p2, line_rk, verbose_level);
1463 points_on_line(p1, p2, line, verbose_level);
1464}
1465
1466void orthogonal::points_on_line(long int pi, long int pj,
1467 long int *line, int verbose_level)
1468{
1469 int f_v = (verbose_level >= 1);
1470 int f_vv = FALSE; //(verbose_level >= 2);
1471 int *v1, *v2, *v3;
1472 int coeff[2], t, i, a, b;
1473
1474 if (f_v) {
1475 cout << "orthogonal::points_on_line" << endl;
1476 }
1480 unrank_point(v1, 1, pi, verbose_level - 1);
1481 unrank_point(v2, 1, pj, verbose_level - 1);
1482 if (f_vv) {
1483 cout << "orthogonal::points_on_line" << endl;
1484 cout << "v1=";
1485 Int_vec_print(cout, v1, n);
1486 cout << endl;
1487 cout << "v2=";
1488 Int_vec_print(cout, v2, n);
1489 cout << endl;
1490 }
1491 for (t = 0; t <= q; t++) {
1492 F->PG_element_unrank_modified(coeff, 1, 2, t);
1493 for (i = 0; i < n; i++) {
1494 a = F->mult(coeff[0], v1[i]);
1495 b = F->mult(coeff[1], v2[i]);
1496 v3[i] = F->add(a, b);
1497 }
1498 if (f_vv) {
1499 cout << "orthogonal::points_on_line t=" << t << " ";
1500 Int_vec_print(cout, coeff, 2);
1501 cout << " v3=";
1502 Int_vec_print(cout, v3, n);
1503 cout << endl;
1504 }
1505 normalize_point(v3, 1);
1506 if (f_vv) {
1507 cout << "orthogonal::points_on_line normalized:";
1508 Int_vec_print(cout, v3, n);
1509 cout << endl;
1510 }
1511 line[t] = rank_point(v3, 1, verbose_level - 1);
1512 if (f_vv) {
1513 cout << "orthogonal::points_on_line=" << line[t] << endl;
1514 }
1515 }
1516 if (f_v) {
1517 cout << "orthogonal::points_on_line done" << endl;
1518 }
1519}
1520
1522 long int pi, long int pj, int *pt_coords, int verbose_level)
1523{
1524 int f_v = (verbose_level >= 1);
1525 int f_vv = (verbose_level >= 2);
1526 int *v1, *v2, *v3;
1527 int coeff[2], t, i, a, b;
1528
1529 if (f_v) {
1530 cout << "orthogonal::points_on_line_by_coordinates" << endl;
1531 }
1535 unrank_point(v1, 1, pi, verbose_level - 1);
1536 unrank_point(v2, 1, pj, verbose_level - 1);
1537 if (f_vv) {
1538 cout << "orthogonal::points_on_line_by_coordinates" << endl;
1539 cout << "v1=";
1540 Int_vec_print(cout, v1, n);
1541 cout << endl;
1542 cout << "v2=";
1543 Int_vec_print(cout, v2, n);
1544 cout << endl;
1545 }
1546 for (t = 0; t <= q; t++) {
1547 F->PG_element_unrank_modified(coeff, 1, 2, t);
1548 for (i = 0; i < n; i++) {
1549 a = F->mult(coeff[0], v1[i]);
1550 b = F->mult(coeff[1], v2[i]);
1551 v3[i] = F->add(a, b);
1552 }
1553 if (f_vv) {
1554 cout << "orthogonal::points_on_line_by_coordinates v3=";
1555 Int_vec_print(cout, v3, n);
1556 cout << endl;
1557 }
1558 normalize_point(v3, 1);
1559 for (i = 0; i < n; i++) {
1560 pt_coords[t * n + i] = v3[i];
1561 }
1562 }
1563 if (f_v) {
1564 cout << "orthogonal::points_on_line_by_coordinates done" << endl;
1565 }
1566}
1567
1569 long int *line_pencil_point_ranks, int verbose_level)
1570{
1571 int f_v = (verbose_level >= 1);
1572 int f_vv = FALSE; //(verbose_level >= 2);
1573 long int t, i, rk, rk1, root1, root2;
1574
1575 if (f_v) {
1576 cout << "orthogonal::lines_on_point pt=" << pt << endl;
1577 }
1579 for (i = 0; i < alpha; i++) {
1580 rk = type_and_index_to_point_rk(t, i, 0);
1582 1, rk, verbose_level - 3);
1583 }
1584 if (pt != pt_P) {
1585 root1 = find_root(pt_P, verbose_level - 3);
1586 rk1 = type_and_index_to_point_rk(t, 0, verbose_level - 3);
1587 Siegel_Transformation(T1, pt_P, rk1, root1, verbose_level - 3);
1588 if (pt != 0) {
1589 root2 = find_root(pt, verbose_level);
1590 Siegel_Transformation(T2, rk1, pt, root2, verbose_level - 3);
1592 0 /* verbose_level */);
1593 }
1594 else {
1596 }
1599 0 /* verbose_level */);
1600 }
1601 else {
1603 }
1604 for (i = 0; i < alpha; i++) {
1605 line_pencil_point_ranks[i] = rank_point(
1606 lines_on_point_coords2 + i * n, 1, verbose_level - 3);
1607 }
1608 if (f_vv) {
1609 cout << "orthogonal::lines_on_point line pencil (point ranks) "
1610 "on point " << pt << " : ";
1611 Lint_vec_print(cout, line_pencil_point_ranks, alpha);
1612 cout << endl;
1613 }
1614 if (f_v) {
1615 cout << "orthogonal::lines_on_point done" << endl;
1616 }
1617}
1618
1620 int *line_pencil_line_ranks, int verbose_level)
1621{
1622 int f_v = (verbose_level >= 1);
1623 long int *line_pencil_line_ranks_lint;
1624 int i;
1625
1626 if (f_v) {
1627 cout << "orthogonal::lines_on_point_by_line_rank_must_fit_into_int" << endl;
1628 }
1629 line_pencil_line_ranks_lint = NEW_lint(alpha);
1631 line_pencil_line_ranks_lint, verbose_level - 3);
1632 for (i = 0; i < alpha; i++) {
1633 line_pencil_line_ranks[i] = line_pencil_line_ranks_lint[i];
1634 if (line_pencil_line_ranks[i] != line_pencil_line_ranks_lint[i]) {
1635 cout << "orthogonal::lines_on_point_by_line_rank_must_fit_into_int "
1636 "line rank does not fit into int" << endl;
1637 exit(1);
1638 }
1639 }
1640 FREE_lint(line_pencil_line_ranks_lint);
1641 if (f_v) {
1642 cout << "orthogonal::lines_on_point_by_line_rank_must_fit_into_int done" << endl;
1643 }
1644}
1645
1647 long int *line_pencil_line_ranks, int verbose_level)
1648{
1649 int f_v = (verbose_level >= 1);
1650 int f_vv = (verbose_level >= 2);
1651 int t, i;
1652 long int rk, rk1, root1, root2, pt2;
1654
1655 if (f_v) {
1656 cout << "orthogonal::lines_on_point_by_line_rank verbose_level = " << verbose_level << " pt=" << pt << " pt_P=" << pt_P << endl;
1657 }
1659 if (f_vv) {
1660 cout << "orthogonal::lines_on_point_by_line_rank subspace_point_type=" << subspace_point_type << endl;
1661 }
1662 for (i = 0; i < alpha; i++) {
1663 if (f_vv) {
1664 cout << "orthogonal::lines_on_point_by_line_rank "
1665 "i=" << i << " / " << alpha << endl;
1666 }
1667 rk = type_and_index_to_point_rk(t, i, verbose_level - 3);
1668 if (f_vv) {
1669 cout << "orthogonal::lines_on_point_by_line_rank "
1670 "i=" << i << " / " << alpha << " rk=" << rk << endl;
1671 }
1672 unrank_point(lines_on_point_coords1 + i * n, 1, rk, 0 /*verbose_level - 5*/);
1673 if (f_vv) {
1674 cout << "orthogonal::lines_on_point_by_line_rank "
1675 "i=" << i << " / " << alpha << " has coordinates: ";
1677 cout << endl;
1678 }
1679 }
1680 if (pt != pt_P) {
1681 if (f_v) {
1682 cout << "orthogonal::lines_on_point_by_line_rank "
1683 "pt != pt_P, so applying transformation" << endl;
1684 }
1685 rk1 = type_and_index_to_point_rk(t, 0, verbose_level);
1686 if (pt == rk1) {
1687 root1 = find_root(pt_P, verbose_level - 2);
1688 Siegel_Transformation(T3, pt_P, rk1, root1, verbose_level - 2);
1689 }
1690 else {
1691 root1 = find_root(pt_P, verbose_level - 2);
1692 root2 = find_root(pt, verbose_level - 2);
1693 Siegel_Transformation(T1, pt_P, rk1, root1, verbose_level - 2);
1694 Siegel_Transformation(T2, rk1, pt, root2, verbose_level - 2);
1696 0 /* verbose_level */);
1697 }
1698 if (f_v) {
1699 cout << "orthogonal::lines_on_point_by_line_rank applying:" << endl;
1701 }
1704 0 /* verbose_level */);
1705 }
1706 else {
1707 if (f_v) {
1708 cout << "orthogonal::lines_on_point_by_line_rank pt == pt_P, "
1709 "no need to apply transformation" << endl;
1710 }
1712 }
1713 if (f_v) {
1714 cout << "orthogonal::lines_on_point_by_line_rank "
1715 "computing line_pencil_line_ranks[]" << endl;
1716 }
1717 for (i = 0; i < alpha; i++) {
1718 pt2 = rank_point(lines_on_point_coords2 + i * n, 1, 0/*verbose_level - 5*/);
1719 if (f_v) {
1720 cout << "orthogonal::lines_on_point_by_line_rank "
1721 "i=" << i << " / " << alpha << " pt=" << pt << " pt2=" << pt2 << endl;
1722 cout << "orthogonal::lines_on_point_by_line_rank "
1723 "before rank_line" << endl;
1724 }
1725 line_pencil_line_ranks[i] = rank_line(pt, pt2, verbose_level);
1726 if (f_v) {
1727 cout << "orthogonal::lines_on_point_by_line_rank "
1728 "after rank_line" << endl;
1729 cout << "orthogonal::lines_on_point_by_line_rank "
1730 "i=" << i << " / " << alpha << " line_pencil_line_ranks[i]=" << line_pencil_line_ranks[i] << endl;
1731 }
1732 }
1733 Sorting.lint_vec_quicksort_increasingly(line_pencil_line_ranks, alpha);
1734 if (f_vv) {
1735 cout << "line pencil on point " << pt << " by line rank : ";
1736 Lint_vec_print(cout, line_pencil_line_ranks, alpha);
1737 cout << endl;
1738 }
1739 if (f_v) {
1740 cout << "orthogonal::lines_on_point_by_line_rank done" << endl;
1741 }
1742}
1743
1745 data_structures::partitionstack &S, int verbose_level)
1746{
1747 int f_v = (verbose_level >= 1);
1748 int f_vv = FALSE; //(verbose_level >= 2);
1749 int i, j, l, a, f;
1750
1751 if (f_v) {
1752 cout << "orthogonal::make_initial_partition" << endl;
1753 }
1754 S.allocate(nb_points + nb_lines, 0 /* verbose_level */);
1755
1756 // split off the column class:
1758 S.split_cell(FALSE);
1759
1760 for (i = nb_point_classes; i >= 2; i--) {
1761 l = P[i - 1];
1762 if (l == 0)
1763 continue;
1764 if (f_vv) {
1765 cout << "orthogonal::make_initial_partition "
1766 "splitting off point class " << i
1767 << " of size " << l << endl;
1768 }
1769 for (j = 0; j < l; j++) {
1770 a = type_and_index_to_point_rk(i, j, verbose_level - 2);
1771 //if (f_v) {cout << "j=" << j << " a=" << a << endl;}
1772 S.subset[j] = a;
1773 }
1774 S.subset_size = l;
1775 S.split_cell(FALSE);
1776 }
1777 for (i = nb_line_classes; i >= 2; i--) {
1778 f = nb_points;
1779 for (j = 1; j < i; j++)
1780 f += L[j - 1];
1781 l = L[i - 1];
1782 if (l == 0)
1783 continue;
1784 if (f_vv) {
1785 cout << "orthogonal::make_initial_partition "
1786 "splitting off line class " << i
1787 << " of size " << l << endl;
1788 }
1789 for (j = 0; j < l; j++) {
1790 S.subset[j] = f + j;
1791 }
1792 S.subset_size = l;
1793 S.split_cell(FALSE);
1794 f += l;
1795 }
1796 if (f_vv) {
1797 cout << "the initial partition of points and lines is:" << endl;
1798 S.print(cout);
1799 cout << endl;
1800 }
1801 if (f_v) {
1802 cout << "orthogonal::make_initial_partition done" << endl;
1803 }
1804}
1805
1807 long int *point_ranks, int *&line_vector, int verbose_level)
1808// this function is assuming that there are very few lines!
1809{
1810 int i, j, h;
1811 long int *line_pencil_line_ranks;
1812
1813 line_pencil_line_ranks = NEW_lint(alpha);
1814
1815 line_vector = NEW_int(nb_lines);
1816 Int_vec_zero(line_vector, nb_lines);
1817
1818 for (i = 0; i < size; i++) {
1820 point_ranks[i], line_pencil_line_ranks, verbose_level - 2);
1821
1822 for (h = 0; h < alpha; h++) {
1823 j = line_pencil_line_ranks[h];
1824 line_vector[j]++;
1825 }
1826 }
1827 FREE_lint(line_pencil_line_ranks);
1828}
1829
1830
1831int orthogonal::test_if_minimal_on_line(int *v1, int *v2, int *v3)
1832{
1833 int verbose_level = 0;
1834 int i, t, rk, rk0;
1835
1836 //cout << "testing point : ";
1837 //int_vec_print(cout, v1, n);
1838 //cout << " : ";
1839 //int_vec_print(cout, v2, n);
1840 //cout << endl;
1841 rk0 = rank_point(v1, 1, verbose_level - 1);
1842 for (t = 1; t < q; t++) {
1843 for (i = 0; i < n; i++) {
1844 //cout << "i=" << i << ":" << v1[i] << " + "
1845 //<< t << " * " << v2[i] << "=";
1846 v3[i] = F->add(v1[i], F->mult(t, v2[i]));
1847 //cout << v3[i] << endl;
1848 }
1849 //cout << "t=" << t << " : ";
1850 //int_vec_print(cout, v3, n);
1851 //cout << endl;
1852
1853 rk = rank_point(v3, 1, verbose_level - 1);
1854 if (rk < rk0) {
1855 return FALSE;
1856 }
1857 }
1858 return TRUE;
1859}
1860
1861void orthogonal::find_minimal_point_on_line(int *v1, int *v2, int *v3)
1862{
1863 int verbose_level = 0;
1864 int i, t, rk, rk0, t0;
1865
1866 //cout << "testing point : ";
1867 //int_vec_print(cout, v1, n);
1868 //cout << " : ";
1869 //int_vec_print(cout, v2, n);
1870 //cout << endl;
1871 rk0 = rank_point(v1, 1, verbose_level - 1);
1872 t0 = 0;
1873 for (t = 1; t < q; t++) {
1874 for (i = 0; i < n; i++) {
1875 //cout << "i=" << i << ":" << v1[i]
1876 //<< " + " << t << " * " << v2[i] << "=";
1877 v3[i] = F->add(v1[i], F->mult(t, v2[i]));
1878 //cout << v3[i] << endl;
1879 }
1880 //cout << "t=" << t << " : ";
1881 //int_vec_print(cout, v3, n);
1882 //cout << endl;
1883
1884 rk = rank_point(v3, 1, verbose_level - 1);
1885 if (rk < rk0) {
1886 t0 = t;
1887 }
1888 }
1889 for (i = 0; i < n; i++) {
1890 //cout << "i=" << i << ":" << v1[i] << " + "
1891 //<< t << " * " << v2[i] << "=";
1892 v3[i] = F->add(v1[i], F->mult(t0, v2[i]));
1893 //cout << v3[i] << endl;
1894 }
1895}
1896
1897void orthogonal::zero_vector(int *u, int stride, int len)
1898{
1899 int i;
1900
1901 for (i = 0; i < len; i++) {
1902 u[stride * i] = 0;
1903 }
1904}
1905
1906int orthogonal::is_zero_vector(int *u, int stride, int len)
1907{
1908 int i;
1909
1910 for (i = 0; i < len; i++) {
1911 if (u[stride * i]) {
1912 return FALSE;
1913 }
1914 }
1915 return TRUE;
1916}
1917
1918void orthogonal::change_form_value(int *u, int stride, int m, int multiplier)
1919{
1920 int i;
1921
1922 for (i = 0; i < m; i++) {
1923 u[stride * 2 * i] = F->mult(multiplier, u[stride * 2 * i]);
1924 }
1925}
1926
1927void orthogonal::scalar_multiply_vector(int *u, int stride, int len, int multiplier)
1928{
1929 int i;
1930
1931 for (i = 0; i < len; i++) {
1932 u[stride * i] = F->mult(multiplier, u[stride * i]);
1933 }
1934}
1935
1936int orthogonal::last_non_zero_entry(int *u, int stride, int len)
1937{
1938 int i;
1939
1940 for (i = len - 1; i >= 0; i--) {
1941 if (u[stride * i]) {
1942 return u[stride * i];
1943 }
1944 }
1945 cout << "orthogonal::last_non_zero_entry error: the vector "
1946 "is the zero vector" << endl;
1947 exit(1);
1948}
1949
1950void orthogonal::normalize_point(int *v, int stride)
1951{
1952 if (epsilon == 1) {
1953 F->PG_element_normalize(v, stride, n);
1954 }
1955 else if (epsilon == 0) {
1956 parabolic_point_normalize(v, stride, n);
1957 }
1958}
1959
1960
1961int orthogonal::is_ending_dependent(int *vec1, int *vec2)
1962{
1963 int i;
1964
1965 for (i = n - 2; i < n; i++) {
1966 if (vec2[i]) {
1967 Gauss_step(vec1, vec2, n, i);
1968 if (vec2[n - 2] == 0 && vec2[n - 1] == 0) {
1969 return TRUE;
1970 }
1971 else {
1972 return FALSE;
1973 }
1974 }
1975 }
1976 //now vec2 is zero;
1977 return TRUE;
1978}
1979
1980void orthogonal::Gauss_step(int *v1, int *v2, int len, int idx)
1981// afterwards: v2[idx] = 0 and v1,v2 span the same space as before
1982{
1983 int i, a;
1984
1985 if (v2[idx] == 0) {
1986 return;
1987 }
1988 if (v1[idx] == 0) {
1989 for (i = 0; i < len; i++) {
1990 a = v2[i];
1991 v2[i] = v1[i];
1992 v1[i] = a;
1993 }
1994 return;
1995 }
1996 a = F->negate(F->mult(F->inverse(v1[idx]), v2[idx]));
1997 //cout << "Gauss_step a=" << a << endl;
1998 for (i = 0; i < len; i++) {
1999 v2[i] = F->add(F->mult(v1[i], a), v2[i]);
2000 }
2001}
2002
2003void orthogonal::perp(long int pt,
2004 long int *Perp_without_pt, int &sz, int verbose_level)
2005{
2006 int f_v = (verbose_level >= 1);
2007 //int f_vv = (verbose_level >= 2);
2008 int i, j;
2010
2011 if (f_v) {
2012 cout << "orthogonal::perp verbose_level=" << verbose_level << " pt=" << pt << endl;
2013 }
2014
2015 if (f_v) {
2016 cout << "orthogonal::perp before lines_on_point_by_line_rank" << endl;
2017 }
2018 lines_on_point_by_line_rank(pt, line_pencil, verbose_level - 3);
2019 if (f_v) {
2020 cout << "orthogonal::perp after lines_on_point_by_line_rank" << endl;
2021 }
2022 if (FALSE) {
2023 cout << "orthogonal::perp line_pencil=";
2024 for (i = 0; i < alpha; i++) {
2025 cout << i << " : " << line_pencil[i] << endl;
2026 }
2027 Lint_matrix_print(line_pencil, (alpha + 9)/ 10, 10);
2028 //int_vec_print(cout, line_pencil, alpha);
2029 //cout << endl;
2030 }
2031
2032 if (f_v) {
2033 cout << "orthogonal::perp before points_on_line_by_line_rank" << endl;
2034 }
2035 for (i = 0; i < alpha; i++) {
2037 Perp1 + i * (q + 1), 0 /* verbose_level */);
2038 }
2039
2040 if (FALSE) {
2041 cout << "orthogonal::perp points collinear "
2042 "with pt " << pt << ":" << endl;
2043 for (i = 0; i < alpha; i++) {
2044 for (j = 0; j < q + 1; j++) {
2045 cout << i << " : " << line_pencil[i] << " : " << j
2046 << " : " << Perp1[i * (q + 1) + j] << endl;
2047 }
2048 }
2050 }
2051
2052 Sorting.lint_vec_heapsort(Perp1, alpha * (q + 1));
2053 if (FALSE) {
2054 cout << "orthogonal::perp after sorting:" << endl;
2055 Lint_vec_print(cout, Perp1, alpha * (q + 1));
2056 cout << endl;
2057 }
2058
2059 j = 0;
2060 for (i = 0; i < alpha * (q + 1); i++) {
2061 if (Perp1[i] != pt) {
2062 Perp1[j++] = Perp1[i];
2063 }
2064 }
2065 sz = j;
2066 Sorting.lint_vec_heapsort(Perp1, sz);
2067 if (FALSE) {
2068 cout << "orthogonal::perp after removing "
2069 "pt and sorting:" << endl;
2070 Lint_vec_print(cout, Perp1, sz);
2071 cout << endl;
2072 cout << "sz=" << sz << endl;
2073 }
2074 Lint_vec_copy(Perp1, Perp_without_pt, sz);
2075
2076 if (f_v) {
2077 cout << "orthogonal::perp done" << endl;
2078 }
2079}
2080
2081void orthogonal::perp_of_two_points(long int pt1, long int pt2,
2082 long int *Perp, int &sz, int verbose_level)
2083{
2084 int f_v = (verbose_level >= 1);
2085 long int *Perp1;
2086 long int *Perp2;
2087 long int *Perp3;
2088 int sz1, sz2;
2090
2091 if (f_v) {
2092 cout << "orthogonal::perp_of_two_points "
2093 "pt1=" << pt1 << " pt2=" << pt2 << endl;
2094 }
2095
2096 Perp1 = NEW_lint(alpha * (q + 1));
2097 Perp2 = NEW_lint(alpha * (q + 1));
2098 perp(pt1, Perp1, sz1, 0 /*verbose_level*/);
2099 perp(pt2, Perp2, sz2, 0 /*verbose_level*/);
2100 Sorting.vec_intersect(Perp1, sz1, Perp2, sz2, Perp3, sz);
2101 Lint_vec_copy(Perp3, Perp, sz);
2103 FREE_lint(Perp2);
2104 FREE_lint(Perp3);
2105
2106 if (f_v) {
2107 cout << "orthogonal::perp_of_two_points done" << endl;
2108 }
2109}
2110
2111void orthogonal::perp_of_k_points(long int *pts, int nb_pts,
2112 long int *&Perp, int &sz, int verbose_level)
2113{
2114 int f_v = (verbose_level >= 1);
2115 int f_vv = (verbose_level >= 2);
2116 int i;
2117
2118 if (f_v) {
2119 cout << "orthogonal::perp_of_k_points verbose_level = " << verbose_level << " nb_pts=" << nb_pts << endl;
2120 }
2121 if (f_vv) {
2122 cout << "pts=";
2123 Lint_vec_print(cout, pts, nb_pts);
2124 cout << endl;
2125 for (i = 0; i < nb_pts; i++) {
2126 unrank_point(v1, 1, pts[i], 0 /* verbose_level*/);
2127 cout << i << " : " << pts[i] << " : ";
2128 Int_vec_print(cout, v1, n);
2129 cout << endl;
2130 }
2131 }
2132 if (nb_pts < 2) {
2133 cout << "orthogonal::perp_of_k_points nb_pts < 2" << endl;
2134 exit(1);
2135 }
2136
2137 long int **Perp_without_pt;
2138 long int *Intersection1 = NULL;
2139 int sz1;
2140 long int *Intersection2 = NULL;
2141 int sz2;
2142 int sz0, perp_sz = 0;
2144
2145
2146 if (f_v) {
2147 cout << "orthogonal::perp_of_k_points computing the perps of the points" << endl;
2148 }
2149
2150
2151 sz0 = alpha * q;
2152 Perp_without_pt = NEW_plint(nb_pts);
2153 for (i = 0; i < nb_pts; i++) {
2154 if (f_v) {
2155 cout << "orthogonal::perp_of_k_points "
2156 "computing perp of point " << i
2157 << " / " << nb_pts << ":" << endl;
2158 }
2159 Perp_without_pt[i] = NEW_lint(sz0);
2160
2161
2162 perp(pts[i], Perp_without_pt[i], perp_sz, 0/*verbose_level - 1*/);
2163
2164
2165 if (f_vv) {
2166 cout << "orthogonal::perp_of_k_points perp of pt "
2167 << i << " / " << nb_pts << " has size "
2168 << perp_sz << " and is equal to ";
2169 Lint_vec_print(cout, Perp_without_pt[i], perp_sz);
2170 cout << endl;
2171 }
2172 if (perp_sz != sz0) {
2173 cout << "orthogonal::perp_of_k_points perp_sz != sz0" << endl;
2174 exit(1);
2175 }
2176 }
2177
2178
2179 if (f_v) {
2180 cout << "orthogonal::perp_of_k_points computing the perps of the points done" << endl;
2181 }
2182
2183
2184 if (f_v) {
2185 cout << "orthogonal::perp_of_k_points computing the intersections of the perps" << endl;
2186 }
2187
2188 Sorting.vec_intersect(Perp_without_pt[0], perp_sz,
2189 Perp_without_pt[1], perp_sz, Intersection1, sz1);
2190 if (f_v) {
2191 cout << "orthogonal::perp_of_k_points intersection of "
2192 "P[0] and P[1] has size " << sz1 << " : ";
2193 Lint_vec_print_fully(cout, Intersection1, sz1);
2194 cout << endl;
2195 }
2196 for (i = 2; i < nb_pts; i++) {
2197 if (f_v) {
2198 cout << "intersecting with perp[" << i << "]" << endl;
2199 }
2200 Sorting.vec_intersect(Intersection1, sz1,
2201 Perp_without_pt[i], sz0, Intersection2, sz2);
2202
2203 if (f_v) {
2204 cout << "orthogonal::perp_of_k_points intersection "
2205 "with P[" << i << "] has size " << sz2 << " : ";
2206 Lint_vec_print_fully(cout, Intersection2, sz2);
2207 cout << endl;
2208 }
2209
2210
2211 FREE_lint(Intersection1);
2212 Intersection1 = Intersection2;
2213 Intersection2 = NULL;
2214 sz1 = sz2;
2215 }
2216
2217 if (f_v) {
2218 cout << "orthogonal::perp_of_k_points computing the intersections of the perps done" << endl;
2219 }
2220
2221
2222 Perp = NEW_lint(sz1);
2223 Lint_vec_copy(Intersection1, Perp, sz1);
2224 sz = sz1;
2225
2226
2227 FREE_lint(Intersection1);
2228 for (i = 0; i < nb_pts; i++) {
2229 FREE_lint(Perp_without_pt[i]);
2230 }
2231 FREE_plint(Perp_without_pt);
2232 //free_pint_all(Perp_without_pt, nb_pts);
2233
2234
2235 if (f_v) {
2236 cout << "orthogonal::perp_of_k_points done" << endl;
2237 }
2238}
2239
2240
2241
2242
2243
2244}}}
2245
2246
data structure for set partitions following Jeffrey Leon
a collection of functions related to sorted vectors
void lint_vec_quicksort_increasingly(long int *v, int len)
Definition: sorting.cpp:918
void vec_intersect(long int *v1, int len1, long int *v2, int len2, long int *&v3, int &len3)
Definition: sorting.cpp:741
orthogonal_geometry::orthogonal_indexing * Orthogonal_indexing
void PG_element_unrank_modified(int *v, int stride, int len, int a)
various functions related to geometries
Definition: geometry.h:721
long int nb_pts_Qepsilon(int epsilon, int k, int q)
void mult_matrix_matrix(int *A, int *B, int *C, int m, int n, int o, int verbose_level)
int evaluate_bilinear_form(int n, int *v1, int *v2, int *Gram)
void choose_anisotropic_form(int &c1, int &c2, int &c3, int verbose_level)
void Gram_matrix(int epsilon, int k, int form_c1, int form_c2, int form_c3, int *&Gram, int verbose_level)
void Q_epsilon_unrank(int *v, int stride, int epsilon, int k, int c1, int c2, int c3, long int a, int verbose_level)
long int Q_epsilon_rank(int *v, int stride, int epsilon, int k, int c1, int c2, int c3, int verbose_level)
long int rank_point(int *v, int stride, int verbose_level)
void points_on_line_by_line_rank(long int line_rk, long int *line, int verbose_level)
void lines_on_point_by_line_rank(long int pt, long int *line_pencil_line_ranks, int verbose_level)
void Siegel_Transformation(int *T, long int rk_from, long int rk_to, long int root, int verbose_level)
int evaluate_hyperbolic_bilinear_form(int *u, int *v, int stride, int m)
void unrank_point(int *v, int stride, long int rk, int verbose_level)
void Gauss_step(int *v1, int *v2, int len, int idx)
void fill(long int *M, int i, int j, long int a)
void perp_of_k_points(long int *pts, int nb_pts, long int *&Perp, int &sz, int verbose_level)
void change_form_value(int *u, int stride, int m, int multiplier)
void lines_on_point_by_line_rank_must_fit_into_int(long int pt, int *line_pencil_line_ranks, int verbose_level)
long int rank_line(long int p1, long int p2, int verbose_level)
void scalar_multiply_vector(int *u, int stride, int len, int multiplier)
int evaluate_parabolic_bilinear_form(int *u, int *v, int stride, int m)
ring_theory::homogeneous_polynomial_domain * Poly
Definition: orthogonal.h:204
void unrank_line(long int &p1, long int &p2, long int index, int verbose_level)
long int type_and_index_to_point_rk(long int type, long int index, int verbose_level)
void perp_of_two_points(long int pt1, long int pt2, long int *Perp, int &sz, int verbose_level)
void point_to_line_map(int size, long int *point_ranks, int *&line_vector, int verbose_level)
void points_on_line(long int pi, long int pj, long int *line, int verbose_level)
void lines_on_point(long int pt, long int *line_pencil_point_ranks, int verbose_level)
void init(int epsilon, int n, field_theory::finite_field *F, int verbose_level)
Definition: orthogonal.cpp:312
long int find_root(long int rk2, int verbose_level)
void perp(long int pt, long int *Perp_without_pt, int &sz, int verbose_level)
void make_initial_partition(data_structures::partitionstack &S, int verbose_level)
void points_on_line_by_coordinates(long int pi, long int pj, int *pt_coords, int verbose_level)
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)
#define Lint_vec_copy(A, B, C)
Definition: foundations.h:694
#define Lint_matrix_print(A, B, C)
Definition: foundations.h:708
#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 FREE_plint(p)
Definition: foundations.h:643
#define NEW_OBJECT(type)
Definition: foundations.h:638
#define Lint_vec_print(A, B, C)
Definition: foundations.h:686
#define FREE_OBJECT(p)
Definition: foundations.h:651
#define NEW_int(n)
Definition: foundations.h:625
#define Int_vec_print_integer_matrix_width(A, B, C, D, E, F)
Definition: foundations.h:691
#define Int_matrix_print(A, B, C)
Definition: foundations.h:707
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#define EVEN(x)
Definition: foundations.h:221
#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
#define Lint_vec_print_fully(A, B, C)
Definition: foundations.h:688
the orbiter library for the classification of combinatorial objects