Orbiter 2022
Combinatorial Objects
surface_domain_families.cpp
Go to the documentation of this file.
1/*
2 * surface_domain_families.cpp
3 *
4 * Created on: Jul 22, 2020
5 * Author: betten
6 */
7
8
9
10#include "foundations.h"
11
12
13using namespace std;
14
15
16namespace orbiter {
17namespace layer1_foundations {
18namespace algebraic_geometry {
19
20
21void surface_domain::create_equation_general_abcd(int a, int b, int c, int d, int *coeff, int verbose_level)
22{
23 int f_v = (verbose_level >= 1);
24
25
26 if (f_v) {
27 cout << "surface_domain::create_equation_general_abcd" << endl;
28 }
29
30
31 int m1 = F->negate(1);
32 int two = F->add(1, 1);
33 int four = F->add(two, two);
34
35 int amc = F->add(a, F->negate(c));
36 int bmd = F->add(b, F->negate(d));
37
38 int abc = F->mult3(a, b, c);
39 int abd = F->mult3(a, b, d);
40 int mabd = F->mult4(m1, a, b, d);
41 int macd = F->mult4(m1, a, c, d);
42 int bcd = F->mult3(b, c, d);
43 int admcb = F->add(F->mult(a, d), F->mult3(m1, c, b));
44 int A = F->add5(abc, mabd, macd, bcd, admcb);
45
46 int aac = F->mult3(a, a, c);
47 int aad = F->mult3(a, a, d);
48 int acc = F->mult3(a, c, c);
49 int bcc = F->mult3(b, c, c);
50 int B = F->add4(aac, bcc, admcb, F->negate(F->add(aad, acc)));
51
52 int aacd = F->mult4(a, a, c, d);
53 int abcc = F->mult4(a, b, c, c);
54
55 int C = F->add4(aacd, abd, bcc, F->negate(F->add3(abcc, aad, bcd)));
56
57 int D = F->add4(admcb, b, c, F->negate(F->add(a, d)));
58
59 int two_aabcd = F->mult6(two, a, a, b, c, d);
60 int abbcd = F->mult5(a, b, b, c, d);
61 int two_abccd = F->mult6(two, a, b, c, c, d);
62 int abcdd = F->mult5(a, b, c, d, d);
63
64 int aadd = F->mult4(a, a, d, d);
65 int abbc = F->mult4(a, b, b, c);
66 int acdd = F->mult4(a, c, d, d);
67 int bbcc = F->mult4(b, b, c, c);
68
69 int aabdd = F->mult5(a, a, b, d, d);
70 int two_aacdd = F->mult6(two, a, a, c, d, d);
71 int two_abbcc = F->mult6(two, a, b, b, c, c);
72 int bbccd = F->mult5(b, b, c, c, d);
73 int aabc = F->mult4(a, a, b, c);
74 int four_abcd = F->mult5(four, a, b, c, d);
75 int accd = F->mult4(a, c, c, d);
76
77 int E_plus1 = F->add5(two_aabcd, abbcd, two_abccd, abcdd, aacd);
78 int E_plus2 = F->add5(aadd, abbc, abcc, acdd, bbcc);
79 int E_plus = F->add(E_plus1, E_plus2);
80
81 //cout << "E_plus1 = " << E_plus1 << endl;
82 //cout << "E_plus2 = " << E_plus2 << endl;
83 //cout << "E_plus = " << E_plus << endl;
84
85 int E_minus1 = F->add4(aabdd, two_aacdd, two_abbcc, bbccd);
86 int E_minus2 = F->add3(aabc, four_abcd, accd);
87 int E_minus = F->add(E_minus1, E_minus2);
88
89 int E = F->add(E_plus, F->negate(E_minus));
90
92
93 coeff[5] = F->mult3(m1, A, bmd);
94 coeff[16] = F->mult(A, F->add4(a, b, F->negate(c), F->negate(d)));
95 coeff[17] = F->mult(B, bmd);
96 coeff[10] = F->mult3(m1, A, admcb);
97 coeff[18] = F->mult3(m1, C, bmd);
98 coeff[8] = coeff[9] = F->mult3(m1, amc, A);
99 coeff[11] = F->mult(A, admcb);
100 coeff[14] = F->mult4(c, a, D, bmd);
101 coeff[19] = E;
102
103
104
105 if (f_v) {
106 cout << "surface_domain::create_equation_general_abcd done" << endl;
107 }
108}
109
110void surface_domain::create_equation_Cayley_klmn(int k, int l, int m, int n, int *coeff, int verbose_level)
111{
112 int f_v = (verbose_level >= 1);
113
114
115 if (f_v) {
116 cout << "surface_domain::create_equation_Cayley_klmn" << endl;
117 }
119
120 coeff[6] = coeff[9] = coeff[12] = coeff[3] = 1;
121
122 coeff[16] = k;
123
124 int mn, nl, lm;
125
126 mn = F->mult(l, m);
127 nl = F->mult(n, l);
128 lm = F->mult(l, m);
129
130 coeff[19] = F->add(mn, F->inverse(mn));
131 coeff[18] = F->add(nl, F->inverse(nl));
132 coeff[17] = F->add(lm, F->inverse(lm));
133 coeff[13] = F->add(l, F->inverse(l));
134 coeff[14] = F->add(m, F->inverse(m));
135 coeff[15] = F->add(n, F->inverse(n));
136
137 if (f_v) {
138 cout << "surface_domain::create_equation_Cayley_klmn done" << endl;
139 }
140}
141
142
143void surface_domain::create_equation_bes(int a, int c, int *coeff, int verbose_level)
144// bes means five in Turkish
145{
146 int f_v = (verbose_level >= 1);
147 int ap1c, apc, acp1;
148 int a2, a3, a4;
149 int w1, w2;
150 int alpha, beta, gamma, delta, epsilon;
151
152 if (f_v) {
153 cout << "surface_domain::create_equation_bes" << endl;
154 }
155
156 a2 = F->mult(a, a);
157 a3 = F->mult(a2, a);
158 a4 = F->mult(a3, a);
159
160 w1 = F->add6(a4, F->mult(a3, c), F->mult(a2, c), F->mult(a, c), c, 1);
161
162 w2 = F->add6(F->mult(a4, c), a4, a3, a2, a, c);
163
164
165 ap1c = F->power(F->add(a, 1), 3);
166 apc = F->add(a, c);
167 acp1 = F->add(F->mult(a, c), 1);
168
169 alpha = F->mult(ap1c, apc);
170 beta = w1;
171 gamma = F->mult(ap1c, acp1);
172 delta = w2;
173 epsilon = F->mult(ap1c, F->mult(a, c));
174
176
177 coeff[4] = coeff[7] = coeff[8] = coeff[11] = coeff[12] = alpha;
178 coeff[17] = beta;
179 coeff[18] = gamma;
180 coeff[19] = delta;
181 coeff[15] = epsilon;
182
183
184 if (f_v) {
185 cout << "surface_domain::create_equation_bes done" << endl;
186 }
187}
188
189
190
191void surface_domain::create_equation_F13(int a, int *coeff, int verbose_level)
192{
193 int f_v = (verbose_level >= 1);
194 int b, c;
195
196 if (f_v) {
197 cout << "surface_domain::create_equation_F13" << endl;
198 }
199
200 b = F->power(F->add(a, 1), 5);
201 c = F->add(F->power(a, 3), 1);
203
204 coeff[6] = b;
205 coeff[13] = b;
206 coeff[8] = a;
207 coeff[11] = a;
208 coeff[19] = c;
209 if (f_v) {
210 cout << "surface_domain::create_equation_F13 done" << endl;
211 }
212}
213
214void surface_domain::create_equation_G13(int a, int *coeff, int verbose_level)
215{
216 int f_v = (verbose_level >= 1);
217 int b, c;
218
219 if (f_v) {
220 cout << "surface_domain::create_equation_G13" << endl;
221 }
222
223 b = F->mult(a, F->add(a, 1));
224 c = F->add(F->mult(a, a), F->add(a, 1));
226
227 coeff[5] = coeff[8] = coeff[9] = coeff[10] = coeff[11] = coeff[12] = 1;
228 coeff[14] = coeff[15] = b;
229 coeff[18] = coeff[19] = c;
230 if (f_v) {
231 cout << "surface_domain::create_equation_G13 done" << endl;
232 }
233}
234
236 int verbose_level)
237{
238 int f_v = (verbose_level >= 1);
239
240 if (f_v) {
241 cout << "surface_domain::create_surface_general_abcd" << endl;
242 }
243 int coeff20[20];
244
245 if (f_v) {
246 cout << "surface_domain::create_surface_general_abcd before create_equation_general_abcd" << endl;
247 }
248 create_equation_general_abcd(a, b, c, d, coeff20, verbose_level);
249 if (f_v) {
250 cout << "surface_domain::create_surface_general_abcd after create_equation_general_abcd" << endl;
251 }
252
253 surface_object *SO;
254
256
257 if (f_v) {
258 cout << "surface_domain::create_surface_general_abcd before SO->init_equation" << endl;
259 }
260 SO->init_equation(this, coeff20, verbose_level);
261
262
263 if (f_v) {
264 cout << "surface_domain::create_surface_general_abcd done" << endl;
265 }
266 return SO;
267}
268
269
270
272 int verbose_level)
273{
274 int f_v = (verbose_level >= 1);
275
276 if (f_v) {
277 cout << "surface_domain::create_surface_bes" << endl;
278 }
279 int coeff20[20];
280
281 if (f_v) {
282 cout << "surface_domain::create_surface_bes before create_equation_bes" << endl;
283 }
284 create_equation_bes(a, c, coeff20, verbose_level);
285 if (f_v) {
286 cout << "surface_domain::create_surface_bes after create_equation_bes" << endl;
287 }
288
289 surface_object *SO;
290
292
293 if (f_v) {
294 cout << "surface_domain::create_surface_bes before SO->init_equation" << endl;
295 }
296 SO->init_equation(this, coeff20, verbose_level);
297
298 if (f_v) {
299 cout << "surface_domain::create_surface_bes done" << endl;
300 }
301 return SO;
302}
303
304
306{
307 int f_v = (verbose_level >= 1);
308
309 if (f_v) {
310 cout << "surface_domain::create_surface_F13" << endl;
311 }
312 int coeff20[20];
313
314 if (f_v) {
315 cout << "surface_domain::create_surface_F13 before create_equation_F13" << endl;
316 }
317 create_equation_F13(a, coeff20, verbose_level);
318 if (f_v) {
319 cout << "surface_domain::create_surface_F13 after create_equation_F13" << endl;
320 }
321
322 surface_object *SO;
323
325
326 if (f_v) {
327 cout << "surface_domain::create_surface_F13 before SO->init_equation" << endl;
328 }
329 SO->init_equation(this, coeff20, verbose_level);
330
331 if (f_v) {
332 cout << "surface_domain::create_surface_F13 done" << endl;
333 }
334 return SO;
335}
336
338{
339 int f_v = (verbose_level >= 1);
340
341 if (f_v) {
342 cout << "surface_domain::create_surface_G13" << endl;
343 }
344 int coeff20[20];
345
346 if (f_v) {
347 cout << "surface_domain::create_surface_G13 before create_equation_G13" << endl;
348 }
349 create_equation_G13(a, coeff20, verbose_level);
350 if (f_v) {
351 cout << "surface_domain::create_surface_G13 after create_equation_G13" << endl;
352 }
353
354 surface_object *SO;
355
357
358 if (f_v) {
359 cout << "surface_domain::create_surface_G13 before SO->init_equation" << endl;
360 }
361 SO->init_equation(this, coeff20, verbose_level);
362
363 if (f_v) {
364 cout << "surface_domain::create_surface_G13 done" << endl;
365 }
366 return SO;
367}
368
370 int &alpha, int &beta,
371 int verbose_level)
372{
373 int f_v = (verbose_level >= 1);
374 int alpha0, beta0;
375 long int Lines27[27];
376 int i, rk, nb;
379
380 if (f_v) {
381 cout << "surface_domain::create_Eckardt_surface" << endl;
382 }
383 alpha = -1;
384 beta = -1;
385 //nb_E = -1;
386
387 int a2, a2p1, a2m1;
388
389 a2 = F->mult(a, a);
390 a2p1 = F->add(a2, 1);
391 a2m1 = F->add(a2, F->negate(1));
392 if (a2p1 == 0 || a2m1 == 0) {
393 cout << "surface_domain::create_Eckardt_surface "
394 "a2p1 == 0 || a2m1 == 0" << endl;
395 return FALSE;
396 }
397
398
399 //Pts = NEW_lint(Gg.nb_PG_elements(3, F->q));
400
401 //coeff = NEW_int(20);
402 alpha0 = F->negate(F->mult(b, b));
403 beta0 = F->mult(F->mult(F->power(b, 3),
404 F->add(1, F->mult(a, a))), F->inverse(a));
405 if (f_v) {
406 cout << "surface_domain::create_Eckardt_surface a="
407 << a << " b=" << b << " alpha0=" << alpha0
408 << " beta0=" << beta0 << endl;
409 }
410
411#if 0
412 int_vec_zero(Basis, 8);
413 Basis[0 * 4 + 0] = 1;
414 Basis[0 * 4 + 1] = a;
415 Basis[1 * 4 + 2] = 1;
416 Basis[1 * 4 + 3] = b;
417 line_rk = Gr->rank_int_here(Basis, 0);
418#endif
419
420
421#if 0
422 //int_vec_copy(desired_lines, Lines, 3);
423 //nb = 3;
424
425 cout << "The triangle lines are:" << endl;
426 Gr->print_set(desired_lines, 3);
427#endif
428
429
430 long int *Oab;
431
432 Oab = NEW_lint(12);
433 create_Eckardt_double_six(Oab, a, b, 0 /* verbose_level */);
434
435#if 0
436 if (!test_if_sets_are_equal(Oab, Lines, 12)) {
437 cout << "the sets are not equal" << endl;
438 exit(1);
439 }
440#endif
441
442 if (f_v) {
443 cout << "surface_domain::create_Eckardt_surface The double six is:" << endl;
444 Gr->print_set(Oab, 12);
445 }
446
447
448 Lint_vec_copy(Oab, Lines27, 12);
449 FREE_lint(Oab);
450
451
452 nb = 12;
453
454 if (f_v) {
455 cout << "surface_domain::create_Eckardt_surface We have a set of "
456 "lines of size " << nb << ":";
457 Lint_vec_print(cout, Lines27, nb);
458 cout << endl;
459 }
460
462 Lines27 + 12, 0 /* verbose_level */);
463
464 if (f_v) {
465 cout << "surface_domain::create_Eckardt_surface The remaining 15 lines are:";
466 Lint_vec_print(cout, Lines27 + 12, 15);
467 cout << endl;
468 Gr->print_set(Lines27 + 12, 15);
469 }
470
471
472 if (f_v) {
473 cout << "surface_domain::create_Eckardt_surface before create_HCV_fifteen_lines" << endl;
474 }
475
476 long int special_lines[15];
477
478 create_Eckardt_fifteen_lines(special_lines, a, b, verbose_level);
479 for (i = 0; i < 15; i++) {
480 if (special_lines[i] != Lines27[12 + i]) {
481 cout << "surface_domain::create_Eckardt_surface something is wrong "
482 "with the special line " << i << " / 15 " << endl;
483 exit(1);
484 }
485 }
486 if (f_v) {
487 cout << "surface_domain::create_Eckardt_surface after create_special_fifteen_lines" << endl;
488 }
489
490 if (f_v) {
491 cout << "surface_domain::create_Eckardt_surface before rank_of_system" << endl;
492 }
493 rk = rank_of_system(27, Lines27, 0 /* verbose_level */);
494 if (f_v) {
495 cout << "surface_domain::create_Eckardt_surface "
496 "a=" << a << " b=" << b << " rk=" << rk << endl;
497 }
498
499 if (rk != 19) {
500 cout << "surface_domain::create_Eckardt_surface rk != 19" << endl;
501 exit(1);
502 }
503
504 int coeff20[20];
505
506 build_cubic_surface_from_lines(27, Lines27, coeff20,
507 0 /* verbose_level */);
508 F->PG_element_normalize_from_front(coeff20, 1, 20);
509
510
511
512
513
514 if (!test_Eckardt_form_alpha_beta(coeff20, alpha, beta,
515 0 /* verbose_level */)) {
516 cout << "surface_domain::create_Eckardt_surface not of special form" << endl;
517 exit(1);
518 }
519
520
521 if (alpha != alpha0) {
522 cout << "surface_domain::create_Eckardt_surface alpha != alpha0" << endl;
523 exit(1);
524 }
525 if (beta != beta0) {
526 cout << "surface_domain::create_Eckardt_surface beta != beta0" << endl;
527 exit(1);
528 }
529
530
531
532 surface_object *SO;
533
535
536 if (f_v) {
537 cout << "surface_domain::create_Eckardt_surface before SO->init_with_27_lines" << endl;
538 }
539 SO->init_with_27_lines(this,
540 Lines27, coeff20,
541 FALSE /* f_find_double_six_and_rearrange_lines */,
542 verbose_level);
543
544 if (f_v) {
545 cout << "surface_domain::create_Eckardt_surface done" << endl;
546 }
547 return SO;
548}
549
550
552 int *coeff, int verbose_level)
553{
554 int f_v = (verbose_level >= 1);
555 int alpha, beta;
556
557 if (f_v) {
558 cout << "surface_domain::create_equation_Eckardt_surface" << endl;
559 }
560 alpha = F->negate(F->mult(b, b));
561 beta = F->mult(F->mult(F->power(b, 3),
562 F->add(1, F->mult(a, a))), F->inverse(a));
564
565 coeff[3] = 1;
566 coeff[6] = alpha;
567 coeff[9] = alpha;
568 coeff[12] = alpha;
569 coeff[16] = beta;
570 //coeff[19] = beta;
571 if (f_v) {
572 cout << "surface_domain::create_equation_Eckardt_surface done" << endl;
573 }
574}
575
577 int &alpha, int &beta, int verbose_level)
578{
579 int f_v = (verbose_level >= 1);
580 int ret = TRUE;
581 int zeroes[] = {0,1,2,4,5,7,8,10,11,13,14,15,17,18,19};
582 int alphas[] = {6,9,12};
583 int betas[] = {16};
584 int a;
585
586 if (f_v) {
587 cout << "surface_domain::test_Eckardt_form_alpha_beta" << endl;
588 }
589 if (!orbiter_kernel_system::Orbiter->Int_vec->is_constant_on_subset(coeff,
590 zeroes, sizeof(zeroes) / sizeof(int), a)) {
591 cout << "surface_domain::test_Eckardt_form_alpha_beta "
592 "not constant on zero set" << endl;
593 return FALSE;
594 }
595 if (a != 0) {
596 cout << "surface_domain::test_Eckardt_form_alpha_beta "
597 "not zero on zero set" << endl;
598 return FALSE;
599 }
600 if (coeff[3] != 1) {
601 cout << "surface_domain::test_Eckardt_form_alpha_beta "
602 "not normalized" << endl;
603 exit(1);
604 }
605 if (!orbiter_kernel_system::Orbiter->Int_vec->is_constant_on_subset(coeff,
606 alphas, sizeof(alphas) / sizeof(int), a)) {
607 cout << "surface_domain::test_Eckardt_form_alpha_beta "
608 "not constant on alpha set" << endl;
609 return FALSE;
610 }
611 alpha = a;
612 if (!orbiter_kernel_system::Orbiter->Int_vec->is_constant_on_subset(coeff,
613 betas, sizeof(betas) / sizeof(int), a)) {
614 cout << "surface_domain::test_Eckardt_form_alpha_beta "
615 "not constant on beta set" << endl;
616 return FALSE;
617 }
618 beta = a;
619
620 if (f_v) {
621 cout << "surface_domain::test_Eckardt_form_alpha_beta done" << endl;
622 }
623 return ret;
624}
625
627 int a, int b, int verbose_level)
628// create double-six for the Eckardt surface
629{
630 int f_v = (verbose_level >= 1);
631 int Basis[12 * 8] = {
632 1,2,0,0,0,0,1,6,
633 1,3,0,0,0,0,1,7,
634 1,0,5,0,0,1,0,7,
635 1,0,4,0,0,1,0,6,
636 1,0,0,7,0,1,3,0,
637 1,0,0,6,0,1,2,0,
638 1,5,0,0,0,0,1,7,
639 1,4,0,0,0,0,1,6,
640 1,0,2,0,0,1,0,6,
641 1,0,3,0,0,1,0,7,
642 1,0,0,6,0,1,4,0,
643 1,0,0,7,0,1,5,0
644 };
645 int i, c, ma, mb, av, mav;
646
647 if (f_v) {
648 cout << "surface_domain::create_Eckardt_double_six "
649 "a=" << a << " b=" << b << endl;
650 }
651 ma = F->negate(a);
652 mb = F->negate(b);
653 av = F->inverse(a);
654 mav = F->negate(av);
655 for (i = 0; i < 12 * 8; i++) {
656 c = Basis[i];
657 if (c == 2) {
658 c = a;
659 }
660 else if (c == 3) {
661 c = ma;
662 }
663 else if (c == 4) {
664 c = av;
665 }
666 else if (c == 5) {
667 c = mav;
668 }
669 else if (c == 6) {
670 c = b;
671 }
672 else if (c == 7) {
673 c = mb;
674 }
675 Basis[i] = c;
676 }
677 for (i = 0; i < 12; i++) {
678 double_six[i] = Gr->rank_lint_here(Basis + i * 8,
679 0 /* verbose_level */);
680 }
681 if (f_v) {
682 cout << "surface_domain::create_Eckardt_double_six done" << endl;
683 }
684}
685
687 int a, int b, int verbose_level)
688{
689 int f_v = (verbose_level >= 1);
690 int Basis[15 * 8] = {
691 1,0,0,0,0,1,0,0, // 0 = c_12
692 0,1,-1,0,2,3,0,-1, // 1 = c_13
693 0,-1,-1,0,-2,-3,0,-1, // 2 = c_14
694 1,0,-1,0,-3,2,0,-1, // 3 = c_15
695 -1,0,-1,0,3,-2,0,-1, // 4 = c_16
696 0,-1,-1,0,-2,3,0,-1, // 5 = c_23
697 0,1,-1,0,2,-3,0,-1, // 6 = c_24
698 -1,0,-1,0,-3,-2,0,-1, // 7 = c_25
699 1,0,-1,0,3,2,0,-1, // 8 = c_26
700 1,0,0,0,0,0,1,0, // 9 = c_34
701 -1,0,4,5,0,-1,-4,-5, // 10 = c_35
702 -1,0,4,-5,0,-1,4,-5, // 11 = c_36
703 -1,0,-4,5,0,-1,-4,5, // 12 = c_45
704 -1,0,-4,-5,0,-1,4,5, // 13 = c_46
705 0,1,0,0,0,0,1,0 // 14 = c_56
706 };
707 int i, m1, a2, a2p1, a2m1, ba2p1, /*ba2m1,*/ twoa;
708 int c, c2, cm2, c3, cm3, c4, cm4, c5, cm5;
709
710 // 2 stands for (2a)/(b(a^2+1))
711 // -2 stands for -(2a)/(b(b^2+1))
712 // 3 stands for (a^2-1)/(b(a^2+1))
713 // -3 stands for -(a^2-1)/(b(a^2+1))
714 // 4 stands for (2a)/(a^2-1)
715 // -4 stands for -(2a)/(a^2-1)
716 // 5 stands for 3 inverse
717 // -5 stands for -3 inverse
718
719 if (f_v) {
720 cout << "surface_domain::create_Eckardt_fifteen_lines "
721 "a=" << a << " b=" << b << endl;
722 }
723 m1 = F->negate(1);
724 a2 = F->mult(a, a);
725 a2p1 = F->add(a2, 1);
726 a2m1 = F->add(a2, m1);
727 twoa = F->add(a, a);
728 ba2p1 = F->mult(b, a2p1);
729 //ba2m1 = F->mult(b, a2m1);
730
731 if (ba2p1 == 0) {
732 cout << "surface_domain::create_Eckardt_fifteen_lines "
733 "ba2p1 = 0, cannot invert" << endl;
734 exit(1);
735 }
736 c2 = F->mult(twoa, F->inverse(ba2p1));
737 cm2 = F->negate(c2);
738 c3 = F->mult(a2m1, F->inverse(ba2p1));
739 cm3 = F->negate(c3);
740 if (a2m1 == 0) {
741 cout << "surface_domain::create_Eckardt_fifteen_lines "
742 "a2m1 = 0, cannot invert" << endl;
743 exit(1);
744 }
745 c4 = F->mult(twoa, F->inverse(a2m1));
746 cm4 = F->negate(c4);
747
748 if (c3 == 0) {
749 cout << "surface_domain::create_Eckardt_fifteen_lines "
750 "c3 = 0, cannot invert" << endl;
751 exit(1);
752 }
753 c5 = F->inverse(c3);
754 if (cm3 == 0) {
755 cout << "surface_domain::create_Eckardt_fifteen_lines "
756 "cm3 = 0, cannot invert" << endl;
757 exit(1);
758 }
759 cm5 = F->inverse(cm3);
760
761
762 for (i = 0; i < 15 * 8; i++) {
763 c = Basis[i];
764 if (c == 0) {
765 c = 0;
766 }
767 else if (c == 1) {
768 c = 1;
769 }
770 else if (c == -1) {
771 c = m1;
772 }
773 else if (c == 2) {
774 c = c2;
775 }
776 else if (c == -2) {
777 c = cm2;
778 }
779 else if (c == 3) {
780 c = c3;
781 }
782 else if (c == -3) {
783 c = cm3;
784 }
785 else if (c == 4) {
786 c = c4;
787 }
788 else if (c == -4) {
789 c = cm4;
790 }
791 else if (c == 5) {
792 c = c5;
793 }
794 else if (c == -5) {
795 c = cm5;
796 }
797 else {
798 cout << "surface_domain::create_Eckardt_fifteen_lines "
799 "unknown value" << c << endl;
800 exit(1);
801 }
802 Basis[i] = c;
803 }
804 for (i = 0; i < 15; i++) {
805 fifteen_lines[i] = Gr->rank_lint_here(
806 Basis + i * 8, 0 /* verbose_level */);
807 }
808 if (f_v) {
809 cout << "surface_domain::create_Eckardt_fifteen_lines done" << endl;
810 }
811}
812
813
814
815
816
817}}}
818
void create_equation_bes(int a, int c, int *coeff, int verbose_level)
surface_object * create_surface_general_abcd(int a, int b, int c, int d, int verbose_level)
void create_Eckardt_fifteen_lines(long int *fifteen_lines, int a, int b, int verbose_level)
int test_Eckardt_form_alpha_beta(int *coeff, int &alpha, int &beta, int verbose_level)
surface_object * create_surface_bes(int a, int c, int verbose_level)
void create_equation_general_abcd(int a, int b, int c, int d, int *coeff, int verbose_level)
surface_object * create_Eckardt_surface(int a, int b, int &alpha, int &beta, int verbose_level)
void create_Eckardt_double_six(long int *double_six, int a, int b, int verbose_level)
void create_equation_Cayley_klmn(int k, int l, int m, int n, int *coeff, int verbose_level)
void create_remaining_fifteen_lines(long int *double_six, long int *fifteen_lines, int verbose_level)
void create_equation_Eckardt_surface(int a, int b, int *coeff, int verbose_level)
void build_cubic_surface_from_lines(int len, long int *S, int *coeff, int verbose_level)
a particular cubic surface in PG(3,q), given by its equation
void init_equation(surface_domain *Surf, int *eqn, int verbose_level)
void init_with_27_lines(surface_domain *Surf, long int *Lines27, int *eqn, int f_find_double_six_and_rearrange_lines, int verbose_level)
a collection of functions related to sorted vectors
int add5(int i1, int i2, int i3, int i4, int i5)
int mult6(int a1, int a2, int a3, int a4, int a5, int a6)
int mult5(int a1, int a2, int a3, int a4, int a5)
int add6(int i1, int i2, int i3, int i4, int i5, int i6)
various functions related to geometries
Definition: geometry.h:721
long int rank_lint_here(int *Mtx, int verbose_level)
Definition: grassmann.cpp:275
#define Lint_vec_copy(A, B, C)
Definition: foundations.h:694
#define Int_vec_zero(A, B)
Definition: foundations.h:713
#define NEW_OBJECT(type)
Definition: foundations.h:638
#define Lint_vec_print(A, B, C)
Definition: foundations.h:686
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#define FREE_lint(p)
Definition: foundations.h:642
#define NEW_lint(n)
Definition: foundations.h:628
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
the orbiter library for the classification of combinatorial objects