Orbiter 2022
Combinatorial Objects
action_on_homogeneous_polynomials.cpp
Go to the documentation of this file.
1// action_on_homogeneous_polynomials.cpp
2//
3// Anton Betten
4// September 10, 2016
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 A = NULL;
30 HPD = NULL;
31 M = NULL;
32 F = NULL;
33 v1 = NULL;
34 v2 = NULL;
35 v3 = NULL;
36 Elt1 = NULL;
39 Equations = NULL;
40 nb_equations = 0;
41}
42
44{
45 if (v1) {
46 FREE_int(v1);
47 }
48 if (v2) {
49 FREE_int(v2);
50 }
51 if (v3) {
52 FREE_int(v3);
53 }
54 if (Elt1) {
56 }
57 if (Equations) {
59 }
60 null();
61}
62
64 ring_theory::homogeneous_polynomial_domain *HPD, int verbose_level)
65{
66 int f_v = (verbose_level >= 1);
68
69 if (f_v) {
70 cout << "action_on_homogeneous_polynomials::init" << endl;
71 cout << "starting with action " << A->label << endl;
72 }
73 if (A->type_G != matrix_group_t) {
74 cout << "action_on_homogeneous_polynomials::init "
75 "fatal: A->type_G != matrix_group_t" << endl;
76 exit(1);
77 }
80 M = A->G.matrix_grp;
81 F = M->GFq;
82 n = M->n;
83 q = F->q;
86 if (f_v) {
87 cout << "action_on_homogeneous_polynomials::init "
88 "dimension = " << dimension << endl;
89 cout << "action_on_homogeneous_polynomials::init "
90 "degree = " << degree << endl;
91 }
97}
98
100 int *Equations, int nb_equations, int verbose_level)
101{
102 int f_v = (verbose_level >= 1);
103 int i;
104
105 if (f_v) {
106 cout << "action_on_homogeneous_polynomials::init_invariant_set_of_equations" << endl;
107 cout << "nb_equations = " << nb_equations << endl;
108 }
116 for (i = 0; i < nb_equations; i++) {
118 }
120 if (f_v) {
121 cout << "action_on_homogeneous_polynomials::init_invariant_set_of_equations done" << endl;
122 }
123}
124
126{
127 HPD->unrank_coeff_vector(v, rk);
128 //PG_element_unrank_modified(*F, v, 1, dimension, rk);
129}
130
132{
133#if 0
134 int rk;
135
136 PG_element_rank_modified(*F, v, 1, dimension, rk);
137 return rk;
138#else
139 return HPD->rank_coeff_vector(v);
140#endif
141}
142
144 int *Elt, long int a, int verbose_level)
145{
146 int f_v = (verbose_level >= 1);
147 int f_vv = (verbose_level >= 2);
148 int b;
150
151 if (f_v) {
152 cout << "action_on_homogeneous_polynomials::compute_image_int "
153 "verbose_level=" << verbose_level << endl;
154 }
155 if (f_invariant_set) {
157 }
158 else {
159 unrank_point(v1, a);
160 }
161 if (f_vv) {
162 cout << "action_on_homogeneous_polynomials::compute_image_int "
163 "a = " << a << " v1 = ";
164 Int_vec_print(cout, v1, dimension);
165 cout << endl;
166 }
167
168 compute_image_int_low_level(Elt, v1, v2, verbose_level);
169 if (f_vv) {
170 cout << " v2 = v1 * A = ";
171 Int_vec_print(cout, v2, dimension);
172 cout << endl;
173 }
174
175 if (f_invariant_set) {
177 for (b = 0; b < nb_equations; b++) {
178 if (Sorting.int_vec_compare(Equations + b * dimension, v2, dimension) == 0) {
179 break;
180 }
181 }
182 if (b == nb_equations) {
183 cout << "action_on_homogeneous_polynomials::compute_image_int "
184 "could not find equation" << endl;
185 cout << "action_on_homogeneous_polynomials::compute_image_int "
186 "a = " << a << " v1 = " << endl;
187 Int_vec_print(cout, v1, dimension);
188 cout << endl;
189 cout << " v2 = v1 * A = " << endl;
190 Int_vec_print(cout, v2, dimension);
191 cout << endl;
192 cout << "A=" << endl;
193 A->element_print_quick(Elt, cout);
194 cout << "equations:" << endl;
195 for (b = 0; b < nb_equations; b++) {
196 cout << setw(3) << b << " : ";
198 cout << endl;
199 }
200 exit(1);
201 }
202 }
203 else {
204 b = rank_point(v2);
205 }
206 if (f_v) {
207 cout << "action_on_homogeneous_polynomials::compute_image_int "
208 "done " << a << "->" << b << endl;
209 }
210 return b;
211}
212
214 int *Elt, int *input, int *output, int verbose_level)
215{
216 int f_v = (verbose_level >= 1);
217 int f_vv = (verbose_level >= 2);
218 int f_semilinear;
220 int n;
221
222 if (f_v) {
223 cout << "action_on_homogeneous_polynomials::compute_image_int_low_level" << endl;
224 }
225 if (f_vv) {
226 cout << "action_on_homogeneous_polynomials::compute_image_int_low_level "
227 "input = ";
228 Int_vec_print(cout, input, dimension);
229 cout << endl;
230 }
231
232 if (A->type_G != matrix_group_t) {
233 cout << "action_on_homogeneous_polynomials::compute_image_int_low_level "
234 "A->type_G != matrix_group_t" << endl;
235 exit(1);
236 }
237
238 mtx = A->G.matrix_grp;
239 f_semilinear = mtx->f_semilinear;
240 n = mtx->n;
241
242
243 A->element_invert(Elt, Elt1, 0);
244
245
246 if (f_semilinear) {
247 HPD->substitute_semilinear(input, output,
248 f_semilinear, Elt[n * n], Elt1, 0 /* verbose_level */);
249 }
250 else {
251 HPD->substitute_linear(input, output, Elt1, 0 /* verbose_level */);
252 }
253
254 if (f_vv) {
255 cout << "action_on_homogeneous_polynomials::compute_image_int_low_level "
256 "output = ";
257 Int_vec_print(cout, output, dimension);
258 cout << endl;
259 }
260 if (f_v) {
261 cout << "action_on_homogeneous_polynomials::compute_image_int_low_level done" << endl;
262 }
263}
264
266 int *Elt, int *M, int verbose_level)
267{
268 int f_v = (verbose_level >= 1);
269 int i;
270
271 if (f_v) {
272 cout << "action_on_homogeneous_polynomials::compute_representation" << endl;
273 }
274 if (A->type_G != matrix_group_t) {
275 cout << "action_on_homogeneous_polynomials::compute_representation "
276 "A->type_G != matrix_group_t" << endl;
277 exit(1);
278 }
279
280
281 for (i = 0; i < dimension; i++) {
283 v1[i] = 1;
285 Elt, v1, M + i * dimension, 0 /* verbose_level */);
286 }
287
288 if (f_v) {
289 cout << "action_on_homogeneous_polynomials::compute_representation done" << endl;
290 }
291}
292
293
294}}}
295
296
a collection of functions related to sorted vectors
various functions related to geometries
Definition: geometry.h:721
homogeneous polynomials of a given degree in a given number of variables over a finite field GF(q)
Definition: ring_theory.h:88
void substitute_semilinear(int *coeff_in, int *coeff_out, int f_semilinear, int frob_power, int *Mtx_inv, int verbose_level)
void substitute_linear(int *coeff_in, int *coeff_out, int *Mtx_inv, int verbose_level)
a permutation group in a fixed action.
Definition: actions.h:99
void element_print_quick(void *elt, std::ostream &ost)
Definition: action_cb.cpp:353
void element_invert(void *a, void *av, int verbose_level)
Definition: action_cb.cpp:322
a matrix group over a finite field in projective, vector space or affine action
Definition: groups.h:318
void init(actions::action *A, ring_theory::homogeneous_polynomial_domain *HPD, 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 TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#define Int_vec_copy(A, B, C)
Definition: foundations.h:693
#define Int_vec_print(A, B, C)
Definition: foundations.h:685
the orbiter library for the classification of combinatorial objects