Orbiter 2022
Combinatorial Objects
semifield_downstep_node.cpp
Go to the documentation of this file.
1/*
2 * semifield_downstep_node.cpp
3 *
4 * Created on: Apr 17, 2019
5 * Author: betten
6 */
7
8
9
10
11#include "orbiter.h"
12
13using namespace std;
14
15namespace orbiter {
16namespace layer5_applications {
17namespace semifields {
18
19
20static void coset_action_unrank_point(int *v, long int a, void *data);
21static long int coset_action_rank_point(int *v, void *data);
22
23
25{
26 SC = NULL;
27 SL = NULL;
28 F = NULL;
29 k = 0;
30 k2 = 0;
31 level = 0;
32 orbit_number = 0;
33 Candidates = NULL;
34 nb_candidates = 0;
35 subspace_basis = NULL;
36 //subspace_base_cols = NULL;
37 on_cosets = NULL;
38 A_on_cosets = NULL;
39 Sch = NULL;
41 //null();
42}
43
45{
46 if (subspace_basis) {
48 }
49 if (A_on_cosets) {
51 }
52 //freeself();
53}
54
56 semifield_lifting *SL, int level, int orbit_number,
57 long int *Candidates, int nb_candidates, int first_flag_orbit,
58 int verbose_level)
59{
60 int f_v = (verbose_level >= 1);
61 int f_vv = (verbose_level >= 2);
62 //int f_vvv = (verbose_level >= 3);
64
65 if (f_v) {
66 cout << "semifield_downstep_node::init level=" << level
67 << " orbit_number=" << orbit_number
68 << " nb_candidates=" << nb_candidates << endl;
69 }
70
76
82
83
85 //subspace_base_cols = NEW_int(level);
86
87 int pivots[2]; // not used
88
89 if (level == 2) {
91 subspace_basis, pivots, verbose_level);
92 }
93 else {
95 subspace_basis, //subspace_base_cols,
96 verbose_level);
97 }
98
99 if (f_v) {
100 cout << "subspace_basis:" << endl;
102 //cout << "base_cols:" << endl;
103 //int_vec_print(cout, subspace_base_cols, level);
104 //cout << endl;
105 }
106
107#if 0
108 if (f_v) {
109 cout << "semifield_downstep_node::init "
110 "sorting the " << nb_candidates << " candidates" << endl;
111 }
113 if (f_v) {
114 cout << "downstep_node::init "
115 "sorting done" << endl;
116 }
117#endif
118
120
121
122 if (f_v) {
123 cout << "semifield_downstep_node::init "
124 "initializing on_cosets:" << endl;
125 }
128 SC->AS,
129 F,
130 level /* dimension_of_subspace */,
131 k * k /* n */,
134 coset_action_unrank_point,
135 coset_action_rank_point,
136 this /*rank_unrank_data*/,
137 verbose_level);
138 if (f_v) {
139 cout << "semifield_downstep_node::init "
140 "initializing on_cosets done" << endl;
141 }
142
143
145
146 if (f_vv) {
147 cout << "semifield_downstep_node::init "
148 "initializing A_on_cosets:" << endl;
149 }
151 on_cosets,
152 FALSE /* f_induce_action */, NULL /* old_G */,
153 verbose_level);
154 if (f_v) {
155 cout << "semifield_downstep_node::init "
156 "initializing A_on_cosets done, "
157 "the degree of the action is " << A_on_cosets->degree << endl;
158 }
159
160
161 if (f_v) {
162 cout << "semifield_downstep_node::init "
163 "before orbits_on_points_schreier" << endl;
164 }
165
166
169
170
173 verbose_level);
174 sg->group_order(go);
175 if (f_v) {
176 cout << "semifield_downstep_node::init "
177 "initializing A_on_cosets done, "
178 "the group order is " << go << endl;
179 }
180 if (f_vv) {
181 cout << "semifield_downstep_node::init the generators for "
182 "the stabilizer are:" << endl;
183 sg->print_generators_tex(cout);
184 }
185
186#if 0
187 if (SFS->f_orbits_light) {
188
189
190 orbits_light(SFS, level, orbit_number,
192 sg,
193 verbose_level);
194
195
196 }
197 else {
198#endif
200 string fname;
201
203
204 if (File_io.file_size(fname) > 0) {
206 Sch->A = A_on_cosets;
207 cout << "semifield_downstep_node::init "
208 "Reading schreier data structure from "
209 "file " << fname << endl;
210 Sch->read_file_binary(fname, verbose_level);
211 }
212 else {
213 if (f_v) {
214 cout << "semifield_downstep_node::init "
215 "before sg->orbits_on_points_schreier" << endl;
216 }
218 A_on_cosets, verbose_level);
219 cout << "Writing schreier data structure to "
220 "file " << fname << endl;
221 Sch->write_file_binary(fname, verbose_level);
222
223 Sch->delete_images(); // make space
224
225 //delete Sch; // make space in memory
226 }
227 //}
228
229 if (f_vv) {
230 cout << "semifield_downstep_node::init "
231 "after orbits_on_points_schreier" << endl;
232 }
233
234
235
236
237 if (f_v) {
238 cout << "semifield_downstep_node::init done" << endl;
239 }
240}
241
243{
244 int idx;
246
248 a, idx, 0 /* verbose_level */)) {
249 cout << "semifield_downstep_node::find_point point " << a
250 << " cannot be found in the Candidates array" << endl;
251 //cout << "The " << nb_candidates << " Candidates:" << endl;
252 //int_vec_print(cout, Candidates, nb_candidates);
253 //cout << endl;
254 //SFS->matrix_print_numeric(a);
255 exit(1);
256 }
257 return idx;
258}
259
260// #############################################################################
261// global functions:
262// #############################################################################
263
264
265static void coset_action_unrank_point(int *v, long int a, void *data)
266{
268 semifield_classify *SC = DN->SC;
269
270 SC->matrix_unrank(a, v);
271}
272
273static long int coset_action_rank_point(int *v, void *data)
274{
276 semifield_classify *SC = DN->SC;
277
278 return SC->matrix_rank(v);
279}
280
281
282
283}}}
284
a collection of functions related to sorted vectors
int lint_vec_search(long int *v, int len, long int a, int &idx, int verbose_level)
Definition: sorting.cpp:1157
a class to represent arbitrary precision integers
Definition: ring_theory.h:366
a permutation group in a fixed action.
Definition: actions.h:99
void induced_action_on_cosets(induced_actions::action_on_cosets *A_on_cosets, int f_induce_action, groups::sims *old_G, int verbose_level)
Schreier trees for orbits of groups on points.
Definition: groups.h:839
void write_file_binary(std::string &fname, int verbose_level)
void read_file_binary(std::string &fname, int verbose_level)
a strong generating set for a permutation group with respect to a fixed action
Definition: groups.h:1703
schreier * orbits_on_points_schreier(actions::action *A_given, int verbose_level)
void group_order(ring_theory::longinteger_object &go)
induced action on the cosets of a subspace by right multiplication
void init_lint(int nb_points, long int *Points, actions::action *A_linear, field_theory::finite_field *F, int dimension_of_subspace, int n, int *subspace_basis, int *base_cols, void(*unrank_point)(int *v, long int a, void *data), long int(*rank_point)(int *v, void *data), void *rank_unrank_data, int verbose_level)
classification of semifields using poset classification
Definition: semifields.h:144
auxiliary class for classifying semifields
Definition: semifields.h:734
void init(semifield_lifting *SL, int level, int orbit_number, long int *Candidates, int nb_candidates, int first_flag_orbit, int verbose_level)
void get_basis_and_pivots(int po, int *basis, int *pivots, int verbose_level)
One step of lifting for classifying semifields.
Definition: semifields.h:465
void make_file_name_schreier(std::string &fname, int level, int orbit_idx)
void get_basis(int po3, int *basis, int verbose_level)
groups::strong_generators * get_stabilizer_generators(int level, int orbit_idx, int verbose_level)
#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
#define Int_matrix_print(A, B, C)
Definition: foundations.h:707
#define FALSE
Definition: foundations.h:234
the orbiter library for the classification of combinatorial objects