Orbiter 2022
Combinatorial Objects
flag_orbits_incidence_structure.cpp
Go to the documentation of this file.
1/*
2 * flag_orbits_incidence_structure.cpp
3 *
4 * Created on: Dec 15, 2021
5 * Author: betten
6 */
7
8
9
10
11
12
13#include "orbiter.h"
14
15using namespace std;
16
17namespace orbiter {
18namespace layer5_applications {
19namespace apps_combinatorics {
20
21
22
24{
25 OwP = NULL;
26 nb_rows = 0;
27 nb_cols = 0;
29 nb_flags = 0;
30 Flags = NULL;
31 Flag_table = NULL;
32 A_on_flags = NULL;
33 Orb = NULL;
34}
35
37{
38 OwP = NULL;
39
40 if (Flags) {
42 }
43 if (Flag_table) {
45 }
46 if (A_on_flags) {
48 }
49 if (Orb) {
51 }
52}
53
55 int f_anti_flags, actions::action *A_perm,
56 groups::strong_generators *SG, int verbose_level)
57{
58 int f_v = (verbose_level >= 1);
59
60 if (f_v) {
61 cout << "flag_orbits_incidence_structure::init" << endl;
62 }
63
65
67
68
69 if (f_v) {
70 cout << "flag_orbits_incidence_structure::init "
71 "before encode_incma" << endl;
72 }
73 OwP->OwCF->encode_incma(Enc, verbose_level - 2);
74
75 nb_rows = Enc->nb_rows;
76 nb_cols = Enc->nb_cols;
77
78 if (Enc->nb_flags > 1000) {
79 cout << "flag_orbits_incidence_structure::init too many flags" << endl;
80 return;
81 }
82
84 nb_flags = 0;
85
86 int i, j, h, f, a;
87
88 if (f_anti_flags) {
89 a = 0;
90 }
91 else {
92 a = 1;
93 }
94 for (i = 0; i < nb_rows; i++) {
95 for (j = 0; j < nb_cols; j++) {
96 if (Enc->get_incidence_ij(i, j) == a) {
97 Flags[nb_flags++] = i * nb_cols + j;
98 }
99 }
100 }
102 for (h = 0; h < nb_flags; h++) {
103 f = Flags[h];
104 i = f / nb_cols;
105 j = f % nb_cols;
106 Flag_table[h * 2 + 0] = i;
107 Flag_table[h * 2 + 1] = nb_rows + j;
108 }
109 if (FALSE) {
110 cout << "flag_orbits_incidence_structure::init "
111 "Flag_table:" << endl;
113 }
114
115 if (f_v) {
116 cout << "flag_orbits_incidence_structure::init "
117 "before A_on_flags" << endl;
118 }
120 2 /* set_size */, Flag_table,
121 verbose_level - 2);
122 if (f_v) {
123 cout << "flag_orbits_incidence_structure::init "
124 "after A_on_flags" << endl;
125 }
126
128
129 string prefix;
130
131 if (f_v) {
132 cout << "flag_orbits_incidence_structure::init "
133 "before Orb->init" << endl;
134 }
135 Orb->init(
137 SG,
138 FALSE /* f_load_save */,
139 prefix,
140 verbose_level - 2);
141 if (f_v) {
142 cout << "flag_orbits_incidence_structure::init "
143 "after Orb->init" << endl;
144 }
145
147
148 if (f_v) {
149 cout << "flag_orbits_incidence_structure::init done" << endl;
150 }
151}
152
154{
155 long int flag[2];
156 int idx;
157
158 flag[0] = i;
159 flag[1] = j;
160
161 idx = A_on_flags->G.on_sets->find_set(flag, 0 /*verbose_level*/);
162 return idx;
163}
164
165void flag_orbits_incidence_structure::report(std::ostream &ost, int verbose_level)
166{
167 int f_v = (verbose_level >= 1);
168
169 if (f_v) {
170 cout << "flag_orbits_incidence_structure::report" << endl;
171 }
172
174 ost << "Flag orbits are not available.\\\\" << endl;
175 return;
176 }
177
178 //Orb->report(ost, verbose_level);
179 Orb->report_quick(ost, verbose_level);
180
181 if (f_v) {
182 cout << "flag_orbits_incidence_structure::report done" << endl;
183 }
184}
185
186
187}}}
188
encoding of combinatorial object for use with nauty
void encode_incma(combinatorics::encoded_combinatorial_object *&Enc, int verbose_level)
a permutation group in a fixed action.
Definition: actions.h:99
action * create_induced_action_on_sets(int nb_sets, int set_size, long int *sets, int verbose_level)
compute orbits of a group in a given action; allows file io
Definition: groups.h:492
void report_quick(std::ostream &ost, int verbose_level)
void init(actions::action *A, strong_generators *SG, int f_load_save, std::string &prefix, int verbose_level)
a strong generating set for a permutation group with respect to a fixed action
Definition: groups.h:1703
void init(object_with_properties *OwP, int f_anti_flags, actions::action *A_perm, groups::strong_generators *SG, int verbose_level)
object properties which are derived from nauty canonical form
#define Lint_matrix_print(A, B, C)
Definition: foundations.h:708
#define FREE_int(p)
Definition: foundations.h:640
#define NEW_OBJECT(type)
Definition: foundations.h:638
#define FREE_OBJECT(p)
Definition: foundations.h:651
#define NEW_int(n)
Definition: foundations.h:625
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#define FREE_lint(p)
Definition: foundations.h:642
#define NEW_lint(n)
Definition: foundations.h:628
the orbiter library for the classification of combinatorial objects
induced_actions::action_on_sets * on_sets