Orbiter 2022
Combinatorial Objects
gl_class_rep.cpp
Go to the documentation of this file.
1/*
2 * gl_class_rep.cpp
3 *
4 * Created on: Feb 9, 2019
5 * Author: betten
6 */
7
8
9
10#include "foundations.h"
11
12using namespace std;
13
14
15namespace orbiter {
16namespace layer1_foundations {
17namespace algebra {
18
19
20
22{
23 type_coding = NULL;
24 centralizer_order = NULL;
25 class_length = NULL;
26}
27
29{
30 if (type_coding) {
32 }
35 }
36 if (class_length) {
38 }
39}
40
41void gl_class_rep::init(int nb_irred, int *Select_polynomial,
42 int *Select_partition, int verbose_level)
43{
44 int f_v = (verbose_level >= 1);
45 int l, i;
46
47 if (f_v) {
48 cout << "gl_class_rep::init" << endl;
49 }
50 l = 0;
51 for (i = 0; i < nb_irred; i++) {
52 if (Select_polynomial[i]) {
53 l++;
54 }
55 }
57
58 type_coding->allocate(l, 3);
59 l = 0;
60 for (i = 0; i < nb_irred; i++) {
61 if (Select_polynomial[i]) {
62 type_coding->s_ij(l, 0) = i;
63 type_coding->s_ij(l, 1) = Select_polynomial[i];
64 type_coding->s_ij(l, 2) = Select_partition[i];
65 l++;
66 }
67 }
68 if (f_v) {
69 cout << "gl_class_rep::init done" << endl;
70 }
71}
72
73void gl_class_rep::print(int nb_irred, int *Select_polynomial,
74 int *Select_partition, int verbose_level)
75{
76 int i, l;
77
78 cout << "gl_class_rep::print" << endl;
79 l = 0;
80 for (i = 0; i < nb_irred; i++) {
81 if (Select_polynomial[i]) {
82 cout << "poly " << i << " (" << type_coding->s_ij(l, 0)
83 << ", " << type_coding->s_ij(l, 1)
84 << ", " << type_coding->s_ij(l, 2) << ")" << endl;
85 l++;
86 }
87 }
88
89}
90
92 int &nb_irred, int *&Poly_degree,
93 int *&Poly_mult, int *&Partition_idx,
94 int verbose_level)
95{
96 int f_v = (verbose_level >= 1);
97 int i;
98
99 if (f_v) {
100 cout << "gl_class_rep::compute_vector_coding" << endl;
101 }
102 nb_irred = type_coding->s_m();
103 if (f_v) {
104 cout << "gl_class_rep::compute_vector_coding "
105 "nb_irred=" << nb_irred << endl;
106 }
107 Poly_degree = NEW_int(nb_irred);
108 Poly_mult = NEW_int(nb_irred);
109 Partition_idx = NEW_int(nb_irred);
110 for (i = 0; i < nb_irred; i++) {
111 Poly_degree[i] = C->Table_of_polynomials->Degree[type_coding->s_ij(i, 0)];
112 Poly_mult[i] = type_coding->s_ij(i, 1);
113 Partition_idx[i] = type_coding->s_ij(i, 2);
114 }
115 if (f_v) {
116 cout << "gl_class_rep::compute_vector_coding done" << endl;
117 }
118}
119
121 ring_theory::longinteger_object &co, int verbose_level)
122{
123 int f_v = (verbose_level >= 1);
124 int *Poly_degree;
125 int *Poly_mult;
126 int *Partition_idx;
127 int nb_irred;
128
129 if (f_v) {
130 cout << "gl_class_rep::centralizer_order_Kung" << endl;
131 }
132
133 compute_vector_coding(C, nb_irred, Poly_degree,
134 Poly_mult, Partition_idx, verbose_level);
135
137 Poly_degree, Poly_mult, Partition_idx,
138 co,
139 verbose_level);
140
141 FREE_int(Poly_degree);
142 FREE_int(Poly_mult);
143 FREE_int(Partition_idx);
144
145 if (f_v) {
146 cout << "gl_class_rep::centralizer_order_Kung done" << endl;
147 }
148}
149
150}}}
151
152
data_structures::int_matrix * type_coding
Definition: algebra.h:262
void init(int nb_irred, int *Select_polynomial, int *Select_partition, int verbose_level)
ring_theory::longinteger_object * class_length
Definition: algebra.h:264
ring_theory::longinteger_object * centralizer_order
Definition: algebra.h:263
void print(int nb_irred, int *Select_polynomial, int *Select_partition, int verbose_level)
void compute_vector_coding(gl_classes *C, int &nb_irred, int *&Poly_degree, int *&Poly_mult, int *&Partition_idx, int verbose_level)
void centralizer_order_Kung(gl_classes *C, ring_theory::longinteger_object &co, int verbose_level)
to list all conjugacy classes in GL(n,q)
Definition: algebra.h:455
void centralizer_order_Kung_basic(int nb_irreds, int *poly_degree, int *poly_mult, int *partition_idx, ring_theory::longinteger_object &co, int verbose_level)
Definition: gl_classes.cpp:346
ring_theory::table_of_irreducible_polynomials * Table_of_polynomials
Definition: algebra.h:460
a class to represent arbitrary precision integers
Definition: ring_theory.h:366
#define FREE_int(p)
Definition: foundations.h:640
#define NEW_OBJECT(type)
Definition: foundations.h:638
#define FREE_OBJECT(p)
Definition: foundations.h:651
#define NEW_int(n)
Definition: foundations.h:625
the orbiter library for the classification of combinatorial objects