Orbiter 2022
Combinatorial Objects
orbiter_symbol_table.cpp
Go to the documentation of this file.
1/*
2 * orbiter_symbol_table.cpp
3 *
4 * Created on: Dec 2, 2020
5 * Author: betten
6 */
7
8
9
10
11#include "foundations.h"
12
13
14using namespace std;
15
16namespace orbiter {
17namespace layer1_foundations {
18namespace orbiter_kernel_system {
19
20
21
22
24{
25 // Table;
26}
27
29{
30
31}
32
34{
35 int i;
37
38 for (i = 0; i < Table.size(); i++) {
39 if (ST.stringcmp(str, Table[i].label.c_str()) == 0) {
40 return i;
41 }
42 }
43 //cout << "orbiter_symbol_table::find_symbol " << str << " not found" << endl;
44 return -1;
45}
46
48 orbiter_symbol_table_entry *Symb, int verbose_level)
49{
50 int f_v = (verbose_level >= 1);
51 int idx;
52
53 if (f_v) {
54 cout << "orbiter_symbol_table::add_symbol_table_entry" << endl;
55 }
56 idx = find_symbol(str);
57
58 if (idx >= 0) {
59 cout << "orbiter_symbol_table::add_symbol_table_entry Overriding "
60 "symbol " << str << " in symbol table at position " << idx << endl;
61 Table[idx].freeself();
62 Table[idx] = *Symb;
63 }
64 else {
65 Table.push_back(*Symb);
66 Symb->freeself();
67 }
68 if (f_v) {
69 cout << "orbiter_symbol_table::add_symbol_table_entry done" << endl;
70 }
71}
72
74{
75 int i;
76
77 if (Table.size()) {
78 for (i = 0; i < Table.size(); i++) {
79 cout << i << " : " << Table[i].label << " : ";
80 Table[i].print();
81 cout << endl;
82 }
83 }
84 else {
85 cout << "orbiter_symbol_table::print_symbol_table symbol table is empty" << endl;
86 }
87}
88
90{
91 if (idx >= Table.size()) {
92 cout << "orbiter_symbol_table::get_object out of bounds" << endl;
93 exit(1);
94 }
95 return Table[idx].ptr;
96}
97
99{
100 if (idx >= Table.size()) {
101 cout << "orbiter_symbol_table::get_object_type out of bounds" << endl;
102 exit(1);
103 }
104 return Table[idx].object_type;
105}
106
108{
109 if (t == t_nothing_object) {
110 cout << "t_nothing_object" << endl;
111 }
112 else if (t == t_finite_field) {
113 cout << "t_finite_field" << endl;
114 }
115 else if (t == t_any_group) {
116 cout << "t_any_group" << endl;
117 }
118 else if (t == t_linear_group) {
119 cout << "t_linear_group" << endl;
120 }
121 else if (t == t_permutation_group) {
122 cout << "t_permutation_group" << endl;
123 }
124 else if (t == t_modified_group) {
125 cout << "t_modified_group" << endl;
126 }
127 else if (t == t_projective_space) {
128 cout << "t_projective_space" << endl;
129 }
130 else if (t == t_orthogonal_space) {
131 cout << "t_orthogonal_space" << endl;
132 }
133 else if (t == t_formula) {
134 cout << "t_formula" << endl;
135 }
136 else if (t == t_cubic_surface) {
137 cout << "t_cubic_surface" << endl;
138 }
139 else if (t == t_quartic_curve) {
140 cout << "t_quartic_curve" << endl;
141 }
143 cout << "t_classification_of_cubic_surfaces_with_double_sixes" << endl;
144 }
145 else if (t == t_collection) {
146 cout << "t_collection" << endl;
147 }
148 else if (t == t_geometric_object) {
149 cout << "t_geometric_object" << endl;
150 }
151 else if (t == t_graph) {
152 cout << "t_graph" << endl;
153 }
154 else if (t == t_spread_table) {
155 cout << "t_spread_table" << endl;
156 }
157 else if (t == t_packing_was) {
158 cout << "t_packing_was" << endl;
159 }
160 else if (t == t_packing_was_choose_fixed_points) {
161 cout << "t_packing_was_choose_fixed_points" << endl;
162 }
163 else if (t == t_packing_long_orbits) {
164 cout << "t_packing_long_orbits" << endl;
165 }
166 else if (t == t_graph_classify) {
167 cout << "t_graph_classify" << endl;
168 }
169 else if (t == t_diophant) {
170 cout << "t_diophant" << endl;
171 }
172 else if (t == t_design) {
173 cout << "t_design" << endl;
174 }
175 else if (t == t_design_table) {
176 cout << "t_design_table" << endl;
177 }
178 else if (t == t_large_set_was) {
179 cout << "t_large_set_was" << endl;
180 }
181 else if (t == t_set) {
182 cout << "t_set" << endl;
183 }
184 else if (t == t_vector) {
185 cout << "t_vector" << endl;
186 }
187 else if (t == t_combinatorial_objects) {
188 cout << "t_combinatorial_objects" << endl;
189 }
190 else if (t == t_action) {
191 cout << "t_action" << endl;
192 }
193 else if (t == t_poset) {
194 cout << "t_poset" << endl;
195 }
196 else if (t == t_poset_classification) {
197 cout << "t_poset_classification" << endl;
198 }
199 else {
200 cout << "type is unknown" << endl;
201 exit(1);
202 }
203
204}
205
206
207
208}}}
209
210
functions related to strings and character arrays
symbol table to store data entries for the orbiter run-time system
void freeself()
void add_symbol_table_entry(std::string &str, orbiter_symbol_table_entry *Symb, int verbose_level)
@ t_classification_of_cubic_surfaces_with_double_sixes
Definition: foundations.h:762
the orbiter library for the classification of combinatorial objects