17namespace layer1_foundations {
31 for (i = 0; i < set_size; i++) {
34 ost << setw(3) << i <<
" : " << setw(5) << a <<
" : ";
39 ost <<
"\\\\" << endl;
50 for (i = 0; i < set_size; i++) {
53 cout << setw(3) << i <<
" : " << setw(5) << a <<
" : ";
64 long int *set,
int set_size)
70 for (i = 0; i < set_size; i++) {
73 cout << setw(3) << i <<
" : " << setw(5) << a <<
" : ";
82 long int *pts,
int nb_pts,
int verbose_level)
84 int f_v = (verbose_level >= 1);
85 int f_vv = (verbose_level >= 2);
93 cout <<
"projective_space::is_contained_in_Baer_subline "
97 cout <<
"computing Baer subline determined by the "
98 "first three points:" << endl;
102 cout <<
"projective_space::is_contained_in_Baer_subline "
103 "The Baer subline is:" << endl;
108 for (i = 0; i < nb_pts; i++) {
113 cout <<
"did not find " << i <<
"-th point " << a
114 <<
" in the list of points, hence not "
115 "contained in Baer subline" << endl;
128 int *pts,
int nb_pts,
int *six_coeffs,
int verbose_level)
135 int f_v = (verbose_level >= 1);
136 int f_vv = (verbose_level >= 2);
141 int i, x, y, z, xq, yq, zq, rk;
143 int kernel_m, kernel_n;
147 cout <<
"projective_space::determine_hermitian_form_in_plane" << endl;
153 cout <<
"projective_space::determine_hermitian_"
154 "form_in_plane field degree must be even" << endl;
157 little_e =
F->
e >> 1;
160 cout <<
"projective_space::determine_hermitian_"
161 "form_in_plane Q=" << Q <<
" q=" <<
q << endl;
164 cout <<
"projective_space::determine_hermitian_"
165 "form_in_plane n != 2" << endl;
168 for (i = 0; i < nb_pts; i++) {
172 cout <<
"projective_space::determine_hermitian_"
173 "form_in_plane points:" << endl;
177 for (i = 0; i < nb_pts; i++) {
178 x = coords[i * 3 + 0];
179 y = coords[i * 3 + 1];
180 z = coords[i * 3 + 2];
184 system[i * 9 + 0] =
F->
mult(x, xq);
185 system[i * 9 + 1] =
F->
mult(y, yq);
186 system[i * 9 + 2] =
F->
mult(z, zq);
187 system[i * 9 + 3] =
F->
mult(x, yq);
188 system[i * 9 + 4] =
F->
mult(y, xq);
189 system[i * 9 + 5] =
F->
mult(x, zq);
190 system[i * 9 + 6] =
F->
mult(z, xq);
191 system[i * 9 + 7] =
F->
mult(y, zq);
192 system[i * 9 + 8] =
F->
mult(z, yq);
195 cout <<
"projective_space::determine_hermitian_"
196 "form_in_plane system:" << endl;
204 nb_pts, 9, base_cols, verbose_level - 2);
206 cout <<
"projective_space::determine_hermitian_form_in_plane "
214 cout <<
"projective_space::determine_hermitian_form_"
215 "in_plane system underdetermined" << endl;
221 MINIMUM(nb_pts, 9), 9, base_cols, rk,
222 kernel_m, kernel_n, kernel, 0 );
224 cout <<
"projective_space::determine_hermitian_form_"
225 "in_plane kernel:" << endl;
229 six_coeffs[0] = kernel[0 * kernel_n + 0];
230 six_coeffs[1] = kernel[1 * kernel_n + 0];
231 six_coeffs[2] = kernel[2 * kernel_n + 0];
232 six_coeffs[3] = kernel[3 * kernel_n + 0];
233 six_coeffs[4] = kernel[5 * kernel_n + 0];
234 six_coeffs[5] = kernel[7 * kernel_n + 0];
236 cout <<
"projective_space::determine_hermitian_form_in_plane "
237 "six_coeffs:" << endl;
247 int *pts,
int nb_pts,
int *circle_type,
251 int f_v = (verbose_level >= 1);
252 int f_vv = (verbose_level >= 2);
262 cout <<
"projective_space::circle_type_of_line_subset "
269 for (i = 0; i < nb_pts; i++) {
275 for (i = 0; i < 3; i++) {
276 subset[i] = pts[idx_set[i]];
281 for (i = 0; i < nb_pts; i++) {
290 cout <<
"projective_space::circle_type_of_line_subset "
291 "The Baer subline determined by " << endl;
295 cout <<
" which intersects in " << b <<
" points" << endl;
305 cout <<
"projective_space::circle_type_of_line_subset "
306 "circle_type before fixing =" << endl;
310 for (i = 4; i < nb_pts; i++) {
312 if (circle_type[i] % a) {
313 cout <<
"projective_space::circle_type_of_line_subset "
314 "circle_type[i] % a" << endl;
320 cout <<
"projective_space::circle_type_of_line_subset "
321 "circle_type after fixing =" << endl;
328 long int *U,
int &sz,
int verbose_level)
330 int f_v = (verbose_level >= 1);
331 int f_vv = (verbose_level >= 2);
332 int f_vvv = (verbose_level >= 3);
335 long int X, Y, Z, Xq, Yq, Zq;
338 cout <<
"projective_space::create_unital_XXq_YZq_ZYq" << endl;
341 cout <<
"projective_space::create_unital_XXq_YZq_ZYq "
346 cout <<
"projective_space::create_unital_XXq_YZq_ZYq "
354 cout <<
"e=" << e << endl;
360 cout <<
"i=" << i <<
" : ";
372 cout <<
" a=" << a << endl;
382 cout <<
"we found " << sz <<
" points:" << endl;
390 cout <<
"projective_space::create_unital_XXq_YZq_ZYq "
397 grassmann *G,
int rk,
long int *set,
int set_size,
398 long int *&intersection_set,
int &intersection_set_size,
401 int f_v = (verbose_level >= 1);
404 cout <<
"projective_space::intersection_of_subspace_with_point_set" << endl;
412 intersection_set =
NEW_lint(set_size);
414 intersection_set_size = 0;
418 for (h = 0; h < set_size; h++) {
422 k + 1, d, 0 ) ==
k) {
423 intersection_set[intersection_set_size++] = set[h];
429 cout <<
"projective_space::intersection_of_subspace_with_point_set done" << endl;
435 long int *set,
int set_size,
436 long int *&intersection_set,
int &intersection_set_size,
439 int f_v = (verbose_level >= 1);
442 cout <<
"projective_space::intersection_of_subspace_with_point_set_rank_is_longinteger" << endl;
449 intersection_set =
NEW_lint(set_size);
451 intersection_set_size = 0;
455 for (h = 0; h < set_size; h++) {
459 k + 1, d, 0 ) ==
k) {
460 intersection_set[intersection_set_size++] = set[h];
466 cout <<
"projective_space::intersection_of_subspace_with_point_set_rank_is_longinteger done" << endl;
472 long int *set,
int set_size,
473 int *&intersection_type,
int &highest_intersection_number,
474 int *&intersection_matrix,
int &nb_planes,
477 int f_v = (verbose_level >= 1);
478 int f_vv = (verbose_level >= 2);
480 long int **Pts_on_plane;
481 int *nb_pts_on_plane;
483 int i, j, a, u, f, l, ii;
486 cout <<
"projective_space::plane_intersection_invariant" << endl;
489 cout <<
"projective_space::plane_intersection_invariant before plane_intersection_type_fast" << endl;
493 R, Pts_on_plane, nb_pts_on_plane, nb_planes_total,
496 cout <<
"projective_space::plane_intersection_invariant after plane_intersection_type_fast" << endl;
500 int f_second =
FALSE;
502 C.
init(nb_pts_on_plane, nb_planes_total, f_second, 0);
504 cout <<
"projective_space::plane_intersection_invariant "
505 "plane-intersection type: ";
510 cout <<
"The plane intersection type is (";
512 cout <<
")" << endl << endl;
516 intersection_type =
NEW_int(highest_intersection_number + 1);
518 Int_vec_zero(intersection_type, highest_intersection_number + 1);
524 intersection_type[a] = l;
529 int *Incma, *Incma_t, *IIt, *ItI;
531 Incma =
NEW_int(set_size * nb_planes);
532 Incma_t =
NEW_int(nb_planes * set_size);
533 IIt =
NEW_int(set_size * set_size);
534 ItI =
NEW_int(nb_planes * nb_planes);
537 for (i = 0; i < set_size * nb_planes; i++) {
540 for (i = 0; i < nb_planes; i++) {
542 for (j = 0; j < nb_pts_on_plane[ii]; j++) {
543 a = Pts_on_plane[ii][j];
544 Incma[a * nb_planes + i] = 1;
548 cout <<
"Incidence matrix:" << endl;
550 Incma, set_size, nb_planes, nb_planes, 1);
552 for (i = 0; i < set_size; i++) {
553 for (j = 0; j < set_size; j++) {
555 for (u = 0; u < nb_planes; u++) {
556 a += Incma[i * nb_planes + u] *
557 Incma_t[u * set_size + j];
559 IIt[i * set_size + j] = a;
563 cout <<
"I * I^\\top = " << endl;
565 IIt, set_size, set_size, set_size, 2);
567 for (i = 0; i < nb_planes; i++) {
568 for (j = 0; j < nb_planes; j++) {
570 for (u = 0; u < set_size; u++) {
571 a += Incma[u * nb_planes + i] *
572 Incma[u * nb_planes + j];
574 ItI[i * nb_planes + j] = a;
578 cout <<
"I^\\top * I = " << endl;
580 ItI, nb_planes, nb_planes, nb_planes, 3);
583 intersection_matrix =
NEW_int(nb_planes * nb_planes);
585 intersection_matrix, nb_planes * nb_planes);
593 for (i = 0; i < nb_planes_total; i++) {
600 cout <<
"projective_space::plane_intersection_invariant done" << endl;
606 long int *set,
int set_size,
607 int *&intersection_type,
int &highest_intersection_number,
610 int f_v = (verbose_level >= 1);
612 long int **Pts_on_plane;
613 int *nb_pts_on_plane;
618 cout <<
"projective_space::plane_intersection_type" << endl;
621 cout <<
"projective_space::plane_intersection_type before plane_intersection_type_fast" << endl;
625 R, Pts_on_plane, nb_pts_on_plane, nb_planes,
628 cout <<
"projective_space::plane_intersection_type after plane_intersection_type_fast" << endl;
632 int f_second =
FALSE;
634 C.
init(nb_pts_on_plane, nb_planes, f_second, 0);
636 cout <<
"projective_space::plane_intersection_type "
637 "plane-intersection type: ";
642 cout <<
"The plane intersection type is (";
644 cout <<
")" << endl << endl;
649 intersection_type =
NEW_int(highest_intersection_number + 1);
650 Int_vec_zero(intersection_type, highest_intersection_number + 1);
655 intersection_type[a] = l;
658 for (i = 0; i < nb_planes; i++) {
665 cout <<
"projective_space::plane_intersection_type done" << endl;
672 long int *set,
int set_size,
677 int f_v = (verbose_level >= 1);
678 long int **Pts_on_plane;
679 int *nb_pts_on_plane;
684 cout <<
"projective_space::plane_intersections" << endl;
687 cout <<
"projective_space::plane_intersections before plane_intersection_type_fast" << endl;
691 R, Pts_on_plane, nb_pts_on_plane, nb_planes,
694 cout <<
"projective_space::plane_intersections after plane_intersection_type_fast" << endl;
697 cout <<
"projective_space::plane_intersections "
698 "before Sos.init" << endl;
701 Pts_on_plane, nb_pts_on_plane, verbose_level - 1);
703 cout <<
"projective_space::plane_intersections "
704 "after Sos.init" << endl;
706 for (i = 0; i < nb_planes; i++) {
712 cout <<
"projective_space::plane_intersections done" << endl;
718 long int *set,
int set_size,
720 long int **&Pts_on_plane,
int *&nb_pts_on_plane,
int &len,
723 int f_v = (verbose_level >= 1);
724 int f_vv = (verbose_level >= 2);
726 long int r, rk, i, u, d, N_planes, l;
734 cout <<
"projective_space::plane_intersection_type_slow" << endl;
740 cout <<
"projective_space::plane_intersection_type_slow "
741 "the input set if not a set" << endl;
748 cout <<
"N_planes=" << N_planes << endl;
753 nb_pts_on_plane =
NEW_int(N_planes);
758 Coords =
NEW_int(set_size * d);
760 for (i = 0; i < set_size; i++) {
764 cout <<
"projective_space::plane_intersection_type_slow "
770 for (rk = 0; rk < N_planes; rk++) {
772 if (N_planes > 1000000) {
773 if ((rk % 250000) == 0) {
774 cout <<
"projective_space::plane_intersection_type_slow "
775 << rk <<
" / " << N_planes << endl;
780 long int *pts_on_plane;
785 for (u = 0; u < set_size; u++) {
791 pts_on_plane[nb++] = u;
796 Pts_on_plane[l] = pts_on_plane;
797 nb_pts_on_plane[l] = nb;
798 R[l].
create(rk, __FILE__, __LINE__);
807 cout <<
"projective_space::plane_intersection_type_slow "
814 long int *set,
int set_size,
816 long int **&Pts_on_plane,
int *&nb_pts_on_plane,
int &len,
819 int f_v = (verbose_level >= 1);
820 int f_vv = (verbose_level >= 2);
821 int f_v3 = (verbose_level >= 3);
822 int r, rk, rr, h, i, j, a, d, N_planes, N, N2, idx, l;
834 long int *pts_on_plane;
839 cout <<
"projective_space::plane_intersection_type_fast" << endl;
846 cout <<
"projective_space::plane_intersection_type_fast "
847 "the input set if not a set" << endl;
855 cout <<
"N_planes=" << N_planes << endl;
856 cout <<
"N=number of 3-subsets of the set=" << N << endl;
869 Coords =
NEW_int(set_size * d);
871 for (i = 0; i < N; i++) {
872 f_subset_done[i] =
FALSE;
874 for (i = 0; i < set_size; i++) {
878 cout <<
"projective_space::plane_intersection_type_fast "
885 for (rk = 0; rk < N; rk++) {
888 cout << rk <<
"-th subset ";
892 if (f_subset_done[rk]) {
894 cout <<
"skipping" << endl;
898 for (j = 0; j < 3; j++) {
907 cout <<
" corresponds to Basis:" << endl;
914 cout <<
"projective_space::plane_intersection_type_fast "
915 "not independent, skip" << endl;
925 cout << rk <<
"-th subset ";
927 cout <<
" plane_rk=" << plane_rk << endl;
933 cout <<
"projective_space::plane_intersection_type_fast "
934 "longinteger_vec_search(R, len, plane_rk, idx) "
940 cout <<
"plane_rk=" << plane_rk
941 <<
" was not found" << endl;
953 cout <<
"after unrank " << plane_rk
954 <<
", Basis:" << endl;
959 for (h = 0; h < set_size; h++) {
961 cout <<
"testing point " << h <<
":" << endl;
962 cout <<
"plane_rk=" << plane_rk << endl;
968 cout <<
"after unrank " << plane_rk <<
":" << endl;
969 int_matrix_print(G->
M, 3, d);
971 for (j = 0; j < 3 * d; j++) {
983 cout <<
"Basis and point:" << endl;
989 pts_on_plane[l++] = h;
991 cout <<
"point " << h
992 <<
" is on the plane" << endl;
997 cout <<
"point " << h
998 <<
" is not on the plane" << endl;
1003 cout <<
"We found an " << l <<
"-plane, "
1004 "its rank is " << plane_rk << endl;
1005 cout <<
"The ranks of points on that plane are : ";
1012 for (j = len; j > idx; j--) {
1014 Pts_on_plane[j] = Pts_on_plane[j - 1];
1015 nb_pts_on_plane[j] = nb_pts_on_plane[j - 1];
1017 for (j = 0; j < N; j++) {
1018 if (f_subset_done[j] && rank_idx[j] >= idx) {
1024 cout <<
"after assign_to, "
1025 "plane_rk=" << plane_rk << endl;
1034 for (i = 0; i < N2; i++) {
1036 for (h = 0; h < 3; h++) {
1037 subset3[h] = pts_on_plane[subset2[h]];
1041 cout << i <<
"-th subset3 ";
1043 cout <<
" rr=" << rr << endl;
1045 if (!f_subset_done[rr]) {
1046 f_subset_done[rr] =
TRUE;
1049 else if (rank_idx[rr] == -1) {
1052 else if (rank_idx[rr] != idx) {
1053 cout <<
"projective_space::plane_intersection_type_fast "
1054 "f_subset_done[rr] && "
1055 "rank_idx[rr] >= 0 && "
1056 "rank_idx[rr] != idx" << endl;
1060 Pts_on_plane[idx] = pts_on_plane;
1061 nb_pts_on_plane[idx] = l;
1067 f_subset_done[rk] =
TRUE;
1079 cout <<
"projective_space::plane_intersection_type_fast done" << endl;
1084 long int *set,
int set_size,
1086 vector<int> &plane_ranks,
1089 int f_v = (verbose_level >= 1);
1090 int f_vv = (verbose_level >= 2);
1092 long int r, rk, i, u, d, N_planes;
1100 cout <<
"projective_space::find_planes_which_intersect_in_at_least_s_points" << endl;
1106 cout <<
"projective_space::find_planes_which_intersect_in_at_least_s_points "
1107 "the input set if not a set" << endl;
1114 cout <<
"N_planes=" << N_planes << endl;
1120 Coords =
NEW_int(set_size * d);
1122 for (i = 0; i < set_size; i++) {
1126 cout <<
"projective_space::find_planes_which_intersect_in_at_least_s_points "
1131 int one_percent = 0;
1133 if (N_planes > 1000000) {
1134 one_percent = N_planes / 100;
1136 for (rk = 0; rk < N_planes; rk++) {
1138 if (one_percent > 0) {
1139 if ((rk % one_percent) == 0) {
1140 cout <<
"projective_space::find_planes_which_intersect_in_at_least_s_points "
1141 << rk <<
" / " << N_planes <<
" which is "
1142 << rk / one_percent <<
" percent done" << endl;
1148 int nb_pts_on_plane = 0;
1150 for (u = 0; u < set_size; u++) {
1160 if (nb_pts_on_plane >= s) {
1161 plane_ranks.push_back(rk);
1165 cout <<
"projective_space::find_planes_which_intersect_in_at_least_s_points we found "
1166 << plane_ranks.size() <<
" planes which intersect "
1167 "in at least " << s <<
" points" << endl;
1174 cout <<
"projective_space::find_planes_which_intersect_in_at_least_s_points "
1180 long int *set,
int set_size,
1181 vector<int> &point_indices,
1182 vector<int> &point_local_coordinates,
1185 int f_v = (verbose_level >= 1);
1186 int f_vv = (verbose_level >= 2);
1193 int coefficients[3];
1197 cout <<
"projective_space::plane_intersection" << endl;
1203 Coords =
NEW_int(set_size * d);
1205 for (i = 0; i < set_size; i++) {
1209 cout <<
"projective_space::plane_intersection "
1216 int nb_pts_on_plane = 0;
1219 for (u = 0; u < set_size; u++) {
1226 point_indices.push_back(u);
1234 3, d, Basis, base_cols,
1235 Basis + 3 * d, coefficients, verbose_level);
1237 coefficients, 1, 3, local_rank);
1238 point_local_coordinates.push_back(local_rank);
1246 cout <<
"projective_space::plane_intersection "
1252 long int *set,
int set_size,
1253 vector<int> &point_indices,
1256 int f_v = (verbose_level >= 1);
1257 int f_vv = (verbose_level >= 2);
1266 cout <<
"projective_space::line_intersection" << endl;
1272 Coords =
NEW_int(set_size * d);
1274 for (i = 0; i < set_size; i++) {
1278 cout <<
"projective_space::line_intersection "
1285 for (u = 0; u < set_size; u++) {
1291 point_indices.push_back(u);
1299 cout <<
"projective_space::line_intersection "
1306 long int *set_in,
int set_size,
long int *set_out,
1315 int f_v = (verbose_level >= 1);
1316 int f_vv = (verbose_level >= 2);
1323 int f_elements_exponential =
TRUE;
1324 string symbol_for_print;
1330 cout <<
"projective_space::klein_correspondence" << endl;
1334 symbol_for_print.assign(
"\\alpha");
1336 for (h = 0; h < set_size; h++) {
1340 cout << setw(5) << h <<
" : " << setw(5) << a <<
" :" << endl;
1362 a =
F->
mult(v6[0], v6[1]);
1363 b =
F->
mult(v6[2], v6[3]);
1364 c =
F->
mult(v6[4], v6[5]);
1365 d =
F->
add3(a, b, c);
1369 cout <<
"d != 0" << endl;
1375 cout <<
"projective_space::klein_correspondence done" << endl;
1380 int line_rk,
int *v6,
int verbose_level)
1382 int f_v = (verbose_level >= 1);
1383 int f_vv = (verbose_level >= 2);
1386 int f_elements_exponential =
FALSE;
1387 string symbol_for_print;
1390 cout <<
"projective_space::Pluecker_coordinates" << endl;
1392 symbol_for_print.assign(
"\\alpha");
1395 cout << setw(5) << line_rk <<
" :" << endl;
1418 cout <<
"projective_space::Pluecker_coordinates done" << endl;
1424 int *table,
int verbose_level)
1426 int f_v = (verbose_level >= 1);
1427 int f_vv = (verbose_level >= 2);
1436 int f_elements_exponential =
TRUE;
1437 string symbol_for_print;
1441 cout <<
"projective_space::klein_correspondence" << endl;
1443 symbol_for_print.assign(
"\\alpha");
1446 cout <<
"half=" << half << endl;
1447 cout <<
"N_lines=" <<
N_lines << endl;
1450 for (h = 0; h <
N_lines; h++) {
1453 cout << setw(5) << h <<
" :" << endl;
1475 a =
F->
mult(x6[0], x6[1]);
1476 b =
F->
mult(x6[2], x6[3]);
1477 c =
F->
mult(x6[4], x6[5]);
1478 d =
F->
add3(a, b, c);
1482 cout <<
"d != 0" << endl;
1487 y6[2] =
F->
mult(half,
F->
add(x6[2], x6[3]));
1499 cout <<
"lines in PG(3,q) to points in PG(5,q) "
1500 "in special model:" << endl;
1501 for (h = 0; h <
N_lines; h++) {
1502 cout << setw(4) << h <<
" : " << setw(5) << table[h] << endl;
1507 cout <<
"projective_space::klein_correspondence_special_model done" << endl;
1512 std::ostream &f,
int verbose_level)
1514 int f_v = (verbose_level >= 1);
1517 cout <<
"projective_space::cheat_sheet_points" << endl;
1521 string symbol_for_print;
1525 symbol_for_print.assign(
"\\alpha");
1528 f <<
"PG$(" <<
n <<
", " <<
q <<
")$ has "
1529 <<
N_points <<
" points:\\\\" << endl;
1531 f <<
"\\begin{multicols}{4}" << endl;
1534 f <<
"$P_{" << i <<
"}=\\bP";
1536 f <<
"$\\\\" << endl;
1538 f <<
"\\end{multicols}" << endl;
1541 f <<
"\\begin{multicols}{2}" << endl;
1544 f <<
"$P_{" << i <<
"}=\\bP";
1548 f <<
"$\\\\" << endl;
1550 f <<
"\\end{multicols}" << endl;
1552 f <<
"\\begin{multicols}{2}" << endl;
1555 f <<
"$P_{" << i <<
"}=\\bP";
1559 f <<
"$\\\\" << endl;
1561 f <<
"\\end{multicols}" << endl;
1566 f <<
"Baer subgeometry:\\\\" << endl;
1567 f <<
"\\begin{multicols}{4}" << endl;
1572 for (j = 0; j < d; j++) {
1579 f <<
"$P_{" << i <<
"}=\\bP";
1581 f <<
"$\\\\" << endl;
1584 f <<
"\\end{multicols}" << endl;
1585 f <<
"There are " << cnt <<
" elements in the Baer subgeometry.\\\\" << endl;
1590 f <<
"Normalized from the left:\\\\" << endl;
1591 f <<
"\\begin{multicols}{4}" << endl;
1595 f <<
"$P_{" << i <<
"}=\\bP";
1597 f <<
"$\\\\" << endl;
1599 f <<
"\\end{multicols}" << endl;
1600 f <<
"\\clearpage" << endl << endl;
1608 cout <<
"projective_space::cheat_sheet_points done" << endl;
1614 int f_v = (verbose_level >= 1);
1617 cout <<
"projective_space::cheat_polarity" << endl;
1620 f <<
"Standard polarity point $\\leftrightarrow$ hyperplane:\\\\" << endl;
1624 f <<
"Reversal polarity point $\\leftrightarrow$ hyperplane:\\\\" << endl;
1629 cout <<
"projective_space::cheat_polarity done" << endl;
1634 std::ostream &f,
int verbose_level)
1636 int f_v = (verbose_level >= 1);
1639 cout <<
"projective_space::cheat_sheet_point_table" << endl;
1641 int I, i, j, a, d, nb_rows, nb_cols = 5;
1642 int nb_rows_per_page = 40, nb_tables;
1650 f <<
"PG$(" <<
n <<
", " <<
q <<
")$ has " <<
N_points
1651 <<
" points:\\\\" << endl;
1653 nb_rows = (
N_points + nb_cols - 1) / nb_cols;
1654 nb_tables = (nb_rows + nb_rows_per_page - 1) / nb_rows_per_page;
1656 for (I = 0; I < nb_tables; I++) {
1658 f <<
"\\begin{array}{r|*{" << nb_cols <<
"}{r}}" << endl;
1659 f <<
"P_{" << nb_cols <<
"\\cdot i+j}";
1660 for (j = 0; j < nb_cols; j++) {
1663 f <<
"\\\\" << endl;
1664 f <<
"\\hline" << endl;
1666 if (I == nb_tables - 1) {
1667 nb_r = nb_rows - I * nb_rows_per_page;
1670 nb_r = nb_rows_per_page;
1673 for (i = 0; i < nb_r; i++) {
1674 f << (I * nb_rows_per_page + i) * nb_cols;
1675 for (j = 0; j < nb_cols; j++) {
1676 a = (I * nb_rows_per_page + i) * nb_cols + j;
1683 f <<
"\\\\" << endl;
1685 f <<
"\\end{array}" << endl;
1691 cout <<
"projective_space::cheat_sheet_point_table done" << endl;
1697 std::ostream &f,
int verbose_level)
1699 int f_v = (verbose_level >= 1);
1702 cout <<
"projective_space::cheat_sheet_points_on_lines" << endl;
1707 f <<
"PG$(" <<
n <<
", " <<
q <<
")$ has " <<
N_lines
1708 <<
" lines, each with " <<
k <<
" points:\\\\" << endl;
1710 f <<
"Don't have Lines table\\\\" << endl;
1719 for (i = 0; i <
N_lines; i++) {
1722 for (i = 0; i <
k; i++) {
1726 for (i = 0; i <
N_lines; i += 40) {
1739 cout <<
"projective_space::cheat_sheet_points_on_lines done" << endl;
1744 std::ostream &f,
int verbose_level)
1746 int f_v = (verbose_level >= 1);
1749 cout <<
"projective_space::cheat_sheet_lines_on_points" << endl;
1753 f <<
"PG$(" <<
n <<
", " <<
q <<
")$ has " <<
N_points
1754 <<
" points, each with " <<
r <<
" lines:\\\\" << endl;
1756 f <<
"Don't have Lines\\_on\\_point table\\\\" << endl;
1768 for (i = 0; i <
r; i++) {
1771 for (i = 0; i <
N_points; i += 40) {
1777 row_labels + i, col_labels,
TRUE );
1785 int_matrix_print_tex(f, Lines_on_point,
N_points,
r);
1790 cout <<
"projective_space::cheat_sheet_lines_on_points done" << endl;
1796 std::ostream &f,
int k,
int verbose_level)
1798 int f_v = (verbose_level >= 1);
1804 int f_need_comma =
FALSE;
1809 cout <<
"projective_space::cheat_sheet_subspaces "
1817 f_need_comma =
TRUE;
1821 Gr->
init(n1, k1,
F, 0 );
1828 f <<
"PG$(" <<
n <<
", " <<
q <<
")$ has "
1829 << nb_k_subspaces <<
" $" <<
k
1830 <<
"$-subspaces:\\\\" << endl;
1832 if (nb_k_subspaces > 10000) {
1833 f <<
"Too many to print \\\\" << endl;
1836 f <<
"%\\begin{multicols}{2}" << endl;
1837 for (u = 0; u < nb_k_subspaces; u++) {
1839 f <<
"$L_{" << u <<
"}=\\bL";
1840 f <<
"\\left[" << endl;
1841 f <<
"\\begin{array}{c}" << endl;
1842 for (i = 0; i < k1; i++) {
1843 for (j = 0; j < n1; j++) {
1844 f << Gr->
M[i * n1 + j];
1845 if (f_need_comma && j < n1 - 1) {
1849 f <<
"\\\\" << endl;
1851 f <<
"\\end{array}" << endl;
1852 f <<
"\\right]" << endl;
1854 if (
n == 3 &&
k == 1) {
1858 f <<
"={\\rm\\bf Pl}(" << v6[0] <<
"," << v6[1] <<
","
1859 << v6[2] <<
"," << v6[3] <<
"," << v6[4]
1860 <<
"," << v6[5] <<
" ";
1864 f <<
"$\\\\" << endl;
1866 if (((u + 1) % 1000) == 0) {
1867 f <<
"\\clearpage" << endl << endl;
1870 f <<
"%\\end{multicols}" << endl;
1873 if (
n == 3 &&
k == 1) {
1878 if (
n == 3 &&
k == 1) {
1879 f <<
"PG$(" <<
n <<
", " <<
q <<
")$ has "
1880 <<
"the following low weight Pluecker lines:\\\\" << endl;
1881 for (u = 0; u < nb_k_subspaces; u++) {
1888 for (j = 0; j < 6; j++) {
1894 f <<
"$L_{" << u <<
"}=";
1895 f <<
"\\left[" << endl;
1896 f <<
"\\begin{array}{c}" << endl;
1897 for (i = 0; i < k1; i++) {
1898 for (j = 0; j < n1; j++) {
1899 f << Gr->
M[i * n1 + j];
1900 if (f_need_comma && j < n1 - 1) {
1904 f <<
"\\\\" << endl;
1906 f <<
"\\end{array}" << endl;
1907 f <<
"\\right]" << endl;
1908 f <<
"={\\rm\\bf Pl}(" << v6[0] <<
"," << v6[1] <<
","
1909 << v6[2] <<
"," << v6[3] <<
"," << v6[4]
1910 <<
"," << v6[5] <<
" ";
1912 f <<
"$\\\\" << endl;
1920 f <<
"\\clearpage" << endl << endl;
1926 cout <<
"projective_space::cheat_sheet_subspaces "
1932 grassmann *Gr,
int k,
int nb_k_subspaces,
int verbose_level)
1934 int f_v = (verbose_level >= 1);
1942 cout <<
"projective_space::do_pluecker_reverse" << endl;
1945 Pos =
NEW_int(nb_k_subspaces);
1946 for (i = 0; i < nb_k_subspaces; i++) {
1955 cout <<
"projective_space::do_pluecker_reverse after sort:" << endl;
1956 for (i = 0; i < nb_k_subspaces; i++) {
1957 cout << i <<
" : " << T[i] <<
" : " << Pos[i] << endl;
1964 int f_need_comma =
FALSE;
1970 ost <<
"Lines sorted by Pluecker coordinates\\\\" << endl;
1971 ost <<
"%\\begin{multicols}{2}" << endl;
1972 for (u0 = 0; u0 < nb_k_subspaces; u0++) {
1981 "={\\rm\\bf Pl}(" << v6[0] <<
"," << v6[1] <<
","
1982 << v6[2] <<
"," << v6[3] <<
"," << v6[4]
1983 <<
"," << v6[5] <<
" ";
1984 ost <<
")=" << endl;
1986 ost <<
"L_{" << u <<
"}=";
1987 ost <<
"\\left[" << endl;
1988 ost <<
"\\begin{array}{c}" << endl;
1989 for (i = 0; i < k1; i++) {
1990 for (j = 0; j < n1; j++) {
1991 ost << Gr->
M[i * n1 + j];
1992 if (f_need_comma && j < n1 - 1) {
1996 ost <<
"\\\\" << endl;
1998 ost <<
"\\end{array}" << endl;
1999 ost <<
"\\right]" << endl;
2002 ost <<
"$\\\\" << endl;
2004 if (((u + 1) % 1000) == 0) {
2005 ost <<
"\\clearpage" << endl << endl;
2008 ost <<
"%\\end{multicols}" << endl;
2014 cout <<
"projective_space::do_pluecker_reverse done" << endl;
2019 std::ostream &f,
int verbose_level)
2021 int f_v = (verbose_level >= 1);
2024 cout <<
"projective_space::cheat_sheet_line_intersection" << endl;
2029 f <<
"intersection of 2 lines:" << endl;
2031 f <<
"\\begin{array}{|r|*{" <<
N_points <<
"}{r}|}" << endl;
2032 f <<
"\\hline" << endl;
2034 f <<
"& " << j << endl;
2036 f <<
"\\\\" << endl;
2037 f <<
"\\hline" << endl;
2047 f <<
"\\\\[-3pt]" << endl;
2049 f <<
"\\hline" << endl;
2050 f <<
"\\end{array}" << endl;
2052 f <<
"\\clearpage" << endl;
2055 cout <<
"projective_space::cheat_sheet_line_intersection done" << endl;
2061 std::ostream &f,
int verbose_level)
2063 int f_v = (verbose_level >= 1);
2066 cout <<
"projective_space::cheat_sheet_line_through_pairs_of_points" << endl;
2072 f <<
"line through 2 points:" << endl;
2074 f <<
"\\begin{array}{|r|*{" <<
N_points <<
"}{r}|}" << endl;
2075 f <<
"\\hline" << endl;
2077 f <<
"& " << j << endl;
2079 f <<
"\\\\" << endl;
2080 f <<
"\\hline" << endl;
2091 f <<
"\\\\[-3pt]" << endl;
2093 f <<
"\\hline" << endl;
2094 f <<
"\\end{array}" << endl;
2096 f <<
"\\clearpage" << endl;
2099 cout <<
"projective_space::cheat_sheet_line_through_pairs_of_points done" << endl;
2105 long int *set,
int set_size,
2106 long int **&Pts_on_conic,
int *&nb_pts_on_conic,
int &len,
2109 int f_v = (verbose_level >= 1);
2112 cout <<
"projective_space::conic_type_randomized" << endl;
2114 int f_vv = (verbose_level >= 2);
2115 int f_v3 = (verbose_level >= 3);
2116 int rk, h, i, j, a, N, l, cnt;
2118 long int input_pts[5];
2124 long int *pts_on_conic;
2125 int allocation_length;
2132 cout <<
"projective_space::conic_type_randomized" << endl;
2135 cout <<
"projective_space::conic_type_randomized "
2144 cout <<
"projective_space::conic_type_randomized "
2145 "the input set if not a set" << endl;
2152 cout <<
"set_size=" << set_size << endl;
2153 cout <<
"N=number of 5-subsets of the set=" << N << endl;
2157 allocation_length = 1024;
2158 Pts_on_conic =
NEW_plint(allocation_length);
2159 nb_pts_on_conic =
NEW_int(allocation_length);
2163 for (cnt = 0; cnt < nb_times; cnt++) {
2167 if (cnt && ((cnt % 1000) == 0)) {
2168 cout << cnt <<
" / " << nb_times <<
" : ";
2173 for (i = 0; i < len; i++) {
2175 Pts_on_conic[i], nb_pts_on_conic[i], 0 )) {
2179 int_vec_print(cout, subset, 5);
2180 cout <<
" is a subset of the " << i <<
"th conic ";
2181 int_vec_print(cout, Pts_on_conic[i], nb_pts_on_conic[i]);
2191 for (j = 0; j < 5; j++) {
2193 input_pts[j] = set[a];
2198 cout <<
"input_pts: ";
2203 5, six_coeffs, 0 )) {
2211 cout << rk <<
"-th subset ";
2213 cout <<
" conic_rk=" << conic_rk << endl;
2219 cout <<
"projective_space::conic_type_randomized "
2220 "longinteger_vec_search(R, len, conic_rk, idx) "
2222 cout <<
"The current set is ";
2223 int_vec_print(cout, subset, 5);
2225 cout <<
"conic_rk=" << conic_rk << endl;
2226 cout <<
"The set where it should be is ";
2227 int_vec_print(cout, Pts_on_conic[idx], nb_pts_on_conic[idx]);
2229 cout <<
"R[idx]=" << R[idx] << endl;
2230 cout <<
"This is the " << idx <<
"th conic" << endl;
2237 cout <<
"conic_rk=" << conic_rk <<
" was not found" << endl;
2241 for (h = 0; h < set_size; h++) {
2242 if (
FALSE && f_v3) {
2243 cout <<
"testing point " << h <<
":" << endl;
2244 cout <<
"conic_rk=" << conic_rk << endl;
2252 pts_on_conic[l++] = h;
2254 cout <<
"point " << h <<
" is on the conic" << endl;
2258 if (
FALSE && f_v3) {
2259 cout <<
"point " << h
2260 <<
" is not on the conic" << endl;
2265 cout <<
"We found an " << l
2266 <<
"-conic, its rank is " << conic_rk << endl;
2275 cout <<
"We found an " << l <<
"-conic, "
2276 "its rank is " << conic_rk << endl;
2277 cout <<
"The " << l <<
" points on the "
2278 << len <<
"th conic are: ";
2288 for (j = len; j > idx; j--) {
2289 R[j].swap_with(R[j - 1]);
2290 Pts_on_conic[j] = Pts_on_conic[j - 1];
2291 nb_pts_on_conic[j] = nb_pts_on_conic[j - 1];
2294 Pts_on_conic[idx] = pts_on_conic;
2295 nb_pts_on_conic[idx] = l;
2299 Pts_on_conic[len] = pts_on_conic;
2300 nb_pts_on_conic[len] = l;
2307 cout <<
"We now have found " << len
2308 <<
" conics" << endl;
2312 int f_second =
FALSE;
2314 C.
init(nb_pts_on_conic, len, f_second, 0);
2317 cout <<
"The conic intersection type is (";
2319 cout <<
")" << endl << endl;
2326 if (len == allocation_length) {
2327 int new_allocation_length = allocation_length + 1024;
2330 long int **Pts_on_conic1;
2331 int *nb_pts_on_conic1;
2333 Pts_on_conic1 =
NEW_plint(new_allocation_length);
2334 nb_pts_on_conic1 =
NEW_int(new_allocation_length);
2335 for (i = 0; i < len; i++) {
2337 Pts_on_conic1[i] = Pts_on_conic[i];
2338 nb_pts_on_conic1[i] = nb_pts_on_conic[i];
2342 Pts_on_conic = Pts_on_conic1;
2343 nb_pts_on_conic = nb_pts_on_conic1;
2344 allocation_length = new_allocation_length;
2359 cout <<
"projective_space::conic_type_randomized done" << endl;
2364 int f_randomized,
int nb_times,
2365 long int *set,
int set_size,
2367 int *&intersection_type,
int &highest_intersection_number,
2371 int f_v = (verbose_level >= 1);
2373 long int **Pts_on_conic;
2375 int *nb_pts_on_conic;
2377 int i, j, idx, f, l, a, t;
2380 cout <<
"projective_space::conic_intersection_type threshold = " << threshold << endl;
2385 cout <<
"projective_space::conic_intersection_type "
2386 "randomized" << endl;
2390 Pts_on_conic, nb_pts_on_conic, nb_conics,
2395 cout <<
"projective_space::conic_intersection_type "
2396 "not randomized" << endl;
2399 set, set_size, threshold,
2400 Pts_on_conic, Conic_eqn, nb_pts_on_conic, nb_conics,
2405 int f_second =
FALSE;
2407 C.
init(nb_pts_on_conic, nb_conics, f_second, 0);
2409 cout <<
"projective_space::conic_intersection_type "
2410 "conic-intersection type: ";
2415 cout <<
"The conic intersection type is (";
2417 cout <<
")" << endl << endl;
2422 intersection_type =
NEW_int(highest_intersection_number + 1);
2423 Int_vec_zero(intersection_type, highest_intersection_number + 1);
2428 intersection_type[a] = l;
2431 if (f_save_largest_sets) {
2437 highest_intersection_number, verbose_level);
2438 for (j = 0; j < l; j++) {
2441 largest_sets->
Sets[j],
2442 highest_intersection_number);
2446 for (i = 0; i < nb_conics; i++) {
2454 cout <<
"projective_space::conic_intersection_type done" << endl;
2460 long int *set,
int set_size,
2461 std::vector<int> &Rk,
2464 int f_v = (verbose_level >= 1);
2469 long int **Pts_on_conic;
2471 int *nb_pts_on_conic;
2479 cout <<
"projective_space::determine_nonconical_six_subsets" << endl;
2482 cout <<
"projective_space::determine_nonconical_six_subsets n != 2" << endl;
2487 cout <<
"projective_space::determine_nonconical_six_subsets before conic_type" << endl;
2492 Pts_on_conic, Conic_eqn, nb_pts_on_conic, len,
2495 cout <<
"projective_space::determine_nonconical_six_subsets after conic_type" << endl;
2498 cout <<
"There are " << len <<
" conics. They contain the following points:" << endl;
2499 for (i = 0; i < len; i++) {
2500 cout << i <<
" : " << nb_pts_on_conic[i] <<
" : ";
2511 cout <<
"set_size=" << set_size << endl;
2512 cout <<
"N=number of 6-subsets of the set=" << N << endl;
2516 for (rk = 0; rk < N; rk++) {
2520 cout <<
"projective_space::conic_type rk=" << rk <<
" / " << N <<
" : ";
2525 for (i = 0; i < len; i++) {
2527 Pts_on_conic[i], nb_pts_on_conic[i], 0 )) {
2533 cout <<
" is a subset of the " << i <<
"th conic ";
2535 Pts_on_conic[i], nb_pts_on_conic[i]);
2544 cout <<
" not on conic " << i << endl;
2553 for (i = 0; i < len; i++) {
2568 cout <<
"computing Eckardt point number distribution" << endl;
2570 for (i = 0; i < nb; i++) {
2571 if ((i % 500) == 0) {
2572 cout << i <<
" / " << nb << endl;
2576 for (j = 0; j < 6; j++) {
2577 Arc6[j] = set[subset[j]];
2588 cout <<
"Eckardt point number distribution : ";
2602 cout <<
"The class of " << m <<
" is ";
2609 for (i = 0; i < nb_idx; i++) {
2614 cout << i <<
" / " << nb_idx <<
" idx=" << idx <<
", rk=" << rk <<
" :" << endl;
2620 for (j = 0; j < 6; j++) {
2621 Arc6[j] = set[subset[j]];
2626 cout <<
"nb_E != m" << endl;
2630 cout <<
"The subset is ";
2633 cout <<
" the arc is ";
2635 cout <<
" nb_E = " << nb_E << endl;
2642 fname.assign(
"set_system.csv");
2644 cout <<
"Written file " << fname <<
" of size " << Fio.
file_size(fname) << endl;
2651 cout <<
"distribution of points: ";
2661 cout <<
"projective_space::determine_nonconical_six_subsets done" << endl;
2666 long int *set,
int set_size,
2668 long int **&Pts_on_conic,
int **&Conic_eqn,
int *&nb_pts_on_conic,
int &nb_conics,
2671 int f_v = (verbose_level >= 1);
2672 int f_vv = (verbose_level >= 2);
2673 int f_v3 = (verbose_level >= 3);
2674 int rk, h, i, j, a, N, l;
2676 long int input_pts[5];
2683 long int *pts_on_conic;
2684 int allocation_length;
2690 cout <<
"projective_space::conic_type, threshold = " << threshold << endl;
2693 cout <<
"projective_space::conic_type n != 2" << endl;
2701 cout <<
"projective_space::conic_type the input "
2702 "set if not a set" << endl;
2709 cout <<
"set_size=" << set_size << endl;
2710 cout <<
"N=number of 5-subsets of the set=" << N << endl;
2714 coords =
NEW_int(set_size * 3);
2715 for (i = 0; i < set_size; i++) {
2719 cout <<
"projective_space::conic_type coords:" << endl;
2725 allocation_length = 1024;
2726 Pts_on_conic =
NEW_plint(allocation_length);
2727 Conic_eqn =
NEW_pint(allocation_length);
2728 nb_pts_on_conic =
NEW_int(allocation_length);
2732 for (rk = 0; rk < N; rk++) {
2736 cout <<
"projective_space::conic_type rk=" << rk <<
" / " << N <<
" : ";
2741 for (i = 0; i < nb_conics; i++) {
2743 Pts_on_conic[i], nb_pts_on_conic[i], 0)) {
2747 int_vec_print(cout, subset, 5);
2748 cout <<
" is a subset of the " << i <<
"th conic ";
2750 Pts_on_conic[i], nb_pts_on_conic[i]);
2757 if (i < nb_conics) {
2760 for (j = 0; j < 5; j++) {
2762 input_pts[j] = set[a];
2768 cout <<
"input_pts: ";
2774 six_coeffs, verbose_level - 2)) {
2776 cout <<
"determine_conic_in_plane returns FALSE" << endl;
2781 cout <<
"projective_space::conic_type rk=" << rk <<
" / " << N <<
" : ";
2783 cout <<
" has not yet been considered and a conic exists" << endl;
2786 cout <<
"determine_conic_in_plane the conic exists" << endl;
2796 cout << rk <<
"-th subset ";
2798 cout <<
" conic_rk=" << conic_rk << endl;
2804 cout <<
"projective_space::conic_type_randomized "
2805 "longinteger_vec_search(R, len, conic_rk, idx) "
2807 cout <<
"The current set is ";
2808 int_vec_print(cout, subset, 5);
2810 cout <<
"conic_rk=" << conic_rk << endl;
2811 cout <<
"The set where it should be is ";
2812 int_vec_print(cout, Pts_on_conic[idx], nb_pts_on_conic[idx]);
2814 cout <<
"R[idx]=" << R[idx] << endl;
2815 cout <<
"This is the " << idx <<
"th conic" << endl;
2822 cout <<
"considering conic of rank conic_rk=" << conic_rk <<
":" << endl;
2826 for (h = 0; h < set_size; h++) {
2831 cout <<
"testing point " << h <<
":" << endl;
2839 pts_on_conic[l++] = h;
2841 cout <<
"point " << h
2842 <<
" is on the conic" << endl;
2846 if (
FALSE && f_v3) {
2847 cout <<
"point " << h
2848 <<
" is not on the conic" << endl;
2853 cout <<
"We found an " << l <<
"-conic, "
2854 "its rank is " << conic_rk << endl;
2860 if (l >= threshold) {
2863 cout <<
"We found an " << l <<
"-conic, "
2864 "its rank is " << conic_rk << endl;
2865 cout <<
"The " << l <<
" points on the "
2866 << nb_conics <<
"th conic are: ";
2873 for (j = len; j > idx; j--) {
2874 R[j].swap_with(R[j - 1]);
2875 Pts_on_conic[j] = Pts_on_conic[j - 1];
2876 nb_pts_on_conic[j] = nb_pts_on_conic[j - 1];
2879 Pts_on_conic[idx] = pts_on_conic;
2880 nb_pts_on_conic[idx] = l;
2884 Pts_on_conic[nb_conics] = pts_on_conic;
2885 Conic_eqn[nb_conics] =
NEW_int(6);
2887 nb_pts_on_conic[nb_conics] = l;
2894 cout <<
"We now have found " << nb_conics
2895 <<
" conics" << endl;
2899 int f_second =
FALSE;
2901 C.
init(nb_pts_on_conic, nb_conics, f_second, 0);
2904 cout <<
"The conic intersection type is (";
2906 cout <<
")" << endl << endl;
2913 if (nb_conics == allocation_length) {
2914 int new_allocation_length = allocation_length + 1024;
2917 long int **Pts_on_conic1;
2919 int *nb_pts_on_conic1;
2921 Pts_on_conic1 =
NEW_plint(new_allocation_length);
2922 Conic_eqn1 =
NEW_pint(new_allocation_length);
2923 nb_pts_on_conic1 =
NEW_int(new_allocation_length);
2924 for (i = 0; i < nb_conics; i++) {
2926 Pts_on_conic1[i] = Pts_on_conic[i];
2927 Conic_eqn1[i] = Conic_eqn[i];
2928 nb_pts_on_conic1[i] = nb_pts_on_conic[i];
2933 Pts_on_conic = Pts_on_conic1;
2934 Conic_eqn = Conic_eqn1;
2935 nb_pts_on_conic = nb_pts_on_conic1;
2936 allocation_length = new_allocation_length;
2946 cout <<
"projective_space::conic_type we skip this conic" << endl;
2956 cout <<
"projective_space::conic_type we found " << nb_conics
2957 <<
" conics intersecting in at least "
2958 << threshold <<
" many points" << endl;
2962 cout <<
"projective_space::conic_type done" << endl;
2967 int *set,
int set_size,
int &nucleus,
2970 int f_v = (verbose_level >= 1);
2971 int i, j, a, b, l, sz, idx, t1, t2;
2976 cout <<
"projective_space::find_nucleus" << endl;
2980 cout <<
"projective_space::find_nucleus n != 2" << endl;
2983 if (set_size !=
F->
q + 1) {
2984 cout <<
"projective_space::find_nucleus "
2985 "set_size != F->q + 1" << endl;
2995 for (i = 0; i <
r; i++) {
3001 for (i = 0; i < set_size - 1; i++) {
3005 cout <<
"projective_space::find_nucleus "
3006 "cannot find secant in pencil" << endl;
3009 for (j = idx + 1; j < sz; j++) {
3010 Lines[j - 1] = Lines[j];
3015 cout <<
"projective_space::find_nucleus sz != 1" << endl;
3020 cout <<
"projective_space::find_nucleus t1 = " << t1 << endl;
3026 for (i = 0; i <
r; i++) {
3032 for (i = 0; i < set_size - 1; i++) {
3041 cout <<
"projective_space::find_nucleus "
3042 "cannot find secant in pencil" << endl;
3045 for (j = idx + 1; j < sz; j++) {
3046 Lines[j - 1] = Lines[j];
3051 cout <<
"projective_space::find_nucleus sz != 1" << endl;
3056 cout <<
"projective_space::find_nucleus t2 = " << t2 << endl;
3061 cout <<
"projective_space::find_nucleus "
3062 "nucleus = " << nucleus << endl;
3065 cout <<
"nucleus = ";
3073 cout <<
"projective_space::find_nucleus done" << endl;
3078 long int *&set,
int &set_size,
long int *three_points,
3081 int f_v = (verbose_level >= 1);
3082 long int three_lines[3];
3088 cout <<
"projective_space::points_on_projective_triangle" << endl;
3090 set_size = 3 * (
q - 1);
3102 for (i = 0; i < sz; i++) {
3104 if (a == three_points[0]) {
3107 if (a == three_points[1]) {
3110 if (a == three_points[2]) {
3115 if (h != set_size) {
3116 cout <<
"projective_space::points_on_projective_triangle "
3117 "h != set_size" << endl;
3124 cout <<
"projective_space::points_on_projective_triangle "
3130 int *A6,
int *Pts,
int nb_pts,
int *&Table,
3133 int f_v = (verbose_level >= 1);
3139 cout <<
"projective_space::elliptic_curve_addition_table" << endl;
3141 Table =
NEW_int(nb_pts * nb_pts);
3142 for (i = 0; i < nb_pts; i++) {
3144 for (j = 0; j < nb_pts; j++) {
3149 cout <<
"projective_space::elliptic_curve_addition_table cannot find point pk" << endl;
3150 cout <<
"i=" << i <<
" pi=" << pi <<
" j=" << j
3151 <<
" pj=" << pj <<
" pk=" << pk << endl;
3157 Table[i * nb_pts + j] =
k;
3161 cout <<
"projective_space::elliptic_curve_addition_table done" << endl;
3166 int *A6,
int p1_rk,
int p2_rk,
3169 int f_v = (verbose_level >= 1);
3170 int f_vv = (verbose_level >= 2);
3177 int a1, a2, a3, a4, a6;
3181 cout <<
"projective_space::elliptic_curve_addition" << endl;
3202 cout <<
"projective_space::elliptic_curve_addition "
3203 "x1=" << x1 <<
" y1=" << y1 <<
" z1=" << z1 << endl;
3204 cout <<
"projective_space::elliptic_curve_addition "
3205 "x2=" << x2 <<
" y2=" << y2 <<
" z2=" << z2 << endl;
3209 cout <<
"projective_space::elliptic_curve_addition "
3210 "z1 == 0 && p1_rk != 1" << endl;
3219 cout <<
"projective_space::elliptic_curve_addition "
3220 "z2 == 0 && p2_rk != 1" << endl;
3237 cout <<
"projective_space::elliptic_curve_addition "
3238 "z2 == 0 && p2_rk != 1" << endl;
3257 int lambda_top, lambda_bottom, lambda, nu_top, nu_bottom, nu;
3263 if (x1 == x2 && c == 0) {
3271 three =
F->
add(two, 1);
3280 F->
mult3(two, a2, x1), a4,
3283 F->
mult(a1, x1), a3);
3289 F->
mult(a1, x1), a3);
3298 nu_bottom = lambda_bottom;
3302 if (lambda_bottom == 0) {
3303 cout <<
"projective_space::elliptic_curve_addition "
3304 "lambda_bottom == 0" << endl;
3305 cout <<
"projective_space::elliptic_curve_addition "
3306 "x1=" << x1 <<
" y1=" << y1 <<
" z1=" << z1 << endl;
3307 cout <<
"projective_space::elliptic_curve_addition "
3308 "x2=" << x2 <<
" y2=" << y2 <<
" z2=" << z2 << endl;
3309 cout <<
"projective_space::elliptic_curve_addition "
3310 "a1=" << a1 << endl;
3311 cout <<
"projective_space::elliptic_curve_addition "
3312 "a2=" << a2 << endl;
3313 cout <<
"projective_space::elliptic_curve_addition "
3314 "a3=" << a3 << endl;
3315 cout <<
"projective_space::elliptic_curve_addition "
3316 "a4=" << a4 << endl;
3317 cout <<
"projective_space::elliptic_curve_addition "
3318 "a6=" << a6 << endl;
3323 if (nu_bottom == 0) {
3324 cout <<
"projective_space::elliptic_curve_addition "
3325 "nu_bottom == 0" << endl;
3331 cout <<
"projective_space::elliptic_curve_addition "
3332 "a1=" << a1 << endl;
3333 cout <<
"projective_space::elliptic_curve_addition "
3334 "a2=" << a2 << endl;
3335 cout <<
"projective_space::elliptic_curve_addition "
3336 "a3=" << a3 << endl;
3337 cout <<
"projective_space::elliptic_curve_addition "
3338 "a4=" << a4 << endl;
3339 cout <<
"projective_space::elliptic_curve_addition "
3340 "a6=" << a6 << endl;
3341 cout <<
"projective_space::elliptic_curve_addition "
3342 "three=" << three << endl;
3343 cout <<
"projective_space::elliptic_curve_addition "
3344 "lambda_top=" << lambda_top << endl;
3345 cout <<
"projective_space::elliptic_curve_addition "
3346 "lambda=" << lambda <<
" nu=" << nu << endl;
3358 cout <<
"projective_space::elliptic_curve_addition "
3359 "x3=" << x3 <<
" y3=" << y3 <<
" z3=" << z3 << endl;
3363 cout <<
"projective_space::elliptic_curve_addition "
3371 long int *Lines,
int nb_lines,
int *&M,
int &nb_planes,
3374 int f_v = (verbose_level >= 1);
3382 cout <<
"projective_space::line_plane_incidence_matrix_restricted" << endl;
3385 cout <<
"projective_space::line_plane_incidence_matrix_"
3386 "restricted n <= 2" << endl;
3389 line_sz = 2 * (
n + 1);
3392 M =
NEW_int(nb_lines * nb_planes);
3395 the_lines =
NEW_int(nb_lines * line_sz);
3399 for (i = 0; i < nb_lines; i++) {
3402 for (j = 0; j < nb_planes; j++) {
3404 for (i = 0; i < nb_lines; i++) {
3407 Work + 3 * (
n + 1), line_sz);
3409 M[i * nb_planes + j] = 1;
3417 cout <<
"projective_space::line_plane_incidence_matrix_restricted done" << endl;
3422 int line1,
int line2,
int verbose_level)
3424 int f_v = (verbose_level >= 1);
3431 cout <<
"projective_space::test_if_lines_are_skew" << endl;
3434 cout <<
"projective_space::test_if_lines_are_skew "
3439 cout <<
"line1=" << line1 <<
" line2=" << line2 << endl;
3443 cout <<
"line1:" << endl;
3448 cout <<
"line2:" << endl;
3455 cout <<
"projective_space::test_if_lines_are_skew done" << endl;
3467 long int line1,
long int line2,
int verbose_level)
3469 int f_v = (verbose_level >= 1);
3476 cout <<
"projective_space::point_of_intersection_of_a_line_and_a_line_in_three_space" << endl;
3479 cout <<
"projective_space::point_of_intersection_of_a_line_and_a_line_in_three_space n != 3" << endl;
3483 cout <<
"line1=" << line1 <<
" line2=" << line2 << endl;
3487 cout <<
"line1:" << endl;
3492 cout <<
"line2:" << endl;
3498 cout <<
"projective_space::point_of_intersection_of_a_line_and_a_line_in_three_space intersection "
3499 "is not a point" << endl;
3500 cout <<
"line1:" << endl;
3502 cout <<
"line2:" << endl;
3504 cout <<
"rk = " << rk << endl;
3508 cout <<
"intersection:" << endl;
3513 cout <<
"point rank = " << a << endl;
3516 cout <<
"projective_space::point_of_intersection_of_a_line_and_a_line_in_three_space done" << endl;
3522 long int line,
int plane,
int verbose_level)
3524 int f_v = (verbose_level >= 1);
3531 cout <<
"projective_space::point_of_intersection_of_a_line_and_a_plane_in_three_space" << endl;
3534 cout <<
"projective_space::point_of_intersection_of_a_line_and_a_plane_in_three_space n != 3" << endl;
3538 cout <<
"line=" << line <<
" plane=" << plane << endl;
3542 cout <<
"line:" << endl;
3547 cout <<
"plane:" << endl;
3553 cout <<
"projective_space::point_of_intersection_of_a_line_and_a_plane_in_three_space intersection "
3554 "is not a point" << endl;
3557 cout <<
"intersection:" << endl;
3562 cout <<
"point rank = " << a << endl;
3565 cout <<
"projective_space::point_of_intersection_of_a_line_and_a_plane_in_three_space done" << endl;
3571 long int plane1,
long int plane2,
int verbose_level)
3573 int f_v = (verbose_level >= 1);
3580 cout <<
"projective_space::line_of_intersection_of_two_planes_in_three_space" << endl;
3583 cout <<
"projective_space::line_of_intersection_of_"
3584 "two_planes_in_three_space n != 3" << endl;
3592 cout <<
"projective_space::line_of_intersection_of_two_planes_in_three_space intersection is not a line" << endl;
3596 cout <<
"projective_space::line_of_intersection_of_two_planes_in_three_space done" << endl;
3602 long int plane1,
long int plane2,
int verbose_level)
3604 int f_v = (verbose_level >= 1);
3611 cout <<
"projective_space::line_of_intersection_of_two_planes_in_three_space_using_dual_coordinates" << endl;
3614 cout <<
"projective_space::line_of_intersection_of_two_planes_in_three_space_using_dual_coordinates "
3627 cout <<
"projective_space::line_of_intersection_of_two_planes_in_three_space_using_dual_coordinates done" << endl;
3633 long int line1,
long int line2,
int pt,
int verbose_level)
3635 int f_v = (verbose_level >= 1);
3642 cout <<
"projective_space::transversal_to_two_skew_lines_through_a_point" << endl;
3645 cout <<
"projective_space::transversal_to_two_skew_lines_through_a_point "
3660 cout <<
"projective_space::transversal_to_two_skew_lines_through_a_point "
3669 long int *Planes,
int nb_planes,
int *&Intersection_matrix,
3672 int f_v = (verbose_level >= 1);
3676 cout <<
"projective_space::plane_intersection_matrix_in_three_space" << endl;
3678 Intersection_matrix =
NEW_int(nb_planes * nb_planes);
3679 for (i = 0; i < nb_planes; i++) {
3681 for (j = i + 1; j < nb_planes; j++) {
3683 Intersection_matrix[i * nb_planes + j] = -1;
3686 Intersection_matrix[i * nb_planes + j] = rk;
3687 Intersection_matrix[j * nb_planes + i] = rk;
3690 for (i = 0; i < nb_planes; i++) {
3691 Intersection_matrix[i * nb_planes + i] = -1;
3695 cout <<
"projective_space::plane_intersection_matrix_in_three_space done" << endl;
3700 int *eqn3,
int verbose_level)
3702 int f_v = (verbose_level >= 1);
3708 cout <<
"projective_space::line_rank_using_dual_coordinates_in_plane" << endl;
3713 cout <<
"projective_space::line_rank_using_dual_coordinates_in_plane rk != 1" << endl;
3718 cout <<
"projective_space::line_rank_using_dual_coordinates_in_plane" << endl;
3724 long int line_rank,
int verbose_level)
3726 int f_v = (verbose_level >= 1);
3732 cout <<
"projective_space::dual_rank_of_line_in_plane" << endl;
3737 cout <<
"projective_space::dual_rank_of_line_in_plane rk != 2" << endl;
3742 cout <<
"projective_space::dual_rank_of_line_in_plane done" << endl;
3750 int *eqn4,
int verbose_level)
3752 int f_v = (verbose_level >= 1);
3758 cout <<
"projective_space::plane_rank_using_dual_coordinates_in_three_space" << endl;
3763 cout <<
"projective_space::plane_rank_using_dual_coordinates_in_three_space rk != 1" << endl;
3768 cout <<
"projective_space::plane_rank_using_dual_coordinates_in_three_space" << endl;
3774 long int plane_rank,
int verbose_level)
3776 int f_v = (verbose_level >= 1);
3782 cout <<
"projective_space::dual_rank_of_plane_in_three_space" << endl;
3787 cout <<
"projective_space::dual_rank_of_plane_"
3788 "in_three_space rk != 3" << endl;
3793 cout <<
"projective_space::dual_rank_of_plane_in_three_space done" << endl;
3799 long int *three_lines,
int *plane_eqn4,
int verbose_level)
3801 int f_v = (verbose_level >= 1);
3806 cout <<
"projective_space::plane_equation_from_three_lines_in_three_space" << endl;
3811 cout <<
"projective_space::plane_equation_from_three_lines_in_three_space rk != 3" << endl;
3817 cout <<
"projective_space::plane_equation_from_three_lines_in_three_space done" << endl;
3822 int nb_subsets,
int *sz,
int **subsets,
3829 int f_v = (verbose_level >= 1);
3830 int nb_pts, nb_lines;
3836 cout <<
"projective_space::decomposition_from_set_partition" << endl;
3841 cout <<
"m = N_points = " << nb_pts << endl;
3842 cout <<
"n = N_lines = " << nb_lines << endl;
3846 for (i = 0; i < nb_pts; i++) {
3847 for (j = 0; j < nb_lines; j++) {
3860 Stack->
allocate(nb_pts + nb_lines, 0);
3866 for (level = 0; level < nb_subsets; level++) {
3874 if (sz[level] < l) {
3875 Stack->
split_cell(subsets[level], sz[level], 0);
3876 part[level] = Stack->
ht - 1;
3888 cout <<
"projective_space::decomposition level " << level
3889 <<
" : partition stack after splitting:" << endl;
3891 cout <<
"i : part[i]" << endl;
3892 for (i = 0; i < nb_subsets; i++) {
3893 cout << setw(3) << i <<
" : " << setw(3) << part[i] << endl;
3901 int f_labeled =
TRUE;
3902 int f_vv = (verbose_level >= 2);
3905 TDO_depth = nb_pts + nb_lines;
3908 cout <<
"projective_space::decomposition_from_set_partition "
3909 "before compute_TDO" << endl;
3911 hash = Inc->
compute_TDO(*Stack, ht0, TDO_depth, verbose_level + 2);
3913 cout <<
"projective_space::decomposition_from_set_partition "
3914 "after compute_TDO" << endl;
3932 cout <<
"projective_space::decomposition_from_set_partition done" << endl;
3939 long int line_rk, std::vector<long int> &plane_ranks,
3942 int f_v = (verbose_level >= 1);
3955 cout <<
"projective_space::planes_through_a_line" << endl;
3966 cout <<
"projective_space::planes_through_a_line M1=" << endl;
3971 base_cols, embedding, 0 );
3973 cout <<
"projective_space::planes_through_a_line r != 2" << endl;
3977 cout <<
"projective_space::planes_through_a_line after RREF, M1=" << endl;
3982 for (h = 0; h < N; h++) {
3986 for (j = 0; j < d - 2; j++) {
3987 v[embedding[j]] =
w[j];
3992 cout <<
"projective_space::planes_through_a_line h = " << h <<
", M2=" << endl;
4000 cout <<
"projective_space::planes_through_a_line h = " << h <<
", M2=" << endl;
4008 cout <<
"projective_space::planes_through_a_line h = " << h <<
" rk=" << rk << endl;
4010 plane_ranks.push_back(rk);
4020 cout <<
"projective_space::planes_through_a_line done" << endl;
4026 long int line1_from,
long int line2_from,
4027 long int line1_to,
long int line2_to,
int verbose_level)
4029 int f_v = (verbose_level >= 1);
4032 cout <<
"projective_space::do_move_two_lines_in_hyperplane_stabilizer" << endl;
4036 cout <<
"projective_space::do_move_two_lines_in_hyperplane_stabilizer n != 3" << endl;
4044 line1_from, line1_to,
4045 line2_from, line2_to,
4049 cout <<
"projective_space::do_move_two_lines_in_hyperplane_stabilizer A4=" << endl;
4053 cout <<
"projective_space::do_move_two_lines_in_hyperplane_stabilizer done" << endl;
4058 std::string line1_from_text, std::string line2_from_text,
4059 std::string line1_to_text, std::string line2_to_text,
4062 int f_v = (verbose_level >= 1);
4065 cout <<
"projective_space::do_move_two_lines_in_hyperplane_stabilizer_text" << endl;
4068 cout <<
"projective_space::do_move_two_lines_in_hyperplane_stabilizer n != 3" << endl;
4076 int *line1_from_data;
4077 int *line2_from_data;
4082 Int_vec_scan(line1_from_text.c_str(), line1_from_data, sz);
4084 cout <<
"line1_from_text must contain exactly 8 integers" << endl;
4087 Int_vec_scan(line2_from_text.c_str(), line2_from_data, sz);
4089 cout <<
"line2_from_text must contain exactly 8 integers" << endl;
4092 Int_vec_scan(line1_to_text.c_str(), line1_to_data, sz);
4094 cout <<
"line1_to_text must contain exactly 8 integers" << endl;
4097 Int_vec_scan(line2_to_text.c_str(), line2_to_data, sz);
4099 cout <<
"line2_to_text must contain exactly 8 integers" << endl;
4103 long int line1_from;
4104 long int line2_from;
4108 line1_from =
rank_line(line1_from_data);
4109 line2_from =
rank_line(line2_from_data);
4115 line1_from, line1_to,
4116 line2_from, line2_to,
4120 cout <<
"projective_space::do_move_two_lines_in_hyperplane_stabilizer_text A4=" << endl;
4124 cout <<
"projective_space::do_move_two_lines_in_hyperplane_stabilizer_text done" << endl;
a collection of combinatorial functions
int first_k_subset(int *set, int n, int k)
void unrank_k_subset(int rk, int *set, int n, int k)
int rank_k_subset(int *set, int n, int k)
long int generalized_binomial(int n, int k, int q)
long int int_n_choose_k(int n, int k)
int next_k_subset(int *set, int n, int k)
int maximum(int *v, int len)
data structure for set partitions following Jeffrey Leon
void subset_continguous(int from, int len)
void split_cell(int verbose_level)
std::ostream & print(std::ostream &ost)
void print_classes(std::ostream &ost)
void allocate(int n, int verbose_level)
void init_basic_constant_size(int underlying_set_size, int nb_sets, int constant_size, int verbose_level)
void init_with_Sz_in_int(int underlying_set_size, int nb_sets, long int **Pts, int *Sz, int verbose_level)
a collection of functions related to sorted vectors
int int_vec_search(int *v, int len, int a, int &idx)
void int_vec_heapsort(int *v, int len)
int test_if_set_with_return_value_lint(long int *set, int set_size)
void int_vec_heapsort_with_log(int *v, int *w, int len)
int longinteger_vec_search(ring_theory::longinteger_object *v, int len, ring_theory::longinteger_object &a, int &idx)
int lint_vec_search(long int *v, int len, long int a, int &idx, int verbose_level)
void lint_vec_heapsort(long int *v, int len)
int lint_vec_is_subset_of(int *set, int sz, long int *big_set, int big_set_sz, int verbose_level)
a statistical analysis of data consisting of single integers
void print_file_tex(std::ostream &ost, int f_backwards)
void init(int *data, int data_length, int f_second, int verbose_level)
void print(int f_backwards)
void print_naked(int f_backwards)
void get_class_by_value(int *&Pts, int &nb_pts, int value, int verbose_level)
int add4(int i1, int i2, int i3, int i4)
void PG_element_rank_modified(int *v, int stride, int len, int &a)
void PG_element_normalize_from_front(int *v, int stride, int len)
void PG_element_normalize(int *v, int stride, int len)
void PG_element_unrank_modified(int *v, int stride, int len, int a)
int belongs_to_quadratic_subfield(int a)
int mult3(int a1, int a2, int a3)
void int_vec_print_elements_exponential(std::ostream &ost, int *v, int len, std::string &symbol_for_print)
int frobenius_power(int a, int frob_power)
int add3(int i1, int i2, int i3)
void int_vec_print_field_elements(std::ostream &ost, int *v, int len)
void latex_matrix(std::ostream &f, int f_elements_exponential, std::string &symbol_for_print, int *M, int m, int n)
linear_algebra::linear_algebra * Linear_algebra
int has_quadratic_subfield()
various functions related to geometries
void hyperplane_lifting_with_two_lines_moved(projective_space *P, long int line1_from, long int line1_to, long int line2_from, long int line2_to, int *A4, int verbose_level)
long int nb_PG_elements(int n, int q)
void AG_element_rank_longinteger(int q, int *v, int stride, int len, ring_theory::longinteger_object &a)
to rank and unrank subspaces of a fixed dimension in F_q^n
void unrank_longinteger(ring_theory::longinteger_object &rk, int verbose_level)
void unrank_longinteger_here(int *Mtx, ring_theory::longinteger_object &rk, int verbose_level)
void unrank_lint(long int rk, int verbose_level)
long int rank_lint_here(int *Mtx, int verbose_level)
void rank_longinteger_here(int *Mtx, ring_theory::longinteger_object &rk, int verbose_level)
void unrank_lint_here(int *Mtx, long int rk, int verbose_level)
void init(int n, int k, field_theory::finite_field *F, int verbose_level)
interface for various incidence geometries
void get_and_print_decomposition_schemes(data_structures::partitionstack &PStack)
int compute_TDO(data_structures::partitionstack &PStack, int ht0, int depth, int verbose_level)
void print_partitioned(std::ostream &ost, data_structures::partitionstack &P, int f_labeled)
void init_by_matrix(int m, int n, int *M, int verbose_level)
void report(std::ostream &f)
int * Line_through_two_points
projective space PG(n,q) of dimension n over Fq
void find_nucleus(int *set, int set_size, int &nucleus, int verbose_level)
void cheat_sheet_line_intersection(std::ostream &f, int verbose_level)
long int line_of_intersection_of_two_planes_in_three_space_using_dual_coordinates(long int plane1, long int plane2, int verbose_level)
void do_move_two_lines_in_hyperplane_stabilizer_text(std::string line1_from_text, std::string line2_from_text, std::string line1_to_text, std::string line2_to_text, int verbose_level)
void plane_intersection(int plane_rank, long int *set, int set_size, std::vector< int > &point_indices, std::vector< int > &point_local_coordinates, int verbose_level)
void plane_intersection_type_fast(grassmann *G, long int *set, int set_size, ring_theory::longinteger_object *&R, long int **&Pts_on_plane, int *&nb_pts_on_plane, int &len, int verbose_level)
int point_of_intersection_of_a_line_and_a_plane_in_three_space(long int line, int plane, int verbose_level)
long int transversal_to_two_skew_lines_through_a_point(long int line1, long int line2, int pt, int verbose_level)
void plane_equation_from_three_lines_in_three_space(long int *three_lines, int *plane_eqn4, int verbose_level)
void print_set_numerical(std::ostream &ost, long int *set, int set_size)
void conic_type(long int *set, int set_size, int threshold, long int **&Pts_on_conic, int **&Conic_eqn, int *&nb_pts_on_conic, int &nb_conics, int verbose_level)
void line_intersection(int line_rank, long int *set, int set_size, std::vector< int > &point_indices, int verbose_level)
void elliptic_curve_addition_table(int *A6, int *Pts, int nb_pts, int *&Table, int verbose_level)
void plane_intersection_invariant(grassmann *G, long int *set, int set_size, int *&intersection_type, int &highest_intersection_number, int *&intersection_matrix, int &nb_planes, int verbose_level)
int determine_conic_in_plane(long int *input_pts, int nb_pts, int *six_coeffs, int verbose_level)
long int rank_line(int *basis)
int is_contained_in_Baer_subline(long int *pts, int nb_pts, int verbose_level)
void do_move_two_lines_in_hyperplane_stabilizer(long int line1_from, long int line2_from, long int line1_to, long int line2_to, int verbose_level)
void klein_correspondence(projective_space *P5, long int *set_in, int set_size, long int *set_out, int verbose_level)
void find_planes_which_intersect_in_at_least_s_points(long int *set, int set_size, int s, std::vector< int > &plane_ranks, int verbose_level)
long int dual_rank_of_line_in_plane(long int line_rank, int verbose_level)
void create_points_on_line(long int line_rk, long int *line, int verbose_level)
projective_space_implementation * Implementation
long int line_rank_using_dual_coordinates_in_plane(int *eqn3, int verbose_level)
void planes_through_a_line(long int line_rk, std::vector< long int > &plane_ranks, int verbose_level)
void intersection_of_subspace_with_point_set(grassmann *G, int rk, long int *set, int set_size, long int *&intersection_set, int &intersection_set_size, int verbose_level)
int is_incident(int pt, int line)
void points_on_projective_triangle(long int *&set, int &set_size, long int *three_points, int verbose_level)
void Pluecker_coordinates(int line_rk, int *v6, int verbose_level)
void cheat_sheet_point_table(std::ostream &f, int verbose_level)
long int plane_rank_using_dual_coordinates_in_three_space(int *eqn4, int verbose_level)
void plane_intersections(grassmann *G, long int *set, int set_size, ring_theory::longinteger_object *&R, data_structures::set_of_sets &SoS, int verbose_level)
void cheat_sheet_points_on_lines(std::ostream &f, int verbose_level)
void determine_nonconical_six_subsets(long int *set, int set_size, std::vector< int > &Rk, int verbose_level)
void print_line_set_numerical(long int *set, int set_size)
field_theory::finite_field * F
int nonconical_six_arc_get_nb_Eckardt_points(long int *Arc6, int verbose_level)
int test_if_lines_are_skew(int line1, int line2, int verbose_level)
void unrank_lines(int *v, long int *Rk, int nb)
void cheat_sheet_lines_on_points(std::ostream &f, int verbose_level)
void circle_type_of_line_subset(int *pts, int nb_pts, int *circle_type, int verbose_level)
long int nb_rk_k_subspaces_as_lint(int k)
int point_of_intersection_of_a_line_and_a_line_in_three_space(long int line1, long int line2, int verbose_level)
void cheat_polarity(std::ostream &f, int verbose_level)
void line_plane_incidence_matrix_restricted(long int *Lines, int nb_lines, int *&M, int &nb_planes, int verbose_level)
void do_pluecker_reverse(std::ostream &ost, grassmann *Gr, int k, int nb_k_subspaces, int verbose_level)
void decomposition_from_set_partition(int nb_subsets, int *sz, int **subsets, incidence_structure *&Inc, data_structures::partitionstack *&Stack, int verbose_level)
long int rank_point(int *v)
void print_set(long int *set, int set_size)
int determine_hermitian_form_in_plane(int *pts, int nb_pts, int *six_coeffs, int verbose_level)
void create_unital_XXq_YZq_ZYq_brute_force(long int *U, int &sz, int verbose_level)
void klein_correspondence_special_model(projective_space *P5, int *table, int verbose_level)
void plane_intersection_matrix_in_three_space(long int *Planes, int nb_planes, int *&Intersection_matrix, int verbose_level)
void cheat_sheet_subspaces(std::ostream &f, int k, int verbose_level)
void cheat_sheet_points(std::ostream &f, int verbose_level)
void Baer_subline(long int *pts3, long int *&pts, int &nb_pts, int verbose_level)
void cheat_sheet_line_through_pairs_of_points(std::ostream &f, int verbose_level)
void conic_type_randomized(int nb_times, long int *set, int set_size, long int **&Pts_on_conic, int *&nb_pts_on_conic, int &len, int verbose_level)
polarity * Reversal_polarity
void plane_intersection_type(grassmann *G, long int *set, int set_size, int *&intersection_type, int &highest_intersection_number, int verbose_level)
void init_incidence_structure(int verbose_level)
void conic_intersection_type(int f_randomized, int nb_times, long int *set, int set_size, int threshold, int *&intersection_type, int &highest_intersection_number, int f_save_largest_sets, data_structures::set_of_sets *&largest_sets, int verbose_level)
int elliptic_curve_addition(int *A6, int p1_rk, int p2_rk, int verbose_level)
void plane_intersection_type_slow(grassmann *G, long int *set, int set_size, ring_theory::longinteger_object *&R, long int **&Pts_on_plane, int *&nb_pts_on_plane, int &len, int verbose_level)
long int line_of_intersection_of_two_planes_in_three_space(long int plane1, long int plane2, int verbose_level)
polarity * Standard_polarity
int intersection_of_two_lines(long int l1, long int l2)
void intersection_of_subspace_with_point_set_rank_is_longinteger(grassmann *G, ring_theory::longinteger_object &rk, long int *set, int set_size, long int *&intersection_set, int &intersection_set_size, int verbose_level)
long int rank_plane(int *basis)
void unrank_plane(int *basis, long int rk)
long int dual_rank_of_plane_in_three_space(long int plane_rank, int verbose_level)
long int line_through_two_points(long int p1, long int p2)
void unrank_point(int *v, long int rk)
void unrank_line(int *basis, long int rk)
int Pluecker_34(int *x4, int *y4)
void reduce_mod_subspace_and_get_coefficient_vector(int k, int len, int *basis, int *base_cols, int *v, int *coefficients, int verbose_level)
int Pluecker_13(int *x4, int *y4)
int base_cols_and_embedding(int m, int n, int *A, int *base_cols, int *embedding, int verbose_level)
int Gauss_easy(int *A, int m, int n)
int Pluecker_14(int *x4, int *y4)
int Pluecker_12(int *x4, int *y4)
int RREF_and_kernel(int n, int k, int *A, int verbose_level)
int rank_of_rectangular_matrix(int *A, int m, int n, int verbose_level)
int Pluecker_42(int *x4, int *y4)
int Pluecker_23(int *x4, int *y4)
int evaluate_conic_form(int *six_coeffs, int *v3)
int Gauss_simple(int *A, int m, int n, int *base_cols, int verbose_level)
void matrix_get_kernel(int *M, int m, int n, int *base_cols, int nb_base_cols, int &kernel_m, int &kernel_n, int *kernel, int verbose_level)
int intersect_subspaces(int n, int k1, int *A, int k2, int *B, int &k3, int *intersection, int verbose_level)
basic number theoretic functions
int i_power_j(int i, int j)
a collection of functions related to file io
void int_matrix_write_csv(std::string &fname, int *M, int m, int n)
long int file_size(std::string &fname)
interface to create latex output files
void print_integer_matrix_with_labels(std::ostream &ost, int *p, int m, int n, int *row_labels, int *col_labels, int f_tex)
data_structures::int_vec * Int_vec
interface to system functions
int random_integer(int p)
a class to represent arbitrary precision integers
void assign_to(longinteger_object &b)
void create(long int i, const char *file, int line)
void swap_with(longinteger_object &b)
#define Lint_vec_copy(A, B, C)
#define Int_vec_scan(A, B, C)
#define Int_vec_print_integer_matrix(A, B, C, D)
#define Int_vec_zero(A, B)
#define Lint_vec_print(A, B, C)
#define Int_vec_print_integer_matrix_width(A, B, C, D, E, F)
#define Int_matrix_print(A, B, C)
#define NEW_OBJECTS(type, n)
#define Int_vec_copy(A, B, C)
#define Int_vec_print(A, B, C)
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
the orbiter library for the classification of combinatorial objects