forked from YangKai-NEU/TED
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathe_ted_ratio.cpp
42 lines (30 loc) · 915 Bytes
/
e_ted_ratio.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
33
34
35
36
37
38
39
40
41
42
#include "e_counter.hpp"
#include "e_header.h"
#include "e_tool.hpp"
#include <iostream>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
int main(int argv, char *args[]) {
FileReader *tInitReader = new FileReader(args[1], false);
FileReader *tPReader = new FileReader(args[2], true);
FileReader *tLReader = new FileReader(args[3], true);
FileReader *tTReader = new FileReader(args[4], true);
FileWriter *tWriter = new FileWriter(args[5], false);
int tSelect = atoi(args[6]);
Counter *tCounter = new Counter();
double tPDDPRatio =
tCounter->Getratio(tInitReader, tPReader, tLReader, tTReader, tSelect);
char *s;
time_t tTimePtr;
time(&tTimePtr);
s = ctime(&tTimePtr);
for (int i = 0; i < strlen(s); i++) {
tWriter->WriteChar(s[i]);
}
tWriter->WriteChar(' ');
tWriter->WriteDouble(tPDDPRatio);
tWriter->WriteChar('\n');
return 0;
}