Orbiter 2022
Combinatorial Objects
finite_field_description.cpp
Go to the documentation of this file.
1/*
2 * finite_field_description.cpp
3 *
4 * Created on: Dec 2, 2020
5 * Author: betten
6 */
7
8
9
10
11
12
13#include "foundations.h"
14
15using namespace std;
16
17
18
19namespace orbiter {
20namespace layer1_foundations {
21namespace field_theory {
22
23
25{
26 f_q = FALSE;
27 q = 0;
28
30 //std::string override_polynomial;
31
33
34}
35
37{
38}
39
41 int argc, std::string *argv,
42 int verbose_level)
43{
44 int f_v = (verbose_level >= 1);
45 int i;
47
48 if (f_v) {
49 cout << "finite_field_description::read_arguments" << endl;
50 }
51 for (i = 0; i < argc; i++) {
52 if (ST.stringcmp(argv[i], "-q") == 0) {
53 f_q = TRUE;
54 q = ST.strtoi(argv[++i]);
55 if (f_v) {
56 cout << "-q " << q << endl;
57 }
58 }
59 else if (ST.stringcmp(argv[i], "-override_polynomial") == 0) {
61 override_polynomial.assign(argv[++i]);
62 if (f_v) {
63 cout << "-override_polynomial " << override_polynomial << endl;
64 }
65 }
66 else if (ST.stringcmp(argv[i], "-without_tables") == 0) {
68 if (f_v) {
69 cout << "-without_tables " << endl;
70 }
71 }
72 else if (ST.stringcmp(argv[i], "-end") == 0) {
73 if (f_v) {
74 cout << "-end" << endl;
75 }
76 break;
77 }
78 else {
79 cout << "finite_field_description::read_arguments "
80 "unrecognized option " << argv[i] << endl;
81 }
82 } // next i
83 if (f_v) {
84 cout << "finite_field_description::read_arguments done" << endl;
85 }
86 return i + 1;
87}
88
90{
91 //cout << "finite_field_description::print:" << endl;
92
93 if (f_q) {
94 cout << "-q " << q << endl;
95 }
97 cout << "-override_polynomial " << override_polynomial << endl;
98 }
99 if (f_without_tables) {
100 cout << "-without_tables" << endl;
101 }
102}
103
104}}}
105
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