17namespace layer1_foundations {
18namespace data_structures {
37 int f_v = (verbose_level >= 1);
40 cout <<
"data_input_stream::init" << endl;
52 cout <<
"data_input_stream::init before read_objects" << endl;
58 cout <<
"data_input_stream::init after read_objects" << endl;
62 cout <<
"data_input_stream::init done" << endl;
68 int f_v = (verbose_level >= 1);
69 int input_idx, nb_obj;
74 cout <<
"data_input_stream::count_number_of_objects_to_test" << endl;
83 cout <<
"input set of points "
84 <<
Descr->
Input[input_idx].input_string <<
":" << endl;
92 cout <<
"input set of lines "
93 <<
Descr->
Input[input_idx].input_string <<
":" << endl;
101 cout <<
"input set of points and lines "
102 <<
Descr->
Input[input_idx].input_string <<
" "
103 <<
Descr->
Input[input_idx].input_string2 <<
":" << endl;
111 cout <<
"input set of packing "
112 <<
Descr->
Input[input_idx].input_string <<
":" << endl;
120 cout <<
"input sets of points from file "
121 <<
Descr->
Input[input_idx].input_string <<
":" << endl;
126 cout <<
"The file " <<
Descr->
Input[input_idx].input_string
127 <<
" has " << nb_obj <<
" objects" << endl;
134 cout <<
"input sets of lines from file "
135 <<
Descr->
Input[input_idx].input_string <<
":" << endl;
140 cout <<
"The file " <<
Descr->
Input[input_idx].input_string
141 <<
" has " << nb_obj <<
" objects" << endl;
148 cout <<
"input sets of packings from file "
149 <<
Descr->
Input[input_idx].input_string <<
":" << endl;
154 cout <<
"The file " <<
Descr->
Input[input_idx].input_string
155 <<
" has " << nb_obj <<
" objects" << endl;
160 else if (
Descr->
Input[input_idx].input_type ==
163 cout <<
"input sets of packings from file "
164 <<
Descr->
Input[input_idx].input_string << endl;
165 cout <<
"through spread table "
166 <<
Descr->
Input[input_idx].input_string2 <<
" :" << endl;
175 int underlying_set_size = 0;
178 cout <<
"data_input_stream::count_number_of_objects_to_test "
179 "Reading the file " <<
Descr->
Input[input_idx].input_string << endl;
183 Descr->
Input[input_idx].input_string, verbose_level);
185 cout <<
"Read the file " <<
Descr->
Input[input_idx].input_string <<
", underlying_set_size=" << underlying_set_size << endl;
194 cout <<
"The file " <<
Descr->
Input[input_idx].input_string
195 <<
" has " << nb_obj <<
" objects" << endl;
202 cout <<
"input set of points from file "
203 <<
Descr->
Input[input_idx].input_string <<
":" << endl;
207 cout <<
"The file " <<
Descr->
Input[input_idx].input_string
208 <<
" has " << nb_obj <<
" objects" << endl;
215 cout <<
"input designs from file "
216 <<
Descr->
Input[input_idx].input_string <<
":" << endl;
226 cout <<
"classify_objects_using_nauty Reading the file " <<
Descr->
Input[input_idx].input_string
227 <<
" which contains designs on " <<
Descr->
Input[input_idx].input_data1 <<
" points, nck=" << nck << endl;
230 Descr->
Input[input_idx].input_string, verbose_level);
231 cout <<
"Read the file " <<
Descr->
Input[input_idx].input_string << endl;
236 cout <<
"The file " <<
Descr->
Input[input_idx].input_string
237 <<
" has " << nb_obj <<
" objects" << endl;
244 cout <<
"input incidence geometries from file "
245 <<
Descr->
Input[input_idx].input_string <<
":" << endl;
250 std::vector<std::vector<int> > Geos;
254 cout <<
"input incidence geometries from file "
255 "the file contains " << Geos.size() <<
"incidence geometries" << endl;
258 if (
Descr->
Input[input_idx].input_data1 != m) {
259 cout <<
"v does not match" << endl;
262 if (
Descr->
Input[input_idx].input_data2 != n) {
263 cout <<
"b does not match" << endl;
266 if (
Descr->
Input[input_idx].input_data3 != nb_flags) {
267 cout <<
"nb_flags does not match" << endl;
273 cout <<
"input incidence geometries by row ranks from file "
274 <<
Descr->
Input[input_idx].input_string <<
":" << endl;
279 std::vector<std::vector<int> > Geos;
283 cout <<
"input incidence geometries from file "
284 "the file contains " << Geos.size() <<
"incidence geometries" << endl;
287 if (
Descr->
Input[input_idx].input_data1 != m) {
288 cout <<
"v does not match" << endl;
291 if (
Descr->
Input[input_idx].input_data2 != n) {
292 cout <<
"b does not match" << endl;
295 if (
Descr->
Input[input_idx].input_data3 != r) {
296 cout <<
"r does not match" << endl;
302 cout <<
"input incidence geometry directly "
303 <<
Descr->
Input[input_idx].input_string <<
":" << endl;
309 cout <<
"input incidence geometry directly "
310 <<
Descr->
Input[input_idx].input_string <<
":" << endl;
316 cout <<
"input from parallel search" << endl;
319 int nb_cases =
Descr->
Input[input_idx].input_data1;
323 mask.assign(
Descr->
Input[input_idx].input_string);
324 cases_fname.assign(
Descr->
Input[input_idx].input_string2);
327 cout <<
"input from parallel search, mask=" << mask << endl;
328 cout <<
"input from parallel search, nb_cases=" << nb_cases << endl;
329 cout <<
"input from parallel search, cases_fname=" << cases_fname << endl;
336 for (i = 0; i < nb_cases; i++) {
343 sprintf(str, mask.c_str(), i);
347 int underlying_set_size = 0;
355 cout <<
"objects from file " << i <<
" / " << nb_cases <<
356 " the file contains " << nb_sol <<
" sets" << endl;
363 cout <<
"unknown input type" << endl;
369 cout <<
"data_input_stream::count_number_of_objects_to_test done" << endl;
376 int f_v = (verbose_level >= 1);
381 cout <<
"data_input_stream::read_objects" << endl;
386 cout <<
"data_input_stream::read_objects "
394 cout <<
"data_input_stream::read_objects "
395 "input set of points "
396 <<
Descr->
Input[input_idx].input_string <<
":" << endl;
511 cout <<
"input incidence geometries from file "
512 <<
Descr->
Input[input_idx].input_string <<
":" << endl;
517 std::vector<std::vector<int> > Geos;
521 cout <<
"input incidence geometries from file "
522 "the file contains " << Geos.size() <<
"incidence geometries" << endl;
526 if (
Descr->
Input[input_idx].input_data1 != m) {
527 cout <<
"v does not match" << endl;
530 if (
Descr->
Input[input_idx].input_data2 != n) {
531 cout <<
"b does not match" << endl;
534 if (
Descr->
Input[input_idx].input_data3 != nb_flags) {
535 cout <<
"f does not match" << endl;
539 for (h = 0; h < Geos.size(); h++) {
558 cout <<
"input incidence geometries from file "
559 <<
Descr->
Input[input_idx].input_string <<
" by row ranks:" << endl;
564 std::vector<std::vector<int> > Geos;
568 cout <<
"input incidence geometries from file "
569 "the file contains " << Geos.size() <<
"incidence geometries" << endl;
573 if (
Descr->
Input[input_idx].input_data1 != m) {
574 cout <<
"v does not match" << endl;
577 if (
Descr->
Input[input_idx].input_data2 != n) {
578 cout <<
"b does not match" << endl;
581 if (
Descr->
Input[input_idx].input_data3 != r) {
582 cout <<
"r does not match" << endl;
586 for (h = 0; h < Geos.size(); h++) {
605 int v, b, k, design_sz;
610 design_sz =
Descr->
Input[input_idx].input_data4;
616 int underlying_set_size = 0;
619 cout <<
"data_input_stream::read_objects "
620 "Reading the file " <<
Descr->
Input[input_idx].input_string << endl;
624 Descr->
Input[input_idx].input_string, verbose_level);
626 cout <<
"Read the file " <<
Descr->
Input[input_idx].input_string <<
", underlying_set_size=" << underlying_set_size << endl;
631 for (h = 0; h < SoS->
nb_sets; h++) {
633 if ((h % 1000) == 0) {
634 cout <<
"data_input_stream::read_objects " << h <<
" / " << SoS->
nb_sets << endl;
659 long int *Spread_table;
664 cout <<
"data_input_stream::read_objects "
665 "Reading spread table from file "
666 <<
Descr->
Input[input_idx].input_string2 << endl;
670 Spread_table, nb_spreads, spread_size,
674 cout <<
"Reading spread table from file "
675 <<
Descr->
Input[input_idx].input_string2 <<
" done" << endl;
676 cout <<
"The spread table contains " << nb_spreads
677 <<
" spreads" << endl;
685 int underlying_set_size = 0;
688 cout <<
"data_input_stream::read_objects "
689 "Reading the file " <<
Descr->
Input[input_idx].input_string << endl;
693 Descr->
Input[input_idx].input_string, verbose_level);
695 cout <<
"Read the file " <<
Descr->
Input[input_idx].input_string <<
", underlying_set_size=" << underlying_set_size << endl;
700 for (h = 0; h < SoS->
nb_sets; h++) {
710 Spread_table, nb_spreads, spread_size,
729 int underlying_set_size = 0;
732 cout <<
"data_input_stream::read_objects "
733 "Reading the file " <<
Descr->
Input[input_idx].input_string << endl;
737 Descr->
Input[input_idx].input_string, verbose_level);
739 cout <<
"Read the file " <<
Descr->
Input[input_idx].input_string <<
", underlying_set_size=" << underlying_set_size << endl;
745 for (h = 0; h < SoS->
nb_sets; h++) {
771 int underlying_set_size = 0;
774 cout <<
"data_input_stream::read_objects "
775 "Reading the file " <<
Descr->
Input[input_idx].input_string << endl;
779 Descr->
Input[input_idx].input_string, verbose_level);
781 cout <<
"Read the file " <<
Descr->
Input[input_idx].input_string <<
", underlying_set_size=" << underlying_set_size << endl;
787 for (h = 0; h < SoS->
nb_sets; h++) {
813 int underlying_set_size = 0;
816 cout <<
"projective_space_object_classifier::process_multiple_objects_from_file "
817 "Reading the file " <<
Descr->
Input[input_idx].input_string << endl;
821 Descr->
Input[input_idx].input_string, verbose_level);
823 cout <<
"Read the file " <<
Descr->
Input[input_idx].input_string <<
", underlying_set_size=" << underlying_set_size << endl;
829 for (h = 0; h < SoS->
nb_sets; h++) {
850 cout <<
"input from parallel search" << endl;
853 int nb_cases =
Descr->
Input[input_idx].input_data1;
857 mask.assign(
Descr->
Input[input_idx].input_string);
858 cases_fname.assign(
Descr->
Input[input_idx].input_string2);
861 cout <<
"input from parallel search, mask=" << mask << endl;
862 cout <<
"input from parallel search, nb_cases=" << nb_cases << endl;
863 cout <<
"input from parallel search, cases_fname=" << cases_fname << endl;
873 col_label.assign(
"REP");
878 Reps, verbose_level);
880 cout <<
"data_input_stream::read_objects the sets have different sizes" << endl;
885 for (c = 0; c < nb_cases; c++) {
889 cout <<
"case " << c <<
" / " << nb_cases <<
" prefix=";
897 sprintf(str, mask.c_str(), c);
901 int underlying_set_size = 0;
910 cout <<
"objects from file " << c <<
" / " << nb_cases <<
911 " the file contains " << nb_sol <<
" sets" << endl;
915 cout <<
"data_input_stream::read_objects the sets have different sizes" << endl;
923 Sol_idx =
NEW_lint(nb_sol * sol_width);
924 set =
NEW_lint(prefix_sz + sol_width);
925 for (i = 0; i < nb_sol; i++) {
926 for (j = 0; j < sol_width; j++) {
927 Sol_idx[i * sol_width + j] = SoS->
Sets[i][j];
931 for (i = 0; i < nb_sol; i++) {
936 Lint_vec_copy(Sol_idx + i * sol_width, set + prefix_sz, sol_width);
941 set, prefix_sz + sol_width,
955 cout <<
"data_input_stream::read_objects "
956 "unknown input type " <<
Descr->
Input[input_idx].input_type << endl;
962 cout <<
"data_input_stream::read_objects nb_objects_to_test != Objects.size()" << endl;
967 cout <<
"data_input_stream::read_objects done" << endl;
a collection of combinatorial functions
long int int_n_choose_k(int n, int k)
void init_from_file(int &underlying_set_size, std::string &fname, int verbose_level)
int has_constant_size_property()
void init_from_orbiter_file(int underlying_set_size, std::string &fname, int verbose_level)
a collection of functions related to file io
int count_number_of_orbits_in_file(std::string &fname, int verbose_level)
void read_incidence_by_row_ranks_file(std::vector< std::vector< int > > &Geos, int &m, int &n, int &r, std::string &inc_file_name, int verbose_level)
void read_column_and_parse(std::string &fname, std::string &col_label, data_structures::set_of_sets *&SoS, int verbose_level)
void lint_matrix_read_csv(std::string &fname, long int *&M, int &m, int &n, int verbose_level)
void read_incidence_file(std::vector< std::vector< int > > &Geos, int &m, int &n, int &nb_flags, std::string &inc_file_name, int verbose_level)
void read_set_from_file(std::string &fname, long int *&the_set, int &set_size, int verbose_level)
#define Lint_vec_copy(A, B, C)
#define Lint_vec_print(A, B, C)
@ t_data_input_stream_incidence_geometry_by_row_ranks
@ t_data_input_stream_set_of_points
@ t_data_input_stream_file_of_incidence_geometries
@ t_data_input_stream_set_of_lines
@ t_data_input_stream_file_of_point_set
@ t_data_input_stream_from_parallel_search
@ t_data_input_stream_file_of_points
@ t_data_input_stream_file_of_packings_through_spread_table
@ t_data_input_stream_file_of_designs
@ t_data_input_stream_file_of_packings
@ t_data_input_stream_incidence_geometry
@ t_data_input_stream_set_of_points_and_lines
@ t_data_input_stream_file_of_lines
@ t_data_input_stream_set_of_packing
@ t_data_input_stream_file_of_incidence_geometries_by_row_ranks
the orbiter library for the classification of combinatorial objects