-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
52 lines (44 loc) · 1.37 KB
/
main.cpp
File metadata and controls
52 lines (44 loc) · 1.37 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
#include "Model.h"
#include "Data.h"
#include "BruteForce.h"
#include "MonteCarloSampling.h"
#include "OrderingSampling.h"
#include "ListingSampling.hpp"
#include "OrderingListingSampling.hpp"
#include <ctime>
int main() {
clock_t start, end;
Model model;
// model.fin.open(R"(..\1.txt)");
LoadData(model);
// cout << " BruteForce " << endl;
// BruteForce(model);
start = clock();
cout << endl;
cout << " MonteCarlo " << endl;
model.result.clear();
MonteCarloSampling(model);
end = clock();
cout << "MonteCarlo Time : " << (double) (end - start) / CLOCKS_PER_SEC << " s " << endl;
start = clock();
cout << endl;
cout << " Ordering " << endl;
model.result.clear();
OrderingSampling(model);
end = clock();
cout << "Ordering Time : " << (double) (end - start) / CLOCKS_PER_SEC << " s " << endl;
start = clock();
cout << endl;
cout << " ListingSampling " << endl;
model.result.clear();
ListingSampling(model);
end = clock();
cout << "Listing Time : " << (double) (end - start) / CLOCKS_PER_SEC << " s " << endl;
start = clock();
cout << endl;
cout << " OrderingListingSampling " << endl;
model.result.clear();
OrderingListingSampling(model);
end = clock();
cout << "OrderingListingSampling Time : " << (double) (end - start) / CLOCKS_PER_SEC << " s " << endl;
}