-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.c
70 lines (50 loc) · 1.94 KB
/
main.c
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
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "tads/Cluster.h"
int main(int argc, char *argv[])
{
// clock_t start, end, head, tail;
// double cpu_time_used;
// head = clock();
Cluster cluster = cluster_init(atoi(argv[2]));
// start = clock();
cluster_read(cluster, argv[1]);
// end = clock();
// cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC;
// printf("cluster_read() time: %.3lf seconds\n", cpu_time_used);
// start = clock();
cluster_calcDistances(cluster);
// end = clock();
// cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC;
// printf("cluster_calcDistances() time: %.3lf seconds\n", cpu_time_used);
// start = clock();
cluster_sortDistances(cluster);
// end = clock();
// cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC;
// printf("cluster_sortDistances() time: %.3lf seconds\n", cpu_time_used);
// start = clock();
cluster_kruskal(cluster);
// end = clock();
// cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC;
// printf("cluster_kruskal() time: %.3lf seconds\n", cpu_time_used);
// start = clock();
cluster_identifyGroups(cluster);
// end = clock();
// cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC;
// printf("cluster_identifyGroups() time: %.3lf seconds\n", cpu_time_used);
// start = clock();
cluster_generateResult(cluster, argv[3]);
// end = clock();
// cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC;
// printf("cluster_generateResult() time: %.3lf seconds\n", cpu_time_used);
// start = clock();
cluster_destroy(cluster);
// end = clock();
// cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC;
// printf("cluster_destroy() time: %.3lf seconds\n", cpu_time_used);
// tail = clock();
// cpu_time_used = ((double)(tail - head)) / CLOCKS_PER_SEC;
// printf("total time: %.3lf seconds\n", cpu_time_used);
return 0;
}