14namespace layer5_applications {
15namespace apps_combinatorics {
32 int f_v = (verbose_level >= 1);
35 cout <<
"design_activity::perform_activity" << endl;
41 if (
Descr->f_create_table) {
46 Descr->create_table_label,
47 Descr->create_table_group,
73 cout <<
"design_activity::perform_activity f_extract_solutions_by_index_csv" << endl;
87 cout <<
"design_activity::perform_activity f_extract_solutions_by_index_csv done" << endl;
93 cout <<
"design_activity::perform_activity f_extract_solutions_by_index_txt" << endl;
107 cout <<
"design_activity::perform_activity f_extract_solutions_by_index_txt done" << endl;
112 cout <<
"design_activity::perform_activity export_inc" << endl;
120 cout <<
"design_activity::perform_activity export_blocks" << endl;
128 cout <<
"design_activity::perform_activity row_sums" << endl;
136 cout <<
"design_activity::perform_activity f_tactical_decomposition" << endl;
145 cout <<
"design_activity::perform_activity done" << endl;
154 std::string &group_label,
155 std::string &fname_in,
156 std::string &fname_out,
157 std::string &prefix_text,
161 int f_v = (verbose_level >= 1);
164 cout <<
"design_activity::do_extract_solutions_by_index" << endl;
180 cout <<
"object must be of type group, but is ";
195 cout <<
"design_activity::do_extract_solutions_by_index after Combi.load_design_table" << endl;
213 Sol_idx =
NEW_int(nb_sol * (prefix_sz + sol_width));
214 for (i = 0; i < nb_sol; i++) {
215 for (j = 0; j < prefix_sz; j++) {
216 Sol_idx[i * (prefix_sz + sol_width) + j] = prefix[j];
218 for (j = 0; j < sol_width; j++) {
219 Sol_idx[i * (prefix_sz + sol_width) + prefix_sz + j] = Sol_idx_1[i * sol_width + j];
223 sol_width += prefix_sz;
227 int underlying_set_size = 0;
232 fname_in, verbose_level);
236 cout <<
"design_activity::do_extract_solutions_by_index the sets have different sizes" << endl;
241 Sol_idx =
NEW_int(nb_sol * (prefix_sz + sol_width));
242 for (i = 0; i < nb_sol; i++) {
243 for (j = 0; j < prefix_sz; j++) {
244 Sol_idx[i * (prefix_sz + sol_width) + j] = prefix[j];
246 for (j = 0; j < sol_width; j++) {
247 Sol_idx[i * (prefix_sz + sol_width) + prefix_sz + j] = SoS->
Sets[i][j];
250 sol_width += prefix_sz;
260 cout <<
"design_activity::do_extract_solutions_by_index before T->extract_solutions_by_index" << endl;
264 nb_sol, sol_width, Sol_idx,
269 cout <<
"design_activity::do_extract_solutions_by_index after T->extract_solutions_by_index" << endl;
275 cout <<
"design_activity::do_extract_solutions_by_index done" << endl;
284 std::string &group_label,
287 int f_v = (verbose_level >= 1);
290 cout <<
"design_activity::do_create_table" << endl;
307 cout <<
"object must be of type group, but is ";
315 cout <<
"design_activity::do_create_table before Combi.create_design_table" << endl;
325 cout <<
"design_activity::do_create_table after Combi.create_design_table" << endl;
329 cout <<
"design_activity::do_create_table done" << endl;
337 std::string &group_label,
338 std::string &H_label,
339 std::string &H_go_text,
340 std::string &H_generators_data,
341 int selected_orbit_length,
344 int f_v = (verbose_level >= 1);
347 cout <<
"design_activity::do_load_table" << endl;
362 cout <<
"object must be of type group, but is ";
370 cout <<
"design_activity::do_create_table before Combi.load_design_table" << endl;
383 cout <<
"design_activity::do_create_table after Combi.load_design_table" << endl;
392 cout <<
"design_activity::do_create_table before LS->init" << endl;
398 cout <<
"design_activity::do_create_table after LS->init" << endl;
407 cout <<
"design_activity::do_load_table before H_gens->init_from_data_with_go" << endl;
410 DC->
A, H_generators_data,
414 cout <<
"design_activity::do_load_table after H_gens->init_from_data_with_go" << endl;
425 cout <<
"design_activity::do_load_table before LSW->init" << endl;
429 selected_orbit_length,
432 cout <<
"design_activity::do_load_table after LSW->init" << endl;
438 cout <<
"design_activity::do_load_table done" << endl;
445 int f_v = (verbose_level >= 1);
448 cout <<
"design_activity::do_canonical_form" << endl;
457 cout <<
"design_activity::do_canonical_form" << endl;
463 cout <<
"design_activity::do_canonical_form before OC->do_the_work" << endl;
466 Canonical_form_Descr,
471 cout <<
"design_activity::do_canonical_form after OC->do_the_work" << endl;
480 cout <<
"design_activity::do_canonical_form done" << endl;
489 int f_v = (verbose_level >= 1);
492 cout <<
"design_activity::do_export_inc" << endl;
498 fname.append(
"_inc.txt");
517 ost << v <<
" " << b <<
" " << N << endl;
518 for (h = 0; h < v * b; h++) {
528 cout <<
"Written file " << fname <<
" of size " << Fio.
file_size(fname) << endl;
540 cout <<
"design_activity::do_export_inc done" << endl;
548 int f_v = (verbose_level >= 1);
551 cout <<
"design_activity::do_export_blocks" << endl;
557 fname.append(
"_blocks_coded.csv");
569 cout <<
"Written file " << fname <<
" of size " << Fio.
file_size(fname) << endl;
574 fname.append(
"_blocks.csv");
583 cout <<
"Written file " << fname <<
" of size " << Fio.
file_size(fname) << endl;
590 cout <<
"design_activity::do_export_blocks done" << endl;
598 int f_v = (verbose_level >= 1);
601 cout <<
"design_activity::do_row_sums" << endl;
607 fname.append(
"_inc.txt");
625 for (i = 0; i < v; i++) {
627 for (j = 0; j < b; j++) {
637 cout <<
"distribution of row sums: ";
647 cout <<
"design_activity::do_row_sums done" << endl;
655 int f_v = (verbose_level >= 1);
658 cout <<
"design_activity::do_tactical_decomposition" << endl;
664 fname.append(
"_inc.txt");
704 cout <<
"process_single_case before refine_column_partition_safe" << endl;
708 cout <<
"process_single_case after refine_column_partition_safe" << endl;
711 cout <<
"process_single_case before refine_row_partition_safe" << endl;
715 cout <<
"process_single_case after refine_row_partition_safe" << endl;
723 int f_labeled =
TRUE;
730 int f_print_subscripts =
FALSE;
731 cout <<
"Decomposition:\\\\" << endl;
732 cout <<
"Row scheme:\\\\" << endl;
735 f_print_subscripts, *Stack);
736 cout <<
"Column scheme:\\\\" << endl;
739 f_print_subscripts, *Stack);
745 cout <<
"Row classes:\\\\" << endl;
750 cout <<
"Col classes:\\\\" << endl;
753 if (Row_classes->
nb_sets > 1) {
754 cout <<
"The row partition splits" << endl;
757 if (Col_classes->
nb_sets > 1) {
758 cout <<
"The col partition splits" << endl;
769 cout <<
"design_activity::do_tactical_decomposition" << endl;
description of a classification of objects using class classification_of_objects
classification of combinatorial objects using a graph-theoretic approach
a collection of combinatorial functions
void compute_blocks(int v, int b, int k, long int *Blocks_coded, int *&Blocks, int verbose_level)
void compute_incidence_matrix(int v, int b, int k, long int *Blocks_coded, int *&M, int verbose_level)
data structure for set partitions following Jeffrey Leon
void get_column_classes(set_of_sets *&Sos, int verbose_level)
void allocate_with_two_classes(int n, int v, int b, int verbose_level)
void get_row_classes(set_of_sets *&Sos, int verbose_level)
void print_classes(std::ostream &ost)
int has_constant_size_property()
void print_table_tex(std::ostream &ost)
void init_from_orbiter_file(int underlying_set_size, std::string &fname, int verbose_level)
a statistical analysis of data consisting of single integers
void init(int *data, int data_length, int f_second, int verbose_level)
void print(int f_backwards)
interface for various incidence geometries
void get_and_print_row_tactical_decomposition_scheme_tex(std::ostream &ost, int f_enter_math, int f_print_subscripts, data_structures::partitionstack &PStack)
int refine_row_partition_safe(data_structures::partitionstack &PStack, int verbose_level)
void get_and_print_decomposition_schemes(data_structures::partitionstack &PStack)
int refine_column_partition_safe(data_structures::partitionstack &PStack, int verbose_level)
void get_and_print_column_tactical_decomposition_scheme_tex(std::ostream &ost, int f_enter_math, int f_print_subscripts, data_structures::partitionstack &PStack)
void print_partitioned(std::ostream &ost, data_structures::partitionstack &P, int f_labeled)
void init_by_matrix(int m, int n, int *M, int verbose_level)
a collection of functions related to file io
void int_matrix_write_csv(std::string &fname, int *M, int m, int n)
void lint_matrix_write_csv(std::string &fname, long int *M, int m, int n)
void int_matrix_read_csv(std::string &fname, int *&M, int &m, int &n, int verbose_level)
long int file_size(std::string &fname)
symbol_table_object_type get_object_type(int idx)
int find_symbol(std::string &label)
void print_type(symbol_table_object_type t)
a strong generating set for a permutation group with respect to a fixed action
void init_from_data_with_go(actions::action *A, std::string &generators_data, std::string &go_text, int verbose_level)
a wrapper for linear_group and permutation_group_create
groups::strong_generators * Subgroup_gens
void create_design_table(design_create *DC, std::string &problem_label, design_tables *&T, groups::strong_generators *Gens, int verbose_level)
void load_design_table(design_create *DC, std::string &problem_label, design_tables *&T, groups::strong_generators *Gens, int verbose_level)
to describe an activity for a design
int f_extract_solutions_by_index_txt
std::string load_table_H_group_order
std::string load_table_H_gens
int f_tactical_decomposition
std::string extract_solutions_by_index_fname_solutions_in
int load_table_selected_orbit_length
std::string extract_solutions_by_index_label
std::string extract_solutions_by_index_prefix
combinatorics::classification_of_objects_description * Canonical_form_Descr
std::string load_table_group
std::string extract_solutions_by_index_group
int f_extract_solutions_by_index_csv
std::string extract_solutions_by_index_fname_solutions_out
std::string load_table_label
std::string load_table_H_label
void do_export_blocks(design_create *DC, int verbose_level)
void do_tactical_decomposition(design_create *DC, int verbose_level)
void do_extract_solutions_by_index(design_create *DC, std::string &label, std::string &group_label, std::string &fname_in, std::string &fname_out, std::string &prefix_text, int f_csv_format, int verbose_level)
void do_export_inc(design_create *DC, int verbose_level)
void do_canonical_form(combinatorics::classification_of_objects_description *Canonical_form_Descr, int verbose_level)
void do_create_table(design_create *DC, std::string &label, std::string &group_label, int verbose_level)
void do_load_table(design_create *DC, std::string &label, std::string &group_label, std::string &H_label, std::string &H_go_text, std::string &H_generators_data, int selected_orbit_length, int verbose_level)
void do_row_sums(design_create *DC, int verbose_level)
void perform_activity(design_activity_description *Descr, design_create *DC, int verbose_level)
design_activity_description * Descr
to create a known design using a description from class design_create_description
a set of designs to be used for a large set
void extract_solutions_by_index(int nb_sol, int Index_width, int *Index, std::string &ouput_fname_csv, int verbose_level)
classification of large sets of designs
void init(design_create *DC, design_tables *T, int verbose_level)
classification of large sets of designs with assumed symmetry
void init(large_set_was_description *Descr, large_set_classify *LS, int verbose_level)
#define Int_vec_scan(A, B, C)
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
the orbiter library for the classification of combinatorial objects