Orbiter 2022
Combinatorial Objects
permutation_group_description.cpp
Go to the documentation of this file.
1/*
2 * permutation_group_description.cpp
3 *
4 * Created on: Sep 26, 2021
5 * Author: betten
6 */
7
8
9
10
12#include "group_actions.h"
13
14using namespace std;
15
16
17
18namespace orbiter {
19namespace layer3_group_actions {
20namespace groups {
21
22
23
25{
26 degree = 0;
28
29 f_bsgs = FALSE;
30 //std::string bsgs_label;
31 //std::string bsgs_label_tex;
32 //std::string bsgs_order_text;
33 //std::string bsgs_base;
35 //std::string bsgs_generators;
36
38 //std::string subgroup_label;
39 //std::string subgroup_order_text;
41 //std::string subgroup_generators_label;
42
43}
44
45
47{
48}
49
50
52 int argc, std::string *argv,
53 int verbose_level)
54{
55 int f_v = (verbose_level > 1);
56 int i;
58
59 if (f_v) {
60 cout << "permutation_group_description::read_arguments" << endl;
61 }
62 for (i = 0; i < argc; i++) {
63
64
65 if (ST.stringcmp(argv[i], "-symmetric_group") == 0) {
66 degree = ST.strtoi(argv[++i]);
68 if (f_v) {
69 cout << "-symmetric_group " << degree << endl;
70 }
71 }
72 else if (ST.stringcmp(argv[i], "-bsgs") == 0) {
73 f_bsgs = TRUE;
74 bsgs_label.assign(argv[++i]);
75 bsgs_label_tex.assign(argv[++i]);
76 degree = ST.strtoi(argv[++i]);
77 bsgs_order_text.assign(argv[++i]);
78 bsgs_base.assign(argv[++i]);
79 bsgs_nb_generators = ST.strtoi(argv[++i]);
80 bsgs_generators.assign(argv[++i]);
81 type = bsgs_t;
82
83 if (f_v) {
84 cout << "-bsgs"
85 << " " << bsgs_label
86 << " " << bsgs_label_tex
87 << " " << degree
88 << " " << bsgs_order_text
89 << " " << bsgs_base
90 << " " << bsgs_nb_generators
91 << " " << bsgs_generators
92 << endl;
93 }
94 }
95 else if (ST.stringcmp(argv[i], "-subgroup_by_generators") == 0) {
97 subgroup_label.assign(argv[++i]);
98 subgroup_order_text.assign(argv[++i]);
99 nb_subgroup_generators = ST.strtoi(argv[++i]);
100 subgroup_generators_label.assign(argv[++i]);
101
102 if (f_v) {
103 cout << "-subgroup_by_generators " << subgroup_label
104 << " " << nb_subgroup_generators
106 << endl;
107 }
108 }
109 else if (ST.stringcmp(argv[i], "-end") == 0) {
110 if (f_v) {
111 cout << "-end" << endl;
112 }
113 break;
114 }
115 else {
116 cout << "permutation_group_description::read_arguments "
117 "unrecognized option " << argv[i] << endl;
118 }
119 } // next i
120 if (f_v) {
121 cout << "permutation_group_description::read_arguments done" << endl;
122 }
123 return i + 1;
124}
125
126
128{
129 if (type == symmetric_group_t) {
130 cout << "-symmetric_group " << degree << endl;
131 }
132 if (f_bsgs) {
133 cout << "-bsgs"
134 << " " << bsgs_label
135 << " " << bsgs_label_tex
136 << " " << degree
137 << " " << bsgs_order_text
138 << " " << bsgs_base
139 << " " << bsgs_nb_generators
140 << " " << bsgs_generators
141 << endl;
142 }
144 cout << "-subgroup_by_generators " << subgroup_label
145 << " " << nb_subgroup_generators
147 << endl;
148 }
149}
150
151
152
153}}}
154
functions related to strings and character arrays
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
the orbiter library for the classification of combinatorial objects