Orbiter 2022
Combinatorial Objects
orbiter_symbol_table_entry.cpp
Go to the documentation of this file.
1/*
2 * orbiter_symbol_table_entry.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
23{
24
25 //std::string label;
28 vec = NULL;
29 vec_len = 0;
30 //std::string str;
31 ptr = NULL;
32}
33
35{
36 freeself();
37}
38
40{
41 if (type == t_intvec && vec) {
43 vec = 0;
44 }
47}
48
49void orbiter_symbol_table_entry::init(std::string &str_label)
50{
51 label.assign(str_label);
52}
53
55 field_theory::finite_field *F, int verbose_level)
56{
57 int f_v = (verbose_level >= 1);
58
59 if (f_v) {
60 cout << "orbiter_symbol_table_entry::init_finite_field" << endl;
61 }
63 type = t_object;
65 ptr = F;
66 if (f_v) {
67 cout << "orbiter_symbol_table_entry::init_finite_field done" << endl;
68 }
69}
70
72 void *p, int verbose_level)
73{
74 int f_v = (verbose_level >= 1);
75
76 if (f_v) {
77 cout << "orbiter_symbol_table_entry::init_any_group" << endl;
78 }
80 type = t_object;
82 ptr = p;
83 if (f_v) {
84 cout << "orbiter_symbol_table_entry::init_any_group done" << endl;
85 }
86}
87
89 void *p, int verbose_level)
90{
91 int f_v = (verbose_level >= 1);
92
93 if (f_v) {
94 cout << "orbiter_symbol_table_entry::init_linear_group" << endl;
95 }
97 type = t_object;
99 ptr = p;
100 if (f_v) {
101 cout << "orbiter_symbol_table_entry::init_linear_group done" << endl;
102 }
103}
104
106 void *p, int verbose_level)
107{
108 int f_v = (verbose_level >= 1);
109
110 if (f_v) {
111 cout << "orbiter_symbol_table_entry::init_permutation_group" << endl;
112 }
114 type = t_object;
116 ptr = p;
117 if (f_v) {
118 cout << "orbiter_symbol_table_entry::init_permutation_group done" << endl;
119 }
120}
121
123 void *p, int verbose_level)
124{
125 int f_v = (verbose_level >= 1);
126
127 if (f_v) {
128 cout << "orbiter_symbol_table_entry::init_modified_group" << endl;
129 }
131 type = t_object;
133 ptr = p;
134 if (f_v) {
135 cout << "orbiter_symbol_table_entry::init_modified_group done" << endl;
136 }
137}
138
140 void *p, int verbose_level)
141{
142 int f_v = (verbose_level >= 1);
143
144 if (f_v) {
145 cout << "orbiter_symbol_table_entry::init_projective_space" << endl;
146 }
148 type = t_object;
150 ptr = p;
151 if (f_v) {
152 cout << "orbiter_symbol_table_entry::init_projective_space done" << endl;
153 }
154}
155
157 void *p, int verbose_level)
158{
159 int f_v = (verbose_level >= 1);
160
161 if (f_v) {
162 cout << "orbiter_symbol_table_entry::init_orthogonal_space" << endl;
163 }
165 type = t_object;
167 ptr = p;
168 if (f_v) {
169 cout << "orbiter_symbol_table_entry::init_orthogonal_space done" << endl;
170 }
171}
172
174 void *p, int verbose_level)
175{
176 int f_v = (verbose_level >= 1);
177
178 if (f_v) {
179 cout << "orbiter_symbol_table_entry::init_formula" << endl;
180 }
182 type = t_object;
184 ptr = p;
185 if (f_v) {
186 cout << "orbiter_symbol_table_entry::init_formula done" << endl;
187 }
188}
189
191 void *p, int verbose_level)
192{
193 int f_v = (verbose_level >= 1);
194
195 if (f_v) {
196 cout << "orbiter_symbol_table_entry::init_cubic_surface" << endl;
197 }
199 type = t_object;
201 ptr = p;
202 if (f_v) {
203 cout << "orbiter_symbol_table_entry::init_cubic_surface done" << endl;
204 }
205}
206
208 void *p, int verbose_level)
209{
210 int f_v = (verbose_level >= 1);
211
212 if (f_v) {
213 cout << "orbiter_symbol_table_entry::init_quartic_curve" << endl;
214 }
216 type = t_object;
218 ptr = p;
219 if (f_v) {
220 cout << "orbiter_symbol_table_entry::init_quartic_curve done" << endl;
221 }
222}
223
225 std::string &label,
226 void *p, int verbose_level)
227{
228 int f_v = (verbose_level >= 1);
229
230 if (f_v) {
231 cout << "orbiter_symbol_table_entry::init_classification_of_cubic_surfaces_with_double_sixes" << endl;
232 }
234 type = t_object;
236 ptr = p;
237 if (f_v) {
238 cout << "orbiter_symbol_table_entry::init_classification_of_cubic_surfaces_with_double_sixes done" << endl;
239 }
240
241}
242
244 std::string &list_of_objects, int verbose_level)
245{
246 int f_v = (verbose_level >= 1);
247
248 if (f_v) {
249 cout << "orbiter_symbol_table_entry::init_collection" << endl;
250 }
252 type = t_object;
254
256 const char *p = list_of_objects.c_str();
257 char str[1000];
258
259 std::vector<std::string> *the_list;
260 the_list = new std::vector<std::string>;
261
262 while (TRUE) {
263 if (!ST.s_scan_token_comma_separated(&p, str)) {
264 break;
265 }
266 string var;
267
268 var.assign(str);
269 if (f_v) {
270 cout << "adding object " << var << " to the collection" << endl;
271 }
272
273 the_list->push_back(var);
274
275 }
276
277
278 ptr = the_list;
279 if (f_v) {
280 cout << "orbiter_symbol_table_entry::init_collection done" << endl;
281 }
282}
283
285 geometry::geometric_object_create *COC, int verbose_level)
286{
287 int f_v = (verbose_level >= 1);
288
289 if (f_v) {
290 cout << "orbiter_symbol_table_entry::init_geometric_object" << endl;
291 }
293 type = t_object;
295 ptr = COC;
296 if (f_v) {
297 cout << "orbiter_symbol_table_entry::init_geometric_object done" << endl;
298 }
299}
300
302 void *Gr, int verbose_level)
303{
304 int f_v = (verbose_level >= 1);
305
306 if (f_v) {
307 cout << "orbiter_symbol_table_entry::init_graph" << endl;
308 }
310 type = t_object;
312 ptr = Gr;
313 if (f_v) {
314 cout << "orbiter_symbol_table_entry::init_graph done" << endl;
315 }
316}
317
319 void *P, int verbose_level)
320{
321 int f_v = (verbose_level >= 1);
322
323 if (f_v) {
324 cout << "orbiter_symbol_table_entry::init_spread_table" << endl;
325 }
327 type = t_object;
329 ptr = P;
330 if (f_v) {
331 cout << "orbiter_symbol_table_entry::init_spread_table done" << endl;
332 }
333}
334
336 void *P, int verbose_level)
337{
338 int f_v = (verbose_level >= 1);
339
340 if (f_v) {
341 cout << "orbiter_symbol_table_entry::init_packing_was" << endl;
342 }
344 type = t_object;
346 ptr = P;
347 if (f_v) {
348 cout << "orbiter_symbol_table_entry::init_packing_was done" << endl;
349 }
350}
351
352
354 void *P, int verbose_level)
355{
356 int f_v = (verbose_level >= 1);
357
358 if (f_v) {
359 cout << "orbiter_symbol_table_entry::init_packing_was_choose_fixed_points" << endl;
360 }
362 type = t_object;
364 ptr = P;
365 if (f_v) {
366 cout << "orbiter_symbol_table_entry::init_packing_was_choose_fixed_points done" << endl;
367 }
368}
369
370
372 void *PL, int verbose_level)
373{
374 int f_v = (verbose_level >= 1);
375
376 if (f_v) {
377 cout << "orbiter_symbol_table_entry::init_packing_long_orbits" << endl;
378 }
380 type = t_object;
382 ptr = PL;
383 if (f_v) {
384 cout << "orbiter_symbol_table_entry::init_packing_long_orbits done" << endl;
385 }
386}
387
389 void *GC, int verbose_level)
390{
391 int f_v = (verbose_level >= 1);
392
393 if (f_v) {
394 cout << "orbiter_symbol_table_entry::init_graph_classify" << endl;
395 }
397 type = t_object;
399 ptr = GC;
400 if (f_v) {
401 cout << "orbiter_symbol_table_entry::init_graph_classify done" << endl;
402 }
403}
404
406 void *Dio, int verbose_level)
407{
408 int f_v = (verbose_level >= 1);
409
410 if (f_v) {
411 cout << "orbiter_symbol_table_entry::init_diophant" << endl;
412 }
414 type = t_object;
416 ptr = Dio;
417 if (f_v) {
418 cout << "orbiter_symbol_table_entry::init_diophant done" << endl;
419 }
420}
421
423 void *DC, int verbose_level)
424{
425 int f_v = (verbose_level >= 1);
426
427 if (f_v) {
428 cout << "orbiter_symbol_table_entry::init_design" << endl;
429 }
431 type = t_object;
433 ptr = DC;
434 if (f_v) {
435 cout << "orbiter_symbol_table_entry::init_design done" << endl;
436 }
437}
438
440 void *DT, int verbose_level)
441{
442 int f_v = (verbose_level >= 1);
443
444 if (f_v) {
445 cout << "orbiter_symbol_table_entry::init_design_table" << endl;
446 }
448 type = t_object;
450 ptr = DT;
451 if (f_v) {
452 cout << "orbiter_symbol_table_entry::init_design_table done" << endl;
453 }
454}
455
457 void *LSW, int verbose_level)
458{
459 int f_v = (verbose_level >= 1);
460
461 if (f_v) {
462 cout << "orbiter_symbol_table_entry::init_large_set_was" << endl;
463 }
465 type = t_object;
467 ptr = LSW;
468 if (f_v) {
469 cout << "orbiter_symbol_table_entry::init_large_set_was done" << endl;
470 }
471}
472
474 void *SB, int verbose_level)
475{
476 int f_v = (verbose_level >= 1);
477
478 if (f_v) {
479 cout << "orbiter_symbol_table_entry::init_set" << endl;
480 }
482 type = t_object;
484 ptr = SB;
485 if (f_v) {
486 cout << "orbiter_symbol_table_entry::init_set done" << endl;
487 }
488}
489
491 void *VB, int verbose_level)
492{
493 int f_v = (verbose_level >= 1);
494
495 if (f_v) {
496 cout << "orbiter_symbol_table_entry::init_set" << endl;
497 }
499 type = t_object;
501 ptr = VB;
502 if (f_v) {
503 cout << "orbiter_symbol_table_entry::init_set done" << endl;
504 }
505}
506
508 data_structures::data_input_stream *IS, int verbose_level)
509{
510 int f_v = (verbose_level >= 1);
511
512 if (f_v) {
513 cout << "orbiter_symbol_table_entry::init_combinatorial_objects" << endl;
514 }
516 type = t_object;
518 ptr = IS;
519 if (f_v) {
520 cout << "orbiter_symbol_table_entry::init_combinatorial_objects done" << endl;
521 }
522}
523
525 geometry_builder::geometry_builder *GB, int verbose_level)
526{
527 int f_v = (verbose_level >= 1);
528
529 if (f_v) {
530 cout << "orbiter_symbol_table_entry::init_geometry_builder_object" << endl;
531 }
533 type = t_object;
535 ptr = GB;
536 if (f_v) {
537 cout << "orbiter_symbol_table_entry::init_geometry_builder_object done" << endl;
538 }
539}
540
541
542
543
545{
546 if (type == t_intvec) {
547 Int_vec_print(cout, vec, vec_len);
548 cout << endl;
549 }
550 else if (type == t_object) {
553
555 F->print();
556 }
557 else if (object_type == t_linear_group) {
558 cout << "linear group" << endl;
559 }
560 else if (object_type == t_permutation_group) {
561 cout << "permutation group" << endl;
562 }
563 else if (object_type == t_projective_space) {
564 cout << "projective space" << endl;
565 }
566 else if (object_type == t_orthogonal_space) {
567 cout << "orthogonal space" << endl;
568 }
569 else if (object_type == t_formula) {
570 cout << "formula" << endl;
572
574 F->print();
575 }
576 else if (object_type == t_cubic_surface) {
577 cout << "cubic surface" << endl;
578 }
579 else if (object_type == t_quartic_curve) {
580 cout << "quartic curve" << endl;
581 }
583 cout << "classification_of_cubic_surfaces_with_double_sixes" << endl;
584 }
585 else if (object_type == t_collection) {
586 cout << "collection" << endl;
587 std::vector<std::string> *the_list;
588 int i;
589
590 the_list = (std::vector<std::string> *) ptr;
591 for (i = 0; i < the_list->size(); i++) {
592 cout << i << " : " << (*the_list)[i] << endl;
593 }
594 }
595 else if (object_type == t_geometric_object) {
596 cout << "geometric object" << endl;
597 }
598 else if (object_type == t_graph) {
599 cout << "graph" << endl;
600 }
601 else if (object_type == t_spread_table) {
602 cout << "spread table" << endl;
603 }
604 else if (object_type == t_packing_was) {
605 cout << "packing with symmetry assumption" << endl;
606 }
608 cout << "packing with symmetry assumption, choice of fixed points" << endl;
609 }
611 cout << "packing with symmetry assumption, choosing long orbits" << endl;
612 }
613 else if (object_type == t_graph_classify) {
614 cout << "graph_classification" << endl;
615 }
616 else if (object_type == t_diophant) {
617 cout << "diophant" << endl;
618 }
619 else if (object_type == t_design) {
620 cout << "design" << endl;
621 }
622 else if (object_type == t_design_table) {
623 cout << "design_table" << endl;
624 }
625 else if (object_type == t_large_set_was) {
626 cout << "large_set_was" << endl;
627 }
628 else if (object_type == t_set) {
629 cout << "set" << endl;
630 }
631 else if (object_type == t_vector) {
632 cout << "vector" << endl;
633 }
635 cout << "combinatorial_objects" << endl;
636 }
637 else if (object_type == t_geometry_builder) {
638 cout << "geometry_builder" << endl;
639 }
640
641
642
643
644#if 0
645 else if (object_type == t_action) {
646 action *A;
647
648 A = (action *) ptr;
649 A->print_info();
650 }
651 else if (object_type == t_poset) {
652 poset *P;
653
654 P = (poset *) ptr;
655 P->print();
656 }
658 poset_classification *PC;
659
660 PC = (poset_classification *) ptr;
661 PC->print();
662 }
663#endif
664 }
665}
666
667
668}}}
669
input data for classification of geometric objects from the command line
functions related to strings and character arrays
to create a geometric object from a description using class geometric_object_description
Definition: geometry.h:568
void init_classification_of_cubic_surfaces_with_double_sixes(std::string &label, void *p, int verbose_level)
void init_packing_long_orbits(std::string &label, void *PL, int verbose_level)
int * vec
enum symbol_table_object_type object_type
void init_set(std::string &label, void *SB, int verbose_level)
void init_projective_space(std::string &label, void *p, int verbose_level)
void init_graph(std::string &label, void *Gr, int verbose_level)
void init_geometric_object(std::string &label, geometry::geometric_object_create *COC, int verbose_level)
void init_diophant(std::string &label, void *Dio, int verbose_level)
void init_spread_table(std::string &label, void *P, int verbose_level)
void init(std::string &str_label)
orbiter_symbol_table_entry()
void init_collection(std::string &label, std::string &list_of_objects, int verbose_level)
void init_quartic_curve(std::string &label, void *p, int verbose_level)
void init_linear_group(std::string &label, void *p, int verbose_level)
void freeself()
void init_any_group(std::string &label, void *p, int verbose_level)
enum symbol_table_entry_type type
~orbiter_symbol_table_entry()
void init_large_set_was(std::string &label, void *LSW, int verbose_level)
void init_finite_field(std::string &label, field_theory::finite_field *F, int verbose_level)
void init_design(std::string &label, void *DC, int verbose_level)
void init_packing_was_choose_fixed_points(std::string &label, void *P, int verbose_level)
void init_cubic_surface(std::string &label, void *p, int verbose_level)
void init_combinatorial_objects(std::string &label, data_structures::data_input_stream *IS, int verbose_level)
void init_packing_was(std::string &label, void *P, int verbose_level)
void init_orthogonal_space(std::string &label, void *p, int verbose_level)
int vec_len
void init_vector(std::string &label, void *VB, int verbose_level)
void init_geometry_builder_object(std::string &label, geometry_builder::geometry_builder *GB, int verbose_level)
void init_modified_group(std::string &label, void *p, int verbose_level)
void init_formula(std::string &label, void *p, int verbose_level)
std::string label
void print()
std::string str
void init_permutation_group(std::string &label, void *p, int verbose_level)
void init_graph_classify(std::string &label, void *GC, int verbose_level)
void * ptr
void init_design_table(std::string &label, void *DT, int verbose_level)
#define FREE_int(p)
Definition: foundations.h:640
#define TRUE
Definition: foundations.h:231
#define Int_vec_print(A, B, C)
Definition: foundations.h:685
@ t_classification_of_cubic_surfaces_with_double_sixes
Definition: foundations.h:762
the orbiter library for the classification of combinatorial objects