Orbiter 2022
Combinatorial Objects
action_on_flags.cpp
Go to the documentation of this file.
1// action_on_flags.cpp
2//
3// Anton Betten
4// May 21, 2016
5
7#include "group_actions.h"
8
9
10using namespace std;
11
12
13namespace orbiter {
14namespace layer3_group_actions {
15namespace induced_actions {
16
17
19{
20 null();
21}
22
24{
25 free();
26}
27
29{
30 A = NULL;
31 type = NULL;
32 type_len = 0;
33}
34
36{
37 null();
38}
39
41 int type_len, int verbose_level)
42{
43 int f_v = (verbose_level >= 1);
44
45 if (f_v) {
46 cout << "action_on_flags::init" << endl;
47 }
51 if (!A->f_is_linear) {
52 cout << "action_on_flags::init the action must be "
53 "linear but is not" << endl;
54 exit(1);
55 }
56 n = A->dimension;
57 if (A->type_G == matrix_group_t) {
58 M = A->G.matrix_grp;
59 }
60 else {
62 M = sub->G.matrix_grp;
63 }
64 F = M->GFq;
65 if (f_v) {
66 cout << "action_on_flags::init n=" << n << " q=" << F->q << endl;
67 }
68
70 Flag->init(n, type, type_len, F, verbose_level);
71
72 degree = Flag->N;
73 if (f_v) {
74 cout << "action_on_flags::init degree = " << degree << endl;
75 }
76
77 M1 = NEW_int(n * n);
78 M2 = NEW_int(n * n);
79 if (f_v) {
80 cout << "action_on_flags::init done" << endl;
81 }
82}
83
84long int action_on_flags::compute_image(int *Elt, long int i, int verbose_level)
85{
86 int f_v = (verbose_level >= 1);
87 long int h, j;
88
89 if (f_v) {
90 cout << "action_on_flags::compute_image "
91 "i = " << i << endl;
92 }
93 if (i < 0 || i >= degree) {
94 cout << "action_on_flags::compute_image "
95 "i = " << i << " out of range" << endl;
96 exit(1);
97 }
98 if (f_v) {
99 cout << "Elt=" << endl;
100 A->element_print_quick(Elt, cout);
101 }
102 Flag->unrank(i, M1, 0 /*verbose_level*/);
103 if (f_v) {
104 cout << "action_on_flags::compute_image M1=" << endl;
106 }
107 if (f_v) {
108 cout << "action_on_flags::compute_image "
109 "before image_of_low_level" << endl;
110 }
111 for (h = 0; h < Flag->K; h++) {
113 M1 + h * n, M2 + h * n, verbose_level - 1);
114 }
115 if (f_v) {
116 cout << "action_on_flags::compute_image "
117 "after image_of_low_level" << endl;
118 }
119 if (f_v) {
120 cout << "action_on_flags::compute_image M2=" << endl;
122 }
123 j = Flag->rank(M2, 0 /*verbose_level*/);
124
125 if (f_v) {
126 cout << "action_on_flags::compute_image "
127 << i << " maps to " << j << endl;
128 }
129 return j;
130}
131
132
133}}}
134
a maximal chain of subspaces
Definition: geometry.h:522
void unrank(long int rk, int *subspace, int verbose_level)
Definition: flag.cpp:168
void init(int n, int *type, int type_len, field_theory::finite_field *F, int verbose_level)
Definition: flag.cpp:76
long int rank(int *subspace, int verbose_level)
Definition: flag.cpp:252
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 image_of_low_level(void *elt, int *input, int *output, int verbose_level)
Definition: action_cb.cpp:23
long int compute_image(int *Elt, long int i, int verbose_level)
void init(actions::action *A, int *type, int type_len, int verbose_level)
#define NEW_OBJECT(type)
Definition: foundations.h:638
#define NEW_int(n)
Definition: foundations.h:625
#define Int_matrix_print(A, B, C)
Definition: foundations.h:707
the orbiter library for the classification of combinatorial objects