Orbiter 2022
Combinatorial Objects
poset_description.cpp
Go to the documentation of this file.
1// poset_description.cpp
2//
3// Anton Betten
4// November 19, 2018
5
7#include "discreta/discreta.h"
10
11using namespace std;
12
13namespace orbiter {
14namespace layer4_classification {
15namespace poset_classification {
16
17
19{
20 null();
21}
22
24{
25 freeself();
26}
27
29{
32 //label[0] = 0;
35}
36
38{
39 null();
40}
41
43 const char *str, int verbose_level)
44{
45 int f_v = (verbose_level >= 1);
46 int f_vv = (verbose_level >= 2);
47
48 int argc;
49 char **argv;
50 int i;
52
53 if (f_v) {
54 cout << "poset_description::read_arguments_from_string" << endl;
55 }
56 ST.chop_string(str, argc, argv);
57
58 if (f_vv) {
59 cout << "argv:" << endl;
60 for (i = 0; i < argc; i++) {
61 cout << i << " : " << argv[i] << endl;
62 }
63 }
64
65
67 argc, (const char **) argv,
68 verbose_level);
69
70 for (i = 0; i < argc; i++) {
71 FREE_char(argv[i]);
72 }
73 FREE_pchar(argv);
74 if (f_v) {
75 cout << "poset_description::read_arguments_from_string "
76 "done" << endl;
77 }
78}
79
80
82 int argc, const char **argv,
83 int verbose_level)
84{
85 int i;
86
87 cout << "poset_description::read_arguments" << endl;
88 for (i = 0; i < argc; i++) {
89
90#if 0
91 if (argv[i][0] != '-') {
92 continue;
93 }
94#endif
95
96 if (strcmp(argv[i], "-subset_lattice") == 0) {
98 cout << "-subset_lattice " << endl;
99 }
100 else if (strcmp(argv[i], "-subspace_lattice") == 0) {
102 dimension = atoi(argv[++i]);
103 q = atoi(argv[++i]);
104 cout << "-subset_lattice " << dimension << " " << q << endl;
105 }
106 else if (strcmp(argv[i], "-independence_condition") == 0) {
108 //independence_condition_max_depth = atoi(argv[++i]);
109 independence_condition_value = atoi(argv[++i]);
110 cout << "-independence_condition "
111 //<< independence_condition_max_depth << " "
113 << endl;
114 }
115 else {
116 cout << "poset_description::read_arguments "
117 "unrecognized option " << argv[i] << endl;
118 }
119 } // next i
120 cout << "poset_description::read_arguments done" << endl;
121 return i;
122}
123
124}}}
125
126
functions related to strings and character arrays
void chop_string(const char *str, int &argc, char **&argv)
int read_arguments(int argc, const char **argv, int verbose_level)
#define FREE_pchar(p)
Definition: foundations.h:648
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#define FREE_char(p)
Definition: foundations.h:646
the orbiter library for the classification of combinatorial objects