-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsandbox.cpp
More file actions
35 lines (27 loc) · 793 Bytes
/
sandbox.cpp
File metadata and controls
35 lines (27 loc) · 793 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
31
32
33
34
35
#include <lactea_xp_merged/star.hpp>
#include <iostream>
#include <lactea_xp_merged/raw_star_db.hpp>
#include <lactea_xp_merged/star_tree.hpp>
int main(int argc, char** argv) {
printf("starting ...");
if (argc < 5) {
printf("Use %s [stardb] [str] [outputDirectory] [MaxStarsPerNode] \n", argv[0]);
return 0;
}
std::string dbFilename(argv[1]);
std::string treeFilename(argv[2]);
std::string outputDirectory(argv[3]);
unsigned int maxStarsPerNode = atoi(argv[4]);
RawStarDB sdb;
sdb.load(dbFilename, true);
StarTree st;
st.setStarDB(&sdb);
st.setNodePath(outputDirectory);
st.build(maxStarsPerNode);
st.save(treeFilename);
st.load(treeFilename);
st.chunker(true);
st.loadTree(true);
st.printTree();
return 0;
}