Orbiter 2022
Combinatorial Objects
graph_classify_description.cpp
Go to the documentation of this file.
1/*
2 * graph_classify_description.cpp
3 *
4 * Created on: Jul 27, 2020
5 * Author: betten
6 */
7
8
9#include "orbiter.h"
10
11using namespace std;
12
13namespace orbiter {
14namespace layer5_applications {
15namespace apps_graph_theory {
16
17
19{
20 f_n = FALSE;
22
24 Control = NULL;
25
26 f_girth = FALSE;
29
30
31
32 f_depth = FALSE;
35
36 regularity = 0;
37 girth = 0;
38 n = 0;
39 depth = 0;
41
42
43}
44
46{
47}
48
49int graph_classify_description::read_arguments(int argc, std::string *argv,
50 int verbose_level)
51{
52 int i;
54
55
56
57 cout << "graph_classify_description::read_arguments" << endl;
58 for (i = 0; i < argc; i++) {
59
60 if (ST.stringcmp(argv[i], "-regular") == 0) {
62 regularity = ST.strtoi(argv[++i]);
63 cout << "-regular " << regularity << endl;
64 }
65 else if (ST.stringcmp(argv[i], "-poset_classification_control") == 0) {
68 i += Control->read_arguments(argc - (i + 1),
69 argv + i + 1, verbose_level);
70
71 cout << "done with -poset_classification_control" << endl;
72 cout << "i = " << i << endl;
73 cout << "argc = " << argc << endl;
74 if (i < argc) {
75 cout << "next argument is " << argv[i] << endl;
76 }
77 }
78 else if (ST.stringcmp(argv[i], "-n") == 0) {
79 f_n = TRUE;
80 n = ST.strtoi(argv[++i]);
81 cout << "-n " << n << endl;
82 }
83 else if (ST.stringcmp(argv[i], "-girth") == 0) {
84 f_girth = TRUE;
85 girth = ST.strtoi(argv[++i]);
86 cout << "-girth " << girth << endl;
87 }
88 else if (ST.stringcmp(argv[i], "-tournament") == 0) {
90 cout << "-tournament " << endl;
91 }
92 else if (ST.stringcmp(argv[i], "-no_transmitter") == 0) {
94 cout << "-no_superking " << endl;
95 }
96 else if (ST.stringcmp(argv[i], "-test_multi_edge") == 0) {
98 cout << "-test_multi_edge " << endl;
99 }
100 else if (ST.stringcmp(argv[i], "-identify") == 0) {
101 int a, j;
102
104 j = 0;
105 while (TRUE) {
106 a = ST.strtoi(argv[++i]);
107 if (a == -1) {
108 break;
109 }
110 identify_data[j++] = a;
111 }
113 cout << "-identify ";
115 cout << endl;
116 }
117 else if (ST.stringcmp(argv[i], "-depth") == 0) {
118 f_depth = TRUE;
119 depth = ST.strtoi(argv[++i]);
120 cout << "-depth " << depth << endl;
121 }
122
123 else if (ST.stringcmp(argv[i], "-end") == 0) {
124 break;
125 }
126 else {
127 cout << "ignoring argument " << argv[i] << endl;
128 }
129 } // next i
130
131 if (!f_n) {
132 cout << "graph_classify_description::read_arguments "
133 "please use option -n <n> "
134 "to specify the number of vertices" << endl;
135 exit(1);
136 }
137
138 cout << "graph_classify_description::read_arguments done" << endl;
139 return i + 1;
140}
141
143{
144 if (f_regular) {
145 cout << "-regular " << regularity << endl;
146 }
147 if (f_control) {
148 }
149 if (f_n) {
150 cout << "-n " << n << endl;
151 }
152 if (f_girth) {
153 cout << "-girth " << girth << endl;
154 }
155 if (f_tournament) {
156 cout << "-tournament " << endl;
157 }
158 if (f_no_superking) {
159 cout << "-no_superking " << endl;
160 }
161 if (f_test_multi_edge) {
162 cout << "-test_multi_edge " << endl;
163 }
164 if (f_identify) {
165 cout << "-identify ";
167 cout << endl;
168 }
169 if (f_depth) {
170 cout << "-depth " << depth << endl;
171 }
172}
173
174
175}}}
176
functions related to strings and character arrays
to control the behavior of the poset classification algorithm
poset_classification::poset_classification_control * Control
Definition: graph_theory.h:331
#define NEW_OBJECT(type)
Definition: foundations.h:638
#define Lint_vec_print(A, B, C)
Definition: foundations.h:686
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
the orbiter library for the classification of combinatorial objects