Orbiter 2022
Combinatorial Objects
incidence_structure_with_group.cpp
Go to the documentation of this file.
1/*
2 * incidence_structure_with_group.cpp
3 *
4 * Created on: Feb 1, 2020
5 * Author: betten
6 */
7
8
9
10
12#include "group_actions.h"
13
14using namespace std;
15
16
17
18namespace orbiter {
19namespace layer3_group_actions {
20namespace data_structures_groups {
21
22
24{
25 Inc = NULL;
26 N = 0;
27 partition = NULL;
28
30 canonical_form = NULL;
31 //canonical_form_len = 0;
32
34 canonical_labeling = NULL;
35
36 A_perm = NULL;
37
38 null();
39}
40
42{
43 freeself();
44}
45
47{
48 Inc = NULL;
49 N = 0;
50 partition = NULL;
51
53 canonical_form = NULL;
54 //canonical_form_len = 0;
55
57 canonical_labeling = NULL;
58
59 A_perm = NULL;
60}
61
63{
64 if (canonical_form) {
66 }
69 }
70
71 if (A_perm) {
73 }
74 null();
75}
76
79 int *partition,
80 int verbose_level)
81{
82 int f_v = (verbose_level >= 1);
83
84 if (f_v) {
85 cout << "incidence_structure_with_group::init" << endl;
86 }
87
89 N = Inc->nb_rows + Inc->nb_cols;
92 if (f_v) {
93 cout << "incidence_structure_with_group::init done" << endl;
94 }
95}
96
98 int f_compute_canonical_form,
100 int verbose_level)
101{
102
103 int f_v = (verbose_level >= 1);
104 int f_vv = (verbose_level >= 2);
105 int i;
106
107
108 if (f_v) {
109 cout << "incidence_structure_with_group::set_stabilizer_and_canonical_form" << endl;
110 cout << "verbose_level = " << verbose_level << endl;
111 }
112
113
114 if (verbose_level > 5) {
115 cout << "incidence_structure_with_group::set_stabilizer_and_canonical_form Incma:" << endl;
117 }
118
119 for (i = 0; i < Inc->nb_rows + Inc->nb_cols; i++) {
120 canonical_labeling[i] = i;
121 }
122
123
124
125
126
127 if (f_vv) {
128 cout << "incidence_structure_with_group::set_stabilizer_and_canonical_form "
129 "initializing Aut, Base, "
130 "Transversal_length" << endl;
131 }
132
133 if (f_v) {
134 cout << "incidence_structure_with_group::set_stabilizer_and_canonical_form "
135 "calling nauty_interface_matrix_int" << endl;
136 }
137
138
139 nauty_interface Nau;
140 int N;
141
142 N = Inc->nb_rows + Inc->nb_cols;
143
144
146
148 Inc->M, partition,
149 verbose_level);
150
152
154 NO->allocate(N, verbose_level);
155
156 Nau.nauty_interface_matrix_int(
157 &Enc,
158 NO,
159 verbose_level - 3);
160
161
162 // set to NULL so that we don't call free on it later:
164 NULL, NULL,
165 verbose_level);
166
167 for (i = 0; i < N; i++) {
169 }
170
172
173 if (f_v) {
174 cout << "incidence_structure_with_group::set_stabilizer_and_canonical_form "
175 "done with nauty_interface_matrix_int, "
176 "Ago=" << NO->Ago << endl;
177 }
178 if (verbose_level > 5) {
179 int h;
180 int degree = N;
182
183 for (h = 0; h < NO->Aut_counter; h++) {
184 cout << "aut generator " << h << " / "
185 << NO->Aut_counter << " : " << endl;
186 Combi.perm_print(cout, NO->Aut + h * degree, degree);
187 cout << endl;
188 }
189 }
190
191
192
193 Inc_out = Inc->apply_canonical_labeling(
194 canonical_labeling, verbose_level - 2);
195
196
197
198
199 if (f_compute_canonical_form) {
200
201 //canonical_form = Inc_out->encode_as_bitvector(canonical_form_len);
203
204 }
205
206
207
208
209
211
212 if (f_v) {
213 cout << "incidence_structure_with_group::set_stabilizer_and_canonical_form "
214 "before init_permutation_group_from_generators" << endl;
215 }
216
218 verbose_level);
219
220 if (f_vv) {
221 cout << "incidence_structure_with_group::set_stabilizer_and_canonical_form created action ";
223 cout << endl;
224 }
225 FREE_OBJECT(NO);
226
227 if (f_v) {
228 cout << "incidence_structure_with_group::set_stabilizer_and_canonical_form done" << endl;
229 }
230}
231
232}}}
233
encoding of combinatorial object for use with nauty
void init_everything(int nb_rows, int nb_cols, int *Incma, int *partition, int verbose_level)
interface for various incidence geometries
Definition: geometry.h:1099
incidence_structure * apply_canonical_labeling(long int *canonical_labeling, int verbose_level)
a permutation group in a fixed action.
Definition: actions.h:99
void init_permutation_group_from_nauty_output(data_structures::nauty_output *NO, int verbose_level)
void init(geometry::incidence_structure *Inc, int *partition, int verbose_level)
void set_stabilizer_and_canonical_form(int f_compute_canonical_form, geometry::incidence_structure *&Inc_out, int verbose_level)
#define NEW_OBJECT(type)
Definition: foundations.h:638
#define FREE_OBJECT(p)
Definition: foundations.h:651
#define FALSE
Definition: foundations.h:234
#define Int_vec_copy_to_lint(A, B, C)
Definition: foundations.h:722
#define FREE_lint(p)
Definition: foundations.h:642
#define NEW_lint(n)
Definition: foundations.h:628
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
the orbiter library for the classification of combinatorial objects