13namespace layer1_foundations {
20 n =
m =
s =
q =
Q = 0;
72 int f_v = (verbose_level >= 1);
77 cout <<
"desarguesian_spread::init m=" <<
m
78 <<
" n=" <<
n <<
" s=" <<
s << endl;
90 cout <<
"desarguesian_spread::init q=" <<
q << endl;
91 cout <<
"desarguesian_spread::init Q=" <<
Q << endl;
94 cout <<
"desarguesian_spread::init "
95 "i_power_j(q, s) != Q" << endl;
99 cout <<
"desarguesian_spread::init s != SubS->s" << endl;
110 cout <<
"desarguesian_spread::init "
116 cout <<
"desarguesian_spread::init N = " <<
N << endl;
121 cout <<
"desarguesian_spread::init "
122 "nb_points_per_spread_element = "
127 cout <<
"desarguesian_spread::init "
128 "before calculate_spread_elements" << endl;
132 cout <<
"desarguesian_spread::init "
133 "after calculate_spread_elements" << endl;
137 cout <<
"desarguesian_spread::init done" << endl;
144 int f_v = (verbose_level >= 1);
145 int f_vv = (verbose_level >= 2);
149 int h, i, j, a, b, c, J, t;
152 cout <<
"desarguesian_spread::calculate_spread_elements" << endl;
161 for (h = 0; h <
N; h++) {
163 cout <<
"h=" << h <<
" / " <<
N << endl;
170 for (i = 0; i <
s; i++) {
173 cout <<
"i=" << i <<
" / " <<
s << endl;
178 for (j = 0; j <
m; j++) {
181 cout <<
"j=" << j <<
" / " <<
m
182 <<
" a=" << a <<
" b=" << b << endl;
188 for (j = 0; j <
m; j++) {
191 for (t = 0; t <
s; t++) {
193 z[i *
n + J + t] = c;
198 cout <<
"basis element " << h <<
" / " <<
N <<
":" << endl;
214 int *Spread_elt_basis;
218 cout <<
"desarguesian_spread::calculate_spread_elements "
219 "computing List_of_points" << endl;
224 for (h = 0; h <
N; h++) {
226 cout <<
"h=" << h <<
" / " <<
N << endl;
236 cout <<
"basis element " << h <<
" / " <<
N <<
":" << endl;
238 cout <<
"Consists of the following points:" << endl;
249 cout <<
"desarguesian_spread::calculate_spread_elements done" << endl;
255 int k,
int *subspace,
256 int *intersection_dimensions,
int verbose_level)
259 int f_v = (verbose_level >= 1);
260 int f_vv = (verbose_level >= 2);
265 cout <<
"desarguesian_spread::compute_intersection_type" << endl;
269 for (h = 0; h <
N; h++) {
271 cout <<
"desarguesian_spread::compute_intersection_type "
272 << h <<
" / " <<
N << endl;
280 intersection_dimensions[h] = k3;
284 cout <<
"desarguesian_spread::compute_intersection_type "
290 int *Basis,
int basis_sz,
291 int *is_in_shadow,
int verbose_level)
293 int f_v = (verbose_level >= 1);
294 int f_vv = (verbose_level >= 2);
295 int *Intersection_dimensions;
300 cout <<
"desarguesian_spread::compute_shadow" << endl;
303 Intersection_dimensions =
NEW_int(
N);
305 Intersection_dimensions, 0 );
308 cout <<
"Intersection_dimensions:";
314 is_in_shadow[i] =
FALSE;
316 for (i = 0; i <
N; i++) {
317 if (Intersection_dimensions[i]) {
320 if (is_in_shadow[rk]) {
321 cout <<
"is_in_shadow[rk] is TRUE, something is "
322 "wrong with the spread" << endl;
325 is_in_shadow[rk] =
TRUE;
332 cout <<
"desarguesian_spread::compute_shadow done" << endl;
337 long int *&the_linear_set,
int &the_linear_set_sz,
340 int f_v = (verbose_level >= 1);
341 int *Intersection_dimensions;
345 cout <<
"desarguesian_spread::compute_linear_set" << endl;
347 Intersection_dimensions =
NEW_int(
N);
350 Intersection_dimensions, 0 );
352 the_linear_set_sz = 0;
353 for (i = 0; i <
N; i++) {
354 if (Intersection_dimensions[i]) {
358 the_linear_set =
NEW_lint(the_linear_set_sz);
360 for (i = 0; i <
N; i++) {
361 if (Intersection_dimensions[i]) {
362 the_linear_set[j++] = i;
366 cout <<
"desarguesian_spread::compute_linear_set "
367 "The linear set is: ";
375 cout <<
"desarguesian_spread::compute_linear_set done" << endl;
385 for (a = 0; a <
N; a++) {
392 ost <<
"\\left[" << endl;
393 ost <<
"\\begin{array}{*{" <<
n <<
"}{c}}" << endl;
394 for (i = 0; i <
s; i++) {
395 for (j = 0; j <
n; j++) {
402 ost <<
"\\\\" << endl;
404 ost <<
"\\end{array}" << endl;
405 ost <<
"\\right]" << endl;
407 ost <<
"\\\\" << endl;
408 ost <<
"\\hline" << endl;
419 ost <<
"\\clearpage" << endl;
420 ost <<
"The spread elements are:\\\\ " << endl;
421 ost <<
"\\begin{multicols}{2}" << endl;
422 ost <<
"\\noindent" << endl;
423 for (a = 0; a <
N; a++) {
424 ost << a <<
" / " <<
N <<
":";
429 ost <<
"\\left[" << endl;
430 ost <<
"\\begin{array}{*{" <<
n <<
"}{c}}" << endl;
431 for (i = 0; i <
s; i++) {
432 for (j = 0; j <
n; j++) {
439 ost <<
"\\\\" << endl;
441 ost <<
"\\end{array}" << endl;
442 ost <<
"\\right]_{" <<
Rk[a] <<
"}" << endl;
444 ost <<
"\\\\" << endl;
446 ost <<
"\\end{multicols}" << endl;
447 ost <<
"Spread elements by rank: ";
449 ost <<
"\\\\" << endl;
458 for (i = 0; i < sz; i++) {
482 int f_v = (verbose_level >= 1);
486 cout <<
"desarguesian_spread::create_latex_report" << endl;
495 snprintf(str, 1000,
"Desarguesian_Spread_%d_%d.tex",
n - 1,
q);
497 snprintf(title, 1000,
"Desarguesian Spread in ${\\rm PG}(%d,%d)$",
n - 1,
q);
519 cout <<
"desarguesian_spread::create_latex_report before report" << endl;
521 report(ost, verbose_level);
523 cout <<
"desarguesian_spread::create_latex_report after report" << endl;
532 cout <<
"written file " << fname <<
" of size "
537 cout <<
"desarguesian_spread::create_latex_report done" << endl;
543 int f_v = (verbose_level >= 1);
546 cout <<
"desarguesian_spread::report" << endl;
553 cout <<
"desarguesian_spread::report done" << endl;
void PG_element_rank_modified(int *v, int stride, int len, int &a)
void PG_element_unrank_modified(int *v, int stride, int len, int a)
linear_algebra::linear_algebra * Linear_algebra
a finite field as a vector space over a subfield
void compute_shadow(int *Basis, int basis_sz, int *is_in_shadow, int verbose_level)
void report(std::ostream &ost, int verbose_level)
field_theory::finite_field * Fq
void print_spread_element_table_tex(std::ostream &ost)
void init(int n, int m, int s, field_theory::subfield_structure *SubS, int verbose_level)
void create_latex_report(int verbose_level)
void print_spread_elements_tex(std::ostream &ost)
field_theory::finite_field * FQ
int nb_points_per_spread_element
void compute_linear_set(int *Basis, int basis_sz, long int *&the_linear_set, int &the_linear_set_sz, int verbose_level)
void calculate_spread_elements(int verbose_level)
void compute_intersection_type(int k, int *subspace, int *intersection_dimensions, int verbose_level)
void print_linear_set_tex(long int *set, int sz)
field_theory::subfield_structure * SubS
void print_linear_set_element_tex(long int a, int sz)
various functions related to geometries
long int nb_PG_elements(int n, int q)
to rank and unrank subspaces of a fixed dimension in F_q^n
long int rank_lint_here(int *Mtx, int verbose_level)
void init(int n, int k, field_theory::finite_field *F, int verbose_level)
void mult_vector_from_the_left(int *v, int *A, int *vA, int m, int n)
int intersect_subspaces(int n, int k1, int *A, int k2, int *B, int &k3, int *intersection, int verbose_level)
basic number theoretic functions
int i_power_j(int i, int j)
a collection of functions related to file io
long int file_size(std::string &fname)
interface to create latex output files
void head(std::ostream &ost, int f_book, int f_title, const char *title, const char *author, int f_toc, int f_landscape, int f_12pt, int f_enlarged_page, int f_pagenumbers, const char *extras_for_preamble)
void foot(std::ostream &ost)
#define Lint_vec_print(A, B, C)
#define Int_matrix_print(A, B, C)
#define Int_vec_copy(A, B, C)
#define Int_vec_print(A, B, C)
the orbiter library for the classification of combinatorial objects