Orbiter 2022
Combinatorial Objects
action_on_spread_set.cpp
Go to the documentation of this file.
1// action_on_spread_set.cpp
2//
3// Anton Betten
4// October 9, 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 mtx1 = NULL;
30 mtx2 = NULL;
31 Elt1 = NULL;
32 Elt2 = NULL;
33 subspace1 = NULL;
34 subspace2 = NULL;
35}
36
38{
39 if (mtx1) {
41 }
42 if (mtx2) {
44 }
45 if (Elt1) {
47 }
48 if (Elt2) {
50 }
51 if (subspace1) {
53 }
54 if (subspace2) {
56 }
57 null();
58}
59
61 actions::action *A_PGL_n_q,
62 actions::action *A_PGL_k_q, groups::sims *G_PGL_k_q,
63 int k, field_theory::finite_field *F, int verbose_level)
64// we are acting on the elements of G_PGL_k_q, so the degree of the action
65// is the order of this group.
66// A_PGL_k_q in only needed for make_element
67{
68 int f_v = (verbose_level >= 1);
70
71 if (f_v) {
72 cout << "action_on_spread_set::init" << endl;
73 }
80 n = 2 * k;
81 k2 = k * k;
83
84 if (f_v) {
85 cout << "action_on_spread_set::init" << endl;
86 cout << "k=" << k << endl;
87 cout << "n=" << n << endl;
88 cout << "q=" << q << endl;
89 cout << "low_level_point_size=" << low_level_point_size << endl;
90 }
91
93 degree = go.as_int();
94 if (f_v) {
95 cout << "action_on_spread_set::init the order of "
96 "the group of matrices is " << degree << endl;
97 }
98
101
102
103 mtx1 = NEW_int(k * k);
104 mtx2 = NEW_int(k * k);
105 subspace1 = NEW_int(k * n);
106 subspace2 = NEW_int(k * n);
107
108 if (f_v) {
109 cout << "degree = " << degree << endl;
110 cout << "low_level_point_size = " << low_level_point_size << endl;
111 }
112
113 if (f_v) {
114 cout << "action_on_spread_set::init done" << endl;
115 }
116}
117
118void action_on_spread_set::report(std::ostream &ost, int verbose_level)
119{
120 ost << "Action on spread set has degree = " << degree << "\\\\" << endl;
121 ost << "Low-level point size = " << low_level_point_size << "\\\\" << endl;
124 ost << "PGL$(" << k << "," << q << ")$ has order " << go << "\\\\" << endl;
125}
126
128 long int rk, int verbose_level)
129{
130 //verbose_level = 2;
131 int f_v = (verbose_level >= 1);
132 int f_vv = (verbose_level >= 2);
133 long int i, rk2;
134
135 if (f_v) {
136 cout << "action_on_spread_set::compute_image_int "
137 "rk = " << rk << endl;
138 }
139
140 unrank_point(rk, mtx1, verbose_level - 1);
141 matrix_to_subspace(mtx1, subspace1, verbose_level);
142
143 if (f_vv) {
144 cout << "action_on_spread_set::compute_image_int "
145 "after unrank_point" << endl;
147 subspace1, k, n, n, F->log10_of_q);
148 cout << "action_on_spread_set::compute_image_int "
149 "group element:" << endl;
150 Int_matrix_print(Elt, n, n);
151 }
152
153 for (i = 0; i < k; i++) {
155 subspace1 + i * n, subspace2 + i * n, Elt, verbose_level - 1);
156 }
157
158 if (f_vv) {
159 cout << "action_on_spread_set::compute_image_int "
160 "after applying group element" << endl;
162 subspace2, k, n, n, F->log10_of_q);
163 }
164
165 subspace_to_matrix(subspace2, mtx2, verbose_level - 1);
166 rk2 = rank_point(mtx2, verbose_level - 1);
167
168 if (f_v) {
169 cout << "action_on_spread_set::compute_image_int "
170 "image of " << rk << " is " << rk2 << endl;
171 }
172 return rk2;
173}
174
176 int *mtx, int *subspace, int verbose_level)
177{
178 int i, j;
179
180 Int_vec_zero(subspace, k * n);
181 for (i = 0; i < k; i++) {
182 subspace[i * n + i] = 1;
183 for (j = 0; j < k; j++) {
184 subspace[i * n + k + j] = mtx[i * k + j];
185 }
186 }
187}
188
190 int *subspace, int *mtx, int verbose_level)
191{
192 int f_v = (verbose_level >= 1);
193 int i, j, r;
194
195 if (f_v) {
196 cout << "action_on_spread_set::subspace_to_matrix" << endl;
197 }
198
199 r = F->Linear_algebra->Gauss_easy(subspace, k, n);
200 if (r != k) {
201 cout << "action_on_spread_set::subspace_to_matrix "
202 "r != k" << endl;
203 exit(1);
204 }
205 if (f_v) {
206 cout << "action_on_spread_set::subspace_to_matrix "
207 "after Gauss_easy" << endl;
208 }
209 for (i = 0; i < k; i++) {
210 for (j = 0; j < k; j++) {
211 mtx[i * k + j] = subspace[i * n + k + j];
212 }
213 }
214 if (f_v) {
215 cout << "action_on_spread_set::subspace_to_matrix "
216 "done" << endl;
217 }
218}
219
221 long int rk, int *mtx, int verbose_level)
222{
223 int f_v = (verbose_level >= 1);
224
225 if (f_v) {
226 cout << "action_on_spread_set::unrank_point "
227 "rk = " << rk << endl;
228 }
230 Int_vec_copy(Elt1, mtx, k * k);
231 if (f_v) {
232 cout << "action_on_spread_set::unrank_point done" << endl;
233 }
234}
235
237 int *mtx, int verbose_level)
238{
239 int f_v = (verbose_level >= 1);
240 long int rk;
241
242 if (f_v) {
243 cout << "action_on_spread_set::rank_point" << endl;
244 }
245 A_PGL_k_q->make_element(Elt2, mtx, 0 /* verbose_level */);
246
248 if (f_v) {
249 cout << "action_on_spread_set::rank_point done, rk = " << rk << endl;
250 }
251 return rk;
252}
253
255 int *Elt, int *input, int *output, int verbose_level)
256{
257 //verbose_level = 2;
258 int f_v = (verbose_level >= 1);
259 int f_vv = (verbose_level >= 2);
260 int i;
261
262 if (f_v) {
263 cout << "action_on_spread_set::compute_image_low_level" << endl;
264 }
265 if (f_vv) {
266 cout << "action_on_spread_set::compute_image_low_level "
267 "input=" << endl;
268 Int_matrix_print(input, k, k);
269 cout << "action_on_spread_set::compute_image_low_level "
270 "matrix=" << endl;
271 Int_matrix_print(Elt, n, n);
272 }
273
274 matrix_to_subspace(input, subspace1, verbose_level- 1);
275
276
277 for (i = 0; i < k; i++) {
279 subspace1 + i * n,
280 subspace2 + i * n,
281 Elt,
282 verbose_level - 2);
283 }
284 if (f_vv) {
285 cout << "action_on_spread_set::compute_image_low_level "
286 "after mult=" << endl;
288 }
289
290 subspace_to_matrix(subspace2, output, verbose_level - 1);
291
292 if (f_vv) {
293 cout << "action_on_spread_set::compute_image_low_level "
294 "output=" << endl;
295 Int_matrix_print(output, k, k);
296 }
297
298 if (f_v) {
299 cout << "action_on_spread_set::compute_image_low_level "
300 "done" << endl;
301 }
302}
303
304}}}
305
a class to represent arbitrary precision integers
Definition: ring_theory.h:366
a permutation group in a fixed action.
Definition: actions.h:99
void make_element(int *Elt, int *data, int verbose_level)
Definition: action.cpp:1875
void element_image_of_low_level(int *input, int *output, void *elt, int verbose_level)
Definition: action_cb.cpp:209
a permutation group represented via a stabilizer chain
Definition: groups.h:1273
void group_order(ring_theory::longinteger_object &go)
Definition: sims.cpp:951
void element_unrank_lint(long int rk, int *Elt, int verbose_level)
Definition: sims.cpp:1326
void subspace_to_matrix(int *subspace, int *mtx, int verbose_level)
void compute_image_low_level(int *Elt, int *input, int *output, int verbose_level)
void matrix_to_subspace(int *mtx, int *subspace, int verbose_level)
long int compute_image_int(int *Elt, long int rk, int verbose_level)
void init(actions::action *A_PGL_n_q, actions::action *A_PGL_k_q, groups::sims *G_PGL_k_q, int k, field_theory::finite_field *F, int verbose_level)
#define FREE_int(p)
Definition: foundations.h:640
#define Int_vec_zero(A, B)
Definition: foundations.h:713
#define NEW_int(n)
Definition: foundations.h:625
#define Int_vec_print_integer_matrix_width(A, B, C, D, E, F)
Definition: foundations.h:691
#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