Orbiter 2022
Combinatorial Objects
orbiter_data_file.cpp
Go to the documentation of this file.
1// orbiter_data_file.cpp
2//
3// Anton Betten
4// July 30, 2018
5//
6//
7//
8// pulled out of ovoid: Jul 30, 2018
9//
10
11#include "foundations.h"
12
13using namespace std;
14
15
16
17namespace orbiter {
18namespace layer1_foundations {
19namespace orbiter_kernel_system {
20
21
23{
24 null();
25}
26
28{
29 freeself();
30}
31
33{
34}
35
37{
38 int i;
39
40 for (i = 0; i < nb_cases; i++) {
43 }
46
49}
50
51void orbiter_data_file::load(std::string &fname, int verbose_level)
52{
53 int f_v = (verbose_level >= 1);
54 char **data;
55 int i;
56 file_io Fio;
57
58
59 if (f_v) {
60 cout << "orbiter_data_file::load "
61 "loading file " << fname << endl;
62 }
63
64
65 if (!Fio.try_to_read_file(fname,
66 nb_cases, data, verbose_level)) {
67 cout << "orbiter_data_file::load couldn't read file "
68 << fname << endl;
69 exit(1);
70 }
71
72 if (f_v) {
73 cout << "file read containing " << nb_cases << " cases" << endl;
74 }
75
76 if (f_v) {
77 cout << "read_and_parse_data_file: "
78 "parsing sets" << endl;
79 }
80
81 Fio.parse_sets(nb_cases, data,
82 FALSE /*f_casenumbers */,
85 verbose_level - 2);
86 if (f_v) {
87 cout << "read_and_parse_data_file: "
88 "parsing sets done" << endl;
89 }
90
91 for (i = 0; i < nb_cases; i++) {
92 FREE_char(data[i]);
93 }
94 FREE_pchar(data);
95
96 if (f_v) {
97 cout << "orbiter_data_file::load "
98 "done nb_cases = " << nb_cases << endl;
99 }
100}
101
102
103}}}
104
void parse_sets(int nb_cases, char **data, int f_casenumbers, int *&Set_sizes, long int **&Sets, char **&Ago_ascii, char **&Aut_ascii, int *&Casenumbers, int verbose_level)
Definition: file_io.cpp:1825
int try_to_read_file(std::string &fname, int &nb_cases, char **&data, int verbose_level)
Definition: file_io.cpp:2037
#define FREE_pchar(p)
Definition: foundations.h:648
#define FREE_int(p)
Definition: foundations.h:640
#define FALSE
Definition: foundations.h:234
#define FREE_char(p)
Definition: foundations.h:646
the orbiter library for the classification of combinatorial objects