12#define MAX_NUMBER_OF_LINES_FOR_INCIDENCE_MATRIX 100000
13#define MAX_NUMBER_OF_LINES_FOR_LINE_TABLE 1000000
14#define MAX_NUMBER_OF_POINTS_FOR_POINT_TABLE 1000000
15#define MAX_NB_POINTS_FOR_LINE_THROUGH_TWO_POINTS_TABLE 10000
16#define MAX_NB_POINTS_FOR_LINE_INTERSECTION_TABLE 10000
20namespace layer1_foundations {
74 cout <<
"projective_space::freeself" << endl;
78 cout <<
"projective_space::freeself "
79 "deleting Grass_lines" << endl;
85 cout <<
"projective_space::freeself "
86 "deleting Grass_planes" << endl;
92 cout <<
"projective_space::freeself "
93 "deleting Grass_hyperplanes" << endl;
100 for (i = 1; i <
n + 1; i++) {
109 cout <<
"projective_space::freeself deleting Go" << endl;
121 cout <<
"projective_space::freeself deleting v" << endl;
147 cout <<
"projective_space::freeself done" << endl;
152 int f_init_incidence_structure,
156 int f_v = (verbose_level >= 1);
166 cout <<
"projective_space::projective_space_init PG(" <<
n <<
"," <<
q <<
")" << endl;
167 cout <<
"f_init_incidence_structure="
168 << f_init_incidence_structure << endl;
189 for (i = 1; i <
n + 1; i++) {
192 cout <<
"projective_space::projective_space_init before Grass_stack[i]->init i=" << i << endl;
198 cout <<
"projective_space::projective_space_init computing number of "
199 "subspaces of each dimension:" << endl;
203 for (i = 0; i <=
n; i++) {
205 cout <<
"projective_space::projective_space_init computing number of "
206 "subspaces of dimension " << i + 1 << endl;
210 n + 1, i + 1,
q, 0 );
222 for (i = 0; i <=
n; i++) {
224 cout <<
"projective_space::projective_space_init computing number of "
225 "subspaces of dimension " << i + 1 << endl;
233 cout <<
"projective_space::projective_space_init N_points=" <<
N_points << endl;
237 cout <<
"projective_space::projective_space_init N_lines=" <<
N_lines << endl;
240 cout <<
"projective_space::projective_space_init r=" <<
r << endl;
244 cout <<
"projective_space::projective_space_init k=" <<
k << endl;
250 if (f_init_incidence_structure) {
252 cout <<
"projective_space::projective_space_init calling "
253 "init_incidence_structure" << endl;
257 cout <<
"projective_space::projective_space_init "
258 "init_incidence_structure done" << endl;
263 cout <<
"projective_space::projective_space_init we don't initialize "
264 "the incidence structure data" << endl;
269 cout <<
"projective_space::projective_space_init n=" <<
n
270 <<
" q=" <<
q <<
" done" << endl;
276 int f_v = (verbose_level >= 1);
279 cout <<
"projective_space::init_incidence_structure" << endl;
286 cout <<
"projective_space::init_incidence_structure "
287 "before projective_space_implementation->init" << endl;
291 cout <<
"projective_space::init_incidence_structure "
292 "after projective_space_implementation->init" << endl;
298 cout <<
"projective_space_implementation::init before init_polarity" << endl;
305 cout <<
"projective_space_implementation::init after init_polarity" << endl;
312 cout <<
"projective_space::init_incidence_structure done" << endl;
319 int f_v = (verbose_level >= 1);
322 cout <<
"projective_space::init_polarity" << endl;
327 cout <<
"projective_space::init_polarity before Standard_polarity->init_standard_polarity" << endl;
331 cout <<
"projective_space::init_polarity after Standard_polarity->init_standard_polarity" << endl;
337 cout <<
"projective_space::init_polarity before Standard_polarity->init_reversal_polarity" << endl;
341 cout <<
"projective_space::init_polarity after Standard_polarity->init_reversal_polarity" << endl;
347 cout <<
"projective_space::init_polarity done" << endl;
352 int line_rk,
long int *intersection,
int &sz,
int verbose_level)
354 int f_v = (verbose_level >= 1);
361 cout <<
"projective_space::intersect_with_line" << endl;
365 for (i = 0; i < set_sz; i++) {
369 cout <<
"projective_space::intersect_with_line data loss" << endl;
373 intersection[sz++] = a;
377 cout <<
"projective_space::intersect_with_line done" << endl;
382 long int line_rk,
long int *line,
int verbose_level)
385 int f_v = (verbose_level >= 1);
388 cout <<
"projective_space::create_points_on_line" << endl;
393 for (a = 0; a <
k; a++) {
401 cout <<
"projective_space::create_points_on_line done" << endl;
406 long int point_rk,
long int *line_pencil,
int verbose_level)
408 int f_v = (verbose_level >= 1);
415 cout <<
"projective_space::create_lines_on_point" << endl;
423 for (i = 0; i <
n + 1; i++) {
429 cout <<
"projective_space::create_lines_on_point zero vector" << endl;
432 for (a = 0; a <
r; a++) {
445 cout <<
"projective_space::create_lines_on_point done" << endl;
450 long int point_rk,
long int plane_rk,
451 long int *line_pencil,
int verbose_level)
454 int f_v = (verbose_level >= 1);
455 int a, b, idx, d, rk, i;
463 cout <<
"projective_space::create_lines_on_point_but_inside_a_plane" << endl;
466 cout <<
"projective_space::create_lines_on_point_but_inside_a_plane n < 3" << endl;
479 for (idx = 0; idx <
n + 1; idx++) {
485 cout <<
"projective_space::create_lines_on_point_but_inside_a_plane zero vector" << endl;
489 for (a = 0; a <
r; a++) {
502 line_pencil[i++] = b;
507 cout <<
"projective_space::create_lines_on_point_but_inside_a_plane i != q + 1" << endl;
516 cout <<
"projective_space::create_lines_on_point_but_inside_a_plane done" << endl;
522 long int line_rk,
int pt_rk,
int verbose_level)
525 int f_v = (verbose_level >= 1);
530 cout <<
"projective_space::create_point_on_line" << endl;
534 cout <<
"projective_space::create_point_on_line line:" << endl;
540 cout <<
"projective_space::create_point_on_line v=" << endl;
548 cout <<
"projective_space::create_point_on_line w=" << endl;
556 cout <<
"projective_space::create_point_on_line b = " << b << endl;
563 int *&Inc,
int verbose_level)
565 int f_v = (verbose_level >= 1);
569 cout <<
"projective_space::make_incidence_matrix" << endl;
576 for (h = 0; h <
r; h++) {
582 cout <<
"projective_space::make_incidence_matrix "
588 std::vector<int> &Pts, std::vector<int> &Lines,
589 int *&Inc,
int verbose_level)
591 int f_v = (verbose_level >= 1);
593 int nb_pts, nb_lines;
596 cout <<
"projective_space::make_incidence_matrix" << endl;
600 nb_lines = Lines.size();
601 Inc =
NEW_int(nb_pts * nb_lines);
603 for (i = 0; i < nb_pts; i++) {
605 for (j = 0; j < nb_lines; j++) {
608 Inc[i * nb_lines + j] = 1;
613 cout <<
"projective_space::make_incidence_matrix done" << endl;
626 cout <<
"projective_space::is_incident "
633 cout <<
"point:" << endl;
642 cout <<
"rk = " << rk << endl;
663 cout <<
"projective_space::incidence_m_ii "
664 "Bitmatrix == NULL" << endl;
678 int f_v = (verbose_level >= 1);
683 cout <<
"projective_space::make_incidence_structure_and_partition" << endl;
684 cout <<
"N_points=" <<
N_points << endl;
685 cout <<
"N_lines=" <<
N_lines << endl;
691 cout <<
"projective_space::make_incidence_structure_and_partition "
692 "allocating M of size "
697 cout <<
"projective_space::make_incidence_structure_and_partition "
698 "after allocating M of size "
704 cout <<
"projective_space::make_incidence_structure_and_partition "
705 "Lines_on_point == NULL" << endl;
709 for (h = 0; h <
r; h++) {
715 cout <<
"projective_space::make_incidence_structure_and_partition "
716 "before Inc->init_by_matrix" << endl;
720 cout <<
"projective_space::make_incidence_structure_and_partition "
721 "after Inc->init_by_matrix" << endl;
733 cout <<
"projective_space::make_incidence_structure_and_partition done" << endl;
738 int row_type,
int col_type,
739 int *&Incma,
int &nb_rows,
int &nb_cols,
744 int f_v = (verbose_level >= 1);
752 cout <<
"projective_space::incma_for_type_ij" << endl;
753 cout <<
"row_type = " << row_type << endl;
754 cout <<
"col_type = " << col_type << endl;
756 if (col_type < row_type) {
757 cout <<
"projective_space::incma_for_type_ij "
758 "col_type < row_type" << endl;
762 cout <<
"projective_space::incma_for_type_ij "
763 "col_type < 0" << endl;
766 if (col_type >
n + 1) {
767 cout <<
"projective_space::incma_for_type_ij "
768 "col_type > P->n + 1" << endl;
779 Incma =
NEW_int(nb_rows * nb_cols);
781 for (i = 0; i < nb_rows; i++) {
785 else if (row_type == 2) {
788 else if (row_type == 3) {
792 cout <<
"projective_space::incma_for_type_ij "
793 "row_type " << row_type
794 <<
" not yet implemented" << endl;
797 for (j = 0; j < nb_cols; j++) {
801 else if (col_type == 2){
804 else if (col_type == 3) {
808 cout <<
"projective_space::incma_for_type_ij "
809 "col_type " << col_type
810 <<
" not yet implemented" << endl;
814 row_type + col_type, d, Basis2, base_cols,
816 if (rk == col_type) {
817 Incma[i * nb_cols + j] = 1;
826 cout <<
"projective_space::incma_for_type_ij done" << endl;
831 int row_type,
int col_type,
836 int f_v = (verbose_level >= 1);
838 int nb_rows, nb_cols;
841 cout <<
"projective_space::incidence_and_stack_for_type_ij" << endl;
845 Incma, nb_rows, nb_cols,
848 cout <<
"projective_space::incidence_and_stack_for_type_ij "
849 "before Inc->init_by_matrix" << endl;
854 cout <<
"projective_space::incidence_and_stack_for_type_ij "
855 "after Inc->init_by_matrix" << endl;
861 Stack->
allocate(nb_rows + nb_cols, 0 );
867 cout <<
"projective_space::incidence_and_stack_for_type_ij done" << endl;
890 for (I = 0; I < (nb_pts + 39) / 40; I++) {
892 ost <<
"\\begin{array}{|r|r|r|}" << endl;
893 ost <<
"\\hline" << endl;
894 ost <<
"i & \\mbox{Rank} & \\mbox{Point} \\\\" << endl;
895 ost <<
"\\hline" << endl;
896 ost <<
"\\hline" << endl;
897 for (h = 0; h < 40; h++) {
898 if (I * 40 + h < nb_pts) {
900 ost << I * 40 + h <<
" & " << Pts[I * 40 + h] <<
" & ";
902 ost <<
"\\\\" << endl;
905 ost <<
"\\hline" << endl;
906 ost <<
"\\end{array}" << endl;
918 cout <<
"All points in PG(" <<
n <<
"," <<
q <<
"):" << endl;
921 cout << setw(3) << i <<
" : ";
931 int verbose_level = 0;
933 int f_v = (verbose_level >= 1);
936 cout <<
"projective_space::rank_point" << endl;
942 cout <<
"projective_space::rank_point done" << endl;
956 for (i = 0; i < sz; i++) {
978 for (i = 0; i < nb; i++) {
980 v + i * 2 * (
n + 1), Rk[i], 0 );
989 cout <<
"projective_space::rank_plane "
990 "Grass_planes == NULL" << endl;
1000 cout <<
"projective_space::unrank_plane "
1001 "Grass_planes == NULL" << endl;
1008 long int p1,
long int p2)
1019 long int l1,
long int l2)
1033 long int l1,
long int l2)
1071 Int_vec_copy(Mtx1 + 2 * d, Mtx3 + (d - 2) * d, (d - 2) * d);
1074 cout <<
"projective_space::intersection_of_two_lines r < d - 1, "
1075 "the lines do not intersect" << endl;
1079 cout <<
"projective_space::intersection_of_two_lines r > d - 1, "
1080 "something is wrong" << endl;
1094 long int *two_input_pts,
1100 int f_v = (verbose_level >= 1);
1101 int f_vv = (verbose_level >= 2);
1107 int kernel_m, kernel_n;
1111 cout <<
"projective_space::determine_line_in_plane" << endl;
1114 cout <<
"projective_space::determine_line_in_plane "
1123 for (i = 0; i < nb_pts; i++) {
1127 cout <<
"projective_space::determine_line_in_plane "
1132 for (i = 0; i < nb_pts; i++) {
1133 x = coords[i * 3 + 0];
1134 y = coords[i * 3 + 1];
1135 z = coords[i * 3 + 2];
1136 system[i * 3 + 0] = x;
1137 system[i * 3 + 1] = y;
1138 system[i * 3 + 2] = z;
1141 cout <<
"projective_space::determine_line_in_plane system:" << endl;
1149 nb_pts, 3, base_cols, verbose_level - 2);
1152 cout <<
"projective_space::determine_line_in_plane "
1153 "system undetermined" << endl;
1158 kernel_m, kernel_n, kernel, 0 );
1160 cout <<
"projective_space::determine_line_in_plane line:" << endl;
1163 for (i = 0; i < 3; i++) {
1164 three_coeffs[i] = kernel[i];
1173 long int *Arc6,
int verbose_level)
1175 int f_v = (verbose_level >= 1);
1178 cout <<
"projective_space::nonconical_six_arc_get_nb_Eckardt_points" << endl;
1197 int f_v = (verbose_level >= 1);
1200 long int the_set[6];
1206 cout <<
"projective_space::conic_test" << endl;
1213 for (i = 0; i < 5; i++) {
1214 the_set[i] = S[subset[i]];
1218 the_set, 6, six_coeffs, 0 )) {
1229 cout <<
"projective_space::conic_test done" << endl;
1245 c[0] =
F->
mult(x, x);
1246 c[1] =
F->
mult(y, y);
1247 c[2] =
F->
mult(z, z);
1248 c[3] =
F->
mult(x, y);
1249 c[4] =
F->
mult(x, z);
1250 c[5] =
F->
mult(y, z);
1252 for (i = 0; i < 6; i++) {
1253 s =
F->
add(s,
F->
mult(six_coeffs[i], c[i]));
1264 long int *input_pts,
int nb_pts,
1270 int f_v = (verbose_level >= 1);
1271 int f_vv = (verbose_level >= 2);
1277 int kernel_m, kernel_n;
1280 cout <<
"projective_space::determine_conic_in_plane" << endl;
1283 cout <<
"projective_space::determine_conic_in_plane "
1288 cout <<
"projective_space::determine_conic_in_plane "
1289 "need at least 5 points" << endl;
1295 cout <<
"projective_space::determine_conic_in_plane "
1296 "some 3 of the points are collinear" << endl;
1304 for (i = 0; i < nb_pts; i++) {
1308 cout <<
"projective_space::determine_conic_in_plane "
1313 for (i = 0; i < nb_pts; i++) {
1314 x = coords[i * 3 + 0];
1315 y = coords[i * 3 + 1];
1316 z = coords[i * 3 + 2];
1317 system[i * 6 + 0] =
F->
mult(x, x);
1318 system[i * 6 + 1] =
F->
mult(y, y);
1319 system[i * 6 + 2] =
F->
mult(z, z);
1320 system[i * 6 + 3] =
F->
mult(x, y);
1321 system[i * 6 + 4] =
F->
mult(x, z);
1322 system[i * 6 + 5] =
F->
mult(y, z);
1325 cout <<
"projective_space::determine_conic_in_plane "
1334 6, base_cols, verbose_level - 2);
1337 cout <<
"projective_space::determine_conic_in_plane "
1338 "system undetermined" << endl;
1343 kernel_m, kernel_n, kernel, 0 );
1345 cout <<
"projective_space::determine_conic_in_plane "
1350 for (i = 0; i < 6; i++) {
1351 six_coeffs[i] = kernel[i];
1356 cout <<
"projective_space::determine_conic_in_plane done" << endl;
1364 int nb_pts,
long int *Pts,
int *coeff10,
1368 int f_v = (verbose_level >= 1);
1375 cout <<
"projective_space::determine_cubic_in_plane" << endl;
1378 Pt_coord =
NEW_int(nb_pts * d);
1383 cout <<
"projective_space::determine_cubic_in_plane list of "
1388 for (i = 0; i < nb_pts; i++) {
1392 cout <<
"projective_space::determine_cubic_in_plane matrix of "
1393 "point coordinates:" << endl;
1397 for (i = 0; i < nb_pts; i++) {
1404 cout <<
"projective_space::determine_cubic_in_plane "
1405 "The system:" << endl;
1411 cout <<
"projective_space::determine_cubic_in_plane "
1412 "The system in RREF:" << endl;
1416 cout <<
"projective_space::determine_cubic_in_plane "
1417 "The system has rank " <<
r << endl;
1421 cout <<
"r != 9" << endl;
1424 int kernel_m, kernel_n;
1428 kernel_m, kernel_n, coeff10, 0 );
1435 cout <<
"projective_space::determine_cubic_in_plane done" << endl;
1442 long int *nine_pts_or_more,
1443 int nb_pts,
int *ten_coeffs,
int verbose_level)
1445 int f_v = (verbose_level >= 1);
1446 int f_vv = (verbose_level >= 2);
1449 int kernel[10 * 10];
1451 int i, x, y, z,
w, rk;
1452 int kernel_m, kernel_n;
1455 cout <<
"projective_space::determine_quadric_in_solid" << endl;
1458 cout <<
"projective_space::determine_quadric_in_solid "
1463 cout <<
"projective_space::determine_quadric_in_solid "
1464 "you need to give at least 9 points" << endl;
1468 system =
NEW_int(nb_pts * 10);
1469 for (i = 0; i < nb_pts; i++) {
1473 cout <<
"projective_space::determine_quadric_in_solid "
1478 for (i = 0; i < nb_pts; i++) {
1479 x = coords[i * 4 + 0];
1480 y = coords[i * 4 + 1];
1481 z = coords[i * 4 + 2];
1482 w = coords[i * 4 + 3];
1483 system[i * 10 + 0] =
F->
mult(x, x);
1484 system[i * 10 + 1] =
F->
mult(y, y);
1485 system[i * 10 + 2] =
F->
mult(z, z);
1486 system[i * 10 + 3] =
F->
mult(
w,
w);
1487 system[i * 10 + 4] =
F->
mult(x, y);
1488 system[i * 10 + 5] =
F->
mult(x, z);
1489 system[i * 10 + 6] =
F->
mult(x,
w);
1490 system[i * 10 + 7] =
F->
mult(y, z);
1491 system[i * 10 + 8] =
F->
mult(y,
w);
1492 system[i * 10 + 9] =
F->
mult(z,
w);
1495 cout <<
"projective_space::determine_quadric_in_solid "
1504 nb_pts, 10, base_cols, verbose_level - 2);
1506 cout <<
"projective_space::determine_quadric_in_solid "
1507 "system underdetermined" << endl;
1508 cout <<
"rk=" << rk << endl;
1512 kernel_m, kernel_n, kernel, 0 );
1514 cout <<
"projective_space::determine_quadric_in_solid "
1519 for (i = 0; i < 10; i++) {
1520 ten_coeffs[i] = kernel[i];
1523 cout <<
"projective_space::determine_quadric_in_solid done" << endl;
1529 long int *points,
int &nb_points,
int verbose_level)
1531 int f_v = (verbose_level >= 1);
1532 int f_vv = (verbose_level >= 2);
1537 cout <<
"projective_space::conic_points_brute_force" << endl;
1544 cout <<
"point " << i <<
" = ";
1546 cout <<
" gives a value of " << a << endl;
1550 cout <<
"point " << i <<
" = ";
1552 cout <<
" lies on the conic" << endl;
1554 points[nb_points++] = i;
1558 cout <<
"projective_space::conic_points_brute_force done, "
1559 "we found " << nb_points <<
" points" << endl;
1562 cout <<
"They are : ";
1567 cout <<
"projective_space::conic_points_brute_force done" << endl;
1573 long int *points,
int &nb_points,
int verbose_level)
1576 int f_v = (verbose_level >= 1);
1577 int f_vv = (verbose_level >= 2);
1582 cout <<
"projective_space::quadric_points_brute_force" << endl;
1589 cout <<
"point " << i <<
" = ";
1591 cout <<
" gives a value of " << a << endl;
1595 cout <<
"point " << i <<
" = ";
1597 cout <<
" lies on the quadric" << endl;
1599 points[nb_points++] = i;
1603 cout <<
"projective_space::quadric_points_brute_force done, "
1604 "we found " << nb_points <<
" points" << endl;
1607 cout <<
"They are : ";
1612 cout <<
"projective_space::quadric_points_brute_force done" << endl;
1617 long int *five_pts,
int *six_coeffs,
1618 long int *points,
int &nb_points,
int verbose_level)
1620 int f_v = (verbose_level >= 1);
1621 int f_vv = (verbose_level >= 2);
1626 int i, j, l, a = 0, av, ma, b, bv, t;
1630 cout <<
"projective_space::conic_points" << endl;
1633 cout <<
"projective_space::conic_points n != 2" << endl;
1636 Gram_matrix[0 * 3 + 0] =
F->
add(six_coeffs[0], six_coeffs[0]);
1637 Gram_matrix[1 * 3 + 1] =
F->
add(six_coeffs[1], six_coeffs[1]);
1638 Gram_matrix[2 * 3 + 2] =
F->
add(six_coeffs[2], six_coeffs[2]);
1639 Gram_matrix[0 * 3 + 1] = Gram_matrix[1 * 3 + 0] = six_coeffs[3];
1640 Gram_matrix[0 * 3 + 2] = Gram_matrix[2 * 3 + 0] = six_coeffs[4];
1641 Gram_matrix[1 * 3 + 2] = Gram_matrix[2 * 3 + 1] = six_coeffs[5];
1643 cout <<
"projective_space::conic_points Gram matrix:" << endl;
1649 for (i = 1; i < 5; i++) {
1657 cout <<
"projective_space::conic_points did not "
1658 "find non-orthogonal vector" << endl;
1663 for (i = 0; i < 3; i++) {
1664 Basis[3 + i] =
F->
mult(av, Basis[3 + i]);
1668 cout <<
"projective_space::conic_points "
1669 "Hyperbolic pair:" << endl;
1675 cout <<
"projective_space::conic_points perp:" << endl;
1681 cout <<
"projective_space::conic_points "
1682 "form value = " << a << endl;
1685 cout <<
"projective_space::conic_points "
1686 "the form is degenerate or we are in "
1687 "characteristic zero" << endl;
1695 for (i = 0; i < 3; i++) {
1696 Basis[6 + i] =
F->
mult(bv, Basis[6 + i]);
1700 cout <<
"form value = " << a << endl;
1703 for (i = 0; i < 3; i++) {
1704 Basis2[3 + i] = Basis[6 + i];
1706 for (i = 0; i < 3; i++) {
1707 Basis2[0 + i] = Basis[0 + i];
1709 for (i = 0; i < 3; i++) {
1710 Basis2[6 + i] = Basis[3 + i];
1713 cout <<
"Basis2:" << endl;
1732 cout <<
"vector corresponding to 100:" << endl;
1742 for (t = 0; t <
F->
q; t++) {
1748 cout <<
"vector corresponding to t=" << t <<
":" << endl;
1753 points[nb_points++] = b;
1756 cout <<
"projective_space::conic_points conic points:" << endl;
1761 cout <<
"projective_space::conic_points done" << endl;
1767 long int *points,
int nb_points,
1768 long int *tangents,
int verbose_level)
1770 int f_v = (verbose_level >= 1);
1771 int f_vv = (verbose_level >= 2);
1778 cout <<
"projective_space::find_tangent_lines_to_conic" << endl;
1781 cout <<
"projective_space::find_tangent_lines_to_conic "
1785 Gram_matrix[0 * 3 + 0] =
F->
add(six_coeffs[0], six_coeffs[0]);
1786 Gram_matrix[1 * 3 + 1] =
F->
add(six_coeffs[1], six_coeffs[1]);
1787 Gram_matrix[2 * 3 + 2] =
F->
add(six_coeffs[2], six_coeffs[2]);
1788 Gram_matrix[0 * 3 + 1] = Gram_matrix[1 * 3 + 0] = six_coeffs[3];
1789 Gram_matrix[0 * 3 + 2] = Gram_matrix[2 * 3 + 0] = six_coeffs[4];
1790 Gram_matrix[1 * 3 + 2] = Gram_matrix[2 * 3 + 1] = six_coeffs[5];
1792 for (i = 0; i < nb_points; i++) {
1796 cout <<
"perp:" << endl;
1802 cout <<
"tangent at point " << i <<
" is "
1803 << tangents[i] << endl;
1807 cout <<
"projective_space::find_tangent_lines_to_conic done" << endl;
1817 long int *set,
int set_size,
int *type,
int verbose_level)
1820 int f_v = (verbose_level >= 1);
1824 cout <<
"projective_space::line_intersection_type" << endl;
1830 for (i = 0; i <
N_lines; i++) {
1833 for (i = 0; i < set_size; i++) {
1835 for (j = 0; j <
r; j++) {
1842 cout <<
"projective_space::line_intersection_type done" << endl;
1847 long int *set,
int set_size,
int *type,
int verbose_level)
1850 int f_v = (verbose_level >= 1);
1855 cout <<
"projective_space::line_intersection_type_basic" << endl;
1859 for (rk = 0; rk <
N_lines; rk++) {
1862 for (h = 0; h < set_size; h++) {
1873 cout <<
"projective_space::line_intersection_type_basic done" << endl;
1878 long int *lines_by_rank,
int nb_lines,
1879 long int *set,
int set_size,
int *type,
int verbose_level)
1882 int f_v = (verbose_level >= 1);
1883 long int rk, h, d, u;
1887 cout <<
"projective_space::line_intersection_type_basic_given_a_set_of_lines" << endl;
1891 for (u = 0; u < nb_lines; u++) {
1892 rk = lines_by_rank[u];
1895 for (h = 0; h < set_size; h++) {
1906 cout <<
"projective_space::line_intersection_type_basic_given_a_set_of_lines done" << endl;
1912 long int *set,
int set_size,
int *type,
int verbose_level)
1915 int f_v = (verbose_level >= 1);
1917 long int rk, h, i, j, d, cnt, i1;
1927 int nb_pts_in_hyperplane;
1933 cout <<
"projective_space::line_intersection_type_through_hyperplane "
1934 "set_size=" << set_size << endl;
1943 for (i = 0; i < set_size; i++) {
1946 cout << set[i] <<
" : ";
1950 if (M[d - 1] == 0) {
1951 set1[sz1++] = set[i];
1954 set2[sz2++] = set[i];
1961 cout <<
"projective_space::line_intersection_type_through_hyperplane "
1962 "sz1=" << sz1 <<
" sz2=" << sz2 << endl;
1970 cout <<
"projective_space::line_intersection_type_through_hyperplane "
1971 "nb_pts_in_hyperplane="
1972 << nb_pts_in_hyperplane << endl;
1975 cnt1 =
NEW_int(nb_pts_in_hyperplane);
1976 Pts1 =
NEW_int(nb_pts_in_hyperplane * d);
1980 for (i = 0; i < nb_pts_in_hyperplane; i++) {
1982 Pts1[i * d + d - 1] = 0;
1992 for (i = 0; i < sz2; i++) {
1997 for (i = 0; i < nb_pts_in_hyperplane; i++) {
1999 cout <<
"projective_space::line_intersection_type_through_hyperplane "
2000 "checking lines through point " << i
2001 <<
" / " << nb_pts_in_hyperplane <<
":" << endl;
2004 for (j = 0; j < sz2; j++) {
2009 cout <<
"projective_space::line_intersection_type_through_hyperplane "
2010 "j=" << j <<
" / " << sz2 <<
":" << endl;
2020 cout <<
"projective_space::line_intersection_type_through_hyperplane "
2021 "line rk=" << rk <<
" cnt1="
2022 << cnt1[rk] <<
":" << endl;
2025 for (h = j + 1; h < sz2; h++) {
2047 cout <<
"projective_space::line_intersection_type_through_hyperplane "
2053 long int *set,
int set_size,
2054 long int *lines,
int &nb_lines,
int max_lines,
2060 int f_v = (verbose_level >= 1);
2061 int i, j, rk, d, h, idx;
2066 cout <<
"projective_space::find_secant_lines "
2067 "set_size=" << set_size << endl;
2072 for (i = 0; i < set_size; i++) {
2073 for (j = i + 1; j < set_size; j++) {
2079 if (nb_lines == max_lines) {
2080 cout <<
"projective_space::find_secant_lines "
2081 "nb_lines == max_lines" << endl;
2084 for (h = nb_lines; h > idx; h--) {
2085 lines[h] = lines[h - 1];
2094 cout <<
"projective_space::find_secant_lines done" << endl;
2099 std::vector<long int> &Points,
2100 std::vector<long int> &Lines,
2108 int f_v = (verbose_level >= 1);
2109 int f_vv = (verbose_level >= 2);
2112 long int h, i, j, d, a, b;
2125 cout <<
"projective_space::find_lines_which_are_contained "
2126 "set_size=" << Points.size() << endl;
2136 for (i = 0; i < Points.size(); i++) {
2139 cout << Points[i] <<
" : ";
2143 if (M[d - 1] == 0) {
2144 set1[sz1++] = Points[i];
2147 set2[sz2++] = Points[i];
2157 cout <<
"projective_space::find_lines_which_are_contained "
2158 "sz1=" << sz1 <<
" sz2=" << sz2 << endl;
2166 n2 = (sz1 * (sz1 - 1)) >> 1;
2173 cout <<
"projective_space::find_lines_which_are_contained "
2174 "before find_secant_lines" << endl;
2178 secants, nb_secants, n2,
2182 cout <<
"projective_space::find_lines_which_are_contained "
2183 "after find_secant_lines" << endl;
2187 cout <<
"projective_space::find_lines_which_are_contained "
2188 "we found " << nb_secants
2189 <<
" secants in the hyperplane" << endl;
2195 cout <<
"projective_space::find_lines_which_are_contained "
2196 "testing secants, nb_secants=" << nb_secants << endl;
2200 for (i = 0; i < nb_secants; i++) {
2204 cout <<
"testing secant " << i <<
" / " << nb_secants
2205 <<
" which is line " << rk <<
":" << endl;
2212 for (a = 0; a <
q + 1; a++) {
2221 for (h = 0; h < d; h++) {
2222 M2[2 * d + h] =
F->
add(
2223 F->
mult(coeffs[0], M2[0 * d + h]),
2224 F->
mult(coeffs[1], M2[1 * d + h]));
2240 cout <<
"secant " << i <<
" / " << nb_secants
2241 <<
" of rank " << rk <<
" is contained, adding" << endl;
2243 Lines.push_back(rk);
2249 cout <<
"projective_space::find_lines_which_are_contained "
2250 "We found " << Lines.size() <<
" in the hyperplane" << endl;
2260 for (i = 0; i < sz1; i++) {
2263 for (i = 0; i < sz2; i++) {
2268 cout <<
"projective_space::find_lines_which_are_contained "
2269 "checking lines through points of the hyperplane, sz1=" << sz1 << endl;
2273 for (i = 0; i < sz1; i++) {
2275 cout <<
"projective_space::find_lines_which_are_contained "
2276 "checking lines through hyperplane point " << i
2277 <<
" / " << sz1 <<
":" << endl;
2283 for (j = 0; j < sz2; j++) {
2288 cout <<
"projective_space::find_lines_which_are_contained "
2289 "i=" << i <<
" j=" << j <<
" / " << sz2 <<
":" << endl;
2306 cout <<
"projective_space::find_lines_which_are_contained "
2307 "line rk=" << rk <<
":" << endl;
2312 for (a = 1; a <
q; a++) {
2316 for (h = 0; h < d; h++) {
2320 F->
mult(a, M2[1 * d + h]));
2329 cout <<
"eliminating point " << idx << endl;
2332 f_taken[idx] =
TRUE;
2339 if (nb_lines == max_lines) {
2340 cout <<
"projective_space::find_lines_which_are_"
2341 "contained nb_lines == max_lines" << endl;
2347 cout <<
"adding line " << rk <<
" nb_lines="
2348 << Lines.size() << endl;
2350 Lines.push_back(rk);
2352 cout <<
"adding line " << rk <<
" nb_lines="
2353 << Lines.size() <<
" done" << endl;
2367 cout <<
"projective_space::find_lines_which_are_contained done" << endl;
2373 long int *point_rks,
int nb_points,
2374 long int *plane_rks,
int nb_planes,
2375 int *&M,
int verbose_level)
2378 int f_v = (verbose_level >= 1);
2386 cout <<
"projective_space::plane_intersection_type_basic" << endl;
2394 G->
init(d, 3,
F, 0 );
2396 M =
NEW_int(nb_points * nb_planes);
2401 for (i = 0; i < nb_points; i++) {
2405 for (j = 0; j < nb_planes; j++) {
2407 cout <<
"projective_space::plane_intersection_type_basic "
2408 "rk=" << rk << endl;
2414 for (i = 0; i < nb_points; i++) {
2424 M[i * nb_planes + j] = 1;
2434 cout <<
"projective_space::plane_intersection_type_basic done" << endl;
2441 long int *set,
int set_size,
2442 int *type,
int verbose_level)
2445 int f_v = (verbose_level >= 1);
2446 int rk, h, d, N_planes;
2453 cout <<
"projective_space::plane_intersection_type_basic" << endl;
2461 G->
init(d, 3,
F, 0 );
2465 cout <<
"projective_space::plane_intersection_type_basic "
2466 "N_planes=" << N_planes << endl;
2471 for (h = 0; h < set_size; h++) {
2475 for (rk = 0; rk < N_planes; rk++) {
2477 cout <<
"projective_space::plane_intersection_type_basic "
2478 "rk=" << rk << endl;
2484 for (h = 0; h < set_size; h++) {
2504 cout <<
"projective_space::plane_intersection_type_basic done" << endl;
2509 long int *set,
int set_size,
int *type,
2513 int f_v = (verbose_level >= 1);
2514 int rk, h, d, N_hyperplanes;
2520 cout <<
"projective_space::hyperplane_intersection_type_basic" << endl;
2527 G->
init(d, d - 1,
F, 0 );
2533 for (h = 0; h < set_size; h++) {
2537 for (rk = 0; rk < N_hyperplanes; rk++) {
2542 for (h = 0; h < set_size; h++) {
2549 d, d, 0 ) == d - 1) {
2561 cout <<
"projective_space::hyperplane_intersection_type_basic done" << endl;
2568 long int *set,
int set_size,
int *type_collected,
2572 int f_v = (verbose_level >= 1);
2578 cout <<
"projective_space::line_intersection_type_collected" << endl;
2587 for (h = 0; h < set_size; h++) {
2592 for (rk = 0; rk <
N_lines; rk++) {
2597 for (h = 0; h < set_size; h++) {
2616 type_collected[cnt]++;
2622 cout <<
"projective_space::line_intersection_type_collected done" << endl;
2627 long int *set_of_lines,
int set_size,
2628 int *type,
int verbose_level)
2635 for (i = 0; i < set_size; i++) {
2636 a = set_of_lines[i];
2637 for (j = 0; j <
k; j++) {
2645 int *set_of_lines,
int set_size,
2646 int *type,
int verbose_level)
2653 for (i = 0; i < set_size; i++) {
2654 a = set_of_lines[i];
2655 for (j = 0; j <
k; j++) {
2663 long int *set,
int set_size,
2664 long int *external_lines,
int &nb_external_lines,
2670 nb_external_lines = 0;
2673 for (i = 0; i <
N_lines; i++) {
2677 external_lines[nb_external_lines++] = i;
2683 long int *set,
int set_size,
2684 long int *tangent_lines,
int &nb_tangent_lines,
2690 nb_tangent_lines = 0;
2693 for (i = 0; i <
N_lines; i++) {
2697 tangent_lines[nb_tangent_lines++] = i;
2703 long int *set,
int set_size,
2704 long int *secant_lines,
int &nb_secant_lines,
2710 nb_secant_lines = 0;
2713 for (i = 0; i <
N_lines; i++) {
2717 secant_lines[nb_secant_lines++] = i;
2723 long int *set,
int set_size,
int k,
2724 long int *secant_lines,
int &nb_secant_lines,
2730 nb_secant_lines = 0;
2733 for (i = 0; i <
N_lines; i++) {
2737 secant_lines[nb_secant_lines++] = i;
2744 long int *&pts,
int &nb_pts,
int verbose_level)
2746 int f_v = (verbose_level >= 1);
2747 int f_vv = (verbose_level >= 2);
2748 int f_vvv = (verbose_level >= 3);
2760 cout <<
"projective_space::Baer_subline" << endl;
2763 cout <<
"projective_space::Baer_subline field degree "
2764 "must be even (because we need a "
2765 "quadratic subfield)" << endl;
2772 for (j = 0; j < 3; j++) {
2776 cout <<
"projective_space::Baer_subline" << endl;
2777 cout <<
"M=" << endl;
2782 3, len, base_cols, verbose_level - 3);
2784 cout <<
"projective_space::Baer_subline" << endl;
2785 cout <<
"has rank " << rk << endl;
2786 cout <<
"base_cols=";
2789 cout <<
"basis:" << endl;
2795 cout <<
"projective_space::Baer_subline: rk should "
2796 "be 2 (points are not collinear)" << endl;
2801 for (j = 0; j < rk * len; j++) {
2805 cout <<
"projective_space::Baer_subline basis:" << endl;
2811 for (j = 0; j < 3; j++) {
2821 rk, len, Basis, base_cols,
2822 M + j * len, N + j * rk, verbose_level - 3);
2829 cout <<
"projective_space::Baer_subline "
2830 "local coordinates in the subspace are N=" << endl;
2840 for (j = 0; j < 3; j++) {
2841 for (i = 0; i < 2; i++) {
2842 Frame[i * 3 + j] = N[j * 2 + i];
2846 cout <<
"projective_space::Baer_subline "
2852 2, 3, base_cols2, verbose_level - 3);
2854 cout <<
"projective_space::Baer_subline: "
2855 "rk2 should be 2" << endl;
2859 cout <<
"projective_space::Baer_subline "
2860 "after Gauss Frame=" << endl;
2863 cout <<
"projective_space::Baer_subline "
2868 for (i = 0; i < 2; i++) {
2869 a = Frame[i * 3 + 2];
2870 for (j = 0; j < 2; j++) {
2871 N[i * 2 + j] =
F->
mult(a, N[i * 2 + j]);
2875 cout <<
"projective_space::Baer_subline "
2876 "local coordinates in the subspace are N=" << endl;
2882 int *Local_pts_sorted;
2887 Local_pts_sorted =
NEW_int(nb_pts);
2889 for (i = 0; i < nb_pts; i++) {
2890 for (j = 0; j < 2; j++) {
2891 w[j] = N[i * 2 + j];
2893 PG_element_rank_modified(*
F,
w, 1, 2, a);
2895 Local_pts_sorted[i] = a;
2897 int_vec_heapsort(Local_pts_sorted, nb_pts);
2899 cout <<
"Local_pts=" << endl;
2900 int_vec_print(cout, Local_pts, nb_pts);
2902 cout <<
"Local_pts_sorted=" << endl;
2903 int_vec_print(cout, Local_pts_sorted, nb_pts);
2913 index = (
F->
q - 1) / (q0 - 1);
2920 cout <<
"projective_space::Baer_subline q0=" << q0 << endl;
2921 cout <<
"projective_space::Baer_subline index=" << index << endl;
2922 cout <<
"projective_space::Baer_subline nb_pts=" << nb_pts << endl;
2926 for (i = 0; i < 3; i++) {
2927 for (j = 0; j < len; j++) {
2929 z[j] = Basis[i * len + j];
2932 z[j] =
F->
add(Basis[0 * len + j], Basis[1 * len + j]);
2938 for (t = 0; t < 3; t++) {
2940 cout <<
"t=" << t << endl;
2944 cout <<
"z=w*Basis";
2951 for (t = 2; t < q0; t++) {
2954 cout <<
"t=" << t <<
" a=" << a << endl;
2956 for (j = 0; j < 2; j++) {
2957 w[j] =
F->
add(N[0 * 2 + j],
F->
mult(a, N[1 * 2 + j]));
2966 cout <<
"z=w*Basis";
2973 cout <<
"rank=" << a << endl;
2976 PG_element_rank_modified(*
F,
w, 1, 2, a);
2978 if (!int_vec_search(Local_pts_sorted, nb_pts, a, idx)) {
2981 cout <<
"did not find this point in the list of "
2982 "points, hence not contained in Baer subline" << endl;
2991 cout <<
"projective_space::Baer_subline The Baer subline is";
3012 ost <<
"$q = " <<
F->
q <<
"$\\\\" << endl;
3013 ost <<
"$p = " <<
F->
p <<
"$\\\\" << endl;
3014 ost <<
"$e = " <<
F->
e <<
"$\\\\" << endl;
3015 ost <<
"$n = " <<
n <<
"$\\\\" << endl;
3016 ost <<
"Number of points = " <<
N_points <<
"\\\\" << endl;
3017 ost <<
"Number of lines = " <<
N_lines <<
"\\\\" << endl;
3018 ost <<
"Number of lines on a point = " <<
r <<
"\\\\" << endl;
3019 ost <<
"Number of points on a line = " <<
k <<
"\\\\" << endl;
3026 int f_v = (verbose_level >= 1);
3029 cout <<
"projective_space::report" << endl;
3032 ost <<
"\\subsection*{The projective space ${\\rm \\PG}(" <<
n <<
"," <<
F->
q <<
")$}" << endl;
3033 ost <<
"\\noindent" << endl;
3034 ost <<
"\\arraycolsep=2pt" << endl;
3035 ost <<
"\\parindent=0pt" << endl;
3036 ost <<
"$q = " <<
F->
q <<
"$\\\\" << endl;
3037 ost <<
"$p = " <<
F->
p <<
"$\\\\" << endl;
3038 ost <<
"$e = " <<
F->
e <<
"$\\\\" << endl;
3039 ost <<
"$n = " <<
n <<
"$\\\\" << endl;
3040 ost <<
"Number of points = " <<
N_points <<
"\\\\" << endl;
3041 ost <<
"Number of lines = " <<
N_lines <<
"\\\\" << endl;
3042 ost <<
"Number of lines on a point = " <<
r <<
"\\\\" << endl;
3043 ost <<
"Number of points on a line = " <<
k <<
"\\\\" << endl;
3051 cout <<
"projective_space::report before incidence_matrix_save_csv" << endl;
3053 incidence_matrix_save_csv();
3055 cout <<
"projective_space::report after incidence_matrix_save_csv" << endl;
3061 ost <<
"\\subsection*{The plane}" << endl;
3071 sprintf(str,
"plane_of_order_%d",
q);
3072 fname_base.assign(str);
3083 ost <<
"{\\scriptsize" << endl;
3084 ost <<
"$$" << endl;
3085 ost <<
"\\input " << fname_base <<
"_draw.tex" << endl;
3086 ost <<
"$$" << endl;
3087 ost <<
"}%%" << endl;
3091 ost <<
"\\subsection*{The points of ${\\rm \\PG}(" <<
n <<
"," <<
F->
q <<
")$}" << endl;
3108 for (
k = 1;
k <
n;
k++) {
3111 ost <<
"\\subsection*{The lines of ${\\rm \\PG}(" <<
n <<
"," <<
F->
q <<
")$}" << endl;
3114 ost <<
"\\subsection*{The planes of ${\\rm \\PG}(" <<
n <<
"," <<
F->
q <<
")$}" << endl;
3117 ost <<
"\\subsection*{The subspaces of dimension " <<
k <<
" of ${\\rm \\PG}(" <<
n <<
"," <<
F->
q <<
")$}" << endl;
3121 cout <<
"projective_space::report before cheat_sheet_subspaces, k=" <<
k << endl;
3125 cout <<
"projective_space::report after cheat_sheet_subspaces, k=" <<
k << endl;
3133 ost <<
"\\section*{Line intersections}" << endl;
3140 ost <<
"\\section*{Line through point-pairs}" << endl;
3155 ost <<
"\\subsection*{The polynomial rings associated "
3156 "with ${\\rm \\PG}(" <<
n <<
"," <<
F->
q <<
")$}" << endl;
3189 cout <<
"projective_space::report done" << endl;
3196 int f_v = (verbose_level >= 1);
3199 cout <<
"projective_space::export_incidence_matrix_to_csv" << endl;
3208 for (j = 0; j <
N_lines; j++) {
3225 cout <<
"Written file " << fname <<
" of size " << Fio.
file_size(fname) << endl;
3230 cout <<
"projective_space::export_incidence_matrix_to_csv done" << endl;
3238 sprintf(str,
"PG_n%d_q%d",
n,
q);
3240 fname.append(
"_incidence_matrix.csv");
3248 int f_v = (verbose_level >= 1);
3252 cout <<
"projective_space::create_latex_report" << endl;
3261 snprintf(str, 1000,
"PG_%d_%d.tex",
n,
F->
q);
3263 snprintf(title, 1000,
"Cheat Sheet PG($%d,%d$)",
n,
F->
q);
3269 ofstream ost(fname);
3285 cout <<
"projective_space::create_latex_report before P->report" << endl;
3287 report(ost, O, verbose_level);
3289 cout <<
"projective_space::create_latex_report after P->report" << endl;
3298 cout <<
"written file " << fname <<
" of size "
3303 cout <<
"projective_space::create_latex_report done" << endl;
3309 int f_v = (verbose_level >= 1);
3313 cout <<
"projective_space::create_latex_report_for_Grassmannian" << endl;
3322 snprintf(str, 1000,
"Gr_%d_%d_%d.tex",
n + 1,
k,
F->
q);
3324 snprintf(title, 1000,
"Cheat Sheet ${\\rm Gr}_{%d,%d,%d}$",
n + 1,
k,
F->
q);
3330 ofstream ost(fname);
3346 cout <<
"projective_space::create_latex_report_for_Grassmannian "
3347 "before cheat_sheet_subspaces, k=" <<
k << endl;
3351 cout <<
"projective_space::create_latex_report_for_Grassmannian "
3352 "after cheat_sheet_subspaces, k=" <<
k << endl;
3361 cout <<
"written file " << fname <<
" of size "
3366 cout <<
"projective_space::create_latex_report_for_Grassmannian done" << endl;
3375 int f_v = (verbose_level >= 1);
3378 cout <<
"projective_space::compute_decomposition" << endl;
3381 cout <<
"projective_space::compute_decomposition "
3382 "before incidence_and_stack_for_type_ij" << endl;
3390 cout <<
"projective_space::compute_decomposition "
3391 "after incidence_and_stack_for_type_ij" << endl;
3396 for (i = 1; i < S1->
ht; i++) {
3398 cout <<
"projective_space::compute_decomposition "
3399 "before Stack->split_cell (S1) i=" << i << endl;
3407 for (i = 1; i < S2->
ht; i++) {
3410 for (j = 0; j < sz; j++) {
3414 cout <<
"projective_space::compute_decomposition "
3415 "before Stack->split_cell (S2) i=" << i << endl;
3421 cout <<
"projective_space::compute_decomposition done" << endl;
3433 int f_v = (verbose_level >= 1);
3436 cout <<
"projective_space::compute_decomposition_based_on_tally" << endl;
3439 cout <<
"projective_space::compute_decomposition_based_on_tally "
3440 "before incidence_and_stack_for_type_ij" << endl;
3448 cout <<
"projective_space::compute_decomposition_based_on_tally "
3449 "after incidence_and_stack_for_type_ij" << endl;
3454 for (i = T1->
nb_types - 1; i >= 1; i--) {
3456 cout <<
"projective_space::compute_decomposition_based_on_tally "
3457 "before Stack->split_cell (S1) i=" << i << endl;
3465 for (i = T2->
nb_types - 1; i >= 1; i--) {
3468 for (j = 0; j < sz; j++) {
3472 cout <<
"projective_space::compute_decomposition_based_on_tally "
3473 "before Stack->split_cell (S2) i=" << i << endl;
3479 cout <<
"projective_space::compute_decomposition_based_on_tally done" << endl;
3485 long int rk_in,
long int &rk_out,
int verbose_level)
3487 int f_v = (verbose_level >= 1);
3488 int f_vv = (verbose_level >= 2);
3495 cout <<
"projective_space::polarity_rank_k_subspace, k=" <<
k << endl;
3505 cout <<
"projective_space::polarity_rank_k_subspace subspace " << rk_in <<
":" << endl;
3512 cout <<
"projective_space::polarity_rank_k_subspace after F->perp_standard:" << endl;
3519 cout <<
"projective_space::polarity_rank_k_subspace perp is " << endl;
3521 cout <<
"which has rank " << rk_out << endl;
3526 cout <<
"projective_space::polarity_rank_k_subspace done" << endl;
information about the Eckardt points of a surface derived from a six-arc
a collection of combinatorial functions
int first_k_subset(int *set, int n, int k)
void q_binomial_no_table(ring_theory::longinteger_object &a, int n, int k, int q, int verbose_level)
void q_binomial(ring_theory::longinteger_object &a, int n, int k, int q, int verbose_level)
int next_k_subset(int *set, int n, int k)
void m_ij(int i, int j, int a)
data structure for set partitions following Jeffrey Leon
void subset_continguous(int from, int len)
void split_cell(int verbose_level)
void allocate(int n, int verbose_level)
a collection of functions related to sorted vectors
int int_vec_search(int *v, int len, int a, int &idx)
int lint_vec_search(long int *v, int len, long int a, int &idx, int verbose_level)
int test_if_sets_are_disjoint_assuming_sorted(int *set1, int *set2, int sz1, int sz2)
void lint_vec_heapsort(long int *v, int len)
a statistical analysis of data consisting of single integers
void PG_element_rank_modified(int *v, int stride, int len, int &a)
void PG_element_unrank_modified(int *v, int stride, int len, int a)
void PG_element_unrank_modified_lint(int *v, int stride, int len, long int a)
linear_algebra::linear_algebra * Linear_algebra
void PG_element_rank_modified_lint(int *v, int stride, int len, long int &a)
arcs, ovals, hyperovals etc. in projective planes
int arc_test(long int *input_pts, int nb_pts, int verbose_level)
various functions related to geometries
algebraic_geometry::eckardt_point_info * compute_eckardt_point_info(projective_space *P2, long int *arc6, int verbose_level)
long int nb_PG_elements(int n, int q)
to rank and unrank subspaces of a fixed dimension in F_q^n
void unrank_lint(long int rk, int verbose_level)
long int rank_lint_here(int *Mtx, int verbose_level)
long int rank_lint(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 init_by_matrix(int m, int n, int *M, int verbose_level)
a polarity between points and hyperplanes in PG(n,q)
void init_standard_polarity(projective_space *P, int verbose_level)
void init_reversal_polarity(projective_space *P, int verbose_level)
internal representation of a projective space PG(n,q)
data_structures::bitmatrix * Bitmatrix
void init(projective_space *P, int verbose_level)
void cheat_sheet_line_intersection(std::ostream &f, int verbose_level)
void conic_points(long int *five_pts, int *six_coeffs, long int *points, int &nb_points, int verbose_level)
void point_types_of_line_set(long int *set_of_lines, int set_size, int *type, int verbose_level)
void compute_decomposition_based_on_tally(data_structures::tally *T1, data_structures::tally *T2, incidence_structure *&Inc, data_structures::partitionstack *&Stack, int verbose_level)
void hyperplane_intersection_type_basic(long int *set, int set_size, int *type, int verbose_level)
ring_theory::longinteger_object * Go
void find_k_secant_lines(long int *set, int set_size, int k, long int *secant_lines, int &nb_secant_lines, int verbose_level)
void report_summary(std::ostream &ost)
void compute_decomposition(data_structures::partitionstack *S1, data_structures::partitionstack *S2, incidence_structure *&Inc, data_structures::partitionstack *&Stack, 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)
void polarity_rank_k_subspace(int k, long int rk_in, long int &rk_out, int verbose_level)
int test_if_lines_are_disjoint_from_scratch(long int l1, long int l2)
void find_external_lines(long int *set, int set_size, long int *external_lines, int &nb_external_lines, int verbose_level)
void create_points_on_line(long int line_rk, long int *line, int verbose_level)
void point_types_of_line_set_int(int *set_of_lines, int set_size, int *type, int verbose_level)
void init_polarity(int verbose_level)
projective_space_implementation * Implementation
void intersect_with_line(long int *set, int set_sz, int line_rk, long int *intersection, int &sz, int verbose_level)
void plane_intersection_type_basic(long int *set, int set_size, int *type, int verbose_level)
void unrank_points(int *v, long int *Rk, int sz)
void point_plane_incidence_matrix(long int *point_rks, int nb_points, long int *plane_rks, int nb_planes, int *&M, int verbose_level)
int is_incident(int pt, int line)
int test_if_lines_are_disjoint(long int l1, long int l2)
void incma_for_type_ij(int row_type, int col_type, int *&Incma, int &nb_rows, int &nb_cols, int verbose_level)
void quadric_points_brute_force(int *ten_coeffs, long int *points, int &nb_points, int verbose_level)
void make_fname_incidence_matrix_csv(std::string &fname)
void report(std::ostream &ost, graphics::layered_graph_draw_options *O, int verbose_level)
void cheat_sheet_points_on_lines(std::ostream &f, int verbose_level)
void line_intersection_type_basic(long int *set, int set_size, int *type, int verbose_level)
int test_if_conic_contains_point(int *six_coeffs, int pt)
void create_latex_report_for_Grassmannian(int k, int verbose_level)
field_theory::finite_field * F
int determine_line_in_plane(long int *two_input_pts, int *three_coeffs, int verbose_level)
int nonconical_six_arc_get_nb_Eckardt_points(long int *Arc6, int verbose_level)
void find_secant_lines(long int *set, int set_size, long int *lines, int &nb_lines, int max_lines, int verbose_level)
void unrank_lines(int *v, long int *Rk, int nb)
void export_incidence_matrix_to_csv(int verbose_level)
void cheat_sheet_lines_on_points(std::ostream &f, int verbose_level)
void line_intersection_type_through_hyperplane(long int *set, int set_size, int *type, int verbose_level)
void find_tangent_lines(long int *set, int set_size, long int *tangent_lines, int &nb_tangent_lines, int verbose_level)
long int nb_rk_k_subspaces_as_lint(int k)
void find_tangent_lines_to_conic(int *six_coeffs, long int *points, int nb_points, long int *tangents, int verbose_level)
void print_set_of_points(std::ostream &ost, long int *Pts, int nb_pts)
int determine_cubic_in_plane(ring_theory::homogeneous_polynomial_domain *Poly_3_3, int nb_pts, long int *Pts, int *coeff10, int verbose_level)
void create_lines_on_point(long int point_rk, long int *line_pencil, int verbose_level)
long int rank_point(int *v)
void print_set(long int *set, int set_size)
int conic_test(long int *S, int len, int pt, 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)
grassmann * Grass_hyperplanes
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 create_lines_on_point_but_inside_a_plane(long int point_rk, long int plane_rk, long int *line_pencil, int verbose_level)
void determine_quadric_in_solid(long int *nine_pts_or_more, int nb_pts, int *ten_coeffs, int verbose_level)
polarity * Reversal_polarity
void find_lines_which_are_contained(std::vector< long int > &Points, std::vector< long int > &Lines, int verbose_level)
arc_in_projective_space * Arc_in_projective_space
void init_incidence_structure(int verbose_level)
void conic_points_brute_force(int *six_coeffs, long int *points, int &nb_points, int verbose_level)
void line_intersection_type(long int *set, int set_size, int *type, int verbose_level)
void line_intersection_type_basic_given_a_set_of_lines(long int *lines_by_rank, int nb_lines, long int *set, int set_size, int *type, int verbose_level)
void projective_space_init(int n, field_theory::finite_field *F, int f_init_incidence_structure, int verbose_level)
polarity * Standard_polarity
int intersection_of_two_lines(long int l1, long int l2)
void create_latex_report(graphics::layered_graph_draw_options *O, int verbose_level)
void make_incidence_structure_and_partition(incidence_structure *&Inc, data_structures::partitionstack *&Stack, int verbose_level)
void incidence_m_ii(int pt, int line, int a)
long int rank_plane(int *basis)
void line_intersection_type_collected(long int *set, int set_size, int *type_collected, int verbose_level)
void unrank_plane(int *basis, long int rk)
long int line_through_two_points(long int p1, long int p2)
int create_point_on_line(long int line_rk, int pt_rk, int verbose_level)
void unrank_point(int *v, long int rk)
void make_incidence_matrix(int &m, int &n, int *&Inc, int verbose_level)
void incidence_and_stack_for_type_ij(int row_type, int col_type, incidence_structure *&Inc, data_structures::partitionstack *&Stack, int verbose_level)
void unrank_line(int *basis, long int rk)
options for drawing an object of type layered_graph
void mult_vector_from_the_left(int *v, int *A, int *vA, int m, int n)
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 rank_of_rectangular_matrix_memory_given(int *A, int m, int n, int *B, int *base_cols, int verbose_level)
void mult_matrix_matrix(int *A, int *B, int *C, int m, int n, int o, int verbose_level)
int evaluate_quadric_form_in_PG_three(int *ten_coeffs, int *v4)
int Gauss_easy(int *A, int m, int n)
int perp(int n, int k, int *A, int *Gram, int verbose_level)
int evaluate_bilinear_form(int n, int *v1, int *v2, int *Gram)
int rank_of_rectangular_matrix(int *A, int m, int n, int verbose_level)
int perp_standard(int n, int k, int *A, int verbose_level)
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)
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 head(std::ostream &ost, int f_book, int f_title, const char *title, const char *author, int f_toc, int f_landscape, int f_12pt, int f_enlarged_page, int f_pagenumbers, const char *extras_for_preamble)
void foot(std::ostream &ost)
long int nb_times_projective_space_created
homogeneous polynomials of a given degree in a given number of variables over a finite field GF(q)
void init(field_theory::finite_field *F, int nb_vars, int degree, int f_init_incidence_structure, monomial_ordering_type Monomial_ordering_type, int verbose_level)
void print_monomial_ordering(std::ostream &ost)
int evaluate_monomial(int idx_of_monomial, int *coords)
a class to represent arbitrary precision integers
#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 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