16namespace layer5_applications {
17namespace apps_combinatorics {
20static int design_tables_compare_func(
void *data,
int i,
int j,
void *extra_data);
21static void design_tables_swap_func(
void *data,
int i,
int j,
void *extra_data);
49 long int *initial_set,
int design_size,
53 int f_v = (verbose_level >= 1);
56 cout <<
"design_tables::init" << endl;
84 cout <<
"design_tables::init before create_table" << endl;
88 cout <<
"design_tables::init after create_table" << endl;
92 cout <<
"design_tables::init before save" << endl;
96 cout <<
"design_tables::init after save" << endl;
102 cout <<
"design_tables::init before create_action" << endl;
106 cout <<
"design_tables::init after create_action" << endl;
112 cout <<
"design_tables::init done" << endl;
118 int f_v = (verbose_level >= 1);
121 cout <<
"design_tables::create_table" << endl;
132 cout <<
"design_tables::init computing orbit:" << endl;
136 cout <<
"design_tables::init computing orbit done" << endl;
144 cout <<
"design_tables::init" << endl;
156 cout <<
"design_tables::init before "
157 "sorting design table of size " <<
nb_designs << endl;
161 design_tables_compare_func,
162 design_tables_swap_func,
166 cout <<
"design_tables::init after "
167 "sorting design table of size " <<
nb_designs << endl;
176 cout <<
"design_tables::init "
187 cout <<
"too many to print" << endl;
200 cout <<
"design_tables::create_table done" << endl;
206 int f_v = (verbose_level >= 1);
209 cout <<
"design_tables::create_action" << endl;
215 cout <<
"design_tables::create_action "
216 "creating action A_on_designs" << endl;
224 cout <<
"design_tables::create_action "
225 "A_on_designs->degree=" << A_on_designs->
degree << endl;
230 fname_group.assign(
label);
231 fname_group.append(
"_on_design_table.makefile");
234 cout <<
"design_tables::create_action "
235 "fname_group = " << fname_group << endl;
240 cout <<
"design_tables::create_action "
241 "before A_on_designs->export_to_orbiter_as_bsgs" << endl;
249 cout <<
"design_tables::create_action "
250 "after A_on_designs->export_to_orbiter_as_bsgs" << endl;
254 cout <<
"design_tables::create_action" << endl;
259 int nb_sol,
int Index_width,
int *Index,
260 std::string &ouput_fname_csv,
263 int f_v = (verbose_level >= 1);
264 long int i, j, k, idx, N;
269 cout <<
"design_tables::extract_solutions_by_index" << endl;
274 for (i = 0; i < nb_sol; i++) {
276 for (j = 0; j < Index_width; j++, k +=
design_size) {
277 idx = Index[i * Index_width + j];
287 cout <<
"design_tables::extract_solutions_by_index "
289 << ouput_fname_csv <<
" of size " << Fio.
file_size(ouput_fname_csv) << endl;
293 cout <<
"design_tables::extract_solutions_by_index done" << endl;
300 long int *set,
int set_sz,
301 long int *&reduced_table,
long int *&reduced_table_idx,
int &nb_reduced_designs,
305 int f_v = (verbose_level >= 1);
309 cout <<
"design_tables::make_reduced_design_table" << endl;
313 nb_reduced_designs = 0;
315 for (j = 0; j < set_sz; j++) {
324 reduced_table_idx[nb_reduced_designs] = i;
325 nb_reduced_designs++;
329 cout <<
"design_tables::make_reduced_design_table done" << endl;
334 long int *initial_set,
int design_size,
338 int f_v = (verbose_level >= 1);
341 cout <<
"design_tables::init_from_file" << endl;
358 cout <<
"design_tables::init_from_file before load" << endl;
364 cout <<
"design_tables::init_from_file after load" << endl;
369 cout <<
"design_tables::init_from_file done" << endl;
378 int f_v = (verbose_level >= 1);
381 cout <<
"design_tables::test_if_table_exists" << endl;
392 cout <<
"design_tables::test_if_table_exists design table " <<
fname_design_table <<
" exists" << endl;
398 cout <<
"design_tables::test_if_table_exists design table " <<
fname_design_table <<
" does not exist" << endl;
408 int f_v = (verbose_level >= 1);
412 cout <<
"design_tables::save" << endl;
416 cout <<
"design_tables::save "
423 cout <<
"design_tables::save "
429 cout <<
"design_tables::save done" << endl;
435 int f_v = (verbose_level >= 1);
440 cout <<
"design_tables::load" << endl;
444 cout <<
"design_tables::load "
452 cout <<
"design_tables::load b != design_size" << endl;
456 cout <<
"design_tables::load "
463 cout <<
"design_tables::load done" << endl;
492 for (i = 0; i < set_size; i++) {
493 a = set_of_designs_by_index[i];
495 for (j = i + 1; j < set_size; j++) {
496 b = set_of_designs_by_index[j];
508 long int *set_of_designs_by_index1,
int set_size1,
509 long int *set_of_designs_by_index2,
int set_size2)
516 for (i = 0; i < set_size1; i++) {
517 a = set_of_designs_by_index1[i];
519 for (j = 0; j < set_size2; j++) {
520 b = set_of_designs_by_index2[j];
535static int design_tables_compare_func(
void *data,
int i,
int j,
void *extra_data)
538 int **Sets = (
int **) data;
546static void design_tables_swap_func(
void *data,
int i,
int j,
void *extra_data)
549 int **Sets = (
int **) data;
a collection of combinatorial functions
a collection of functions related to sorted vectors
int test_if_sets_are_disjoint_assuming_sorted_lint(long int *set1, long int *set2, int sz1, int sz2)
void Heapsort_general(void *data, int len, int(*compare_func)(void *data, int i, int j, void *extra_data), void(*swap_func)(void *data, int i, int j, void *extra_data), void *extra_data)
int int_vec_compare(int *p, int *q, int len)
a collection of functions related to file io
void lint_matrix_write_csv(std::string &fname, long int *M, int m, int n)
long int file_size(std::string &fname)
void lint_matrix_read_csv(std::string &fname, long int *&M, int &m, int &n, int verbose_level)
a permutation group in a fixed action.
action * create_induced_action_on_sets(int nb_sets, int set_size, long int *sets, int verbose_level)
void export_to_orbiter_as_bsgs(std::string &fname, std::string &label, std::string &label_tex, groups::strong_generators *SG, int verbose_level)
a strong generating set for a permutation group with respect to a fixed action
data_structures_groups::vector_ge * gens
orbit of sets using a Schreier tree, used in packing::make_spread_table
void init(actions::action *A, actions::action *A2, long int *set, int sz, data_structures_groups::vector_ge *gens, int verbose_level)
a set of designs to be used for a large set
int test_between_two_sets(long int *set_of_designs_by_index1, int set_size1, long int *set_of_designs_by_index2, int set_size2)
void init_from_file(actions::action *A, actions::action *A2, long int *initial_set, int design_size, std::string &label, groups::strong_generators *Strong_generators, int verbose_level)
int test_set_within_itself(long int *set_of_designs_by_index, int set_size)
std::string fname_design_table
void save(int verbose_level)
int test_if_designs_are_disjoint(int i, int j)
void extract_solutions_by_index(int nb_sol, int Index_width, int *Index, std::string &ouput_fname_csv, int verbose_level)
void load(int verbose_level)
groups::strong_generators * Strong_generators
void create_action(actions::action *&A_on_designs, int verbose_level)
void init(actions::action *A, actions::action *A2, long int *initial_set, int design_size, std::string &label, groups::strong_generators *Strong_generators, int verbose_level)
void make_reduced_design_table(long int *set, int set_sz, long int *&reduced_table, long int *&reduced_table_idx, int &nb_reduced_designs, int verbose_level)
void create_table(int verbose_level)
int test_if_table_exists(std::string &label, int verbose_level)
#define Lint_vec_copy(A, B, C)
#define Lint_vec_print(A, B, C)
the orbiter library for the classification of combinatorial objects