15#define MAX_NUMBER_OF_LINES_FOR_INCIDENCE_MATRIX 100000
16#define MAX_NUMBER_OF_LINES_FOR_LINE_TABLE 1000000
17#define MAX_NUMBER_OF_POINTS_FOR_POINT_TABLE 1000000
18#define MAX_NB_POINTS_FOR_LINE_THROUGH_TWO_POINTS_TABLE 10000
19#define MAX_NB_POINTS_FOR_LINE_INTERSECTION_TABLE 10000
23namespace layer1_foundations {
70 int f_v = (verbose_level >= 1);
74 int i, j, a, b, i1, i2, j1, j2;
75 long int N_points, N_lines;
79 cout <<
"projective_space_implementation::init" << endl;
95 cout <<
"projective_space_implementation::init "
96 "allocating Incidence (bitvector)" << endl;
103 cout <<
"projective_space_implementation::init: "
104 "N_lines too big, we do not initialize the "
105 "incidence matrix" << endl;
113 cout <<
"projective_space_implementation::init "
114 "allocating Lines" << endl;
120 cout <<
"projective_space_implementation::init: "
121 "N_lines too big, we do not initialize "
122 "the line table" << endl;
133 cout <<
"projective_space_implementation::init "
134 "allocating Lines_on_point" << endl;
135 cout <<
"projective_space_implementation::init "
136 "allocating N_points=" << N_points << endl;
137 cout <<
"projective_space_implementation::init "
138 "allocating r=" << r << endl;
144 cout <<
"projective_space_implementation::init: "
145 "N_points too big, we do not initialize the "
146 "Lines_on_point table" << endl;
157 cout <<
"projective_space_implementation::init "
158 "allocating Line_through_two_points" << endl;
164 cout <<
"projective_space_implementation::init: "
165 "we do not initialize "
166 "Line_through_two_points" << endl;
173 cout <<
"projective_space_implementation::init "
174 "allocating Line_intersection" << endl;
178 for (i = 0; i < (
long int) N_lines * (
long int) N_lines; i++) {
184 cout <<
"projective_space_implementation::init: "
185 "we do not initialize "
186 "Line_intersection" << endl;
193 cout <<
"projective_space_implementation::init "
194 "number of points = " << N_points << endl;
197 for (i = 0; i < N_points; i++) {
199 cout <<
"point " << i <<
" : ";
217 cout <<
"projective_space_implementation::init "
218 "number of lines = " << N_lines << endl;
227 cout <<
"projective_space_implementation::init "
228 "computing lines..." << endl;
230 cout <<
"Lines is allocated" << endl;
233 cout <<
"Bitmatrix is allocated" << endl;
236 cout <<
"Lines_on_point is allocated" << endl;
247 for (i = 0; i < N_lines; i++) {
249 if ((i % 1000000) == 0) {
250 cout <<
"projective_space_implementation::init "
251 "Line " << i <<
" / " << N_lines <<
":" << endl;
265 j = Grass_lines->rank_int(0);
267 cout <<
"projective_space_implementation::init "
268 "rank yields " << j <<
" != " << i << endl;
275 for (a = 0; a < k; a++) {
285 Lines[i * k + a] = b;
293 cout <<
"line " << i <<
":" << endl;
299 cout <<
"points on line " << i <<
" : ";
306 for (i = 0; i < N_points; i++) {
308 cout <<
"R[i] != r" << endl;
317 cout <<
"projective_space_implementation::init "
318 "computing lines skipped" << endl;
326 cout <<
"computing Lines_on_point..." << endl;
328 for (i = 0; i < N_points; i++) {
329 if ((i % 1000) == 0) {
330 cout <<
"point " << i <<
" / " << N_points <<
":" << endl;
333 for (j = 0; j < N_lines; j++) {
334 if (is_incident(i, j)) {
340 cout <<
"lines on point " << i <<
" = ";
341 PG_element_unrank_modified(*F,
w, 1, n + 1, i);
342 int_vec_print(cout,
w, n + 1);
349 cout <<
"computing Lines_on_point done" << endl;
356 cout <<
"projective_space::init_incidence_structure Lines:" << endl;
358 cout <<
"projective_space::init_incidence_structure Lines_on_point:" << endl;
365 cout <<
"projective_space_implementation::init "
366 "computing Line_through_two_points..." << endl;
368 for (i1 = 0; i1 < N_points; i1++) {
369 for (a = 0; a < r; a++) {
371 for (b = 0; b < k; b++) {
372 i2 =
Lines[j * k + b];
382 cout <<
"line through points i,j is" << endl;
383 for (i = 0; i < N_points; i++) {
384 for (j = i + 1; j < N_points; j++) {
385 cout << i <<
" , " << j <<
" : "
396 cout <<
"projective_space_implementation::init "
397 "computing Line_through_two_points skipped" << endl;
403 cout <<
"projective_space_implementation::init "
404 "computing Line_intersection..." << endl;
406 for (j1 = 0; j1 < N_lines; j1++) {
407 for (a = 0; a < k; a++) {
408 i =
Lines[j1 * k + a];
409 for (b = 0; b < r; b++) {
420 cout <<
"projective_space_implementation::init "
421 "point of intersection of lines i,j is" << endl;
422 for (i = 0; i < N_lines; i++) {
423 for (j = i + 1; j < N_lines; j++) {
424 cout << i <<
" , " << j <<
" : "
435 cout <<
"projective_space_implementation::init "
436 "computing Line_intersection skipped" << endl;
440 cout <<
"projective_space_implementation::init done" << endl;
matrices over GF(2) stored as bitvectors
void m_ij(int i, int j, int a)
void init(int m, int n, int verbose_level)
void PG_element_rank_modified(int *v, int stride, int len, int &a)
void PG_element_normalize_from_front(int *v, int stride, int len)
void PG_element_unrank_modified(int *v, int stride, int len, int a)
void int_vec_print_field_elements(std::ostream &ost, int *v, int len)
linear_algebra::linear_algebra * Linear_algebra
void unrank_lint(long int rk, int verbose_level)
~projective_space_implementation()
int * Line_through_two_points
projective_space_implementation()
data_structures::bitmatrix * Bitmatrix
void init(projective_space *P, int verbose_level)
projective space PG(n,q) of dimension n over Fq
field_theory::finite_field * F
void mult_matrix_matrix(int *A, int *B, int *C, int m, int n, int o, int verbose_level)
#define Int_vec_zero(A, B)
#define Int_vec_print_integer_matrix_width(A, B, C, D, E, F)
#define Int_vec_print(A, B, C)
the orbiter library for the classification of combinatorial objects
#define MAX_NUMBER_OF_POINTS_FOR_POINT_TABLE
#define MAX_NUMBER_OF_LINES_FOR_INCIDENCE_MATRIX
#define MAX_NB_POINTS_FOR_LINE_THROUGH_TWO_POINTS_TABLE
#define MAX_NB_POINTS_FOR_LINE_INTERSECTION_TABLE
#define MAX_NUMBER_OF_LINES_FOR_LINE_TABLE