Orbiter 2022
Combinatorial Objects
action_by_representation.cpp
Go to the documentation of this file.
1// action_by_representation.cpp
2//
3// Anton Betten
4// Mar18, 2010
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 M = NULL;
30 F = NULL;
31 v1 = NULL;
32 v2 = NULL;
33 v3 = NULL;
35}
36
38{
39 if (v1) {
40 FREE_int(v1);
41 }
42 if (v2) {
43 FREE_int(v2);
44 }
45 if (v3) {
46 FREE_int(v3);
47 }
48 null();
49}
50
52 actions::action &A, int verbose_level)
53{
54 int f_v = (verbose_level >= 1);
56
57 if (f_v) {
58 cout << "action_by_representation::init_action_on_conic" << endl;
59 cout << "starting with action " << A.label << endl;
60 }
61 if (A.type_G != matrix_group_t) {
62 cout << "action_by_representation::init "
63 "fatal: A.type_G != matrix_group_t" << endl;
64 exit(1);
65 }
66 M = A.G.matrix_grp;
67 F = M->GFq;
68 n = M->n;
69 q = F->q;
70 if (n != 2) {
71 cout << "action_by_representation::init_action_on_conic needs n == 2" << endl;
72 exit(1);
73 }
75 dimension = 3;
81}
82
84 actions::action &A, int *Elt, long int a, int verbose_level)
85{
86 int f_v = (verbose_level >= 1);
87 int f_vv = (verbose_level >= 2);
88 long int b;
89
90 if (f_v) {
91 cout << "action_by_representation::compute_image_int" << endl;
92 }
94 if (f_vv) {
95 cout << "action_by_representation::compute_image_int "
96 "a = " << a << " v1 = ";
98 cout << endl;
99 }
100
101 compute_image_int_low_level(A, Elt, v1, v2, verbose_level);
102 if (f_vv) {
103 cout << " v2=v1 * A=";
104 Int_vec_print(cout, v2, dimension);
105 cout << endl;
106 }
107
109 if (f_v) {
110 cout << "action_by_representation::compute_image_int "
111 "done " << a << "->" << b << endl;
112 }
113 return b;
114}
115
117 actions::action &A, int *Elt, int *input, int *output, int verbose_level)
118{
119 int *x = input;
120 int *xA = output;
121 int f_v = (verbose_level >= 1);
122 int f_vv = (verbose_level >= 2);
123 int i, f;
124
125 if (f_v) {
126 cout << "action_by_representation::compute_image_int_low_level"
127 << endl;
128 }
129 if (f_vv) {
130 cout << "action_by_representation::compute_image_int_low_level: "
131 "x=";
132 Int_vec_print(cout, x, dimension);
133 cout << endl;
134 }
135 int a, b, c, d;
136
137 a = Elt[0];
138 b = Elt[1];
139 c = Elt[2];
140 d = Elt[3];
141
142 int AA[9];
143 int two;
144
145 two = F->add(1, 1);
146 AA[0] = F->mult(a, a);
147 AA[2] = F->mult(b, b);
148 AA[6] = F->mult(c, c);
149 AA[8] = F->mult(d, d);
150 AA[1] = F->mult(a, b);
151 AA[7] = F->mult(c, d);
152 AA[3] = F->product3(two, a, c);
153 AA[5] = F->product3(two, b, d);
154 AA[4] = F->add(F->mult(a, d), F->mult(b, c));
155
156 if (f_v) {
157 cout << "A=" << endl;
159 AA, 3, 3, 3, F->log10_of_q);
160 }
161 F->Linear_algebra->mult_matrix_matrix(x, AA, xA, 1, 3, 3,
162 0 /* verbose_level */);
163 if (f_vv) {
164 cout << "action_by_representation::compute_image_int_low_level: "
165 "xA=";
166 Int_vec_print(cout, xA, dimension);
167 cout << endl;
168 }
169 if (M->f_semilinear) {
170 f = Elt[n * n];
171 for (i = 0; i < dimension; i++) {
172 xA[i] = F->frobenius_power(xA[i], f);
173 }
174 if (f_vv) {
175 cout << "after " << f << " field automorphisms: xA=";
176 Int_vec_print(cout, xA, dimension);
177 cout << endl;
178 }
179 }
180 if (f_v) {
181 cout << "action_by_representation::compute_image_int_low_level "
182 "done" << endl;
183 }
184}
185
187 long int a, int *v, int verbose_level)
188{
190}
191
193 int *v, int verbose_level)
194{
195 long int a;
196
198 return a;
199}
200
201}}}
202
203
void PG_element_unrank_modified_lint(int *v, int stride, int len, long int a)
void PG_element_rank_modified_lint(int *v, int stride, int len, long int &a)
various functions related to geometries
Definition: geometry.h:721
void mult_matrix_matrix(int *A, int *B, int *C, int m, int n, int o, int verbose_level)
a permutation group in a fixed action.
Definition: actions.h:99
long int compute_image_int(actions::action &A, int *Elt, long int a, int verbose_level)
void compute_image_int_low_level(actions::action &A, int *Elt, int *input, int *output, int verbose_level)
#define FREE_int(p)
Definition: foundations.h:640
#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_vec_print(A, B, C)
Definition: foundations.h:685
the orbiter library for the classification of combinatorial objects