Orbiter 2022
Combinatorial Objects
draw_mod_n_description.cpp
Go to the documentation of this file.
1/*
2 * draw_mod_n_description.cpp
3 *
4 * Created on: Apr 15, 2021
5 * Author: betten
6 */
7
8
9
10
11#include "foundations.h"
12
13
14using namespace std;
15
16
17namespace orbiter {
18namespace layer1_foundations {
19namespace graphics {
20
21
23{
24 f_n = FALSE;
25 n = 0;
26
27 f_mod_s = FALSE;
28 mod_s = 0;
29
31 divide_out_by = 0;
32
33 f_file = FALSE;
34 //std::string fname;
35 f_inverse = 0;
37
38 f_power_cycle = 0;
40
43 //std::string cyclotomic_sets_reps;
44
47
48}
49
51{
52
53}
54
55
56
58 int argc, std::string *argv,
59 int verbose_level)
60{
61 int f_v = (verbose_level >= 1);
62 int i;
64
65 if (f_v) {
66 cout << "draw_mod_n_description::read_arguments" << endl;
67 }
68 for (i = 0; i < argc; i++) {
69
70 if (ST.stringcmp(argv[i], "-n") == 0) {
71 f_n = TRUE;
72 n = ST.strtoi(argv[++i]);
73 cout << "-n " << n << endl;
74 }
75 else if (ST.stringcmp(argv[i], "-mod_s") == 0) {
76 f_mod_s = TRUE;
77 mod_s = ST.strtoi(argv[++i]);
78 cout << "-mod_s " << mod_s << endl;
79 }
80 else if (ST.stringcmp(argv[i], "-divide_out_by") == 0) {
82 divide_out_by = ST.strtoi(argv[++i]);
83 cout << "-divide_out_by " << divide_out_by << endl;
84 }
85 else if (ST.stringcmp(argv[i], "-file") == 0) {
86 f_file = TRUE;
87 fname.assign(argv[++i]);
88 cout << "-file " << fname << endl;
89 }
90 else if (ST.stringcmp(argv[i], "-inverse") == 0) {
92 cout << "-inverse " << endl;
93 }
94 else if (ST.stringcmp(argv[i], "-additive_inverse") == 0) {
96 cout << "-additive_inverse " << endl;
97 }
98 else if (ST.stringcmp(argv[i], "-power_cycle") == 0) {
100 power_cycle_base = ST.strtoi(argv[++i]);
101 cout << "-power_cycle " << power_cycle_base << endl;
102 }
103 else if (ST.stringcmp(argv[i], "-cyclotomic_sets") == 0) {
105 cyclotomic_sets_q = ST.strtoi(argv[++i]);
106 cyclotomic_sets_reps.assign(argv[++i]);
107 cout << "-cyclotomic_sets " << cyclotomic_sets_q << " " << cyclotomic_sets_reps << endl;
108 }
109 else if (ST.stringcmp(argv[i], "-cyclotomic_sets_thickness") == 0) {
111 cyclotomic_sets_thickness = ST.strtoi(argv[++i]);
112 cout << "-cyclotomic_sets_thickness " << cyclotomic_sets_thickness << endl;
113 }
114 else if (ST.stringcmp(argv[i], "-end") == 0) {
115 cout << "-end" << endl;
116 break;
117 }
118 else {
119 cout << "draw_mod_n_description::read_arguments "
120 "unrecognized option " << argv[i] << endl;
121 }
122 } // next i
123 if (f_v) {
124 cout << "draw_mod_n_description::read_arguments done" << endl;
125 }
126 return i + 1;
127}
128
130{
131 if (f_n) {
132 cout << "-n " << n << endl;
133 }
134 if (f_mod_s) {
135 cout << "-mod_s " << mod_s << endl;
136 }
137 if (f_divide_out_by) {
138 cout << "-divide_out_by " << divide_out_by << endl;
139 }
140 if (f_file) {
141 cout << "-file " << fname << endl;
142 }
143 if (f_inverse) {
144 cout << "-inverse " << endl;
145 }
146 if (f_additive_inverse) {
147 cout << "-additive_inverse " << endl;
148 }
149 if (f_power_cycle) {
150 cout << "-power_cycle " << power_cycle_base << endl;
151 }
152 if (f_cyclotomic_sets) {
153 cout << "-cyclotomic_sets " << cyclotomic_sets_q << " " << cyclotomic_sets_reps << endl;
154 }
156 cout << "-cyclotomic_sets_thickness " << cyclotomic_sets_thickness << endl;
157 }
158}
159
160
161
162
163
164}}}
165
166
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