Orbiter 2022
Combinatorial Objects
action_on_determinant.cpp
Go to the documentation of this file.
1// action_on_determinant.cpp
2//
3// Anton Betten
4// January 16, 2009
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}
31
33{
34
35 null();
36}
37
38
40 int f_projective, int m, int verbose_level)
41{
42 int f_v = (verbose_level >= 1);
45
46 if (f_v) {
47 cout << "action_on_determinant::init" << endl;
48 cout << "f_projective=" << f_projective << endl;
49 cout << "m=" << m << endl;
50 }
53 if (A.type_G != matrix_group_t) {
54 cout << "action_on_determinant::init action "
55 "not of matrix group type" << endl;
56 exit(1);
57 }
58 M = A.G.matrix_grp;
59 q = M->GFq->q;
60 if (f_projective) {
61 degree = NT.gcd_lint(m, q - 1);
62 }
63 else {
64 degree = q - 1;
65 }
66 if (f_v) {
67 cout << "degree=" << degree << endl;
68 }
69
70 if (f_v) {
71 cout << "action_on_determinant::init field order is " << q << endl;
72 }
73}
74
76 int *Elt, long int i, int verbose_level)
77{
78 //verbose_level = 1;
79 int f_v = (verbose_level >= 1);
80 long int a, b, c, l = 0, j;
81
82 if (f_v) {
83 cout << "action_on_determinant::compute_image "
84 "i = " << i << endl;
85 }
86 if (i < 0 || i >= degree) {
87 cout << "action_on_determinant::compute_image "
88 "i = " << i << " out of range" << endl;
89 exit(1);
90 }
91 if (f_projective) {
92 a = M->GFq->alpha_power(i);
93 }
94 else {
95 a = i + 1;
96 }
97 b = M->GFq->Linear_algebra->matrix_determinant(Elt, M->n, 0);
98 c = M->GFq->mult(a, b);
99 if (f_projective) {
100 l = M->GFq->log_alpha(c);
101 j = l % degree;
102 }
103 else {
104 j = c - 1;
105 }
106 if (f_v) {
107 cout << "action_on_determinant::compute_image "
108 "det = " << b << endl;
109 cout << "action_on_determinant::compute_image "
110 << a << " * " << b << " = " << c << endl;
111 if (f_projective) {
112 cout << "f_projective, a = " << a
113 << " l = " << l << " c = " << c << endl;
114 }
115 cout << "image of " << i << " is " << j << endl;
116 }
117 return j;
118}
119
120}}}
121
int matrix_determinant(int *A, int n, int verbose_level)
a class to represent arbitrary precision integers
Definition: ring_theory.h:366
a permutation group in a fixed action.
Definition: actions.h:99
void init(actions::action &A, int f_projective, int m, int verbose_level)
long int compute_image(actions::action *A, int *Elt, long int i, int verbose_level)
the orbiter library for the classification of combinatorial objects