-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
32 lines (22 loc) · 814 Bytes
/
main.cpp
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
#include "rNVD.cpp"
#include "json_parser.cpp"
#include<string>
#include <time.h>
#include <cstring>
#include "output.cpp"
using namespace std;
int main(int argc, char* argv[]) {
Output output = Output();
if(argc < 3) {
output.print_usage();
}
string firstFile = argv[1];
string secondFile = argv[2];
int threads = stoi(argv[3]);
if(argc == 5 && strcmp(argv[4], "q") == 0) output.set_quiet(true);
output.print_header();
vector<vector<string>> firstClusterSet = fromFile(firstFile);
vector<vector<string>> secondClusterSet = fromFile(secondFile);
tuple<double, double, double, long long int, long long int> rNVD_all = get_rNVD(firstClusterSet, secondClusterSet, threads);
output.print_result(get<0>(rNVD_all), get<1>(rNVD_all), get<2>(rNVD_all));
}