-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathget_lattices.cpp
More file actions
30 lines (26 loc) · 984 Bytes
/
get_lattices.cpp
File metadata and controls
30 lines (26 loc) · 984 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <iostream>
#include "../src/yaml_c_wrapper.h"
#include <cstring>
int main(int argc, char* argv[]) {
const char* file_name = "../lattice_files/ex.pals.yaml";
const char* lattice_name = "";
if (argc >= 2) {
file_name = argv[1];
}
if (argc >= 3) {
for (int i = 1; i < argc; i++) {
if (strcmp(argv[i], "-lat") == 0) {
lattice_name = argv[i+1];
}
}
}
struct lattices lat = get_lattices(file_name, lattice_name);
std::cout << "Printing original lattice information: " << std::endl;
std::cout << yaml_to_string(lat.original) << std::endl << "\n\n";
// put separating lines here
std::cout << "Printing included lattice information: " << std::endl;
std::cout << yaml_to_string(lat.included) << std::endl << "\n\n";
std::cout << "Printing expanded lattice information: " << std::endl;
std::cout << yaml_to_string(lat.expanded) << std::endl;
return 0;
}