18namespace layer1_foundations {
19namespace algebraic_geometry {
25 int f_v = (verbose_level >= 1);
28 cout <<
"surface_domain::init_Schlaefli" << endl;
37 cout <<
"surface_domain::init_Schlaefli done" << endl;
52 for (i = 0; i < nb; i++) {
67 int *coeff,
int verbose_level)
69 int f_v = (verbose_level >= 1);
75 cout <<
"surface_domain::build_cubic_surface_from_lines" << endl;
79 cout <<
"surface_domain::build_cubic_surface_from_lines before create_system" << endl;
83 cout <<
"surface_domain::build_cubic_surface_from_lines after create_system" << endl;
90 cout <<
"surface_domain::build_cubic_surface_from_lines before F->Gauss_simple" << endl;
95 cout <<
"surface_domain::build_cubic_surface_from_lines after F->Gauss_simple" << endl;
99 cout <<
"surface_domain::create_system "
100 "The system in RREF:" << endl;
104 cout <<
"surface_domain::create_system "
105 "The system has rank " << r << endl;
110 cout <<
"surface_domain::build_cubic_surface_from_lines "
111 "r != nb_monomials - 1" << endl;
112 cout <<
"r=" << r << endl;
116 int kernel_m, kernel_n;
119 cout <<
"surface_domain::build_cubic_surface_from_lines before F->matrix_get_kernel" << endl;
122 kernel_m, kernel_n, coeff, 0 );
124 cout <<
"surface_domain::build_cubic_surface_from_lines after F->matrix_get_kernel" << endl;
132 cout <<
"surface_domain::build_cubic_surface_from_lines done" << endl;
139 int f_v = (verbose_level >= 1);
145 cout <<
"surface_domain::rank_of_system" << endl;
159 cout <<
"surface_domain::rank_of_system done" << endl;
166 int *&System,
int &nb_rows,
int verbose_level)
169 int f_v = (verbose_level >= 1);
174 cout <<
"surface_domain::create_system" << endl;
177 cout <<
"surface_domain::create_system len = " << len << endl;
180 vector<long int> Pts;
181 long int *pts_on_line;
187 for (i = 0; i < len; i++) {
191 for (j = 0; j <
P->
k; j++) {
198 cout <<
"surface_domain::create_system before P->create_points_on_line" << endl;
204 cout <<
"surface_domain::create_system after P->create_points_on_line" << endl;
207 for (j = 0; j <
P->
k; j++) {
208 Pts.push_back(pts_on_line[j]);
215 if (nb_pts > max_pts) {
216 cout <<
"surface_domain::create_system "
217 "nb_pts > max_pts" << endl;
221 cout <<
"surface_domain::create_system list of "
222 "covered points by lines:" << endl;
223 lint_matrix_print(pt_list, len,
P->
k);
228 cout <<
"surface_domain::create_system list of "
229 "covered points by lines has been created" << endl;
233 nb_rows = Pts.size();
236 cout <<
"surface_domain::create_system nb_rows = " << nb_rows << endl;
237 cout <<
"surface_domain::create_system n = " <<
n << endl;
241 for (i = 0; i < nb_rows; i++) {
246 cout <<
"surface_domain::create_system list of "
247 "covered points in coordinates:" << endl;
252 cout <<
"surface_domain::create_system nb_rows = " << nb_rows << endl;
257 for (i = 0; i < nb_rows; i++) {
266 cout <<
"surface_domain::create_system "
267 "The system has been created" << endl;
270 cout <<
"surface_domain::create_system "
271 "The system:" << endl;
276 cout <<
"surface_domain::create_system done" << endl;
281 long int *Lines,
int nb_lines,
282 long int *&Intersection_pt,
285 int f_v = (verbose_level >= 1);
286 int j1, j2, a1, a2, pt;
289 cout <<
"surface_domain::compute_intersection_points" << endl;
291 Intersection_pt =
NEW_lint(nb_lines * nb_lines);
293 for (j1 = 0; j1 < nb_lines; j1++) {
295 for (j2 = j1 + 1; j2 < nb_lines; j2++) {
297 if (Adj[j1 * nb_lines + j2]) {
299 Intersection_pt[j1 * nb_lines + j2] = pt;
300 Intersection_pt[j2 * nb_lines + j1] = pt;
305 cout <<
"surface_domain::compute_intersection_points done" << endl;
310 long int *Points,
int nb_points,
311 long int *Lines,
int nb_lines,
312 int *&Intersection_pt,
int *&Intersection_pt_idx,
315 int f_v = (verbose_level >= 1);
322 cout <<
"surface_domain::compute_intersection_points_and_indices" << endl;
324 Intersection_pt =
NEW_int(nb_lines * nb_lines);
325 Intersection_pt_idx =
NEW_int(nb_lines * nb_lines);
327 for (j1 = 0; j1 < nb_lines; j1++) {
329 for (j2 = j1 + 1; j2 < nb_lines; j2++) {
331 if (Adj[j1 * nb_lines + j2]) {
335 cout <<
"surface_domain::compute_intersection_points_and_indices "
336 "cannot find point in Points" << endl;
340 cout <<
"j1=" << j1 << endl;
341 cout <<
"j2=" << j2 << endl;
342 cout <<
"a1=" << a1 << endl;
343 cout <<
"a2=" << a2 << endl;
344 cout <<
"pt=" << pt << endl;
347 Intersection_pt[j1 * nb_lines + j2] = pt;
348 Intersection_pt[j2 * nb_lines + j1] = pt;
349 Intersection_pt_idx[j1 * nb_lines + j2] = idx;
350 Intersection_pt_idx[j2 * nb_lines + j1] = idx;
355 cout <<
"surface_domain::compute_intersection_points_and_indices done" << endl;
360 long int *lines_meet3,
long int *lines_skew3,
361 long int *&lines,
int &nb_lines,
364 int f_v = (verbose_level >= 1);
371 cout <<
"surface_domain::lines_meet3_and_skew3" << endl;
372 cout <<
"The three lines we will meet are ";
375 cout <<
"The three lines we will be skew to are ";
379 for (i = 0; i < 3; i++) {
383 for (i = 0; i < 3; i++) {
392 for (i = 0; i < perp_sz; i++) {
393 for (j = 0; j < 3; j++) {
395 o_rank[3 + j]) == 0) {
400 lines[nb_lines++] = perp[i];
406 for (i = 0; i < nb_lines; i++) {
411 cout <<
"surface_domain::lines_meet3_and_skew3 done" << endl;
416 long int *&perp,
int &perp_sz,
int verbose_level)
418 int f_v = (verbose_level >= 1);
423 cout <<
"surface_domain::perp_of_three_lines" << endl;
424 cout <<
"The three lines are ";
428 for (i = 0; i < 3; i++) {
434 for (i = 0; i < perp_sz; i++) {
440 cout <<
"surface_domain::perp_of_three_lines done" << endl;
453 long int *four_lines,
long int *trans12,
454 int &perp_sz,
int verbose_level)
456 int f_v = (verbose_level >= 1);
463 cout <<
"surface_domain::perp_of_four_lines" << endl;
464 cout <<
"The four lines are ";
468 for (i = 0; i < 4; i++) {
476 cout <<
"perp_sz = " << perp_sz <<
" != 2" << endl;
488 cout <<
"surface_domain::perp_of_four_lines done" << endl;
494 long int *four_lines,
497 int f_v = (verbose_level >= 1);
504 cout <<
"surface_domain::rank_of_four_lines_on_Klein_quadric" << endl;
505 cout <<
"The four lines are ";
509 for (i = 0; i < 4; i++) {
515 for (i = 0; i < 4; i++) {
522 cout <<
"surface_domain::rank_of_four_lines_on_Klein_quadric done" << endl;
534 long int *five_pts,
long int *double_six,
537 int f_v = (verbose_level >= 1);
543 cout <<
"surface_domain::create_double_six_from_five_lines_with_a_common_transversal" << endl;
544 cout <<
"The five lines are ";
548 for (i = 0; i < 5; i++) {
552 for (i = 0; i < 5; i++) {
553 for (j = i + 1; j < 5; j++) {
555 o_rank[i], o_rank[j]) == 0) {
556 cout <<
"surface_domain::create_double_six_from_five_lines_with_a_common_transversal two of the given lines "
557 "intersect, error" << endl;
563 cout <<
"surface_domain::create_double_six_from_five_lines_with_a_common_transversal" << endl;
564 cout <<
"The five lines as orthogonal points are ";
576 long int opposites[5];
577 long int transversal = 0;
584 cout <<
"surface_domain::create_double_six_from_five_lines_with_a_common_transversal computing perp of 4-subsets" << endl;
586 for (rk = 0; rk < nb_subsets; rk++) {
588 for (i = 0; i < 4; i++) {
589 pts[i] = o_rank[subset[i]];
593 cout <<
"surface_domain::create_double_six_from_five_lines_with_a_common_transversal subset " << rk <<
" / " << nb_subsets <<
" : " << endl;
596 Perp[rk], Perp_sz[rk], 0);
598 cout <<
"surface_domain::create_double_six_from_five_lines_with_a_common_transversal the perp of the subset ";
600 cout <<
" has size " << Perp_sz[rk] <<
" : ";
604 if (Perp_sz[rk] != 2) {
605 cout <<
"surface_domain::create_double_six_from_five_lines_with_a_common_transversal "
606 "Perp_opp_sz != 2, something is wrong" << endl;
607 cout <<
"subset " << rk <<
" / " << nb_subsets << endl;
617 if (lines[0] == Perp[rk][0]) {
618 transversal = lines[0];
619 opposites[0] = lines[1];
620 opposites[1] = Perp[rk][1];
622 else if (lines[0] == Perp[rk][1]) {
623 transversal = lines[0];
624 opposites[0] = lines[1];
625 opposites[1] = Perp[rk][0];
627 else if (lines[1] == Perp[rk][0]) {
628 transversal = lines[1];
629 opposites[0] = lines[0];
630 opposites[1] = Perp[rk][1];
632 else if (lines[1] == Perp[rk][1]) {
633 transversal = lines[1];
634 opposites[0] = lines[0];
635 opposites[1] = Perp[rk][0];
639 if (transversal == Perp[rk][0]) {
640 opposites[rk] = Perp[rk][1];
643 opposites[rk] = Perp[rk][0];
648 cout <<
"surface_domain::create_double_six_from_five_lines_with_a_common_transversal" << endl;
649 cout <<
"opposites ";
654 o_rank[11] = transversal;
655 for (i = 0; i < 5; i++) {
656 o_rank[10 - i] = opposites[i];
661 long int transversal_opp;
665 cout <<
"surface_domain::create_double_six_from_five_lines_with_a_common_transversal before O->perp_of_k_points" << endl;
670 cout <<
"surface_domain::create_double_six_from_five_lines_with_a_common_transversal after O->perp_of_k_points" << endl;
673 cout <<
"the perp of the opposite subset ";
675 cout <<
" has size " << Perp_opp_sz <<
":";
679 if (Perp_opp_sz != 2) {
681 cout <<
"surface_domain::create_double_six_from_five_lines_with_a_common_transversal Perp_opp_sz != 2, "
682 "something is wrong" << endl;
688 transversal_opp = -1;
689 if (Perp_opp[0] == o_rank[0]) {
690 transversal_opp = Perp_opp[1];
692 else if (Perp_opp[1] == o_rank[0]) {
693 transversal_opp = Perp_opp[0];
696 cout <<
"surface_domain::create_double_six_from_five_lines_with_a_common_transversal something is wrong "
697 "with Perp_opp" << endl;
701 o_rank[5] = transversal_opp;
704 cout <<
"surface_domain::create_double_six_from_five_lines_with_a_common_transversal" << endl;
710 for (i = 0; i < 12; i++) {
714 cout <<
"surface_domain::create_double_six_from_five_lines_with_a_common_transversal" << endl;
715 cout <<
"double_six ";
723 for (i = 0; i < 12; i++) {
724 for (j = 0; j < 12; j++) {
726 o_rank[i], o_rank[j]) == 0) {
741 for (i = 0; i < nb_subsets; i++) {
748 cout <<
"surface_domain::create_double_six_from_five_lines_with_a_common_transversal done" << endl;
761 long int *single_six,
762 long int *double_six,
int verbose_level)
764 int f_v = (verbose_level >= 1);
772 cout <<
"surface_domain::create_double_six_from_six_disjoint_lines" << endl;
774 for (i = 0; i < 6; i++) {
778 for (i = 0; i < 6; i++) {
779 for (j = i + 1; j < 6; j++) {
781 o_rank[i], o_rank[j]) == 0) {
782 cout <<
"two of the given lines intersect, error" << endl;
790 long int **Perp_without_pt;
796 for (i = 0; i < 6; i++) {
798 O->
perp(o_rank[i], Perp_without_pt[i], perp_sz,
801 cout <<
"perp_sz != sz" << endl;
807 cout <<
"perp_sz=" << perp_sz << endl;
808 for (i = 0; i < 6; i++) {
825 long int six2, six3, six4, six5, rk, rk2;
831 for (rk = 0; rk < six2; rk++) {
834 Perp_without_pt[subset[0]],
836 Perp_without_pt[subset[1]],
840 cout <<
"Perp_" << subset[0] <<
" \\cap Perp_" << subset[1]
841 <<
" of size " << I2_sz[rk] <<
" = ";
849 for (rk = 0; rk < six3; rk++) {
854 Perp_without_pt[subset[2]],
858 cout <<
"Perp_" << subset[0] <<
" \\cap Perp_" << subset[1]
859 <<
" \\cap Perp_" << subset[2] <<
" of size "
860 << I3_sz[rk] <<
" = ";
869 for (rk = 0; rk < six4; rk++) {
874 Perp_without_pt[subset[3]], perp_sz,
877 cout << rk <<
" / " << six4 <<
" : Perp_" << subset[0]
878 <<
" \\cap Perp_" << subset[1] <<
" \\cap Perp_"
879 << subset[2] <<
" \\cap Perp_" << subset[3]
880 <<
" of size " << I4_sz[rk] <<
" = ";
889 for (rk = 0; rk < six5; rk++) {
894 Perp_without_pt[subset[4]], perp_sz,
897 cout << rk <<
" / " << six5 <<
" : Perp_" << subset[0]
898 <<
" \\cap Perp_" << subset[1] <<
" \\cap Perp_"
899 << subset[2] <<
" \\cap Perp_" << subset[3]
900 <<
" \\cap Perp_" << subset[4] <<
" of size "
901 << I5_sz[rk] <<
" = ";
906 if (I5_sz[rk] != 1) {
907 cout <<
"surface_domain::create_double_six I5_sz[rk] != 1" << endl;
912 for (i = 0; i < 6; i++) {
913 o_rank[6 + i] = I5[6 - 1 - i][0];
915 for (i = 0; i < 12; i++) {
921 for (i = 0; i < 6; i++) {
929 for (i = 0; i < six2; i++) {
938 for (i = 0; i < six3; i++) {
947 for (i = 0; i < six4; i++) {
957 for (i = 0; i < six5; i++) {
968 cout <<
"surface_domain::create_double_six_from_six_disjoint_lines done" << endl;
981 long int *double_six,
982 long int *fifteen_other_lines,
int verbose_level)
984 int f_v = (verbose_level >= 1);
987 cout <<
"surface_domain::create_the_fifteen_other_lines" << endl;
996 cout <<
"creating the 30 planes:" << endl;
998 for (h = 0; h < 30; h++) {
1006 cout <<
"the rank is not 3" << endl;
1012 cout <<
"plane " << h <<
" / " << 30
1013 <<
" has rank " << Planes[h] <<
" and basis ";
1020 cout <<
"creating the 15 lines:" << endl;
1022 for (h = 0; h < 15; h++) {
1032 cout <<
"the rank is not 2" << endl;
1037 for (i = 0; i < 2; i++) {
1042 cout <<
"line " << h <<
" / " << 15
1043 <<
" has rank " << Lines[h]
1057 cout <<
"surface_domain::create_the_fifteen_other_lines done" << endl;
1071 int f_v = (verbose_level >= 1);
1077 cout <<
"surface_domain::test_double_six_property" << endl;
1086 for (i = 0; i < 12; i++) {
1087 for (j = i + 1; j < 12; j++) {
1088 if (i < 6 && j < 6) {
1091 else if (i >= 6 && j >= 6) {
1094 else if (i < 6 && j >= 6) {
1102 if (Adj[i * 12 + j] != expect) {
1103 cout <<
"surface_domain::test_double_six_property double six property is "
1113 cout <<
"surface_domain::test_double_six_property done" << endl;
1132 int *&Adj,
long int *S,
int n,
int verbose_level)
1134 int f_v = (verbose_level >= 1);
1139 cout <<
"surface_domain::compute_adjacency_matrix_of_line_intersection_graph" << endl;
1144 cout <<
"surface_domain::compute_adjacency_matrix_of_line_intersection_graph n > 27" << endl;
1150 for (i = 0; i <
n; i++) {
1156 for (i = 0; i <
n; i++) {
1157 for (j = i + 1; j <
n; j++) {
1159 o_rank[i], o_rank[j]) == 0) {
1167 cout <<
"surface_domain::compute_adjacency_matrix_of_line_intersection_graph done" << endl;
1179 int *&Adj,
long int *S,
int n,
int verbose_level)
1181 int f_v = (verbose_level >= 1);
1186 cout <<
"surface_domain::compute_adjacency_matrix_of_line_disjointness_graph" << endl;
1191 cout <<
"surface_domain::compute_adjacency_matrix_of_line_disjointness_graph n > 27" << endl;
1197 for (i = 0; i <
n; i++) {
1203 for (i = 0; i <
n; i++) {
1204 for (j = i + 1; j <
n; j++) {
1206 o_rank[i], o_rank[j]) != 0) {
1214 cout <<
"surface_domain::compute_adjacency_matrix_of_line_disjointness_graph done" << endl;
1219 long int *Pts_on_surface,
int nb_points_on_surface,
1220 long int *Lines,
int nb_lines,
1225 int f_v = (verbose_level >= 1);
1227 int *Surf_pt_coords;
1232 cout <<
"surface_domain::compute_points_on_lines" << endl;
1234 f_is_on_line =
NEW_int(nb_points_on_surface);
1239 nb_lines,
q + 1, 0 );
1240 Surf_pt_coords =
NEW_int(nb_points_on_surface * 4);
1241 for (i = 0; i < nb_points_on_surface; i++) {
1246 for (i = 0; i < nb_lines; i++) {
1252 for (j = 0; j < nb_points_on_surface; j++) {
1258 f_is_on_line[j] =
TRUE;
1270 cout <<
"surface_domain::compute_points_on_lines done" << endl;
1275 long int *&Rk,
int &nb_subsets,
1276 long int *lines,
int sz,
int verbose_level)
1278 int f_v = (verbose_level >= 1);
1280 long int four_lines[4];
1286 cout <<
"surface_domain::compute_rank_of_any_four" << endl;
1290 for (rk = 0; rk < nb_subsets; rk++) {
1292 for (i = 0; i < 4; i++) {
1293 four_lines[i] = lines[subset[i]];
1297 cout <<
"testing subset " << rk <<
" / "
1298 << nb_subsets <<
" : " << endl;
1308 cout <<
"Ranks:" << endl;
1313 cout <<
"surface_domain::compute_rank_of_any_four done" << endl;
1319 int *given_double_six,
1320 long int *New_lines,
1323 int f_v = (verbose_level >= 1);
1329 cout <<
"surface_domain::rearrange_lines_according_to_a_given_double_six" << endl;
1332 cout <<
"surface_domain::rearrange_lines_according_to_a_given_double_six "
1333 "before compute_adjacency_matrix_of_line_intersection_graph" << endl;
1336 Lines, nb_lines, 0 );
1338 for (i = 0; i < 12; i++) {
1339 New_lines[i] = Lines[given_double_six[i]];
1344 for (i = 0; i < 6; i++) {
1345 for (j = i + 1; j < 6; j++, h++) {
1351 cout <<
"New_lines:";
1359 cout <<
"surface_domain::rearrange_lines_according_to_a_given_double_six done" << endl;
1371 int f_v = (verbose_level >= 1);
1374 long int New_lines[27];
1377 cout <<
"surface_domain::rearrange_lines_according_to_double_six" << endl;
1380 cout <<
"surface_domain::rearrange_lines_according_to_double_six "
1381 "before compute_adjacency_matrix_of_line_"
1382 "intersection_graph" << endl;
1385 Lines, nb_lines, 0 );
1395 cout <<
"surface_domain::rearrange_lines_according_to_double_six "
1396 "before line_intersections->init_from_adjacency_matrix"
1403 cout <<
"surface_domain::rearrange_lines_according_to_double_six "
1404 "before list_starter_configurations" << endl;
1407 line_intersections, Starter_Table, nb_starter,
1410 int l, line_idx, subset_idx;
1412 if (nb_starter == 0) {
1413 cout <<
"surface_domain::rearrange_lines_according_to_double_six "
1414 "nb_starter == 0" << endl;
1418 line_idx = Starter_Table[l * 2 + 0];
1419 subset_idx = Starter_Table[l * 2 + 1];
1422 cout <<
"surface_domain::rearrange_lines_according_to_double_six "
1423 "before rearrange_lines_according_to_starter_"
1424 "configuration" << endl;
1428 line_idx, subset_idx, Adj,
1429 line_intersections, 0 );
1437 cout <<
"surface_domain::rearrange_lines_according_"
1438 "to_double_six done" << endl;
1443 long int *Lines,
long int *New_lines,
1444 int line_idx,
int subset_idx,
int *Adj,
1448 int f_v = (verbose_level >= 1);
1456 cout <<
"surface_domain::rearrange_lines_according_to_starter_configuration" << endl;
1460 line_intersections, Lines, S3, 0 );
1464 cout <<
"line_intersections:" << endl;
1469 for (i = 0; i < 6; i++) {
1471 cout <<
"could not find the line" << endl;
1478 cout <<
"The 5+1 lines are ";
1483 Line_idx[11] = Line_idx[5];
1487 New_lines[11] = S3[5];
1490 cout <<
"computing b_j:" << endl;
1492 for (i = 0; i < 5; i++) {
1496 cout << i <<
" / " << 5 <<
":" << endl;
1500 Int_vec_copy(Line_idx + i + 1, four_lines + i, 5 - i - 1);
1502 cout <<
"four_lines=";
1508 Adj, four_lines, Line_idx[11], verbose_level);
1510 cout <<
"b_" << i + 1 <<
" = "
1511 << Line_idx[6 + i] << endl;
1515 int five_lines_idx[5];
1518 five_lines_idx, verbose_level);
1520 cout <<
"a_" << i + 1 <<
" = "
1521 << Line_idx[5] << endl;
1525 long int double_six[12];
1528 for (i = 0; i < 12; i++) {
1529 double_six[i] = Lines[Line_idx[i]];
1534 for (i = 0; i < 6; i++) {
1535 for (j = i + 1; j < 6; j++, h++) {
1542 cout <<
"New_lines:";
1548 cout <<
"surface_domain::rearrange_lines_according_to_starter_configuration done" << endl;
1553 int *four_lines_idx,
int b6,
int verbose_level)
1555 int f_v = (verbose_level >= 1);
1559 cout <<
"surface_domain::intersection_of_four_lines_but_not_b6" << endl;
1561 for (i = 0; i < 27; i++) {
1565 for (j = 0; j < 4; j++) {
1566 if (Adj[i * 27 + four_lines_idx[j]] == 0) {
1576 cout <<
"surface_domain::intersection_of_four_lines_but_not_b6 could not find the line" << endl;
1581 cout <<
"surface_domain::intersection_of_four_lines_but_not_b6 done" << endl;
1587 int *five_lines_idx,
int verbose_level)
1589 int f_v = (verbose_level >= 1);
1593 cout <<
"surface_domain::intersection_of_five_lines" << endl;
1595 for (i = 0; i < 27; i++) {
1596 for (j = 0; j < 5; j++) {
1597 if (Adj[i * 27 + five_lines_idx[j]] == 0) {
1607 cout <<
"surface_domain::intersection_of_five_lines "
1608 "could not find the line" << endl;
1613 cout <<
"surface_domain::intersection_of_five_lines done" << endl;
1620 long int *New_lines,
long int *double_six,
int verbose_level)
1622 int f_v = (verbose_level >= 1);
1627 cout <<
"surface_domain::rearrange_lines_according_to_a_given_double_six" << endl;
1629 for (i = 0; i < 12; i++) {
1630 New_lines[i] = Lines[double_six[i]];
1633 for (i = 0; i < 6; i++) {
1634 for (j = i + 1; j < 6; j++, h++) {
1636 New_lines , i, j, 0 );
1640 cout <<
"New_lines:";
1646 cout <<
"surface_domain::rearrange_lines_according_to_a_given_double_six done" << endl;
1651 int *The_plane_equations,
1652 long int *Lines27,
int verbose_level)
1654 int f_v = (verbose_level >= 1);
1655 int line_idx, plane1, plane2;
1659 cout <<
"surface_domain::create_lines_from_plane_equations" << endl;
1662 for (line_idx = 0; line_idx < 27; line_idx++) {
1664 line_idx, plane1, plane2, 0 );
1665 Int_vec_copy(The_plane_equations + plane1 * 4, Basis, 4);
1666 Int_vec_copy(The_plane_equations + plane2 * 4, Basis + 4, 4);
1668 Lines27[line_idx] =
rank_line(Basis + 8);
1672 cout <<
"surface_domain::create_lines_from_plane_equations done" << endl;
1679 long int *double_six,
long int *fifteen_lines,
1682 int f_v = (verbose_level >= 1);
1683 int f_vv = (verbose_level >= 2);
1687 cout <<
"surface_domain::create_remaining_fifteen_lines" << endl;
1690 for (i = 0; i < 6; i++) {
1691 for (j = i + 1; j < 6; j++) {
1693 cout <<
"surface_domain::create_remaining_fifteen_lines "
1694 "creating line c_ij where i=" << i
1695 <<
" j=" << j <<
":" << endl;
1697 fifteen_lines[h++] =
compute_cij(double_six, i, j, 0 );
1701 cout <<
"surface_domain::create_remaining_fifteen_lines done" << endl;
1711 int i,
int j,
int verbose_level)
1713 int f_v = (verbose_level >= 1);
1714 long int ai, aj, bi, bj;
1722 int kernel_m, kernel_n;
1726 cout <<
"surface_domain::compute_cij" << endl;
1730 bi = double_six[6 + i];
1731 bj = double_six[6 + j];
1738 cout <<
"The rank of Basis1 is not 3" << endl;
1743 cout <<
"The rank of Basis2 is not 3" << endl;
1747 cout <<
"surface_domain::compute_cij before matrix_get_"
1748 "kernel Basis1" << endl;
1751 kernel_m, kernel_n, K1, 0 );
1752 if (kernel_m != 4) {
1753 cout <<
"surface_domain::compute_cij kernel_m != 4 "
1754 "when computing K1" << endl;
1757 if (kernel_n != 1) {
1758 cout <<
"surface_domain::compute_cij kernel_1 != 1 "
1759 "when computing K1" << endl;
1762 for (j = 0; j < kernel_n; j++) {
1763 for (i = 0; i < 4; i++) {
1764 K[j * 4 + i] = K1[i * kernel_n + j];
1768 cout <<
"surface_domain::compute_cij before matrix_"
1769 "get_kernel Basis2" << endl;
1772 kernel_m, kernel_n, K2, 0 );
1773 if (kernel_m != 4) {
1774 cout <<
"surface_domain::compute_cij kernel_m != 4 "
1775 "when computing K2" << endl;
1778 if (kernel_n != 1) {
1779 cout <<
"surface_domain::compute_cij kernel_1 != 1 "
1780 "when computing K2" << endl;
1783 for (j = 0; j < kernel_n; j++) {
1784 for (i = 0; i < 4; i++) {
1785 K[(1 + j) * 4 + i] = K2[i * kernel_n + j];
1790 cout <<
"The rank of K is not 2" << endl;
1794 cout <<
"surface_domain::compute_cij before "
1795 "matrix_get_kernel K" << endl;
1798 kernel_m, kernel_n, K1, 0 );
1799 if (kernel_m != 4) {
1800 cout <<
"surface_domain::compute_cij kernel_m != 4 "
1801 "when computing final kernel" << endl;
1804 if (kernel_n != 2) {
1805 cout <<
"surface_domain::compute_cij kernel_n != 2 "
1806 "when computing final kernel" << endl;
1809 for (j = 0; j < kernel_n; j++) {
1810 for (i = 0; i <
n; i++) {
1811 Basis1[j *
n + i] = K1[i * kernel_n + j];
1816 cout <<
"surface_domain::compute_cij done" << endl;
1822 long int *&Trans,
int &nb_subsets,
1823 long int *lines,
int sz,
1826 int f_v = (verbose_level >= 1);
1827 long int trans12[2];
1829 long int four_lines[4];
1835 cout <<
"surface_domain::compute_transversals_of_any_four" << endl;
1839 for (rk = 0; rk < nb_subsets; rk++) {
1841 for (i = 0; i < 4; i++) {
1842 four_lines[i] = lines[subset[i]];
1846 cout <<
"testing subset " << rk <<
" / "
1847 << nb_subsets <<
" : " << endl;
1853 cout <<
"The 4-subset does not lead "
1854 "to two transversal lines: ";
1858 cout <<
" perp_sz=" << perp_sz << endl;
1868 cout <<
"Transversals:" << endl;
1872 cout <<
"surface_domain::compute_transversals_of_any_four done" << endl;
1879 if (strcmp(p,
"a1") == 0) {
1882 else if (strcmp(p,
"a2") == 0) {
1885 else if (strcmp(p,
"a3") == 0) {
1888 else if (strcmp(p,
"a4") == 0) {
1891 else if (strcmp(p,
"a5") == 0) {
1894 else if (strcmp(p,
"a6") == 0) {
1897 else if (strcmp(p,
"b1") == 0) {
1900 else if (strcmp(p,
"b2") == 0) {
1903 else if (strcmp(p,
"b3") == 0) {
1906 else if (strcmp(p,
"b4") == 0) {
1909 else if (strcmp(p,
"b5") == 0) {
1912 else if (strcmp(p,
"b6") == 0) {
1915 else if (strcmp(p,
"c12") == 0) {
1918 else if (strcmp(p,
"c13") == 0) {
1921 else if (strcmp(p,
"c14") == 0) {
1924 else if (strcmp(p,
"c15") == 0) {
1927 else if (strcmp(p,
"c16") == 0) {
1930 else if (strcmp(p,
"c23") == 0) {
1933 else if (strcmp(p,
"c24") == 0) {
1936 else if (strcmp(p,
"c25") == 0) {
1939 else if (strcmp(p,
"c26") == 0) {
1942 else if (strcmp(p,
"c34") == 0) {
1945 else if (strcmp(p,
"c35") == 0) {
1948 else if (strcmp(p,
"c36") == 0) {
1951 else if (strcmp(p,
"c45") == 0) {
1954 else if (strcmp(p,
"c46") == 0) {
1957 else if (strcmp(p,
"c56") == 0) {
1961 cout <<
"surface_domain::read_schlaefli_label unknown schlaefli label: " << p << endl;
1968 int f_v = (verbose_level >= 1);
1974 cout <<
"surface_domain::read_string_of_schlaefli_labels" << endl;
1980 cout <<
"surface_domain::read_string_of_schlaefli_labels reading:" << endl;
1981 for (i = 0; i < sz; i++) {
1982 cout << i <<
" : " << argv[i] << endl;
1987 for (i = 0; i < sz; i++) {
1993 cout <<
"surface_domain::read_string_of_schlaefli_labels done" << endl;
schlaefli labeling of objects in cubic surfaces with 27 lines
void find_tritangent_planes_intersecting_in_a_line(int line_idx, int &plane1, int &plane2, int verbose_level)
void init(surface_domain *Surf, int verbose_level)
schlaefli_labels * Labels
int compute_rank_of_any_four(long int *&Rk, int &nb_subsets, long int *lines, int sz, int verbose_level)
int intersection_of_four_lines_but_not_b6(int *Adj, int *four_lines_idx, int b6, int verbose_level)
int compute_transversals_of_any_four(long int *&Trans, int &nb_subsets, long int *lines, int sz, int verbose_level)
void read_string_of_schlaefli_labels(std::string &str, int *&v, int &sz, int verbose_level)
long int rank_line(int *v)
void compute_points_on_lines(long int *Pts_on_surface, int nb_points_on_surface, long int *Lines, int nb_lines, data_structures::set_of_sets *&pts_on_lines, int *&f_is_on_line, int verbose_level)
int rank_of_four_lines_on_Klein_quadric(long int *four_lines, int verbose_level)
int test_double_six_property(long int *S12, int verbose_level)
Given a set of lines in S12[12], test the double six property.
geometry::projective_space * P
geometry::grassmann * Gr3
void compute_intersection_points_and_indices(int *Adj, long int *Points, int nb_points, long int *Lines, int nb_lines, int *&Intersection_pt, int *&Intersection_pt_idx, int verbose_level)
void lines_meet3_and_skew3(long int *lines_meet3, long int *lines_skew3, long int *&lines, int &nb_lines, int verbose_level)
int rank_of_system(int len, long int *S, int verbose_level)
int create_double_six_from_five_lines_with_a_common_transversal(long int *five_pts, long int *double_six, int verbose_level)
Given a five-plus-one five_pts[5], complete the double-six.
void unrank_line(int *v, long int rk)
void create_the_fifteen_other_lines(long int *double_six, long int *fifteen_other_lines, int verbose_level)
Given a double six in double_six[12], compute the 15 remaining lines cij.
orthogonal_geometry::orthogonal * O
void init_Schlaefli(int verbose_level)
void rearrange_lines_according_to_double_six(long int *Lines, int verbose_level)
Picks a double six and rearranges the lines accordingly.
ring_theory::homogeneous_polynomial_domain * Poly3_4
void list_starter_configurations(long int *Lines, int nb_lines, data_structures::set_of_sets *line_intersections, int *&Table, int &N, int verbose_level)
void compute_intersection_points(int *Adj, long int *Lines, int nb_lines, long int *&Intersection_pt, int verbose_level)
void create_lines_from_plane_equations(int *The_plane_equations, long int *Lines, int verbose_level)
field_theory::finite_field * F
void perp_of_three_lines(long int *three_lines, long int *&perp, int &perp_sz, int verbose_level)
void rearrange_lines_according_to_starter_configuration(long int *Lines, long int *New_lines, int line_idx, int subset_idx, int *Adj, data_structures::set_of_sets *line_intersections, int verbose_level)
void unrank_lines(int *v, long int *Rk, int nb)
geometry::klein_correspondence * Klein
int read_schlaefli_label(const char *p)
void compute_adjacency_matrix_of_line_intersection_graph(int *&Adj, long int *S, int n, int verbose_level)
Given a set of lines in S[n], compute the associated line intersection graph.
void create_starter_configuration(int line_idx, int subset_idx, data_structures::set_of_sets *line_neighbors, long int *Lines, long int *S, int verbose_level)
int perp_of_four_lines(long int *four_lines, long int *trans12, int &perp_sz, int verbose_level)
Given four general lines in four_lines[4], complete the two transversal lines.
void create_remaining_fifteen_lines(long int *double_six, long int *fifteen_lines, int verbose_level)
int create_double_six_from_six_disjoint_lines(long int *single_six, long int *double_six, int verbose_level)
Given a single six in single_six[6], compute the other 6 lines in a double-six.
void build_cubic_surface_from_lines(int len, long int *S, int *coeff, int verbose_level)
void create_system(int len, long int *S, int *&System, int &nb_rows, int verbose_level)
void rearrange_lines_according_to_a_given_double_six(long int *Lines, int *given_double_six, long int *New_lines, int verbose_level)
void compute_adjacency_matrix_of_line_disjointness_graph(int *&Adj, long int *S, int n, int verbose_level)
Given a set of lines in S[n], compute the associated disjointness graph.
long int compute_cij(long int *double_six, int i, int j, int verbose_level)
Computes cij, given a double six.
void unrank_point(int *v, long int rk)
int intersection_of_five_lines(int *Adj, int *five_lines_idx, int verbose_level)
a collection of combinatorial functions
void unrank_k_subset(int rk, int *set, int n, int k)
int rank_k_subset(int *set, int n, int k)
long int int_n_choose_k(int n, int k)
void mone(int *v, long int len)
void matrix_print(int *p, int m, int n)
void zero(long int *v, long int len)
void mone(long int *v, long int len)
void add_element(int i, long int a)
void init_basic_constant_size(int underlying_set_size, int nb_sets, int constant_size, int verbose_level)
void init_from_adjacency_matrix(int n, int *Adj, int verbose_level)
a collection of functions related to sorted vectors
int lint_vec_search_linear(long int *v, int len, long int a, int &idx)
void vec_intersect(long int *v1, int len1, long int *v2, int len2, long int *&v3, int &len3)
int lint_vec_search(long int *v, int len, long int a, int &idx, int verbose_level)
void PG_element_normalize_from_front(int *v, int stride, int len)
linear_algebra::linear_algebra * Linear_algebra
long int rank_lint_here(int *Mtx, int verbose_level)
void unrank_lint_here(int *Mtx, long int rk, int verbose_level)
long int line_to_point_on_quadric(long int line_rk, int verbose_level)
long int point_on_quadric_to_line(long int point_rk, int verbose_level)
void create_points_on_line(long int line_rk, long int *line, int verbose_level)
projective_space_implementation * Implementation
int intersection_of_two_lines(long int l1, long int l2)
void unrank_point(int *v, long int rk)
void unrank_line(int *basis, long int rk)
int Gauss_easy(int *A, int m, int n)
int perp_standard(int n, int k, int *A, int verbose_level)
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)
data_structures::lint_vec * Lint_vec
data_structures::int_vec * Int_vec
void unrank_point(int *v, int stride, long int rk, int verbose_level)
int evaluate_bilinear_form_by_rank(int i, int j)
void perp_of_k_points(long int *pts, int nb_pts, long int *&Perp, int &sz, int verbose_level)
void perp(long int pt, long int *Perp_without_pt, int &sz, int verbose_level)
int evaluate_monomial(int idx_of_monomial, int *coords)
#define Lint_vec_copy(A, B, C)
#define Lint_matrix_print(A, B, C)
#define Int_vec_zero(A, B)
#define Lint_vec_print(A, B, C)
#define Int_vec_copy(A, B, C)
#define Lint_vec_zero(A, B)
#define Int_vec_print(A, B, C)
#define Lint_vec_print_fully(A, B, C)
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
the orbiter library for the classification of combinatorial objects