Orbiter 2022
Combinatorial Objects
trace_record.cpp
Go to the documentation of this file.
1/*
2 * trace_record.cpp
3 *
4 * Created on: May 15, 2019
5 * Author: betten
6 */
7
8
9
10
11#include "orbiter.h"
12
13using namespace std;
14
15namespace orbiter {
16namespace layer5_applications {
17namespace semifields {
18
19
20
22{
23 coset = 0;
24 trace_po = 0;
25 f_skip = FALSE;
26 solution_idx = -1;
27 nb_sol = -1;
28 go = -1;
29 pos = -1;
30 so = -1;
31 orbit_len = 0;
32 f2 = -1;
33}
34
36{
37
38}
39
40
42 trace_record *T,
43 int f_trace_record_prefix, std::string &trace_record_prefix,
44 int iso, int f, int po, int so, int N)
45{
46 long int *M;
47 int w = 10;
48 string fname;
49 const char *column_label[] = {
50 "coset",
51 "trace_po",
52 "f_skip",
53 "solution_idx",
54 "nb_sol",
55 "go",
56 "pos",
57 "so",
58 "orbit_len",
59 "f2"
60 };
61 int i;
63
64 M = NEW_lint(N * w);
65 for (i = 0; i < N; i++) {
66 M[i * w + 0] = T[i].coset;
67 M[i * w + 1] = T[i].trace_po;
68 M[i * w + 2] = T[i].f_skip;
69 M[i * w + 3] = T[i].solution_idx;
70 M[i * w + 4] = T[i].nb_sol;
71 M[i * w + 5] = T[i].go;
72 M[i * w + 6] = T[i].pos;
73 M[i * w + 7] = T[i].so;
74 M[i * w + 8] = T[i].orbit_len;
75 M[i * w + 9] = T[i].f2;
76 }
77
78 char str[1000];
79
80 sprintf(str, "trace_record_%03d_f%05d_po%d_so%d.csv",
81 iso, f, po, so);
82
83
84 if (f_trace_record_prefix) {
85 fname.assign(trace_record_prefix);
86 fname.append(str);
87 }
88 else {
89 fname.assign(str);
90 }
91 Fio.lint_matrix_write_csv_with_labels(fname, M, N, w, column_label);
92 cout << "Written file " << fname << " of size " << Fio.file_size(fname) << endl;
93}
94
95
96}}}
97
98
void lint_matrix_write_csv_with_labels(std::string &fname, long int *M, int m, int n, const char **column_label)
Definition: file_io.cpp:1453
to record the result of isomorphism testing
Definition: semifields.h:857
#define FALSE
Definition: foundations.h:234
#define NEW_lint(n)
Definition: foundations.h:628
void save_trace_record(trace_record *T, int f_trace_record_prefix, std::string &trace_record_prefix, int iso, int f, int po, int so, int N)
the orbiter library for the classification of combinatorial objects