20namespace layer3_group_actions {
29static long int matrix_group_element_image_of(action &A,
long int a,
30 void *elt,
int verbose_level);
31static void matrix_group_element_image_of_low_level(action &A,
32 int *input,
int *output,
void *elt,
int verbose_level);
33static int matrix_group_element_linear_entry_ij(action &A,
34 void *elt,
int i,
int j,
int verbose_level);
35static int matrix_group_element_linear_entry_frobenius(action &A,
36 void *elt,
int verbose_level);
37static void matrix_group_element_one(action &A,
38 void *elt,
int verbose_level);
39static int matrix_group_element_is_one(action &A,
40 void *elt,
int verbose_level);
41static void matrix_group_element_unpack(action &A,
42 void *elt,
void *Elt,
int verbose_level);
43static void matrix_group_element_pack(action &A,
44 void *Elt,
void *elt,
int verbose_level);
45static void matrix_group_element_retrieve(action &A,
46 int hdl,
void *elt,
int verbose_level);
47static int matrix_group_element_store(action &A,
48 void *elt,
int verbose_level);
49static void matrix_group_element_mult(action &A,
50 void *a,
void *b,
void *ab,
int verbose_level);
51static void matrix_group_element_invert(action &A,
52 void *a,
void *av,
int verbose_level);
53static void matrix_group_element_transpose(action &A,
54 void *a,
void *at,
int verbose_level);
55static void matrix_group_element_move(action &A,
56 void *a,
void *b,
int verbose_level);
57static void matrix_group_element_dispose(action &A,
58 int hdl,
int verbose_level);
59static void matrix_group_element_print(action &A,
60 void *elt, std::ostream &ost);
61static void matrix_group_element_code_for_make_element(
62 action &A,
void *elt,
int *data);
63static void matrix_group_element_print_for_make_element(
64 action &A,
void *elt, std::ostream &ost);
65static void matrix_group_element_print_for_make_element_no_commas(
66 action &A,
void *elt, std::ostream &ost);
67static void matrix_group_element_print_quick(action &A,
68 void *elt, std::ostream &ost);
69static void matrix_group_element_print_latex(action &A,
70 void *elt, std::ostream &ost);
71static void matrix_group_element_print_latex_with_print_point_function(
73 void *elt, std::ostream &ost,
74 void (*point_label)(std::stringstream &sstr,
long int pt,
void *data),
75 void *point_label_data);
76static void matrix_group_element_print_as_permutation(
77 action &A,
void *elt, std::ostream &ost);
78static void matrix_group_element_print_verbose(action &A,
79 void *elt, std::ostream &ost);
80static void matrix_group_print_point(action &A,
81 long int a, std::ostream &ost);
82static void matrix_group_unrank_point(action &A,
long int rk,
int *v);
83static long int matrix_group_rank_point(action &A,
int *v);
88 label.assign(
"function_pointers_matrix_group");
108 matrix_group_element_print_latex_with_print_point_function;
111 matrix_group_element_code_for_make_element;
113 matrix_group_element_print_for_make_element;
115 matrix_group_element_print_for_make_element_no_commas;
123static long int matrix_group_element_image_of(
action &A,
124 long int a,
void *elt,
int verbose_level)
126 int f_v = (verbose_level >= 1);
128 int *Elt = (
int *) elt;
132 cout <<
"matrix_group_element_image_of "
133 "computing image of " << a << endl;
138 cout <<
"matrix_group_element_image_of "
139 "image of " << a <<
" is " << b << endl;
144static void matrix_group_element_image_of_low_level(action &A,
145 int *input,
int *output,
void *elt,
int verbose_level)
147 int f_v = (verbose_level >= 1);
148 groups::matrix_group &G = *A.G.matrix_grp;
149 int *Elt = (
int *) elt;
152 cout <<
"matrix_group_element_image_of_low_level "
153 "computing image of ";
155 cout <<
" in action " << A.label << endl;
157 G.action_from_the_right_all_types(input,
158 Elt, output, verbose_level - 1);
162 cout <<
"matrix_group_element_image_of_low_level ";
170static int matrix_group_element_linear_entry_ij(action &A,
171 void *elt,
int i,
int j,
int verbose_level)
173 int f_v = (verbose_level >= 1);
174 groups::matrix_group &G = *A.G.matrix_grp;
175 int *Elt = (
int *) elt;
179 cout <<
"matrix_group_element_linear_entry_ij "
180 "i=" << i <<
" j=" << j << endl;
182 w = G.GL_element_entry_ij(Elt, i, j);
186static int matrix_group_element_linear_entry_frobenius(action &A,
187 void *elt,
int verbose_level)
189 int f_v = (verbose_level >= 1);
190 groups::matrix_group &G = *A.G.matrix_grp;
191 int *Elt = (
int *) elt;
195 cout <<
"matrix_group_element_linear_entry_frobenius" << endl;
197 w = G.GL_element_entry_frobenius(Elt);
201static void matrix_group_element_one(action &A,
void *elt,
int verbose_level)
203 int f_v = (verbose_level >= 1);
204 groups::matrix_group &G = *A.G.matrix_grp;
205 int *Elt = (
int *) elt;
208 cout <<
"matrix_group_element_one calling GL_one" << endl;
213static int matrix_group_element_is_one(action &A,
void *elt,
int verbose_level)
215 int f_v = (verbose_level >= 1);
216 groups::matrix_group &G = *A.G.matrix_grp;
217 int *Elt = (
int *) elt;
221 cout <<
"matrix_group_element_is_one" << endl;
223 if (G.f_kernel_is_diagonal_matrices) {
224 f_is_one = G.GL_is_one(Elt);
226 else if (!G.f_projective) {
227 f_is_one = G.GL_is_one(Elt);
230 cout <<
"matrix_group_element_is_one: warning: "
231 "using slow identity element test" << endl;
233 for (i = 0; i < A.degree; i++) {
234 j = A.element_image_of(i, elt,
FALSE);
243 cout <<
"matrix_group_element_is_one "
244 "returns YES" << endl;
247 cout <<
"matrix_group_element_is_one "
248 "returns NO" << endl;
254static void matrix_group_element_unpack(action &A,
255 void *elt,
void *Elt,
int verbose_level)
257 int f_v = (verbose_level >= 1);
258 groups::matrix_group &G = *A.G.matrix_grp;
259 int *Elt1 = (
int *) Elt;
263 cout <<
"matrix_group_element_unpack" << endl;
265 G.GL_unpack(elt1, Elt1, verbose_level - 1);
268static void matrix_group_element_pack(action &A,
269 void *Elt,
void *elt,
int verbose_level)
271 int f_v = (verbose_level >= 1);
272 groups::matrix_group &G = *A.G.matrix_grp;
273 int *Elt1 = (
int *) Elt;
277 cout <<
"matrix_group_element_pack" << endl;
279 G.GL_pack(Elt1, elt1);
282static void matrix_group_element_retrieve(action &A,
283 int hdl,
void *elt,
int verbose_level)
285 int f_v = (verbose_level >= 1);
286 groups::matrix_group &G = *A.G.matrix_grp;
287 int *Elt = (
int *) elt;
291 cout <<
"matrix_group_element_retrieve "
292 "hdl = " << hdl << endl;
294 p_elt = G.Elts->s_i(hdl);
298 G.GL_unpack(p_elt, Elt, verbose_level);
300 G.GL_print_easy(Elt, cout);
304static int matrix_group_element_store(action &A,
305 void *elt,
int verbose_level)
307 int f_v = (verbose_level >= 1);
308 groups::matrix_group &G = *A.G.matrix_grp;
309 int *Elt = (
int *) elt;
313 cout <<
"matrix_group_element_store" << endl;
315 G.GL_pack(Elt, G.elt1);
316 hdl = G.Elts->store(G.elt1);
318 cout <<
"matrix_group_element_store "
319 "hdl = " << hdl << endl;
324static void matrix_group_element_mult(action &A,
325 void *a,
void *b,
void *ab,
int verbose_level)
327 int f_v = (verbose_level >= 1);
328 int f_vv = (verbose_level >= 2);
329 groups::matrix_group &G = *A.G.matrix_grp;
332 int *AB = (
int *) ab;
335 cout <<
"matrix_group_element_mult" << endl;
338 cout <<
"A=" << endl;
339 G.GL_print_easy(AA, cout);
340 cout <<
"B=" << endl;
341 G.GL_print_easy(BB, cout);
343 G.GL_mult(AA, BB, AB, verbose_level - 2);
345 cout <<
"matrix_group_element_mult done" << endl;
348 cout <<
"AB=" << endl;
349 G.GL_print_easy(AB, cout);
353static void matrix_group_element_invert(action &A,
354 void *a,
void *av,
int verbose_level)
356 int f_v = (verbose_level >= 1);
357 int f_vv = (verbose_level >= 2);
358 groups::matrix_group &G = *A.G.matrix_grp;
360 int *AAv = (
int *) av;
363 cout <<
"matrix_group_element_invert" << endl;
366 cout <<
"A=" << endl;
367 G.GL_print_easy(AA, cout);
369 G.GL_invert(AA, AAv);
371 cout <<
"matrix_group_element_invert done" << endl;
374 cout <<
"Av=" << endl;
375 G.GL_print_easy(AAv, cout);
379static void matrix_group_element_transpose(action &A,
380 void *a,
void *at,
int verbose_level)
382 int f_v = (verbose_level >= 1);
383 int f_vv = (verbose_level >= 2);
384 groups::matrix_group &G = *A.G.matrix_grp;
386 int *Atv = (
int *) at;
389 cout <<
"matrix_group_element_transpose" << endl;
392 cout <<
"A=" << endl;
393 G.GL_print_easy(AA, cout);
395 G.GL_transpose(AA, Atv, verbose_level);
397 cout <<
"matrix_group_element_transpose done" << endl;
400 cout <<
"At=" << endl;
401 G.GL_print_easy(Atv, cout);
405static void matrix_group_element_move(action &A,
406 void *a,
void *b,
int verbose_level)
408 int f_v = (verbose_level >= 1);
409 groups::matrix_group &G = *A.G.matrix_grp;
414 cout <<
"matrix_group_element_move" << endl;
419static void matrix_group_element_dispose(action &A,
420 int hdl,
int verbose_level)
422 int f_v = (verbose_level >= 1);
423 groups::matrix_group &G = *A.G.matrix_grp;
426 cout <<
"matrix_group_element_dispose "
427 "hdl = " << hdl << endl;
429 G.Elts->dispose(hdl);
432static void matrix_group_element_print(action &A,
433 void *elt, ostream &ost)
435 groups::matrix_group &G = *A.G.matrix_grp;
436 int *Elt = (
int *) elt;
439 G.GL_print_easy(Elt, ost);
443 G.GL_print_easy_normalized(Elt, ost);
451 n = A.find_fixed_points(elt, fp, 0);
452 cout <<
"with " << n <<
" fixed points ";
453 A.element_print_base_images(Elt, ost);
462 matrix_group_element_print_as_permutation(A, elt, ost);
468static void matrix_group_element_code_for_make_element(action &A,
469 void *elt,
int *data)
471 groups::matrix_group &G = *A.G.matrix_grp;
472 int *Elt = (
int *) elt;
476 G.GL_code_for_make_element(Elt, data);
481static void matrix_group_element_print_for_make_element(action &A,
482 void *elt, ostream &ost)
484 groups::matrix_group &G = *A.G.matrix_grp;
485 int *Elt = (
int *) elt;
489 G.GL_print_for_make_element(Elt, ost);
494static void matrix_group_element_print_for_make_element_no_commas(
495 action &A,
void *elt, ostream &ost)
497 groups::matrix_group &G = *A.G.matrix_grp;
498 int *Elt = (
int *) elt;
502 G.GL_print_for_make_element_no_commas(Elt, ost);
507static void matrix_group_element_print_quick(action &A,
508 void *elt, ostream &ost)
510 groups::matrix_group &G = *A.G.matrix_grp;
511 int *Elt = (
int *) elt;
515 G.GL_print_easy(Elt, ost);
521 G.GL_print_easy_normalized(Elt, ost);
526 A.element_print_base_images_verbose(Elt, ost, 0);
536 matrix_group_element_print_as_permutation(A, elt, ost);
541static void matrix_group_element_print_latex(action &A,
542 void *elt, ostream &ost)
544 groups::matrix_group &G = *A.G.matrix_grp;
545 int *Elt = (
int *) elt;
547 G.GL_print_latex(Elt, ost);
550 G.GL_print_easy_latex_with_option_numerical(Elt,
TRUE, ost);
553static void matrix_group_element_print_latex_with_print_point_function(
555 void *elt, std::ostream &ost,
556 void (*point_label)(std::stringstream &sstr,
long int pt,
void *data),
557 void *point_label_data)
559 groups::matrix_group &G = *A.G.matrix_grp;
560 int *Elt = (
int *) elt;
562 G.GL_print_latex(Elt, ost);
566static void matrix_group_element_print_as_permutation(action &A,
567 void *elt, ostream &ost)
571 int *Elt = (
int *) elt;
576 cout <<
"matrix_group_element_print_as_permutation "
577 "degree = " << A.degree << endl;
580 for (i = 0; i < A.degree; i++) {
587 j = A.element_image_of(i, Elt, 0 );
594static void matrix_group_element_print_verbose(action &A,
595 void *elt, ostream &ost)
597 groups::matrix_group &G = *A.G.matrix_grp;
598 int *Elt = (
int *) elt;
601 G.GL_print_easy(Elt, ost);
605 if (A.degree < 100) {
607 for (i = 0; i < A.degree; i++) {
608 j = A.element_image_of(i, Elt,
FALSE);
616 cout <<
"i : image" << endl;
617 for (i = 0; i <
MINIMUM(40, G.degree); i++) {
618 j = A.element_image_of(i, Elt,
FALSE);
619 cout << i <<
" : " << j << endl;
626static void matrix_group_print_point(action &A,
long int a, ostream &ost)
628 groups::matrix_group *G = A.G.matrix_grp;
631 cout <<
"matrix_group_print_point" << endl;
632 if (G->f_projective) {
633 G->GFq->PG_element_unrank_modified_lint(G->v1, 1, G->n, a);
635 else if (G->f_affine) {
638 else if (G->f_general_linear) {
642 cout <<
"matrix_group_print_point unknown group type" << endl;
648static void matrix_group_unrank_point(action &A,
long int rk,
int *v)
650 groups::matrix_group *G = A.G.matrix_grp;
653 if (G->f_projective) {
654 G->GFq->PG_element_unrank_modified(v, 1 , G->n, rk);
656 else if (G->f_affine) {
659 else if (G->f_general_linear) {
663 cout <<
"matrix_group_unrank_point unknown group type" << endl;
668static long int matrix_group_rank_point(action &A,
int *v)
670 groups::matrix_group *G = A.G.matrix_grp;
674 if (G->f_projective) {
675 G->GFq->PG_element_rank_modified_lint(v, 1 , G->n, rk);
677 else if (G->f_affine) {
680 else if (G->f_general_linear) {
684 cout <<
"matrix_group_unrank_point unknown group type" << endl;
a collection of combinatorial functions
void perm_print(std::ostream &ost, int *a, int n)
various functions related to geometries
void AG_element_unrank(int q, int *v, int stride, int len, long int a)
long int AG_element_rank(int q, int *v, int stride, int len)
long int(* ptr_rank_point)(action &A, int *v)
void(* ptr_element_print_for_make_element)(action &A, void *elt, std::ostream &ost)
void(* ptr_element_dispose)(action &A, int hdl, int verbose_level)
int(* ptr_element_linear_entry_frobenius)(action &A, void *elt, int verbose_level)
void(* ptr_unrank_point)(action &A, long int rk, int *v)
void(* ptr_element_transpose)(action &A, void *a, void *at, int verbose_level)
void(* ptr_element_print)(action &A, void *elt, std::ostream &ost)
void(* ptr_element_print_latex_with_print_point_function)(action &A, void *elt, std::ostream &ost, void(*point_label)(std::stringstream &sstr, long int pt, void *data), void *point_label_data)
void(* ptr_element_print_quick)(action &A, void *elt, std::ostream &ost)
int(* ptr_element_linear_entry_ij)(action &A, void *elt, int i, int j, int verbose_level)
void(* ptr_element_unpack)(action &A, void *elt, void *Elt, int verbose_level)
void(* ptr_element_move)(action &A, void *a, void *b, int verbose_level)
void(* ptr_element_image_of_low_level)(action &A, int *input, int *output, void *elt, int verbose_level)
int(* ptr_element_is_one)(action &A, void *elt, int verbose_level)
void init_function_pointers_matrix_group()
long int(* ptr_element_image_of)(action &A, long int a, void *elt, int verbose_level)
void(* ptr_element_print_for_make_element_no_commas)(action &A, void *elt, std::ostream &ost)
void(* ptr_print_point)(action &A, long int i, std::ostream &ost)
void(* ptr_element_invert)(action &A, void *a, void *av, int verbose_level)
void(* ptr_element_print_latex)(action &A, void *elt, std::ostream &ost)
void(* ptr_element_one)(action &A, void *elt, int verbose_level)
void(* ptr_element_print_verbose)(action &A, void *elt, std::ostream &ost)
void(* ptr_element_code_for_make_element)(action &A, void *elt, int *data)
void(* ptr_element_retrieve)(action &A, int hdl, void *elt, int verbose_level)
void(* ptr_element_pack)(action &A, void *Elt, void *elt, int verbose_level)
int(* ptr_element_store)(action &A, void *elt, int verbose_level)
void(* ptr_element_mult)(action &A, void *a, void *b, void *ab, int verbose_level)
a permutation group in a fixed action.
a matrix group over a finite field in projective, vector space or affine action
long int image_of_element(int *Elt, long int a, int verbose_level)
#define Int_vec_print(A, B, C)
the orbiter library for the classification of combinatorial objects
groups::matrix_group * matrix_grp