19namespace layer1_foundations {
36 int f_v = (verbose_level >= 1);
39 cout <<
"arc_in_projective_space::init" << endl;
45 cout <<
"arc_in_projective_space::init done" << endl;
50 long int *the_arc,
int &size,
int verbose_level)
52 int f_v = (verbose_level >= 1);
53 int frame_data[] = {1,0,0, 0,1,0, 0,0,1, 1,1,1 };
61 cout <<
"arc_in_projective_space::PG_2_8_create_conic_plus_nucleus_arc_1 "
66 cout <<
"arc_in_projective_space::PG_2_8_create_conic_plus_nucleus_arc_1 "
70 for (i = 0; i < 4; i++) {
85 cout <<
"l1=" << L[0] <<
" l2=" << L[1] <<
" l3=" << L[2] << endl;
89 for (h = 0; h < 3; h++) {
90 for (i = 0; i <
P->
r; i++) {
95 for (j = size; j > idx; j--) {
96 the_arc[j] = the_arc[j - 1];
103 cout <<
"there are " << size <<
" points on the three lines: ";
109 for (i = 1; i <
P->
q; i++) {
117 for (j = size; j > idx; j--) {
118 the_arc[j] = the_arc[j - 1];
126 cout <<
"arc_in_projective_space::PG_2_8_create_conic_plus_nucleus_arc_1: after adding the rest of the "
127 "conic, there are " << size <<
" points on the arc: ";
134 long int *the_arc,
int &size,
int verbose_level)
136 int f_v = (verbose_level >= 1);
137 int frame_data[] = {1,0,0, 0,1,0, 0,0,1, 1,1,1 };
145 cout <<
"arc_in_projective_space::PG_2_8_create_conic_plus_"
146 "nucleus_arc_2 P->n != 2" << endl;
150 cout <<
"arc_in_projective_space::PG_2_8_create_conic_plus_"
151 "nucleus_arc_2 P->q != 8" << endl;
154 for (i = 0; i < 4; i++) {
169 cout <<
"l1=" << L[0] <<
" l2=" << L[1] <<
" l3=" << L[2] << endl;
173 for (h = 0; h < 3; h++) {
174 for (i = 0; i <
P->
r; i++) {
179 for (j = size; j > idx; j--) {
180 the_arc[j] = the_arc[j - 1];
187 cout <<
"there are " << size <<
" points on the three lines: ";
193 for (i = 0; i <
P->
q; i++) {
208 for (j = size; j > idx; j--) {
209 the_arc[j] = the_arc[j - 1];
217 cout <<
"arc_in_projective_space::PG_2_8_create_conic_plus_"
218 "nucleus_arc_2: after adding the rest of the conic, "
219 "there are " << size <<
" points on the arc: ";
226 long int *the_arc,
int &size,
int verbose_level)
228 int f_v = (verbose_level >= 1);
230 0,1,2, 0,1,3, 0,1,4, 0,1,5,
231 1,0,7, 1,0,8, 1,0,9, 1,0,10,
232 1,2,0, 1,3,0, 1,4,0, 1,5,0,
233 1,7,5, 1,8,4, 1,9,3, 1,10,2,
234 1,1,1, 1,1,10, 1,10,1, 1,4,4,
244 cout <<
"arc_in_projective_space::create_Maruta_Hamada_arc "
249 cout <<
"arc_in_projective_space::create_Maruta_Hamada_arc "
253 for (i = 0; i < 22; i++) {
255 cout <<
"point " << i <<
" has rank " << points[i] << endl;
259 cout <<
"arc_in_projective_space::create_Maruta_Hamada_arc "
277 for (h = 0; h < 4; h++) {
278 cout <<
"h=" << h <<
" : L[h]=" << L[h] <<
" : " << endl;
279 for (i = 0; i <
P->
r; i++) {
281 cout <<
"point " << b <<
" = ";
291 for (h = 0; h < 4; h++) {
292 for (i = 0; i <
P->
r; i++) {
297 for (j = size; j > idx; j--) {
298 the_arc[j] = the_arc[j - 1];
305 cout <<
"there are " << size
306 <<
" points on the quadrilateral: ";
313 for (i = 0; i < 16; i++) {
315 cout <<
"removing point " << i <<
" : "
316 << points[i] << endl;
319 cout <<
"error, cannot find point to be removed" << endl;
322 for (j = idx; j < size; j++) {
323 the_arc[j] = the_arc[j + 1];
329 for (i = 16; i < 20; i++) {
331 cout <<
"error, special point already there" << endl;
334 for (j = size; j > idx; j--) {
335 the_arc[j] = the_arc[j - 1];
337 the_arc[idx] = points[i];
342 cout <<
"arc_in_projective_space::create_Maruta_Hamada_arc: "
343 "after adding the special point, there are "
344 << size <<
" points on the arc: ";
352 long int *the_arc,
int &size,
int verbose_level)
354 int f_v = (verbose_level >= 1);
356 1,6,2, 1,11,4, 1,5,5, 1,2,6, 1,10,7, 1,12,8, 1,7,10, 1,4,11, 1,8,12,
357 0,1,10, 0,1,12, 0,1,4, 1,0,1, 1,0,3, 1,0,9, 1,1,0, 1,3,0, 1,9,0,
358 1,4,4, 1,4,12, 1,12,4, 1,10,10, 1,10,12, 1,12,10
365 cout <<
"arc_in_projective_space::create_Maruta_Hamada_arc2 "
370 cout <<
"arc_in_projective_space::create_Maruta_Hamada_arc2 "
371 "P->q != 13" << endl;
374 for (i = 0; i < 24; i++) {
376 cout <<
"point " << i <<
" has rank " << points[i] << endl;
380 cout <<
"arc_in_projective_space::create_Maruta_Hamada_arc2 "
385 for (i = 0; i < 9; i++) {
389 for (i = 0; i < 9; i++) {
390 for (j = i + 1; j < 9; j++) {
395 for (i = 9; i < 24; i++) {
396 the_arc[size++] = points[i];
399 cout <<
"arc_in_projective_space::create_Maruta_Hamada_arc2: "
400 "there are " << size <<
" points on the arc: ";
408 long int *the_arc,
int &size,
int verbose_level)
410 int f_v = (verbose_level >= 1);
411 int data[] = {1,1,1, 1,0,0, 0,1,1, 0,1,0, 1,0,1 };
418 cout <<
"arc_in_projective_space::create_pasch_arc "
424 cout <<
"arc_in_projective_space::create_pasch_arc "
429 for (i = 0; i < 5; i++) {
434 cout <<
"arc_in_projective_space::create_pasch_arc() points: ";
451 for (h = 0; h < 4; h++) {
452 for (i = 0; i <
P->
r; i++) {
457 for (j = size; j > idx; j--) {
458 the_arc[j] = the_arc[j - 1];
465 cout <<
"there are " << size <<
" points on the pasch lines: ";
476 cout <<
"error, special point already there" << endl;
479 for (j = size; j > idx; j--) {
480 the_arc[j] = the_arc[j - 1];
486 cout <<
"arc_in_projective_space::create_pasch_arc: after "
487 "adding the special point, there are "
488 << size <<
" points on the arc: ";
495 long int *the_arc,
int &size,
int verbose_level)
497 int f_v = (verbose_level >= 1);
498 int data[] = {1,0,0, 0,1,0, 0,0,1 };
500 int i, j, a, b, c, h, idx, t;
507 cout <<
"arc_in_projective_space::create_Cheon_arc P->n != 2" << endl;
512 cout <<
"arc_in_projective_space::create_Cheon_arc P->q != 8" << endl;
516 for (i = 0; i < 9; i++) {
519 for (i = 0; i < 21; i++) {
522 for (i = 0; i < 3; i++) {
543 for (h = 0; h < 3; h++) {
544 for (i = 0; i <
P->
r; i++) {
549 for (j = size; j > idx; j--) {
550 the_arc[j] = the_arc[j - 1];
558 cout <<
"arc_in_projective_space::create_Cheon_arc there are "
559 << size <<
" points on the 3 lines: ";
567 for (h = 0; h < 3; h++) {
570 cout <<
"h=" << h << endl;
573 for (i = 0; i <
P->
r; i++) {
579 for (i = 0; i <
P->
r; i++) {
581 if (b == L[0] || b == L[1] || b == L[2])
583 Pencil[h * 7 + j] = b;
587 cout <<
"j=" << j << endl;
592 cout <<
"Pencil:" << endl;
596 for (i = 0; i < 7; i++) {
597 a = Pencil[0 * 7 + i];
598 for (j = 0; j < 7; j++) {
599 b = Pencil[1 * 7 + j];
601 cout <<
"i=" << i <<
" a=" << a <<
" j="
602 << j <<
" b=" << b << endl;
606 cout <<
"c=" << c << endl;
611 for (t = size; t > idx; t--) {
612 the_arc[t] = the_arc[t - 1];
618 cout <<
"create_Cheon_arc size=" << size << endl;
624 cout <<
"there are " << size <<
" points on the Cheon lines: ";
634 long int *the_arc,
int &size,
int verbose_level)
636 int f_v = (verbose_level >= 1);
641 cout <<
"arc_in_projective_space::create_regular_hyperoval "
646 for (i = 0; i <
P->
q; i++) {
665 cout <<
"arc_in_projective_space::create_regular_hyperoval: "
666 "there are " << size <<
" points on the arc: ";
673 long int *the_arc,
int &size,
674 int exponent,
int verbose_level)
676 int f_v = (verbose_level >= 1);
681 cout <<
"arc_in_projective_space::create_translation_hyperoval" << endl;
682 cout <<
"exponent = " << exponent << endl;
685 cout <<
"arc_in_projective_space::create_translation_hyperoval "
690 for (i = 0; i <
P->
q; i++) {
709 cout <<
"arc_in_projective_space::create_translation_hyperoval: "
710 "there are " << size <<
" points on the arc: ";
715 cout <<
"arc_in_projective_space::create_translation_hyperoval "
721 long int *the_arc,
int &size,
int verbose_level)
723 int f_v = (verbose_level >= 1);
728 cout <<
"arc_in_projective_space::create_Segre_hyperoval "
733 for (i = 0; i <
P->
q; i++) {
752 cout <<
"arc_in_projective_space::create_Segre_hyperoval: "
753 "there are " << size <<
" points on the arc: ";
760 long int *the_arc,
int &size,
int verbose_level)
762 int f_v = (verbose_level >= 1);
768 int one_sixth, one_half, five_sixth;
771 cout <<
"arc_in_projective_space::create_Payne_hyperoval" << endl;
774 cout <<
"arc_in_projective_space::create_Payne_hyperoval P->n != 2" << endl;
778 a.
create(6, __FILE__, __LINE__);
779 b.
create(exponent, __FILE__, __LINE__);
783 while (one_sixth < 0) {
784 one_sixth += exponent;
787 cout <<
"one_sixth = " << one_sixth << endl;
790 a.
create(2, __FILE__, __LINE__);
793 while (one_half < 0) {
794 one_half += exponent;
797 cout <<
"one_half = " << one_half << endl;
800 five_sixth = (5 * one_sixth) % exponent;
802 cout <<
"five_sixth = " << five_sixth << endl;
805 for (i = 0; i <
P->
q; i++) {
827 cout <<
"arc_in_projective_space::create_Payne_hyperoval: "
828 "there are " << size <<
" points on the arc: ";
835 long int *the_arc,
int &size,
int verbose_level)
837 int f_v = (verbose_level >= 1);
842 int exponent, one_half, e1, e2, e3;
846 cout <<
"arc_in_projective_space::create_Cherowitzo_hyperoval" << endl;
849 cout <<
"arc_in_projective_space::create_Cherowitzo_hyperoval "
855 cout <<
"arc_in_projective_space::create_Cherowitzo_hyperoval "
856 "field degree must be odd" << endl;
860 cout <<
"arc_in_projective_space::create_Cherowitzo_hyperoval "
861 "needs characteristic 2" << endl;
865 one_half = (h + 1) >> 1;
868 e2 = (sigma + 2) % exponent;
869 e3 = (3 * sigma + 4) % exponent;
871 for (i = 0; i <
P->
q; i++) {
893 cout <<
"arc_in_projective_space::create_Cherowitzo_hyperoval: "
894 "there are " << size <<
" points on the arc: ";
901 long int *the_arc,
int &size,
int verbose_level)
903 int f_v = (verbose_level >= 1);
908 cout <<
"arc_in_projective_space::create_OKeefe_Penttila_hyperoval_32"
912 cout <<
"arc_in_projective_space::create_OKeefe_Penttila_hyperoval_32 "
917 cout <<
"arc_in_projective_space::create_OKeefe_Penttila_hyperoval_32 "
918 "needs q=32" << endl;
925 A.
init(
P->
F, verbose_level - 1);
927 for (i = 0; i <
P->
q; i++) {
949 cout <<
"arc_in_projective_space::create_OKeefe_Penttila_hyperoval_32: "
950 "there are " << size <<
" points on the arc: ";
957 long int *arc,
int arc_sz,
958 int target_sz,
int target_d,
962 int f_v = (verbose_level >= 1);
963 int f_vv = (verbose_level >= 5);
966 long int *free_points;
971 cout <<
"arc_in_projective_space::arc_lifting_diophant" << endl;
977 free_points, nb_free_points,
P->
N_points);
985 cout <<
"line_type: ";
991 cout <<
"line type:" << endl;
993 cout << i <<
" : " << line_type[i] << endl;
1000 cout <<
"arc_in_projective_space::arc_lifting_diophant line_type:";
1003 cout <<
"nb_free_points=" << nb_free_points << endl;
1010 for (j = 0; j < nb_free_points; j++) {
1015 D->
sum = target_sz - arc_sz;
1018 if (line_type[i] >
P->
k) {
1019 cout <<
"arc_in_projective_space::arc_lifting_diophant "
1020 "line_type[i] > P->k" << endl;
1024 if (line_type[i] <
P->
k - 1) {
1028 for (j = 0; j < nb_free_points; j++) {
1029 pt = free_points[j];
1038 D->
RHSi(h) = target_d - line_type[i];
1044 for (j = 0; j < nb_free_points; j++) {
1048 D->
RHSi(h) = target_sz - arc_sz;
1056 cout <<
"arc_in_projective_space::arc_lifting_diophant "
1057 "The system is:" << endl;
1062 if (f_save_system) {
1063 cout <<
"arc_in_projective_space saving the system "
1064 "to file " << fname_system << endl;
1066 cout <<
"arc_in_projective_space saving the system "
1067 "to file " << fname_system <<
" done" << endl;
1077 cout <<
"arc_in_projective_space::arc_lifting_diophant done" << endl;
1083 long int *s_lines,
int nb_s_lines,
1084 int target_sz,
int arc_d,
int arc_d_low,
int arc_s,
1089 int f_v = (verbose_level >= 1);
1090 int f_vv = (verbose_level >= 5);
1091 int i, j, h, a, line;
1092 long int *other_lines;
1097 cout <<
"arc_in_projective_space::arc_with_given_set_of_s_lines_diophant" << endl;
1103 other_lines, nb_other_lines,
P->
N_lines);
1108 cout <<
"arc_in_projective_space::arc_with_given_set_of_s_lines_diophant "
1109 "Standard_polarity == NULL" << endl;
1125 for (i = 0; i < nb_s_lines; i++) {
1145 for (i = 0; i < nb_other_lines; i++) {
1150 line = other_lines[i];
1175 D->
RHSi(h) = target_sz;
1183 cout <<
"arc_in_projective_space::arc_with_given_set_of_s_lines_diophant "
1184 "The system is:" << endl;
1189 if (f_save_system) {
1190 cout <<
"do_arc_lifting saving the system "
1191 "to file " << fname_system << endl;
1193 cout <<
"do_arc_lifting saving the system "
1194 "to file " << fname_system <<
" done" << endl;
1203 cout <<
"arc_in_projective_space::arc_with_given_set_of_s_lines_diophant done" << endl;
1210 long int *s_lines,
int nb_s_lines,
int arc_s,
1211 long int *t_lines,
int nb_t_lines,
int arc_t,
1212 int target_sz,
int arc_d,
int arc_d_low,
1217 int f_v = (verbose_level >= 1);
1218 int f_vv = (verbose_level >= 5);
1219 int i, j, h, a, line;
1220 long int *other_lines;
1226 cout <<
"arc_in_projective_space::arc_with_two_given_line_sets_diophant" << endl;
1232 Lint_vec_copy(t_lines, other_lines + nb_s_lines, nb_t_lines);
1236 other_lines + nb_s_lines + nb_t_lines, nb_other_lines,
P->
N_lines);
1241 cout <<
"arc_in_projective_space::arc_with_two_given_line_sets_diophant "
1242 "Standard_polarity == NULL" << endl;
1258 for (i = 0; i < nb_s_lines; i++) {
1278 for (i = 0; i < nb_t_lines; i++) {
1298 for (i = 0; i < nb_other_lines; i++) {
1301 l = other_lines[nb_s_lines + nb_t_lines + i];
1331 D->
RHSi(h) = target_sz;
1339 cout <<
"arc_in_projective_space::arc_with_two_given_line_sets_diophant "
1340 "The system is:" << endl;
1345 if (f_save_system) {
1346 cout <<
"do_arc_lifting saving the system "
1347 "to file " << fname_system << endl;
1349 cout <<
"do_arc_lifting saving the system "
1350 "to file " << fname_system <<
" done" << endl;
1359 cout <<
"arc_in_projective_space::arc_with_two_given_line_sets_diophant done" << endl;
1365 long int *s_lines,
int nb_s_lines,
int arc_s,
1366 long int *t_lines,
int nb_t_lines,
int arc_t,
1367 long int *u_lines,
int nb_u_lines,
int arc_u,
1368 int target_sz,
int arc_d,
int arc_d_low,
1373 int f_v = (verbose_level >= 1);
1374 int f_vv = (verbose_level >= 5);
1375 int i, j, h, a, line;
1376 long int *other_lines;
1382 cout <<
"arc_in_projective_space::arc_with_three_given_line_sets_diophant" << endl;
1388 Lint_vec_copy(t_lines, other_lines + nb_s_lines, nb_t_lines);
1389 Lint_vec_copy(u_lines, other_lines + nb_s_lines + nb_t_lines, nb_u_lines);
1393 other_lines + nb_s_lines + nb_t_lines + nb_u_lines, nb_other_lines,
P->
N_lines);
1398 cout <<
"arc_in_projective_space::arc_with_three_given_line_sets_diophant "
1399 "Polarity_point_to_hyperplane == NULL" << endl;
1415 for (i = 0; i < nb_s_lines; i++) {
1435 for (i = 0; i < nb_t_lines; i++) {
1455 for (i = 0; i < nb_u_lines; i++) {
1475 for (i = 0; i < nb_other_lines; i++) {
1478 l = other_lines[nb_s_lines + nb_t_lines + nb_u_lines + i];
1506 D->
RHSi(h) = target_sz;
1514 cout <<
"arc_in_projective_space::arc_with_three_given_line_sets_diophant "
1515 "The system is:" << endl;
1520 if (f_save_system) {
1521 cout <<
"arc_in_projective_space::arc_with_three_given_line_sets_diophant saving the system "
1522 "to file " << fname_system << endl;
1524 cout <<
"arc_in_projective_space::arc_with_three_given_line_sets_diophant saving the system "
1525 "to file " << fname_system <<
" done" << endl;
1534 cout <<
"arc_in_projective_space::arc_with_three_given_line_sets_diophant done" << endl;
1541 int arc_sz,
int arc_d,
1542 std::string &secant_lines_text,
1543 std::string &external_lines_as_subset_of_secants_text,
1547 int f_v = (verbose_level >= 1);
1548 int f_vv = (verbose_level >= 5);
1552 int nb_secant_lines;
1554 int *external_lines;
1555 int nb_external_lines;
1562 cout <<
"arc_in_projective_space::maximal_arc_by_diophant" << endl;
1567 Int_vec_scan(secant_lines_text, secant_lines, nb_secant_lines);
1568 Int_vec_scan(external_lines_as_subset_of_secants_text, Idx, nb_external_lines);
1573 secant_lines, nb_secant_lines,
1574 other_lines, nb_other_lines,
1578 external_lines =
NEW_int(nb_external_lines);
1579 for (i = 0; i < nb_external_lines; i++) {
1580 external_lines[i] = secant_lines[Idx[i]];
1584 for (i = 0; i <= nb_external_lines; i++) {
1585 if (i < nb_external_lines) {
1589 s = nb_secant_lines;
1591 for (; j < s; j++) {
1592 secant_lines[h] = secant_lines[j];
1597 if (h != nb_secant_lines - nb_external_lines) {
1598 cout <<
"h != nb_secant_lines - nb_external_lines" << endl;
1601 nb_secant_lines = h;
1603 int nb_slack1, nb_pencil_conditions;
1608 int *pencil_sub_idx;
1620 if (pt >
P->
k + 2) {
1621 cout <<
"pt > k + 2" << endl;
1622 cout <<
"i=" << i << endl;
1623 cout <<
"pt=" << pt << endl;
1626 if (pt == 0 || pt == 1) {
1628 pencil_sub_idx[i] = -1;
1632 cout <<
"pt < 4" << endl;
1637 pencil_sub_idx[i] = nb_times_hit[pt];
1640 for (pt = 0; pt <
P->
k - 2; pt++) {
1641 if (nb_times_hit[pt] !=
P->
k - 1) {
1642 cout <<
"nb_times_hit[pt] != k - 1" << endl;
1643 cout <<
"pt = " << pt << endl;
1644 cout <<
"nb_times_hit[pt] = " << nb_times_hit[pt] << endl;
1649 if (nb_other_lines != (
P->
k - 2) * (
P->
k - 1)) {
1650 cout <<
"nb_other_lines != (k - 2) * (k - 1)" << endl;
1653 nb_slack1 = nb_other_lines;
1654 nb_pencil_conditions =
P->
k - 2;
1658 nb_eqns =
P->
N_lines + 1 + nb_pencil_conditions;
1662 D->
open(nb_eqns, nb_vars);
1664 for (j = 0; j < nb_vars; j++) {
1669 D->
sum = arc_sz + (arc_d - 1) * nb_pencil_conditions;
1671 for (i = 0; i < nb_secant_lines; i++) {
1672 line = secant_lines[i];
1686 for (i = 0; i < nb_external_lines; i++) {
1687 line = external_lines[i];
1701 for (i = 0; i < nb_other_lines; i++) {
1702 line = other_lines[i];
1703 cout <<
"other line " << i <<
" / " << nb_other_lines <<
" is: " << line <<
" : ";
1713 pt = pencil_idx[line];
1714 sub_idx = pencil_sub_idx[line];
1715 cout <<
"pt=" << pt <<
" sub_idx=" << sub_idx << endl;
1717 cout <<
"pt < 0" << endl;
1721 cout <<
"sub_idx < 0" << endl;
1724 D->
Aij(h, slack1_start + pt * (
P->
k - 1) + sub_idx) = arc_d;
1730 for (i = 0; i < nb_pencil_conditions; i++) {
1732 D->
RHSi(h) = arc_d - 1;
1733 for (j = 0; j <
P->
k - 1; j++) {
1734 D->
Aij(h, slack1_start + i * (
P->
k - 1) + j) = 1;
1743 D->
RHSi(h) = arc_sz;
1747 cout <<
"arc_in_projective_space::maximal_arc_by_diophant h != nb_eqns" << endl;
1756 cout <<
"arc_in_projective_space::maximal_arc_by_diophant "
1757 "The system is:" << endl;
1765 cout <<
"arc_in_projective_space::maximal_arc_by_diophant done" << endl;
1774 std::string arc_input_set,
1775 std::string arc_label,
1778 int f_v = (verbose_level >= 1);
1781 cout <<
"arc_in_projective_space::arc_lifting1" << endl;
1784 int f_save_system =
TRUE;
1786 long int *the_set_in;
1792 the_set_in , set_size_in ,
1803 if (f_save_system) {
1805 string fname_system;
1807 fname_system.assign(arc_label);
1808 fname_system.append(
".diophant");
1809 cout <<
"perform_job_for_one_set saving the system "
1810 "to file " << fname_system << endl;
1812 cout <<
"perform_job_for_one_set saving the system "
1813 "to file " << fname_system <<
" done" << endl;
1818 long int nb_backtrack_nodes;
1825 cout <<
"before D->get_solutions" << endl;
1829 cout <<
"after D->get_solutions, nb_sol=" << nb_sol << endl;
1831 string fname_solutions;
1833 fname_solutions.assign(arc_label);
1834 fname_solutions.append(
".solutions");
1837 ofstream fp(fname_solutions);
1840 for (i = 0; i < nb_sol; i++) {
1842 for (j = 0; j < D->
sum; j++) {
1843 a = Sol[i * D->
sum + j];
1848 fp << -1 <<
" " << nb_sol << endl;
1852 cout <<
"Written file " << fname_solutions <<
" of size "
1853 << Fio.
file_size(fname_solutions) << endl;
1857 cout <<
"arc_in_projective_space::arc_lifting1 done" << endl;
1867 std::string arc_input_set,
1868 std::string arc_label,
1870 std::string t_lines_string,
1873 int f_v = (verbose_level >= 1);
1876 cout <<
"arc_in_projective_space::arc_lifting2" << endl;
1883 cout <<
"The t-lines, t=" << arc_t <<
" are ";
1888 long int *the_set_in;
1895 int f_save_system =
TRUE;
1898 the_set_in , set_size_in , arc_s,
1899 t_lines, nb_t_lines, arc_t,
1900 arc_size , arc_d, arc_d_low,
1909 if (f_save_system) {
1910 string fname_system;
1912 fname_system.assign(arc_label);
1913 fname_system.append(
".diophant");
1916 cout <<
"perform_job_for_one_set saving the system "
1917 "to file " << fname_system << endl;
1919 cout <<
"perform_job_for_one_set saving the system "
1920 "to file " << fname_system <<
" done" << endl;
1924 long int nb_backtrack_nodes;
1931 cout <<
"before D->get_solutions" << endl;
1935 cout <<
"after D->get_solutions, nb_sol=" << nb_sol << endl;
1937 string fname_solutions;
1939 fname_solutions.assign(arc_label);
1940 fname_solutions.append(
".solutions");
1943 ofstream fp(fname_solutions);
1946 for (i = 0; i < nb_sol; i++) {
1948 for (j = 0; j < D->
sum; j++) {
1949 a = Sol[i * D->
sum + j];
1954 fp << -1 <<
" " << nb_sol << endl;
1959 cout <<
"Written file " << fname_solutions <<
" of size "
1960 << Fio.
file_size(fname_solutions) << endl;
1964 cout <<
"arc_in_projective_space::arc_lifting2 done" << endl;
1975 std::string arc_input_set,
1976 std::string arc_label,
1978 std::string t_lines_string,
1980 std::string u_lines_string,
1983 int f_v = (verbose_level >= 1);
1986 cout <<
"arc_in_projective_space::arc_lifting3" << endl;
1991 int f_save_system =
TRUE;
2004 cout <<
"The t-lines, t=" << arc_t <<
" are ";
2007 cout <<
"The u-lines, u=" << arc_u <<
" are ";
2012 long int *the_set_in;
2019 the_set_in , set_size_in , arc_s,
2020 t_lines, nb_t_lines, arc_t,
2021 u_lines, nb_u_lines, arc_u,
2022 arc_size , arc_d, arc_d_low,
2030 if (f_save_system) {
2031 string fname_system;
2033 fname_system.assign(arc_label);
2034 fname_system.append(
".diophant");
2036 cout <<
"arc_in_projective_space::perform_activity saving the system "
2037 "to file " << fname_system << endl;
2039 cout <<
"arc_in_projective_space::perform_activity saving the system "
2040 "to file " << fname_system <<
" done" << endl;
2045 long int nb_backtrack_nodes;
2052 cout <<
"before D->get_solutions" << endl;
2056 cout <<
"after D->get_solutions, nb_sol=" << nb_sol << endl;
2058 string fname_solutions;
2060 fname_solutions.assign(arc_label);
2061 fname_solutions.append(
".solutions");
2064 ofstream fp(fname_solutions);
2067 for (i = 0; i < nb_sol; i++) {
2069 for (j = 0; j < D->
sum; j++) {
2070 a = Sol[i * D->
sum + j];
2075 fp << -1 <<
" " << nb_sol << endl;
2079 cout <<
"Written file " << fname_solutions <<
" of size "
2080 << Fio.
file_size(fname_solutions) << endl;
2084 cout <<
"arc_in_projective_space::arc_lifting3 done" << endl;
2090 int f_translation,
int translation_exponent,
2091 int f_Segre,
int f_Payne,
int f_Cherowitzo,
int f_OKeefe_Penttila,
2092 std::string &label_txt,
2093 std::string &label_tex,
2094 int &nb_pts,
long int *&Pts,
2097 int f_v = (verbose_level >= 1);
2108 cout <<
"arc_in_projective_space::create_hyperoval" << endl;
2115 sprintf(str,
"_q%d",
P->
F->
q);
2116 sprintf(str2,
"\\_q%d",
P->
F->
q);
2118 if (f_translation) {
2120 translation_exponent, verbose_level - 0);
2121 label_txt.assign(
"hyperoval_translation");
2122 label_txt.append(str);
2123 label_tex.assign(
"hyperoval\\_translation");
2124 label_tex.append(str2);
2128 label_txt.assign(
"hyperoval_Segre");
2129 label_txt.append(str);
2130 label_tex.assign(
"hyperoval\\_Segre");
2131 label_tex.append(str2);
2135 label_txt.assign(
"hyperoval_Payne");
2136 label_txt.append(str);
2137 label_tex.assign(
"hyperoval\\_Payne");
2138 label_tex.append(str2);
2140 else if (f_Cherowitzo) {
2142 label_txt.assign(
"hyperoval_Cherowitzo");
2143 label_txt.append(str);
2144 label_tex.assign(
"hyperoval\\_Cherowitzo");
2145 label_tex.append(str2);
2147 else if (f_OKeefe_Penttila) {
2150 label_txt.assign(
"hyperoval_OKeefe_Penttila");
2151 label_txt.append(str);
2152 label_tex.assign(
"hyperoval\\_OKeefe\\_Penttila");
2153 label_tex.append(str2);
2157 label_txt.assign(
"hyperoval_regular");
2158 label_txt.append(str);
2159 label_tex.assign(
"hyperoval\\_regular");
2160 label_tex.append(str2);
2164 cout <<
"i : point : projective rank" << endl;
2165 for (i = 0; i < nb_pts; i++) {
2168 cout << setw(4) << i <<
" : ";
2176 cout <<
"arc_in_projective_space::create_hyperoval the set is not a set, "
2177 "something is wrong" << endl;
2188 std::string &label_txt,
2189 std::string &label_tex,
2190 int &nb_pts,
long int *&Pts,
2193 int f_v = (verbose_level >= 1);
2199 cout <<
"arc_in_projective_space::create_subiaco_oval" << endl;
2202 sprintf(str,
"_q%d",
P->
F->
q);
2203 sprintf(str2,
"\\_q%d",
P->
F->
q);
2207 A.
init(
P->
F, verbose_level - 1);
2211 label_txt.assign(
"oval_subiaco_short");
2212 label_txt.append(str);
2213 label_tex.assign(
"oval\\_subiaco\\_short");
2214 label_tex.append(str2);
2217 label_txt.assign(
"oval_subiaco_long");
2218 label_txt.append(str);
2219 label_tex.assign(
"oval\\_subiaco\\_long");
2220 label_tex.append(str);
2226 int n = 2, d = n + 1;
2231 cout <<
"i : point : projective rank" << endl;
2232 for (i = 0; i < nb_pts; i++) {
2235 cout << setw(4) << i <<
" : ";
2245 cout <<
"create_subiaco_oval the set is not a set, "
2246 "something is wrong" << endl;
2254 std::string &label_txt,
2255 std::string &label_tex,
2256 int &nb_pts,
long int *&Pts,
2259 int f_v = (verbose_level >= 1);
2265 cout <<
"arc_in_projective_space::create_subiaco_hyperoval" << endl;
2271 A.
init(
P->
F, verbose_level - 1);
2275 sprintf(str,
"_q%d",
P->
F->
q);
2276 sprintf(str2,
"\\_q%d",
P->
F->
q);
2278 label_txt.assign(
"subiaco_hyperoval");
2279 label_txt.append(str);
2280 label_tex.assign(
"subiaco\\_hyperoval");
2281 label_tex.append(str2);
2286 int n = 2, d = n + 1;
2290 for (i = 0; i < nb_pts; i++) {
2293 cout << setw(4) << i <<
" : ";
2303 cout <<
"arc_in_projective_space::create_subiaco_hyperoval "
2304 "the set is not a set, "
2305 "something is wrong" << endl;
2312 std::string &label_txt,
2313 std::string &label_tex,
2314 int &nb_pts,
long int *&Pts,
2317 int f_v = (verbose_level >= 1);
2321 cout <<
"arc_in_projective_space::create_Maruta_Hamada_arc" << endl;
2324 cout <<
"arc_in_projective_space::create_Maruta_Hamada_arc P->n != 2" << endl;
2335 sprintf(str,
"Maruta_Hamada_arc2_q%d",
P->
q);
2336 sprintf(str2,
"Maruta\\_Hamada\\_arc2\\_q%d",
P->
q);
2337 label_txt.assign(str);
2338 label_tex.assign(str);
2342 cout <<
"arc_in_projective_space::create_Maruta_Hamada_arc done" << endl;
2349 int f_v = (verbose_level >= 1);
2358 cout <<
"arc_in_projective_space::arc_test" << endl;
2361 cout <<
"arc_in_projective_space::arc_test P->n != 2" << endl;
2366 for (i = 0; i < nb_pts; i++) {
2370 cout <<
"arc_in_projective_space::arc_test Pts=" << endl;
2374 for (h = 0; h < N; h++) {
2381 cout <<
"Points P_" << set[0] <<
", P_" << set[1]
2382 <<
" and P_" << set[2] <<
" are collinear" << endl;
2391 cout <<
"arc_in_projective_space::arc_test done" << endl;
2398 int *&bisecants,
int *&conics,
int verbose_level)
2402 int f_v = (verbose_level >= 1);
2403 long int i, j, h, pi, pj, Line[2];
2408 cout <<
"arc_in_projective_space::compute_bisecants_and_conics" << endl;
2414 for (i = 0; i < 6; i++) {
2416 for (j = i + 1; j < 6; j++, h++) {
2424 bisecants + h * 3, 1, 3);
2428 cout <<
"arc_in_projective_space::compute_bisecants_and_conics "
2429 "bisecants:" << endl;
2433 for (j = 0; j < 6; j++) {
2441 cout <<
"deleting point " << j <<
" / 6:";
2442 int_vec_print(cout, arc5, 5);
2453 cout <<
"arc_in_projective_space::compute_bisecants_and_conics "
2459 cout <<
"arc_in_projective_space::compute_bisecants_and_conics "
a collection of combinatorial functions
void set_complement_lint(long int *subset, int subset_size, long int *complement, int &size_complement, int universal_set_size)
void unrank_k_subset(int rk, int *set, int n, int k)
long int int_n_choose_k(int n, int k)
void set_complement(int *subset, int subset_size, int *complement, int &size_complement, int universal_set_size)
a collection of functions related to sorted vectors
void int_vec_heapsort(int *v, int len)
int test_if_set_with_return_value_lint(long int *set, int set_size)
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)
a statistical analysis of data consisting of single integers
void init(int *data, int data_length, int f_second, int verbose_level)
void print_naked(int f_backwards)
void PG_element_normalize_from_front(int *v, int stride, int len)
int frobenius_power(int a, int frob_power)
int add3(int i1, int i2, int i3)
linear_algebra::linear_algebra * Linear_algebra
arcs, ovals, hyperovals etc. in projective planes
int OKeefe_Penttila_32(int t)
void Subiaco_hyperoval(long int *&Pts, int &nb_pts, int verbose_level)
void init(field_theory::finite_field *F, int verbose_level)
void Subiaco_oval(long int *&Pts, int &nb_pts, int f_short, int verbose_level)
void arc_lifting_diophant(long int *arc, int arc_sz, int target_sz, int target_d, solvers::diophant *&D, int verbose_level)
int arc_test(long int *input_pts, int nb_pts, int verbose_level)
void create_subiaco_hyperoval(std::string &label_txt, std::string &label_tex, int &nb_pts, long int *&Pts, int verbose_level)
void arc_lifting3(int arc_size, int arc_d, int arc_d_low, int arc_s, std::string arc_input_set, std::string arc_label, int arc_t, std::string t_lines_string, int arc_u, std::string u_lines_string, int verbose_level)
void create_pasch_arc(long int *the_arc, int &size, int verbose_level)
void init(projective_space *P, int verbose_level)
void create_Payne_hyperoval(long int *the_arc, int &size, int verbose_level)
void create_subiaco_oval(int f_short, std::string &label_txt, std::string &label_tex, int &nb_pts, long int *&Pts, int verbose_level)
void create_regular_hyperoval(long int *the_arc, int &size, int verbose_level)
void arc_lifting2(int arc_size, int arc_d, int arc_d_low, int arc_s, std::string arc_input_set, std::string arc_label, int arc_t, std::string t_lines_string, int verbose_level)
void PG_2_8_create_conic_plus_nucleus_arc_2(long int *the_arc, int &size, int verbose_level)
void create_OKeefe_Penttila_hyperoval_32(long int *the_arc, int &size, int verbose_level)
~arc_in_projective_space()
void create_Segre_hyperoval(long int *the_arc, int &size, int verbose_level)
void create_Cherowitzo_hyperoval(long int *the_arc, int &size, int verbose_level)
void maximal_arc_by_diophant(int arc_sz, int arc_d, std::string &secant_lines_text, std::string &external_lines_as_subset_of_secants_text, solvers::diophant *&D, int verbose_level)
void compute_bisecants_and_conics(long int *arc6, int *&bisecants, int *&conics, int verbose_level)
void PG_2_8_create_conic_plus_nucleus_arc_1(long int *the_arc, int &size, int verbose_level)
void create_Maruta_Hamada_arc(long int *the_arc, int &size, int verbose_level)
void create_translation_hyperoval(long int *the_arc, int &size, int exponent, int verbose_level)
void arc_with_two_given_line_sets_diophant(long int *s_lines, int nb_s_lines, int arc_s, long int *t_lines, int nb_t_lines, int arc_t, int target_sz, int arc_d, int arc_d_low, int f_dualize, solvers::diophant *&D, int verbose_level)
void arc_with_three_given_line_sets_diophant(long int *s_lines, int nb_s_lines, int arc_s, long int *t_lines, int nb_t_lines, int arc_t, long int *u_lines, int nb_u_lines, int arc_u, int target_sz, int arc_d, int arc_d_low, int f_dualize, solvers::diophant *&D, int verbose_level)
void create_Cheon_arc(long int *the_arc, int &size, int verbose_level)
void create_hyperoval(int f_translation, int translation_exponent, int f_Segre, int f_Payne, int f_Cherowitzo, int f_OKeefe_Penttila, std::string &label_txt, std::string &label_tex, int &nb_pts, long int *&Pts, int verbose_level)
void create_Maruta_Hamada_arc2(long int *the_arc, int &size, int verbose_level)
void arc_lifting1(int arc_size, int arc_d, int arc_d_low, int arc_s, std::string arc_input_set, std::string arc_label, int verbose_level)
void arc_with_given_set_of_s_lines_diophant(long int *s_lines, int nb_s_lines, int target_sz, int arc_d, int arc_d_low, int arc_s, int f_dualize, solvers::diophant *&D, int verbose_level)
arc_in_projective_space()
int * Point_to_hyperplane
int * Line_through_two_points
projective space PG(n,q) of dimension n over Fq
int determine_conic_in_plane(long int *input_pts, int nb_pts, int *six_coeffs, int verbose_level)
projective_space_implementation * Implementation
int is_incident(int pt, int line)
field_theory::finite_field * F
int determine_line_in_plane(long int *two_input_pts, int *three_coeffs, int verbose_level)
long int rank_point(int *v)
arc_in_projective_space * Arc_in_projective_space
void line_intersection_type(long int *set, int set_size, int *type, int verbose_level)
polarity * Standard_polarity
int intersection_of_two_lines(long int l1, long int l2)
void unrank_point(int *v, long int rk)
int rank_of_matrix(int *A, int m, int verbose_level)
basic number theoretic functions
int i_power_j(int i, int j)
a collection of functions related to file io
long int file_size(std::string &fname)
domain to compute with objects of type longinteger
void extended_gcd(longinteger_object &a, longinteger_object &b, longinteger_object &g, longinteger_object &u, longinteger_object &v, int verbose_level)
a class to represent arbitrary precision integers
void create(long int i, const char *file, int line)
diophantine systems of equations (i.e., linear systems over the integers)
void get_solutions(long int *&Sol, int &nb_sol, int verbose_level)
diophant_equation_type * type
int solve_all_mckay(long int &nb_backtrack_nodes, int maxresults, int verbose_level)
void init_var_labels(long int *labels, int verbose_level)
void save_in_general_format(std::string &fname, int verbose_level)
#define Lint_vec_copy(A, B, C)
#define Int_vec_scan(A, B, C)
#define Int_vec_zero(A, B)
#define Int_vec_print_fully(A, B, C)
#define Lint_vec_scan(A, B, C)
#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 Int_vec_copy(A, B, C)
#define Int_vec_print(A, B, C)
the orbiter library for the classification of combinatorial objects