-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.cpp
More file actions
89 lines (78 loc) · 2.12 KB
/
Copy pathtest.cpp
File metadata and controls
89 lines (78 loc) · 2.12 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#include <iostream>
#include <string>
#include <sstream>
#include <queue>
#include <time.h>
#include <stdlib.h>
#include <iomanip>
#include "DecisionT.h"
#include "algorithm.h"
int main(int argc, char *argv[])
{
//input the argvs
int cs_start = atoi(argv[1]);
int cs_end = atoi(argv[2]);
int ds = atoi(argv[3]);
string dataset = argv[4];
int cons[cs_end - cs_start + 1];
for (int i = cs_start; i <= cs_end; i++)
cons[i - cs_start] = i;
int cslen = cs_end - cs_start + 1;
int allpart = atoi(argv[5]);
double alpha = atof(argv[6]);
int k = atoi(argv[7]);
int initpart = (k - 1) * (allpart / k);
int looppart = initpart / 6 + 10;
string datafile = "standard//"+dataset+".csv";
string timepath = "result\\" + dataset + "\\time_"+to_string(alpha)+".csv";
for (int i = 2; i >= 0; i--)
{
if (i == 2)
{
// ARU
string savepath = "result\\" + dataset + "\\aru_"+to_string(alpha)+".csv";
test2(datafile,
cons,
cslen,
ds,
allpart,
initpart,
looppart,
alpha,
k,
savepath,
timepath);
}
else if (i == 1)
{
// PAR
string savepath = "result\\" + dataset + "\\par_"+to_string(alpha)+".csv";
test1(datafile,
cons,
cslen,
ds,
allpart,
initpart,
looppart,
alpha,
k,
savepath,
timepath);
}else{
//Naive-U
string savepath = "result\\" + dataset + "\\naiveu_"+to_string(alpha)+".csv";
test0(datafile,
cons,
cslen,
ds,
allpart,
initpart,
looppart,
alpha,
k,
savepath,
timepath);
}
}
return 0;
}