16namespace layer1_foundations {
17namespace orthogonal_geometry {
30 long int type,
long int index,
int verbose_level)
32 int f_v = (verbose_level >= 1);
36 cout <<
"orthogonal::hyperbolic_type_and_index_to_point_rk "
37 "type" << type <<
"index=" << index << endl;
42 cout <<
"error in orthogonal::hyperbolic_type_and_index_to_point_rk, "
43 "index >= p4" << endl;
52 cout <<
"error in orthogonal::hyperbolic_type_and_index_to_point_rk, "
53 "index >= p6" << endl;
62 cout <<
"error in orthogonal::hyperbolic_type_and_index_to_point_rk, "
63 "index >= p3" << endl;
72 cout <<
"error in orthogonal::hyperbolic_type_and_index_to_point_rk, "
73 "index >= p5" << endl;
82 cout <<
"error in orthogonal::hyperbolic_type_and_index_to_point_rk, "
83 "index >= p2" << endl;
92 cout <<
"error in orthogonal::hyperbolic_type_and_index_to_point_rk, "
93 "index >= p1" << endl;
99 cout <<
"error in orthogonal::hyperbolic_type_and_index_to_point_rk, "
100 "unknown type" << endl;
104 cout <<
"orthogonal::hyperbolic_type_and_index_to_point_rk "
105 "type" << type <<
"index=" << index <<
" rk=" << rk << endl;
111 long int rk,
long int &type,
long int &index)
148 cout <<
"error in orthogonal::hyperbolic_point_rk_to_type_and_index" << endl;
163 long int &p1,
long int &p2,
long int rk,
int verbose_level)
166 cout <<
"orthogonal::hyperbolic_unrank_line "
167 "Witt index zero, there is no line to unrank" << endl;
205 cout <<
"error in orthogonal::hyperbolic_unrank_line, "
206 "rk too big" << endl;
211 long int p1,
long int p2,
int verbose_level)
213 int f_v = (verbose_level >= 1);
214 long int pt1_type, pt2_type;
215 long int pt1_index, pt2_index;
221 cout <<
"orthogonal::hyperbolic_rank_line" << endl;
224 cout <<
"orthogonal::hyperbolic_rank_line Witt index zero, "
225 "there is no line to rank" << endl;
229 cout <<
"orthogonal::hyperbolic_rank_line "
230 "p1=" <<
p1 <<
" p2=" <<
p2 << endl;
235 cout <<
"orthogonal::hyperbolic_rank_line pt1_type=" << pt1_type
236 <<
" pt2_type=" << pt2_type << endl;
241 cout <<
"orthogonal::hyperbolic_rank_line "
242 "line_type=" << line_type << endl;
245 cout <<
"orthogonal::hyperbolic_rank_line "
246 "before canonical_points_of_line" << endl;
249 cp1, cp2, verbose_level);
251 cout <<
"orthogonal::hyperbolic_rank_line canonical points "
252 "cp1=" << cp1 <<
" cp2=" << cp2 << endl;
254 if (line_type == 1) {
260 cout <<
"orthogonal::hyperbolic_rank_line "
261 "after adding l1=" <<
l1 <<
", rk=" << rk << endl;
263 if (line_type == 2) {
269 cout <<
"orthogonal::hyperbolic_rank_line "
270 "after adding l2=" <<
l2 <<
", rk=" << rk << endl;
272 if (line_type == 3) {
278 cout <<
"orthogonal::hyperbolic_rank_line "
279 "after adding l3=" <<
l3 <<
", rk=" << rk << endl;
281 if (line_type == 4) {
287 cout <<
"orthogonal::hyperbolic_rank_line after "
288 "adding l4=" <<
l4 <<
", rk=" << rk << endl;
290 if (line_type == 5) {
296 cout <<
"orthogonal::hyperbolic_rank_line "
297 "after adding l5=" <<
l5 <<
", rk=" << rk << endl;
299 if (line_type == 6) {
305 cout <<
"orthogonal::hyperbolic_rank_line "
306 "after adding l6=" <<
l6 <<
", rk=" << rk << endl;
308 if (line_type == 7) {
313 cout <<
"error in orthogonal::hyperbolic_rank_line "
314 "illegal line_type" << endl;
318 cout <<
"orthogonal::hyperbolic_rank_line done" << endl;
324 long int &p1,
long int &p2,
long int index,
int verbose_level)
326 int f_v = (verbose_level >= 1);
327 int f_vv = (verbose_level >= 2);
328 int f_vvv = (verbose_level >= 3);
329 long int P4_index, P4_sub_index, P4_line_index;
330 long int P4_field_element, root, i;
333 cout <<
"orthogonal::unrank_line_L1" << endl;
336 cout <<
"error in orthogonal::unrank_line_L1 "
337 "index too large" << endl;
339 P4_index = index /
a41;
340 P4_sub_index = index %
a41;
341 P4_line_index = P4_sub_index / (
q - 1);
342 P4_field_element = P4_sub_index % (
q - 1);
345 cout <<
"orthogonal::unrank_line_L1 index=" << index << endl;
348 cout <<
"error in orthogonal::unrank_line_L1 index too large" << endl;
352 cout <<
"orthogonal::unrank_line_L1 P4_index=" << P4_index
353 <<
" P4_sub_index=" << P4_sub_index << endl;
354 cout <<
"P4_line_index=" << P4_line_index
355 <<
" P4_field_element=" << P4_field_element << endl;
359 cout <<
"p1=" <<
p1 << endl;
365 cout <<
"orthogonal::unrank_line_L1 after unrank_N1" << endl;
369 for (i = 1; i <
m - 1; i++) {
370 v1[2 * i] =
F->
mult(P4_field_element,
v1[2 * i]);
373 cout <<
"orthogonal::unrank_line_L1 after scaling" << endl;
384 0, P4_index, root,
m - 1,
395 for (i = 0; i <
n - 2; i++) {
402 cout <<
"orthogonal::unrank_line_L1 before rank_Sbar" << endl;
408 cout <<
"p2=" <<
p2 << endl;
411 cout <<
"orthogonal::unrank_line_L1 index=" << index
412 <<
" p1=" <<
p1 <<
" p2=" <<
p2 << endl;
415 cout <<
"orthogonal::unrank_line_L1 done" << endl;
421 int f_v = (verbose_level >= 1);
423 int f_vvv = (verbose_level >= 3);
424 long int P4_index, P4_sub_index, P4_line_index;
425 long int P4_field_element, root, i;
426 long int P4_field_element_inverse;
427 long int index, a, b;
430 cout <<
"orthogonal::rank_line_L1" << endl;
433 cout <<
"orthogonal::rank_line_L1 p1=" <<
p1 <<
" p2=" <<
p2 << endl;
438 cout <<
"p2 = " <<
p2 <<
" v2=" << endl;
442 if (
v2[
n - 1] != 1) {
443 cout <<
"orthogonal::rank_line_L1 v2[n - 1] != 1" << endl;
449 P4_index,
m - 1, verbose_level - 1);
452 0, P4_index, root,
m - 1, verbose_level - 1);
463 for (i = 0; i <
n - 2; i++) {
468 cout <<
"orthogonal::rank_line_L1 mapped back to v1=" << endl;
476 for (i = 0; i <
n; i++) {
481 cout <<
"orthogonal::rank_line_L1 after Gauss reduction v1=" << endl;
486 if (P4_field_element == 0) {
487 cout <<
"orthogonal::rank_line_L1: "
488 "P4_field_element == 0" << endl;
491 P4_field_element_inverse =
F->
inverse(P4_field_element);
492 for (i = 1; i <
m - 1; i++) {
493 v1[2 * i] =
F->
mult(P4_field_element_inverse,
v1[2 * i]);
496 cout <<
"orthogonal::rank_line_L1 after scaling" << endl;
500 if (
v1[0] != 0 ||
v1[1] != 0) {
501 cout <<
"orthogonal::rank_line_L1: "
502 "v1[0] != 0 || v1[1] != 0" << endl;
507 cout <<
"orthogonal::rank_line_L1 after rank_N1, "
508 "P4_line_index=" << P4_line_index << endl;
511 P4_sub_index = P4_line_index * (
q - 1) + P4_field_element;
512 index = P4_index *
a41 + P4_sub_index;
514 cout <<
"orthogonal::rank_line_L1 p1=" <<
p1
515 <<
" p2=" <<
p2 <<
" index=" << index << endl;
518 cout <<
"orthogonal::rank_line_L1 error in rank_line_L1 index too large" << endl;
519 cout <<
"index=" << index << endl;
520 cout <<
"l1=" <<
l1 << endl;
521 cout <<
"P4_index=" << P4_index << endl;
522 cout <<
"a41=" <<
a41 << endl;
523 cout <<
"P4_sub_index=" << P4_sub_index << endl;
524 cout <<
"P4_line_index=" << P4_line_index << endl;
525 cout <<
"P4_field_element=" << P4_field_element << endl;
532 long int &p1,
long int &p2,
long int index,
int verbose_level)
534 int f_v = (verbose_level >= 1);
535 int f_vv = (verbose_level >= 2);
536 int f_vvv = (verbose_level >= 3);
537 long int P3_index, P3_sub_index, P3_point;
538 long int root, a, b, c, d, e, i;
539 long int P3_field_element;
541 P3_index = index /
a32;
542 P3_sub_index = index %
a32;
544 cout <<
"orthogonal::unrank_line_L2 index=" << index << endl;
547 cout <<
"error in orthogonal::unrank_line_L2 index too large" << endl;
549 P3_point = P3_index / (
q - 1);
550 P3_field_element = P3_index % (
q - 1);
552 cout <<
"orthogonal::unrank_line_L2 P3_index=" << P3_index
553 <<
" P3_sub_index=" << P3_sub_index << endl;
554 cout <<
"unrank_line_L2 P3_point=" << P3_point
555 <<
" P3_field_element=" << P3_field_element << endl;
558 v3[
n - 2] = 1 + P3_field_element;
561 cout <<
"orthogonal::unrank_line_L2 before rank_Sbar v3=" << endl;
567 cout <<
"orthogonal::unrank_line_L2 p1=" <<
p1 << endl;
569 if (P3_sub_index == 0) {
571 cout <<
"orthogonal::unrank_line_L2 case 1" << endl;
575 for (i = 2; i <
n - 2; i++) {
581 if (P3_sub_index < (
q - 1) *
T1_mm2) {
584 a = P3_sub_index / (
q - 1);
585 b = P3_sub_index % (
q - 1);
587 cout <<
"orthogonal::unrank_line_L2 case 2, "
588 "a=" << a <<
" b=" << b << endl;
591 for (i = 2; i <
n - 2; i++)
595 P3_sub_index -= (
q - 1) *
T1_mm2;
596 a = P3_sub_index / (
q - 1);
597 b = P3_sub_index % (
q - 1);
603 cout <<
"orthogonal::unrank_line_L2 case 3, "
604 "a=" << a <<
" b=" << b << endl;
607 for (i = 1; i <
m - 1; i++) {
613 cout <<
"orthogonal::unrank_line_L2 partner of 10...10 created:" << endl;
623 0, P3_point, root,
m - 1,
631 cout <<
"orthogonal::unrank_line_L2 the Siegel map is" << endl;
638 for (i = 0; i <
n - 2; i++) {
643 cout <<
"orthogonal::unrank_line_L2 maps to v2=" << endl;
649 cout <<
"c=" << c << endl;
654 cout <<
"orthogonal::unrank_line_L2 before rank_Sbar v2=" << endl;
660 cout <<
"orthogonal::unrank_line_L2 error, not orthogonal" << endl;
665 cout <<
"p2=" <<
p2 << endl;
668 cout <<
"orthogonal::unrank_line_L2 index=" << index
669 <<
" p1=" <<
p1 <<
" p2=" <<
p2 << endl;
675 int f_v = (verbose_level >= 1);
677 int f_vvv = (verbose_level >= 3);
678 long int P3_index, P3_sub_index, P3_point;
679 long int root, a, b, c, d, i,
alpha;
680 long int P3_field_element;
684 cout <<
"orthogonal::rank_line_L2 p1=" <<
p1 <<
" p2=" <<
p2 << endl;
689 cout <<
"p1 = " <<
p1 <<
" : v3=:" << endl;
694 cout <<
"orthogonal::rank_line_L2 v3[n - 1]" << endl;
697 for (i =
n - 3; i >= 0; i--) {
703 cout <<
"orthogonal::rank_line_L2 i < 0" << endl;
709 for (i = 0; i <
n; i++) {
714 cout <<
"orthogonal::rank_line_L2 after scaling, v3=:" << endl;
718 P3_field_element =
v3[
n - 2] - 1;
720 P3_index = P3_point * (
q - 1) + P3_field_element;
722 cout <<
"orthogonal::rank_line_L2 P3_point=" << P3_point
723 <<
" P3_field_element=" << P3_field_element << endl;
724 cout <<
"orthogonal::rank_line_L2 P3_index=" << P3_index << endl;
727 cout <<
"orthogonal::rank_line_L2 p2 = " <<
p2 <<
" : v2=:" << endl;
740 0, P3_point, root,
m - 1,
752 for (i = 0; i <
n - 2; i++)
756 cout <<
"orthogonal::rank_line_L2 maps back to v1=:" << endl;
760 for (i = 2; i <
n - 2; i++)
766 cout <<
"orthogonal::rank_line_L2 case 1" << endl;
769 cout <<
"orthogonal::rank_line_L2, case 1 v1[0]" << endl;
774 cout <<
"orthogonal::rank_line_L2, case 1 v1[1] == 0" << endl;
779 for (i = 0; i <
n; i++) {
784 cout <<
"orthogonal::rank_line_L2 after scaling v1=:" << endl;
795 cout <<
"orthogonal::rank_line_L2 case 2" << endl;
798 cout <<
"orthogonal::rank_line_L2, case 1 "
804 cout <<
"orthogonal::rank_line_L2, case 1 "
805 "v1[1] == 0" << endl;
810 for (i = 0; i <
n; i++) {
815 cout <<
"orthogonal::rank_line_L2 after scaling v1=:" << endl;
820 for (i =
n - 3; i >= 2; i--) {
825 cout <<
"orthogonal::rank_line_L2 case 2, "
831 for (i = 2; i <
n - 2; i++)
835 cout <<
"orthogonal::rank_line_L2 before rank_Sbar:" << endl;
841 cout <<
"a=" << a <<
" b=" << b << endl;
844 P3_sub_index = 1 + a * (
q - 1) + b;
848 cout <<
"orthogonal::rank_line_L2 case 3" << endl;
850 P3_sub_index = 1 + (
q - 1) *
T1_mm2;
853 cout <<
"orthogonal::rank_line_L2, case 3 "
854 "v1[1] == 0" << endl;
859 for (i = 0; i <
n; i++) {
864 cout <<
"orthogonal::rank_line_L2 after scaling v1=:" << endl;
869 cout <<
"orthogonal::rank_line_L2, case 3 "
870 "v1[0] == 0" << endl;
875 for (i = 1; i <
m - 1; i++) {
880 cout <<
"a=" << a <<
" b=" << b << endl;
882 P3_sub_index += a * (
q - 1) + b;
886 cout <<
"orthogonal::rank_line_L2 p1=" <<
p1 <<
" p2=" <<
p2
887 <<
" P3_sub_index=" << P3_sub_index << endl;
890 index = P3_index *
a32 + P3_sub_index;
893 cout <<
"orthogonal::rank_line_L2 p1=" <<
p1 <<
" p2=" <<
p2
894 <<
" index=" << index << endl;
897 cout <<
"error in orthogonal::rank_line_L2 index too large" << endl;
903 long int &p1,
long int &p2,
long int index,
int verbose_level)
905 int f_v = (verbose_level >= 1);
906 int f_vv = (verbose_level >= 2);
907 int f_vvv = (verbose_level >= 3);
908 long int P4_index, P4_sub_index, P4_line_index;
909 long int P4_field_element, root, i, e;
911 P4_index = index /
a43;
912 P4_sub_index = index %
a43;
913 P4_line_index = P4_sub_index / (
q - 1);
914 P4_field_element = P4_sub_index % (
q - 1);
917 cout <<
"orthogonal::unrank_line_L3 index=" << index << endl;
920 cout <<
"error in orthogonal::unrank_line_L3 index too large" << endl;
923 cout <<
"orthogonal::unrank_line_L3 P4_index=" << P4_index
924 <<
" P4_sub_index=" << P4_sub_index << endl;
925 cout <<
"P4_line_index=" << P4_line_index
926 <<
" P4_field_element=" << P4_field_element << endl;
931 cout <<
"p1=" <<
p1 <<
" v3=" << endl;
939 cout <<
"orthogonal::unrank_line_L3 after unrank_Sbar" << endl;
947 P4_index,
m - 1, verbose_level - 1);
950 0, P4_index, root,
m - 1,
961 for (i = 0; i <
n - 2; i++)
965 v2[
n - 1] = P4_field_element;
967 cout <<
"orthogonal::unrank_line_L3 before rank_Sbar" << endl;
973 cout <<
"orthogonal::unrank_line_L3 error, not orthogonal" << endl;
978 cout <<
"orthogonal::unrank_line_L3 p2=" <<
p2 << endl;
981 cout <<
"orthogonal::unrank_line_L3 index=" << index
982 <<
" p1=" <<
p1 <<
" p2=" <<
p2 << endl;
988 int f_v = (verbose_level >= 1);
990 int f_vvv = (verbose_level >= 3);
991 long int P4_index, P4_sub_index, P4_line_index;
992 long int P4_field_element, root, i;
997 cout <<
"orthogonal::rank_line_L3 p1=" <<
p1 <<
" p2=" <<
p2 << endl;
1002 cout <<
"orthogonal::rank_line_L3 p1=" <<
p1 <<
" v3=" << endl;
1007 cout <<
"orthogonal::rank_line_L3 p2=" <<
p2 <<
" v2=" << endl;
1013 cout <<
"orthogonal::rank_line_L3 P4_index=" << P4_index << endl;
1018 P4_index,
m - 1, verbose_level - 1);
1021 0, P4_index, root,
m - 1,
1035 for (i = 0; i <
n; i++)
1039 cout <<
"orthogonal::rank_line_L3 maps back to" << endl;
1045 cout <<
"orthogonal::rank_line_L3 after setting v1[0] = 0, v1=" << endl;
1049 if (
v1[0] ||
v1[1]) {
1050 cout <<
"orthogonal::rank_line_L3 rank_line_L3 v1[0] || v1[1]" << endl;
1055 cout <<
"orthogonal::rank_line_L3 P4_line_index=" << P4_line_index << endl;
1057 for (i =
n - 3; i >= 0; i--) {
1063 cout <<
"orthogonal::rank_line_L3 i < 0" << endl;
1069 for (i = 0; i <
n; i++) {
1074 cout <<
"orthogonal::rank_line_L3 after scaling, v1=:" << endl;
1079 cout <<
"orthogonal::rank_line_L3 v1[n - 2]" << endl;
1082 if (
v1[
n - 1] == 0) {
1083 cout <<
"orthogonal::rank_line_L3 v1[n - 1] == 0" << endl;
1086 P4_field_element =
v1[
n - 1] - 1;
1088 cout <<
"orthogonal::rank_line_L3 P4_field_element=" << P4_field_element << endl;
1090 P4_sub_index = P4_line_index * (
q - 1) + P4_field_element;
1092 cout <<
"orthogonal::rank_line_L3 P4_sub_index=" << P4_sub_index << endl;
1094 index = (
long int) P4_index *
a43 + P4_sub_index;
1097 cout <<
"orthogonal::rank_line_L3 p1=" <<
p1 <<
" p2=" <<
p2
1098 <<
" index=" << index << endl;
1101 cout <<
"error in orthogonal::rank_line_L3 index too large" << endl;
1107 long int &p1,
long int &p2,
long int index,
int verbose_level)
1109 int f_v = (verbose_level >= 1);
1110 int f_vv = (verbose_level >= 2);
1111 int f_vvv = (verbose_level >= 3);
1112 long int P4_index, P4_sub_index, P4_line_index;
1113 long int P4_field_element, root, i, e;
1115 P4_index = index /
a44;
1116 P4_sub_index = index %
a44;
1117 P4_line_index = P4_sub_index / (
q - 1);
1118 P4_field_element = P4_sub_index % (
q - 1);
1121 cout <<
"unrank_line_L4 index=" << index << endl;
1124 cout <<
"error in unrank_line_L4 index too large" << endl;
1127 cout <<
"unrank_line_L4 P4_index=" << P4_index
1128 <<
" P4_sub_index=" << P4_sub_index << endl;
1129 cout <<
"P4_line_index=" << P4_line_index
1130 <<
" P4_field_element=" << P4_field_element << endl;
1135 cout <<
"p1=" <<
p1 << endl;
1141 cout <<
"after unrank_Sbar" << endl;
1149 P4_index,
m - 1, verbose_level - 1);
1152 0, P4_index, root,
m - 1,
1163 for (i = 0; i <
n - 2; i++)
1166 v2[
n - 2] = P4_field_element;
1169 cout <<
"before rank_Sbar" << endl;
1175 cout <<
"error, not orthogonal" << endl;
1180 cout <<
"p2=" <<
p2 << endl;
1183 cout <<
"unrank_line_L4 index=" << index
1184 <<
" p1=" <<
p1 <<
" p2=" <<
p2 << endl;
1190 int f_v = (verbose_level >= 1);
1192 int f_vvv = (verbose_level >= 3);
1193 long int P3_index, P3_sub_index, P3_line_index;
1194 long int P3_field_element, root, i;
1199 cout <<
"rank_line_L4 p1=" <<
p1 <<
" p2=" <<
p2 << endl;
1204 cout <<
"p1=" <<
p1 <<
" v3=" << endl;
1209 cout <<
"p2=" <<
p2 <<
" v2=" << endl;
1215 cout <<
"P3_index=" << P3_index << endl;
1221 0, P3_index, root,
m - 1, verbose_level - 1);
1234 for (i = 0; i <
n; i++)
1238 cout <<
"maps back to" << endl;
1244 cout <<
"after setting v1[0] = 0, v1=" << endl;
1248 if (
v1[0] ||
v1[1]) {
1249 cout <<
"rank_line_L4 v1[0] || v1[1]" << endl;
1254 cout <<
"P3_line_index=" << P3_line_index << endl;
1256 for (i =
n - 3; i >= 0; i--) {
1262 cout <<
"orthogonal::rank_line_L4 i < 0" << endl;
1268 for (i = 0; i <
n; i++) {
1273 cout <<
"after scaling, v1=:" << endl;
1277 if (
v1[
n - 2] == 0) {
1278 cout <<
"orthogonal::rank_line_L4 v1[n - 2] == 0" << endl;
1282 cout <<
"orthogonal::rank_line_L4 v1[n - 1]" << endl;
1285 P3_field_element =
v1[
n - 2] - 1;
1287 cout <<
"P3_field_element=" << P3_field_element << endl;
1289 P3_sub_index = P3_line_index * (
q - 1) + P3_field_element;
1291 cout <<
"P3_sub_index=" << P3_sub_index << endl;
1293 index = P3_index *
a44 + P3_sub_index;
1296 cout <<
"rank_line_L4 p1=" <<
p1 <<
" p2=" <<
p2
1297 <<
" index=" << index << endl;
1300 cout <<
"error in rank_line_L4 index too large" << endl;
1306 long int &p1,
long int &p2,
long int index,
int verbose_level)
1308 int f_v = (verbose_level >= 1);
1313 cout <<
"unrank_line_L5 index=" << index << endl;
1316 cout <<
"error in unrank_line_L5 index "
1317 "too large, l5=" <<
l5 << endl;
1321 cout <<
"unrank_line_L5 index=" << index
1322 <<
" p1=" <<
p1 <<
" p2=" <<
p2 << endl;
1328 int f_v = (verbose_level >= 1);
1332 cout <<
"rank_line_L5 p1=" <<
p1 <<
" p2=" <<
p2 << endl;
1336 cout <<
"rank_line_L5 p1=" <<
p1 <<
" p2=" <<
p2
1337 <<
" index=" << index << endl;
1340 cout <<
"error in rank_line_L5 index too large" << endl;
1346 long int &p1,
long int &p2,
long int index,
int verbose_level)
1348 int f_v = (verbose_level >= 1);
1353 cout <<
"unrank_line_L6 index=" << index << endl;
1356 cout <<
"error in unrank_line_L6 index too large" << endl;
1361 cout <<
"unrank_line_L6 index=" << index
1362 <<
" p1=" <<
p1 <<
" p2=" <<
p2 << endl;
1368 int f_v = (verbose_level >= 1);
1372 cout <<
"rank_line_L6 p1=" <<
p1 <<
" p2=" <<
p2 << endl;
1376 cout <<
"rank_line_L6 p1=" <<
p1 <<
" p2=" <<
p2
1377 <<
" index=" << index << endl;
1380 cout <<
"error in rank_line_L6 index too large" << endl;
1386 long int &p1,
long int &p2,
long int index,
int verbose_level)
1388 int f_v = (verbose_level >= 1);
1393 cout <<
"unrank_line_L7 index=" << index << endl;
1396 cout <<
"error in unrank_line_L7 index too large" << endl;
1401 cout <<
"unrank_line_L7 index=" << index
1402 <<
" p1=" <<
p1 <<
" p2=" <<
p2 << endl;
1408 int f_v = (verbose_level >= 1);
1412 cout <<
"rank_line_L7 p1=" <<
p1 <<
" p2=" <<
p2 << endl;
1416 cout <<
"rank_line_L7 p1=" <<
p1 <<
" p2=" <<
p2
1417 <<
" index=" << index << endl;
1420 cout <<
"error in rank_line_L7 index too large" << endl;
1428 long int pt1,
long int pt2,
1429 long int &cpt1,
long int &cpt2,
int verbose_level)
1431 int f_v = (verbose_level >= 1);
1433 if (line_type == 1) {
1436 else if (line_type == 2) {
1439 else if (line_type == 3) {
1442 else if (line_type == 4) {
1445 else if (line_type == 5) {
1448 else if (line_type == 6) {
1451 else if (line_type == 7) {
1455 cout <<
"hyperbolic_canonical_points_of_line "
1456 "of type " << line_type << endl;
1457 cout <<
"pt1=" << pt1 <<
" pt2=" << pt2 << endl;
1458 cout <<
"cpt1=" << cpt1 <<
" cpt2=" << cpt2 << endl;
1463 long int pt1,
long int pt2,
long int &cpt1,
long int &cpt2)
1465 int a, b, c, d, lambda1, lambda2, i;
1473 if (a == 0 && b == 0) {
1478 if (c == 0 && d == 0) {
1485 if (lambda1 != lambda2) {
1486 cout <<
"orthogonal::canonical_points_L1: "
1487 "lambda1 != lambda2" << endl;
1490 for (i = 0; i <
n; i++) {
1493 if (
v3[
n - 2] ||
v3[
n - 1]) {
1494 cout <<
"orthogonal::canonical_points_L1: "
1495 "v3[n - 2] || v3[n - 1]" << endl;
1503 long int pt1,
long int pt2,
long int &cpt1,
long int &cpt2)
1505 int a, b, c, d,
lambda, i;
1524 for (i = 0; i <
n; i++) {
1528 cout <<
"orthogonal::canonical_points_L2: "
1529 "v3[n - 1]" << endl;
1542 cout <<
"orthogonal::canonical_points_L2: b" << endl;
1546 for (i = 0; i <
n; i++) {
1550 cout <<
"orthogonal::canonical_points_L2: "
1551 "v3[n - 2]" << endl;
1559 long int pt1,
long int pt2,
long int &cpt1,
long int &cpt2)
1561 int a, b, c, d,
lambda, i;
1570 cout <<
"orthogonal::canonical_points_L3 a" << endl;
1574 cout <<
"orthogonal::canonical_points_L3 c" << endl;
1590 for (i = 0; i <
n; i++) {
1593 if (
v3[
n - 2] ||
v3[
n - 1]) {
1594 cout <<
"orthogonal::canonical_points_L3: "
1595 "v3[n - 2] || v3[n - 1]" << endl;
1603 long int pt1,
long int pt2,
long int &cpt1,
long int &cpt2)
1605 int a, b, c, d,
lambda, i;
1614 cout <<
"orthogonal::canonical_points_L4 b" << endl;
1618 cout <<
"orthogonal::canonical_points_L3 d" << endl;
1634 for (i = 0; i <
n; i++) {
1637 if (
v3[
n - 2] ||
v3[
n - 1]) {
1638 cout <<
"orthogonal::canonical_points_L4: "
1639 "v3[n - 2] || v3[n - 1]" << endl;
1647 long int pt1,
long int pt2,
long int &cpt1,
long int &cpt2)
1654 long int pt1,
long int pt2,
long int &cpt1,
long int &cpt2)
1660 long int pt1,
long int pt2,
long int &cpt1,
long int &cpt2)
1666 long int pt1,
long int pt2,
int pt1_type,
int pt2_type)
1668 if (pt1_type == 1) {
1669 if (pt2_type == 1) {
1672 else if (pt2_type == 2) {
1675 else if (pt2_type == 3) {
1678 else if (pt2_type == 4) {
1682 else if (pt1_type == 2) {
1683 if (pt2_type == 1) {
1686 else if (pt2_type == 2) {
1689 else if (pt2_type == 3) {
1692 else if (pt2_type == 4) {
1695 else if (pt2_type == 5) {
1699 else if (pt1_type == 3) {
1702 else if (pt2_type == 2) {
1705 else if (pt2_type == 3) {
1708 else if (pt2_type == 4) {
1711 else if (pt2_type == 6) {
1715 else if (pt1_type == 4) {
1718 else if (pt2_type == 2) {
1721 else if (pt2_type == 3) {
1724 else if (pt2_type == 4) {
1727 else if (pt2_type == 5) {
1730 else if (pt2_type == 6) {
1734 else if (pt1_type == 5) {
1735 if (pt2_type == 2) {
1738 else if (pt2_type == 4) {
1742 else if (pt1_type == 6) {
1743 if (pt2_type == 3) {
1746 else if (pt2_type == 4) {
1750 cout <<
"orthogonal::hyperbolic_line_type_given_point_types "
1751 "illegal combination" << endl;
1752 cout <<
"pt1_type = " << pt1_type << endl;
1753 cout <<
"pt2_type = " << pt2_type << endl;
1790 long int rk2,
int m,
int verbose_level)
1793 int f_v = (verbose_level >= 1);
1797 cout <<
"orthogonal::find_root_hyperbolic "
1798 "rk2=" << rk2 <<
" m=" <<
m << endl;
1801 cout <<
"orthogonal::find_root_hyperbolic: "
1802 "rk2 must not be 0" << endl;
1806 cout <<
"orthogonal::find_root_hyperbolic: "
1807 "m must not be 1" << endl;
1814 cout <<
"orthogonal::find_root_hyperbolic root=" << endl;
1822 cout <<
"orthogonal::find_root_hyperbolic u=" << u << endl;
1828 cout <<
"orthogonal::find_root_hyperbolic v=" << v << endl;
1833 cout <<
"orthogonal::find_root_hyperbolic root=" << root << endl;
1839 long int rk2,
int m,
int *x,
int *y,
int *z,
1843 int f_v = (verbose_level >= 1);
1844 int f_vv = (verbose_level >= 2);
1847 int y2_minus_y3, minus_y1, y3_minus_y2, a, a2;
1850 cout <<
"orthogonal::find_root_hyperbolic_xyz "
1851 "rk2=" << rk2 <<
" m=" <<
m << endl;
1853 for (i = 0; i < d; i++) {
1861 cout <<
"orthogonal::find_root_hyperbolic_xyz y=" << endl;
1867 cout <<
"detected y[0] is nonzero" << endl;
1871 cout <<
"orthogonal::find_root_hyperbolic_xyz z=" << endl;
1878 cout <<
"detected y[0] is zero" << endl;
1882 cout <<
"detected y[1] is zero" << endl;
1884 for (i = 2; i < d; i++) {
1887 cout <<
"detected y[" << i <<
"] is nonzero" << endl;
1893 cout <<
"orthogonal::find_root_hyperbolic_xyz z=" << endl;
1903 cout <<
"orthogonal::find_root_hyperbolic_xyz z=" << endl;
1911 cout <<
"orthogonal::find_root_hyperbolic_xyz error: y is zero vector" << endl;
1914 cout <<
"detected y[1] is nonzero" << endl;
1922 if (minus_y1 != y2_minus_y3) {
1924 cout <<
"detected -y[1] != y[2] - y[3]" << endl;
1936 cout <<
"orthogonal::find_root_hyperbolic_xyz z=" << endl;
1943 cout <<
"detected -y[1] = y[2] - y[3]" << endl;
1946 if (minus_y1 != y3_minus_y2) {
1948 cout <<
"detected -y[1] != y[3] - y[2]" << endl;
1960 cout <<
"orthogonal::find_root_hyperbolic_xyz z=" << endl;
1967 cout <<
"detected -y[1] = y[2] - y[3] = y[3] - y[2]" << endl;
1976 cout <<
"detected field of order 2" << endl;
1981 cout <<
"detected y[2] == 0" << endl;
1990 cout <<
"orthogonal::find_root_hyperbolic_xyz z=" << endl;
1996 else if (y[3] == 0) {
1998 cout <<
"detected y[3] == 0" << endl;
2007 cout <<
"orthogonal::find_root_hyperbolic_xyz z=" << endl;
2013 cout <<
"orthogonal::find_root_hyperbolic_xyz error "
2014 "neither y2 nor y3 is zero" << endl;
2018 cout <<
"detected field has at least 4 elements" << endl;
2036 cout <<
"orthogonal::find_root_hyperbolic_xyz z=" << endl;
2041 cout <<
"orthogonal::find_root_hyperbolic_xyz done" << endl;
2046 int *v,
int stride,
int m)
2050 for (i = 0; i <
m; i++) {
2051 beta =
F->
mult(v[2 * i * stride], v[(2 * i + 1) * stride]);
2058 int *u,
int *v,
int stride,
int m)
2060 int alpha = 0, beta1, beta2, i;
2062 for (i = 0; i <
m; i++) {
2063 beta1 =
F->
mult(u[2 * i * stride], v[(2 * i + 1) * stride]);
2064 beta2 =
F->
mult(u[(2 * i + 1) * stride], v[2 * i * stride]);
linear_algebra::linear_algebra * Linear_algebra
void invert_matrix(int *A, int *A_inv, int n, int verbose_level)
void mult_matrix_matrix(int *A, int *B, int *C, int m, int n, int o, int verbose_level)
long int rank_line_L7(long int p1, long int p2, int verbose_level)
void unrank_N1(int *v, int stride, int m, long int rk)
int evaluate_hyperbolic_quadratic_form(int *v, int stride, int m)
long int hyperbolic_rank_line(long int p1, long int p2, int verbose_level)
field_theory::finite_field * F
void canonical_points_L7(long int pt1, long int pt2, long int &cpt1, long int &cpt2)
void canonical_points_L3(long int pt1, long int pt2, long int &cpt1, long int &cpt2)
int evaluate_hyperbolic_bilinear_form(int *u, int *v, int stride, int m)
int hyperbolic_decide_P3(long int pt1, long int pt2)
int hyperbolic_decide_P2(long int pt1, long int pt2)
void canonical_points_L4(long int pt1, long int pt2, long int &cpt1, long int &cpt2)
long int rank_line_L5(long int p1, long int p2, int verbose_level)
void canonical_points_L1(long int pt1, long int pt2, long int &cpt1, long int &cpt2)
int hyperbolic_decide_P1(long int pt1, long int pt2)
void canonical_points_L2(long int pt1, long int pt2, long int &cpt1, long int &cpt2)
void hyperbolic_canonical_points_of_line(int line_type, long int pt1, long int pt2, long int &cpt1, long int &cpt2, int verbose_level)
void unrank_Sbar(int *v, int stride, int m, long int rk)
int hyperbolic_line_type_given_point_types(long int pt1, long int pt2, int pt1_type, int pt2_type)
long int rank_line_L6(long int p1, long int p2, int verbose_level)
int find_root_hyperbolic(long int rk2, int m, int verbose_level)
void Siegel_map_between_singular_points_hyperbolic(int *T, long int rk_from, long int rk_to, long int root, int m, int verbose_level)
void hyperbolic_point_rk_to_type_and_index(long int rk, long int &type, long int &index)
void unrank_line_L7(long int &p1, long int &p2, long int index, int verbose_level)
long int hyperbolic_type_and_index_to_point_rk(long int type, long int index, int verbose_level)
long int rank_line(long int p1, long int p2, int verbose_level)
long int rank_line_L4(long int p1, long int p2, int verbose_level)
void canonical_points_L5(long int pt1, long int pt2, long int &cpt1, long int &cpt2)
void unrank_line(long int &p1, long int &p2, long int index, int verbose_level)
void point_rk_to_type_and_index(long int rk, long int &type, long int &index, int verbose_level)
long int type_and_index_to_point_rk(long int type, long int index, int verbose_level)
long int rank_line_L3(long int p1, long int p2, int verbose_level)
int line_type_given_point_types(long int pt1, long int pt2, long int pt1_type, long int pt2_type)
void hyperbolic_unrank_line(long int &p1, long int &p2, long int rk, int verbose_level)
void unrank_line_L3(long int &p1, long int &p2, long int index, int verbose_level)
long int rank_N1(int *v, int stride, int m)
int triple_is_collinear(long int pt1, long int pt2, long int pt3)
void unrank_line_L2(long int &p1, long int &p2, long int index, int verbose_level)
void find_root_hyperbolic_xyz(long int rk2, int m, int *x, int *y, int *z, int verbose_level)
long int rank_line_L2(long int p1, long int p2, int verbose_level)
void unrank_line_L5(long int &p1, long int &p2, long int index, int verbose_level)
void unrank_line_L4(long int &p1, long int &p2, long int index, int verbose_level)
void canonical_points_of_line(int line_type, long int pt1, long int pt2, long int &cpt1, long int &cpt2, int verbose_level)
long int rank_line_L1(long int p1, long int p2, int verbose_level)
long int rank_Sbar(int *v, int stride, int m)
void unrank_line_L1(long int &p1, long int &p2, long int index, int verbose_level)
void unrank_line_L6(long int &p1, long int &p2, long int index, int verbose_level)
int is_ending_dependent(int *vec1, int *vec2)
void canonical_points_L6(long int pt1, long int pt2, long int &cpt1, long int &cpt2)
#define Int_vec_print_integer_matrix(A, B, C, D)
#define Int_vec_print(A, B, C)
the orbiter library for the classification of combinatorial objects