Orbiter 2022
Combinatorial Objects
linear_group_description.cpp
Go to the documentation of this file.
1// linear_group_description.cpp
2//
3// Anton Betten
4// December 25, 2015
5
7#include "group_actions.h"
8
9using namespace std;
10
11
12namespace orbiter {
13namespace layer3_group_actions {
14namespace groups {
15
16
18{
28
29 n = 0;
30 //input_q = 0;
32 //override_polynomial;
33 F = NULL;
36
37
38 // induced actions and subgroups:
48 singer_power = 1;
50 s = 1;
55 //subgroup_fname;
56 //subgroup_label;
59
62
65
67 //subgroup_order_text;
69 //subgroup_generators_label;
70
72
74 //restricted_action_text;
75
77 //null();
78}
79
81{
82 freeself();
83}
84
86{
87}
88
90{
91 null();
92}
93
95 int argc, std::string *argv,
96 int verbose_level)
97{
98 int f_v = (verbose_level > 1);
99 int i;
101
102 if (f_v) {
103 cout << "linear_group_description::read_arguments" << endl;
104 }
105 for (i = 0; i < argc; i++) {
106
107
108 // the general linear groups:
109 // GL, GGL, SL, SSL
110 if (ST.stringcmp(argv[i], "-GL") == 0) {
111 n = ST.strtoi(argv[++i]);
112 input_q.assign(argv[++i]);
114 f_general = TRUE;
115 f_affine = FALSE;
118 if (f_v) {
119 cout << "-GL " << n << " " << input_q << endl;
120 }
121 }
122 else if (ST.stringcmp(argv[i], "-GGL") == 0) {
123 n = ST.strtoi(argv[++i]);
124 input_q.assign(argv[++i]);
126 f_general = TRUE;
127 f_affine = FALSE;
130 if (f_v) {
131 cout << "-GGL " << n << " " << input_q << endl;
132 }
133 }
134 else if (ST.stringcmp(argv[i], "-SL") == 0) {
135 n = ST.strtoi(argv[++i]);
136 input_q.assign(argv[++i]);
138 f_general = TRUE;
139 f_affine = FALSE;
141 f_special = TRUE;
142 if (f_v) {
143 cout << "-SL " << n << " " << input_q << endl;
144 }
145 }
146 else if (ST.stringcmp(argv[i], "-SSL") == 0) {
147 n = ST.strtoi(argv[++i]);
148 input_q.assign(argv[++i]);
150 f_general = TRUE;
151 f_affine = FALSE;
153 f_special = TRUE;
154 if (f_v) {
155 cout << "-SSL " << n << " " << input_q << endl;
156 }
157 }
158
159
160 // the projective linear groups:
161 // PGL, PGGL, PSL, PSSL
162 else if (ST.stringcmp(argv[i], "-PGL") == 0) {
163 n = ST.strtoi(argv[++i]);
164 input_q.assign(argv[++i]);
167 f_affine = FALSE;
170 if (f_v) {
171 cout << "-PGL " << n << " " << input_q << endl;
172 }
173 }
174 else if (ST.stringcmp(argv[i], "-PGGL") == 0) {
175 n = ST.strtoi(argv[++i]);
176 input_q.assign(argv[++i]);
179 f_affine = FALSE;
182 if (f_v) {
183 cout << "-PGGL " << n << " " << input_q << endl;
184 }
185 }
186 else if (ST.stringcmp(argv[i], "-PSL") == 0) {
187 n = ST.strtoi(argv[++i]);
188 input_q.assign(argv[++i]);
191 f_affine = FALSE;
193 f_special = TRUE;
194 if (f_v) {
195 cout << "-PSL " << n << " " << input_q << endl;
196 }
197 }
198 else if (ST.stringcmp(argv[i], "-PSSL") == 0) {
199 n = ST.strtoi(argv[++i]);
200 input_q.assign(argv[++i]);
203 f_affine = FALSE;
205 f_special = TRUE;
206 if (f_v) {
207 cout << "-PSSL " << n << " " << input_q << endl;
208 }
209 }
210
211
212
213 // the affine groups:
214 // AGL, AGGL, ASL, ASSL
215 else if (ST.stringcmp(argv[i], "-AGL") == 0) {
216 n = ST.strtoi(argv[++i]);
217 input_q.assign(argv[++i]);
220 f_affine = TRUE;
223 if (f_v) {
224 cout << "-AGL " << n << " " << input_q << endl;
225 }
226 }
227 else if (ST.stringcmp(argv[i], "-AGGL") == 0) {
228 n = ST.strtoi(argv[++i]);
229 input_q.assign(argv[++i]);
232 f_affine = TRUE;
235 if (f_v) {
236 cout << "-AGGL " << n << " " << input_q << endl;
237 }
238 }
239 else if (ST.stringcmp(argv[i], "-ASL") == 0) {
240 n = ST.strtoi(argv[++i]);
241 input_q.assign(argv[++i]);
244 f_affine = TRUE;
246 f_special = TRUE;
247 if (f_v) {
248 cout << "-ASL " << n << " " << input_q << endl;
249 }
250 }
251 else if (ST.stringcmp(argv[i], "-ASSL") == 0) {
252 n = ST.strtoi(argv[++i]);
253 input_q.assign(argv[++i]);
256 f_affine = TRUE;
258 f_special = TRUE;
259 if (f_v) {
260 cout << "-ASSL " << n << " " << input_q << endl;
261 }
262 }
263 else if (ST.stringcmp(argv[i], "-override_polynomial") == 0) {
265 override_polynomial.assign(argv[++i]);
266 if (f_v) {
267 cout << "-override_polynomial" << override_polynomial << endl;
268 }
269 }
270 else if (ST.stringcmp(argv[i], "-GL_d_q_wr_Sym_n") == 0) {
272 GL_wreath_Sym_d = ST.strtoi(argv[++i]);
273 input_q.assign(argv[++i]);
274 GL_wreath_Sym_n = ST.strtoi(argv[++i]);
275 if (f_v) {
276 cout << "-GL_d_q_wr_Sym_n " << GL_wreath_Sym_d
277 << " " << input_q << " " << GL_wreath_Sym_n << endl;
278 }
279 }
280
281 // the orthogonal groups:
282 // PGO0, PGOp, PGOm
283 else if (ST.stringcmp(argv[i], "-PGO") == 0) {
284 n = ST.strtoi(argv[++i]);
285 input_q.assign(argv[++i]);
288 if (f_v) {
289 cout << "-PGO " << n << " " << input_q << endl;
290 }
291 }
292 else if (ST.stringcmp(argv[i], "-PGOp") == 0) {
293 n = ST.strtoi(argv[++i]);
294 input_q.assign(argv[++i]);
297 if (f_v) {
298 cout << "-PGOp " << n << " " << input_q << endl;
299 }
300 }
301 else if (ST.stringcmp(argv[i], "-PGOm") == 0) {
302 n = ST.strtoi(argv[++i]);
303 input_q.assign(argv[++i]);
306 if (f_v) {
307 cout << "-PGOm " << n << " " << input_q << endl;
308 }
309 }
310 else if (ST.stringcmp(argv[i], "-PGGO") == 0) {
311 n = ST.strtoi(argv[++i]);
312 input_q.assign(argv[++i]);
315 if (f_v) {
316 cout << "-PGGO " << n << " " << input_q << endl;
317 }
318 }
319 else if (ST.stringcmp(argv[i], "-PGGOp") == 0) {
320 n = ST.strtoi(argv[++i]);
321 input_q.assign(argv[++i]);
324 if (f_v) {
325 cout << "-PGGOp " << n << " " << input_q << endl;
326 }
327 }
328 else if (ST.stringcmp(argv[i], "-PGGOm") == 0) {
329 n = ST.strtoi(argv[++i]);
330 input_q.assign(argv[++i]);
333 if (f_v) {
334 cout << "-PGGOm " << n << " " << input_q << endl;
335 }
336 }
337
338
339 else if (ST.stringcmp(argv[i], "-wedge") == 0) {
341 if (f_v) {
342 cout << "-wedge" << endl;
343 }
344 }
345 else if (ST.stringcmp(argv[i], "-wedge_detached") == 0) {
347 if (f_v) {
348 cout << "-wedge_detached" << endl;
349 }
350 }
351 else if (ST.stringcmp(argv[i], "-PGL2OnConic") == 0) {
353 if (f_v) {
354 cout << "-PGL2OnConic" << endl;
355 }
356 }
357 else if (ST.stringcmp(argv[i], "-monomial") == 0) {
359 if (f_v) {
360 cout << "-monomial " << endl;
361 }
362 }
363 else if (ST.stringcmp(argv[i], "-diagonal") == 0) {
365 if (f_v) {
366 cout << "-diagonal " << endl;
367 }
368 }
369 else if (ST.stringcmp(argv[i], "-null_polarity_group") == 0) {
371 if (f_v) {
372 cout << "-null_polarity_group" << endl;
373 }
374 }
375 else if (ST.stringcmp(argv[i], "-symplectic_group") == 0) {
377 if (f_v) {
378 cout << "-symplectic_group" << endl;
379 }
380 }
381 else if (ST.stringcmp(argv[i], "-singer") == 0) {
383 singer_power = ST.strtoi(argv[++i]);
384 if (f_v) {
385 cout << "-singer " << singer_power << endl;
386 }
387 }
388 else if (ST.stringcmp(argv[i], "-singer_and_frobenius") == 0) {
390 singer_power = ST.strtoi(argv[++i]);
391 if (f_v) {
392 cout << "-f_singer_group_and_frobenius " << singer_power << endl;
393 }
394 }
395 else if (ST.stringcmp(argv[i], "-subfield_structure_action") == 0) {
397 s = ST.strtoi(argv[++i]);
398 if (f_v) {
399 cout << "-subfield_structure_action " << s << endl;
400 }
401 }
402 else if (ST.stringcmp(argv[i], "-subgroup_from_file") == 0) {
404 subgroup_fname.assign(argv[++i]);
405 subgroup_label.assign(argv[++i]);
406 if (f_v) {
407 cout << "-subgroup_from_file " << subgroup_fname
408 << " " << subgroup_label << endl;
409 }
410 }
411 else if (ST.stringcmp(argv[i], "-borel_upper") == 0) {
413 if (f_v) {
414 cout << "-borel_upper" << endl;
415 }
416 }
417 else if (ST.stringcmp(argv[i], "-borel_lower") == 0) {
419 if (f_v) {
420 cout << "-borel_lower" << endl;
421 }
422 }
423 else if (ST.stringcmp(argv[i], "-identity_group") == 0) {
425 if (f_v) {
426 cout << "-identity_group" << endl;
427 }
428 }
429 else if (ST.stringcmp(argv[i], "-on_k_subspaces") == 0) {
431 on_k_subspaces_k = ST.strtoi(argv[++i]);
432 if (f_v) {
433 cout << "-on_k_subspaces " << on_k_subspaces_k << endl;
434 }
435 }
436 else if (ST.stringcmp(argv[i], "-on_tensors") == 0) {
438 if (f_v) {
439 cout << "-on_tensors " << endl;
440 }
441 }
442 else if (ST.stringcmp(argv[i], "-on_rank_one_tensors") == 0) {
444 if (f_v) {
445 cout << "-on_rank_one_tensors " << endl;
446 }
447 }
448 else if (ST.stringcmp(argv[i], "-orthogonal") == 0) {
450 orthogonal_group_epsilon = ST.strtoi(argv[++i]);
451 if (f_v) {
452 cout << "-orthogonal " << orthogonal_group_epsilon << endl;
453 }
454 }
455 else if (ST.stringcmp(argv[i], "-O") == 0) {
458 if (f_v) {
459 cout << "-O" << endl;
460 }
461 }
462 else if (ST.stringcmp(argv[i], "-O+") == 0 ||
463 ST.stringcmp(argv[i], "-Oplus") == 0) {
466 if (f_v) {
467 cout << "-O+" << endl;
468 }
469 }
470 else if (ST.stringcmp(argv[i], "-O-") == 0 ||
471 ST.stringcmp(argv[i], "-Ominus") == 0) {
474 if (f_v) {
475 cout << "-O-" << endl;
476 }
477 }
478 else if (ST.stringcmp(argv[i], "-subgroup_by_generators") == 0) {
480 subgroup_label.assign(argv[++i]);
481 subgroup_order_text.assign(argv[++i]);
482 nb_subgroup_generators = ST.strtoi(argv[++i]);
483 subgroup_generators_label.assign(argv[++i]);
484
485 if (f_v) {
486 cout << "-subgroup_by_generators " << subgroup_label
487 << " " << nb_subgroup_generators
489 << endl;
490 }
491 }
492 else if (ST.stringcmp(argv[i], "-Janko1") == 0) {
493 f_Janko1 = TRUE;
494 if (f_v) {
495 cout << "-Janko1" << endl;
496 }
497 }
498 else if (ST.stringcmp(argv[i], "-restricted_action") == 0) {
500 restricted_action_text.assign(argv[++i]);
501 if (f_v) {
502 cout << "-restricted_action " << restricted_action_text << endl;
503 }
504 }
505 else if (ST.stringcmp(argv[i], "-export_magma") == 0) {
507 if (f_v) {
508 cout << "-export_magma" << endl;
509 }
510 }
511 else if (ST.stringcmp(argv[i], "-end") == 0) {
512 if (f_v) {
513 cout << "-end" << endl;
514 }
515 break;
516 }
517 else {
518 cout << "linear_group_description::read_arguments "
519 "unrecognized option " << argv[i] << endl;
520 }
521 } // next i
522 if (f_v) {
523 cout << "linear_group_description::read_arguments done" << endl;
524 }
525 return i + 1;
526}
527
529{
530 // the general linear groups:
531 // GL, GGL, SL, SSL
532 if (!f_affine && !f_special && !f_projective && !f_semilinear) {
533 cout << "-GL " << n << " " << input_q << endl;
534 }
536 cout << "-GGL " << n << " " << input_q << endl;
537 }
539 cout << "-SL " << n << " " << input_q << endl;
540 }
542 cout << "-SSL " << n << " " << input_q << endl;
543 }
544
545
546
547 // the projective linear groups:
548 // PGL, PGGL, PSL, PSSL
550 cout << "-PGL " << n << " " << input_q << endl;
551 }
553 cout << "-PGGL " << n << " " << input_q << endl;
554 }
556 cout << "-PSL " << n << " " << input_q << endl;
557 }
559 cout << "-PSSL " << n << " " << input_q << endl;
560 }
561
562
563
564 // the affine groups:
565 // AGL, AGGL, ASL, ASSL
566 if (f_affine && f_general && !f_special && !f_semilinear) {
567 cout << "-AGL " << n << " " << input_q << endl;
568 }
570 cout << "-AGGL " << n << " " << input_q << endl;
571 }
573 cout << "-ASL " << n << " " << input_q << endl;
574 }
576 cout << "-ASSL " << n << " " << input_q << endl;
577 }
579 cout << "-override_polynomial" << override_polynomial << endl;
580 }
581 if (f_GL_d_q_wr_Sym_n) {
582 cout << "-GL_d_q_wr_Sym_n " << GL_wreath_Sym_d
583 << " " << input_q << " " << GL_wreath_Sym_n << endl;
584 }
585
586 // the orthogonal groups:
587 // PGO0, PGOp, PGOm
588 if (f_orthogonal) {
589 cout << "-PGO " << n << " " << input_q << endl;
590 }
591 if (f_orthogonal_p) {
592 cout << "-PGOp " << n << " " << input_q << endl;
593 }
594 if (f_orthogonal_m) {
595 cout << "-PGOm " << n << " " << input_q << endl;
596 }
597 if (f_orthogonal && f_semilinear) {
598 cout << "-PGGO " << n << " " << input_q << endl;
599 }
601 cout << "-PGGOp " << n << " " << input_q << endl;
602 }
604 cout << "-PGGOm " << n << " " << input_q << endl;
605 }
606
607
608 if (f_wedge_action) {
609 cout << "-wedge" << endl;
610 }
612 cout << "-wedge_detached" << endl;
613 }
614 if (f_PGL2OnConic) {
615 cout << "-PGL2OnConic" << endl;
616 }
617 if (f_monomial_group) {
618 cout << "-monomial " << endl;
619 }
620 if (f_diagonal_group) {
621 cout << "-diagonal " << endl;
622 }
624 cout << "-null_polarity_group" << endl;
625 }
626 if (f_symplectic_group) {
627 cout << "-symplectic_group" << endl;
628 }
629 if (f_singer_group) {
630 cout << "-singer " << singer_power << endl;
631 }
633 cout << "-f_singer_group_and_frobenius " << singer_power << endl;
634 }
636 cout << "-subfield_structure_action " << s << endl;
637 }
639 cout << "-subgroup_from_file " << subgroup_fname
640 << " " << subgroup_label << endl;
641 }
643 cout << "-borel_upper" << endl;
644 }
646 cout << "-borel_lower" << endl;
647 }
648 if (f_identity_group) {
649 cout << "-identity_group" << endl;
650 }
651 if (f_on_k_subspaces) {
652 cout << "-on_k_subspaces " << on_k_subspaces_k << endl;
653 }
654 if (f_on_tensors) {
655 cout << "-on_tensors " << endl;
656 }
658 cout << "-on_rank_one_tensors " << endl;
659 }
660 if (f_orthogonal_group) {
661 cout << "-orthogonal " << orthogonal_group_epsilon << endl;
662 }
663 if (f_orthogonal_group) {
664 cout << "-O" << endl;
665 }
667 cout << "-O+" << endl;
668 }
670 cout << "-O-" << endl;
671 }
673 cout << "-subgroup_by_generators " << subgroup_label
674 << " " << nb_subgroup_generators
676 << endl;
677 }
678 if (f_Janko1) {
679 cout << "-Janko1" << endl;
680 }
682 cout << "-restricted_action " << restricted_action_text << endl;
683 }
684 if (f_export_magma) {
685 cout << "-export_magma" << endl;
686 }
687}
688
689
690}}}
691
692
functions related to strings and character arrays
int read_arguments(int argc, std::string *argv, int verbose_level)
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
the orbiter library for the classification of combinatorial objects