Orbiter 2022
Combinatorial Objects
surface_create_description.cpp
Go to the documentation of this file.
1// surface_create_description.cpp
2//
3// Anton Betten
4//
5// December 8, 2017
6//
7//
8//
9//
10//
11
12#include "orbiter.h"
13
14using namespace std;
15
16namespace orbiter {
17namespace layer5_applications {
18namespace applications_in_algebraic_geometry {
19namespace cubic_surfaces_in_general {
20
21
23{
24 f_q = FALSE;
25 q = 0;
26
28 //label_txt
29
31 //label_tex
32
34 //label_for_summary
35
36
38 iso = 0;
39
41 //coefficients_text = NULL;
42
44 //std::string rank_text;
46
47
51
53 family_G13_a = 0;
54
56 family_F13_a = 0;
57
59 family_bes_a = 0;
60 family_bes_c = 0;
61
62
68
70 //arc_lifting_text = NULL;
71 //arc_lifting_two_lines_text = NULL;
73
75 Cayley_form_k = 0;
76 Cayley_form_l = 0;
77 Cayley_form_m = 0;
78 Cayley_form_n = 0;
79
80
82 //std::string equation_name_of_formula;
83 //std::string equation_name_of_formula_tex;
84 //std::string equation_managed_variables;
85 //std::string equation_text;
86 //std::string equation_parameters;
87 //std::string equation_parameters_tex;
88
89
91 //std::string by_double_six_label;
92 //std::string by_double_six_label_tex;
93 //std::string by_double_six_text;
94
95
97 //std::string by_skew_hexagon_label;
98 //std::string by_skew_hexagon_label_tex
99
100 //nb_select_double_six = 0;
101 //select_double_six_string[];
102
104 //std::string override_group_order;
106 //std::string override_group_gens;
107
108
109 //std::vector<std::string> transform_coeffs;
110 //std::vector<int> f_inverse_transform;
111
112 //null();
113}
114
116{
117 freeself();
118}
119
121{
122}
123
125{
126 null();
127}
128
129int surface_create_description::read_arguments(int argc, std::string *argv,
130 int verbose_level)
131{
132 int i;
134
135 cout << "surface_create_description::read_arguments" << endl;
136 for (i = 0; i < argc; i++) {
137
138 if (ST.stringcmp(argv[i], "-q") == 0) {
139 f_q = TRUE;
140 q = ST.strtoi(argv[++i]);
141 cout << "-q " << q << endl;
142 }
143 else if (ST.stringcmp(argv[i], "-label_txt") == 0) {
145 label_txt.assign(argv[++i]);
146 cout << "-label_txt " << label_txt << endl;
147 }
148 else if (ST.stringcmp(argv[i], "-label_tex") == 0) {
150 label_tex.assign(argv[++i]);
151 cout << "-label_tex " << label_tex << endl;
152 }
153 else if (ST.stringcmp(argv[i], "-label_for_summary") == 0) {
155 label_for_summary.assign(argv[++i]);
156 cout << "-label_for_summary " << label_for_summary << endl;
157 }
158 else if (ST.stringcmp(argv[i], "-catalogue") == 0) {
160 iso = ST.strtoi(argv[++i]);
161 cout << "-catalogue " << iso << endl;
162 }
163 else if (ST.stringcmp(argv[i], "-by_coefficients") == 0) {
165 coefficients_text.assign(argv[++i]);
166 cout << "-by_coefficients " << coefficients_text << endl;
167 }
168 else if (ST.stringcmp(argv[i], "-by_rank") == 0) {
169 f_by_rank = TRUE;
170 rank_text.assign(argv[++i]);
171 rank_defining_q = ST.strtoi(argv[++i]);
172 cout << "-by_rank " << rank_text << " " << rank_defining_q << endl;
173 }
174 else if (ST.stringcmp(argv[i], "-family_Eckardt") == 0) {
176 family_Eckardt_a = ST.strtoi(argv[++i]);
177 family_Eckardt_b = ST.strtoi(argv[++i]);
178 cout << "-family_Eckardt " << family_Eckardt_a << " " << family_Eckardt_b << endl;
179 }
180 else if (ST.stringcmp(argv[i], "-family_G13") == 0) {
182 family_G13_a = ST.strtoi(argv[++i]);
183 cout << "-family_G13 " << family_G13_a << endl;
184 }
185 else if (ST.stringcmp(argv[i], "-family_F13") == 0) {
187 family_F13_a = ST.strtoi(argv[++i]);
188 cout << "-family_F13 " << family_F13_a << endl;
189 }
190 else if (ST.stringcmp(argv[i], "-family_bes") == 0) {
192 family_bes_a = ST.strtoi(argv[++i]);
193 family_bes_c = ST.strtoi(argv[++i]);
194 cout << "-family_bes " << family_bes_a << " " << family_bes_c << endl;
195 }
196 else if (ST.stringcmp(argv[i], "-family_general_abcd") == 0) {
198 family_general_abcd_a = ST.strtoi(argv[++i]);
199 family_general_abcd_b = ST.strtoi(argv[++i]);
200 family_general_abcd_c = ST.strtoi(argv[++i]);
201 family_general_abcd_d = ST.strtoi(argv[++i]);
202 cout << "-family_general_abcd "
205 << endl;
206 }
207 else if (ST.stringcmp(argv[i], "-arc_lifting") == 0) {
209 arc_lifting_text.assign(argv[++i]);
210 cout << "-arc_lifting " << arc_lifting_text << endl;
211 }
212 else if (ST.stringcmp(argv[i], "-arc_lifting_with_two_lines") == 0) {
214 arc_lifting_text.assign(argv[++i]);
215 arc_lifting_two_lines_text.assign(argv[++i]);
216 cout << "-arc_lifting_with_two_lines " << arc_lifting_text
217 << " " << arc_lifting_two_lines_text << endl;
218 }
219 else if (ST.stringcmp(argv[i], "-Cayley_form") == 0) {
221 Cayley_form_k = ST.strtoi(argv[++i]);
222 Cayley_form_l = ST.strtoi(argv[++i]);
223 Cayley_form_m = ST.strtoi(argv[++i]);
224 Cayley_form_n = ST.strtoi(argv[++i]);
225 cout << "-Cayley_form "
226 << Cayley_form_k << " " << Cayley_form_l << " "
227 << Cayley_form_m << " " << Cayley_form_n
228 << endl;
229 }
230 else if (ST.stringcmp(argv[i], "-by_equation") == 0) {
232 equation_name_of_formula.assign(argv[++i]);
233 equation_name_of_formula_tex.assign(argv[++i]);
234 equation_managed_variables.assign(argv[++i]);
235 equation_text.assign(argv[++i]);
236 equation_parameters.assign(argv[++i]);
237 equation_parameters_tex.assign(argv[++i]);
238 cout << "-by_equation "
242 << equation_text << " "
243 << equation_parameters << " "
245 << endl;
246 }
247 else if (ST.stringcmp(argv[i], "-by_double_six") == 0) {
249 by_double_six_label.assign(argv[++i]);
250 by_double_six_label_tex.assign(argv[++i]);
251 by_double_six_text.assign(argv[++i]);
252 cout << "-by_double_six "
253 << by_double_six_label << " "
255 << by_double_six_text << " "
256 << endl;
257 }
258 else if (ST.stringcmp(argv[i], "-by_skew_hexagon") == 0) {
260
261 by_skew_hexagon_label.assign(argv[++i]);
262 by_skew_hexagon_label_tex.assign(argv[++i]);
263 cout << "-by_double_six "
264 << by_skew_hexagon_label << " "
266 << endl;
267 }
268
269 else if (ST.stringcmp(argv[i], "-select_double_six") == 0) {
270 //f_select_double_six = TRUE;
271 string s;
272
273 s.assign(argv[++i]);
274 select_double_six_string.push_back(s);
275 cout << "-select_double_six "
277 }
278
279
280 else if (ST.stringcmp(argv[i], "-override_group") == 0) {
282
283 override_group_order.assign(argv[++i]);
284 override_group_nb_gens = ST.strtoi(argv[++i]);
285 override_group_gens.assign(argv[++i]);
286
287 cout << "-override_group "
289 << " " << override_group_nb_gens
290 << " " << override_group_gens
291 << endl;
292 }
293
294
295 else if (ST.stringcmp(argv[i], "-transform") == 0) {
296
297 string s;
298
299 s.assign(argv[++i]);
300 transform_coeffs.push_back(s);
301 f_inverse_transform.push_back(FALSE);
302 cout << "-transform " << transform_coeffs[transform_coeffs.size() - 1]
303 << " " << f_inverse_transform[transform_coeffs.size() - 1] << endl;
304 }
305 else if (ST.stringcmp(argv[i], "-transform_inverse") == 0) {
306
307 string s;
308
309 s.assign(argv[++i]);
310 transform_coeffs.push_back(s);
311 f_inverse_transform.push_back(TRUE);
312 cout << "-transform_inverse " << transform_coeffs[transform_coeffs.size() - 1]
313 << " " << f_inverse_transform[transform_coeffs.size() - 1] << endl;
314 }
315 else if (ST.stringcmp(argv[i], "-end") == 0) {
316 cout << "-end" << endl;
317 break;
318 }
319 } // next i
320 cout << "surface_create_description::read_arguments done" << endl;
321 return i + 1;
322}
323
325{
326 if (f_q) {
327 cout << "-q " << q << endl;
328 }
329 if (f_label_txt) {
330 cout << "-label_txt " << label_txt << endl;
331 }
332 if (f_label_tex) {
333 cout << "-label_tex " << label_tex << endl;
334 }
336 cout << "-label_for_summary " << label_for_summary << endl;
337 }
338 if (f_catalogue) {
339 cout << "-catalogue " << iso << endl;
340 }
341 if (f_by_coefficients) {
342 cout << "-by_coefficients " << coefficients_text << endl;
343 }
344 if (f_by_rank) {
345 cout << "-by_rank " << rank_text << " " << rank_defining_q << endl;
346 }
347 if (f_family_Eckardt) {
348 cout << "-family_Eckardt " << family_Eckardt_a << " " << family_Eckardt_b << endl;
349 }
350 if (f_family_G13) {
351 cout << "-family_G13 " << family_G13_a << endl;
352 }
353 if (f_family_F13) {
354 cout << "-family_F13 " << family_F13_a << endl;
355 }
356 if (f_family_bes) {
357 cout << "-family_bes " << family_bes_a << " " << family_bes_c << endl;
358 }
360 cout << "-family_general_abcd "
363 << endl;
364 }
365 if (f_arc_lifting) {
366 cout << "-arc_lifting " << arc_lifting_text << endl;
367 }
369 cout << "-arc_lifting_with_two_lines " << arc_lifting_text
370 << " " << arc_lifting_two_lines_text << endl;
371 }
372 if (f_Cayley_form) {
373 cout << "-Cayley_form "
374 << Cayley_form_k << " " << Cayley_form_l << " "
375 << Cayley_form_m << " " << Cayley_form_n
376 << endl;
377 }
378 if (f_by_equation) {
379 cout << "-by_equation "
383 << equation_text << " "
384 << equation_parameters << " "
386 << endl;
387 }
388 if (f_by_double_six) {
389 cout << "-by_double_six "
390 << by_double_six_label << " "
392 << by_double_six_text << " "
393 << endl;
394 }
395 if (f_by_skew_hexagon) {
396 cout << "-by_skew_hexagon "
397 << by_skew_hexagon_label << " "
399 << endl;
400 }
401
402 for (int i = 0; i < select_double_six_string.size(); i++) {
403 cout << "-select_double_six " << select_double_six_string[i] << endl;
404 }
405
406
407 if (f_override_group) {
408 cout << "-override_group "
410 << " " << override_group_nb_gens
411 << " " << override_group_gens
412 << endl;
413 }
414
415 for (int i = 0; i < transform_coeffs.size(); i++) {
416 if (f_inverse_transform[i]) {
417 cout << "-transform_inverse " << transform_coeffs[i] << endl;
418 }
419 else {
420 cout << "-transform " << transform_coeffs[i] << endl;
421 }
422 }
423
424}
425
426
427
429{
430 if (!f_q) {
431 cout << "surface_create_description::get_q "
432 "q has not been set yet" << endl;
433 exit(1);
434 }
435 return q;
436}
437
438}}}}
439
440
441
442
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