Orbiter 2022
Combinatorial Objects
action_on_andre.cpp
Go to the documentation of this file.
1// action_on_andre.cpp
2//
3// Anton Betten
4// June 2, 2013
5
7#include "group_actions.h"
8
9using namespace std;
10
11
12namespace orbiter {
13namespace layer3_group_actions {
14namespace induced_actions {
15
16
18{
19 null();
20}
21
23{
24 free();
25}
26
28{
29 An = NULL;
30 An1 = NULL;
31 Andre = NULL;
32 coords1 = NULL;
33 coords2 = NULL;
34 coords3 = NULL;
35}
36
38{
39 if (coords1) {
41 }
42 if (coords2) {
44 }
45 if (coords3) {
47 }
48 null();
49}
50
52 geometry::andre_construction *Andre, int verbose_level)
53{
54 int f_v = (verbose_level >= 1);
55
56 if (f_v) {
57 cout << "action_on_andre::init" << endl;
58 }
65 k1 = k + 1;
66 n1 = n + 1;
67 N = Andre->N;
68 degree = Andre->N * 2;
69 coords1 = NEW_int(k1 * n1);
70 coords2 = NEW_int(k1 * n1);
71 coords3 = NEW_int(k * n);
72 if (f_v) {
73 cout << "action_on_andre::init degree=" << degree << endl;
74 }
75 if (f_v) {
76 cout << "action_on_andre::init done" << endl;
77 }
78}
79
80long int action_on_andre::compute_image(int *Elt, long int i, int verbose_level)
81{
82 int f_v = (verbose_level >= 1);
83 long int a, j;
84
85 if (f_v) {
86 cout << "action_on_andre::compute_image" << endl;
87 }
88 if (i < N) {
89 a = compute_image_of_point(Elt, i, verbose_level);
90 j = a;
91 }
92 else {
93 a = compute_image_of_line(Elt, i - N, verbose_level);
94 j = N + a;
95 }
96 if (f_v) {
97 cout << "action_on_andre::compute_image done" << endl;
98 }
99 return j;
100}
101
103 long int pt_idx, int verbose_level)
104{
105 int f_v = (verbose_level >= 1);
107 long int i, image, rk, parallel_class_idx;
108 int idx;
110
111 if (f_v) {
112 cout << "action_on_andre::compute_image_of_point" << endl;
113 }
114 Pt.init(Andre, 0 /* verbose_level*/);
115 Pt.unrank(pt_idx, 0 /* verbose_level*/);
116 if (Pt.f_is_at_infinity) {
117 if (f_v) {
118 cout << "action_on_andre::compute_image_of_point "
119 "point is at infinity, at_infinity_idx="
120 << Pt.at_infinity_idx << endl;
121 }
122 for (i = 0; i < k; i++) {
124 Pt.at_infinity_idx * k * n + i * n, coords1 + i * n1, n);
125 coords1[i * n1 + n] = 0;
126 }
127 if (f_v) {
128 cout << "Spread element embedded:" << endl;
130 }
131 for (i = 0; i < k; i++) {
133 coords2 + i * n1, Elt, verbose_level - 1);
134 }
135 if (f_v) {
136 cout << "Image of spread element:" << endl;
138 }
139 for (i = 0; i < k; i++) {
140 Int_vec_copy(coords2 + i * n1, coords3 + i * n, n);
141 }
142 if (f_v) {
143 cout << "Reduced:" << endl;
145 }
146 rk = Andre->Grass->rank_lint_here(coords3, 0 /* verbose_level*/);
147 if (f_v) {
148 cout << "rk=" << rk << endl;
149 }
150 if (!Sorting.lint_vec_search(
152 Andre->spread_size, rk, idx, 0)) {
153 cout << "andre_construction_line_element::rank "
154 "cannot find the spread element in the sorted list" << endl;
155 exit(1);
156 }
157 if (f_v) {
158 cout << "idx=" << idx << endl;
159 }
160 parallel_class_idx = Andre->spread_elements_perm_inv[idx];
161 if (f_v) {
162 cout << "parallel_class_idx=" << parallel_class_idx << endl;
163 }
164 image = parallel_class_idx;
165 }
166 else {
168 coords1[n] = 1;
169
171 Elt, verbose_level - 1);
172
175 image = Pt.rank(0 /* verbose_level*/);
176 }
177
178 if (f_v) {
179 cout << "action_on_andre::compute_image_of_point done" << endl;
180 }
181 return image;
182}
183
185 long int line_idx, int verbose_level)
186{
187 int f_v = (verbose_level >= 1);
189 int i, j, image;
190
191 if (f_v) {
192 cout << "action_on_andre::compute_image_of_line" << endl;
193 }
194 Line.init(Andre, 0 /* verbose_level*/);
195 Line.unrank(line_idx, 0 /* verbose_level*/);
196 if (Line.f_is_at_infinity) {
197 image = 0;
198 }
199 else {
200 for (i = 0; i < k1; i++) {
201 for (j = 0; j < n; j++) {
202 coords1[i * n1 + j] = Line.coordinates[i * n + j];
203 }
204 if (i < k) {
205 coords1[i * n1 + n] = 0;
206 }
207 else {
208 coords1[i * n1 + n] = 1;
209 }
210 }
211
212 for (i = 0; i < k1; i++) {
214 coords2 + i * n1, Elt, verbose_level - 1);
215 }
216
217 for (i = 0; i < k; i++) {
218 if (coords2[i * n1 + n]) {
219 cout << "action_on_andre::compute_image_of_line "
220 "coords2[i * n1 + n]" << endl;
221 exit(1);
222 }
223 }
224
226
227 for (i = 0; i < k1; i++) {
228 for (j = 0; j < n; j++) {
229 Line.coordinates[i * n + j] = coords2[i * n1 + j];
230 }
231 }
232 image = Line.rank(0 /* verbose_level*/);
233 }
234
235 if (f_v) {
236 cout << "action_on_andre::compute_image_of_line done" << endl;
237 }
238 return image;
239}
240
241}}}
242
243
a collection of functions related to sorted vectors
int lint_vec_search(long int *v, int len, long int a, int &idx, int verbose_level)
Definition: sorting.cpp:1157
a line in the projective plane created using the Andre construction
Definition: geometry.h:104
a point in the projective plane created using the Andre construction
Definition: geometry.h:75
Andre / Bruck / Bose construction of a translation plane from a spread.
Definition: geometry.h:28
long int rank_lint_here(int *Mtx, int verbose_level)
Definition: grassmann.cpp:275
a permutation group in a fixed action.
Definition: actions.h:99
void element_image_of_low_level(int *input, int *output, void *elt, int verbose_level)
Definition: action_cb.cpp:209
long int compute_image(int *Elt, long int i, int verbose_level)
long int compute_image_of_line(int *Elt, long int line_idx, int verbose_level)
void init(actions::action *An, actions::action *An1, geometry::andre_construction *Andre, int verbose_level)
long int compute_image_of_point(int *Elt, long int pt_idx, int verbose_level)
#define FREE_int(p)
Definition: foundations.h:640
#define NEW_int(n)
Definition: foundations.h:625
#define Int_matrix_print(A, B, C)
Definition: foundations.h:707
#define Int_vec_copy(A, B, C)
Definition: foundations.h:693
the orbiter library for the classification of combinatorial objects