17namespace layer1_foundations {
21static void vector_space_unrank_point_callback(
int *v,
long int rk,
void *data);
22static long int vector_space_rank_point_callback(
int *v,
void *data);
72 int f_v = (verbose_level >= 1);
75 cout <<
"vector_space::init q=" <<
F->
q
89 cout <<
"vector_space::init done" << endl;
94 long int (*rank_point_func)(
int *v,
void *data),
95 void (*unrank_point_func)(
int *v,
long int rk,
void *data),
99 int f_v = (verbose_level >= 1);
102 cout <<
"vector_space::init_rank_functions" << endl;
108 cout <<
"vector_space::init_rank_functions done" << endl;
116 for (i = 0; i < len; i++) {
125 for (i = 0; i < len; i++) {
175 long int *set1,
long int *set2,
int k,
int verbose_level)
177 int f_v = (verbose_level >= 1);
182 cout <<
"vector_space::compare_subspaces_ranked" << endl;
185 r =
F->compare_subspaces_ranked_with_unrank_function(
193 cout <<
"vector_space::compare_subspaces_ranked "
194 "k > dimension" << endl;
200 cout <<
"matrix1:" << endl;
204 cout <<
"matrix2:" << endl;
216 cout <<
"vector_space::compare_subspaces_ranked "
217 "after Gauss" << endl;
218 cout <<
"matrix1:" << endl;
222 cout <<
"rank1=" << rk1 << endl;
223 cout <<
"base_cols1: ";
226 cout <<
"matrix2:" << endl;
230 cout <<
"rank2=" << rk2 << endl;
231 cout <<
"base_cols2: ";
237 cout <<
"vector_space::compare_subspaces_ranked "
239 "so the subspaces are not equal, "
240 "we return 1" << endl;
245 for (i = 0; i < rk1; i++) {
248 cout <<
"the base_cols differ in entry " << i
249 <<
", so the subspaces are not equal, "
250 "we return 1" << endl;
257 if (
M1[i] !=
M2[i]) {
259 cout <<
"the matrices differ in entry " << i
260 <<
", so the subspaces are not equal, "
261 "we return 1" << endl;
268 cout <<
"the subspaces are equal, we return 0" << endl;
273 cout <<
"vector_space::compare_subspaces_ranked "
286static void vector_space_unrank_point_callback(
int *v,
long int rk,
void *data)
294static long int vector_space_rank_point_callback(
int *v,
void *data)
296 vector_space *VS = (vector_space *) data;
finite dimensional vector space over a finite field
long int rank_point(int *v)
void init(field_theory::finite_field *F, int dimension, int verbose_level)
int compare_subspaces_ranked(long int *set1, long int *set2, int k, int verbose_level)
void rank_basis(int *Mtx, long int *set, int len)
void unrank_basis(int *Mtx, long int *set, int len)
void(* unrank_point_func)(int *v, long int rk, void *data)
field_theory::finite_field * F
int is_contained_in_subspace(int *v, int *basis, int k)
int RREF_and_rank(int *basis, int k)
void init_rank_functions(long int(*rank_point_func)(int *v, void *data), void(*unrank_point_func)(int *v, long int rk, void *data), void *data, int verbose_level)
void unrank_point(int *v, long int rk)
long int(* rank_point_func)(int *v, void *data)
void PG_element_unrank_modified_lint(int *v, int stride, int len, long int a)
linear_algebra::linear_algebra * Linear_algebra
void PG_element_rank_modified_lint(int *v, int stride, int len, long int &a)
int is_contained_in_subspace(int k, int len, int *basis, int *base_cols, int *v, int verbose_level)
int Gauss_simple(int *A, int m, int n, int *base_cols, int verbose_level)
#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