-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
144 lines (111 loc) · 3.33 KB
/
Copy pathmain.cpp
File metadata and controls
144 lines (111 loc) · 3.33 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
////TEST BINARY
//#include "dijkstraalgorithmtemplate.h"
//#include <iostream>
//#include <QElapsedTimer>
//typedef DijkstraAlgorithm<DFNode, Edge<DFNode> > DijkstraFib;
//typedef DijkstraAlgorithm<DNode, Edge<DNode> > DijkstraPriorityList;
//int main(int argc, char *argv[])
//{
// DijkstraFib dij;
//// DijkstraPriorityList dij;
// QElapsedTimer timer;
//// if(argc == 2) // benchmarking
//// {
//// QString name = argv[1];
//// dij.loadGraph(name);
//// timer.start();
//// dij.doAlg();
//// qint64 elapsedTime_ms = timer.elapsed();
////// std::cout << "Time = " << elapsedTime_ms << " ms\n";
//// std::cout << elapsedTime_ms << "+";
//// }
//// else
//// {
//// std::cout << "File name missing\n";
//// }
//// if(argc == 2)
//// {
//// QString name = argv[1];
//// dij.loadGraph(name);
//// std::cout << "Choose node index below " << dij.getNodeCount() << "\n";
//// int tmp = 0;
//// std::cin >> tmp;
//// dij.setIndex(tmp); // inf loop 2 no more
//// std::cout << "Processing " << tmp << "\n";
//// if(tmp >= dij.getNodeCount())
//// {
//// std::cout << "Index to large\n";
//// return 0;
//// }
//// timer.start();
//// dij.doAlg();
//// qint64 elapsedTime_ms = timer.elapsed();
//// std::cout << "Time = " << elapsedTime_ms << " ms\n";
//// dij.printResaults();
//// }
//// else
//// {
//// std::cout << "File name missing\n";
//// }
// if(argc == 3)
// {
// QString name = argv[1];
// QString num = argv[2];
// dij.loadGraph(name);
// std::cout << "Choose node index below " << dij.getNodeCount() << "\n";
// int tmp = num.toInt();
//// std::cin >> tmp;
// dij.setIndex(tmp); // inf loop 2 no more
// std::cout << "Processing " << tmp << "\n";
// if(tmp >= dij.getNodeCount())
// {
// std::cout << "Index to large\n";
// return 0;
// }
// timer.start();
// dij.doAlg();
// qint64 elapsedTime_ms = timer.elapsed();
// std::cout << "Time = " << elapsedTime_ms << " ms\n";
// dij.printResaults();
// }
// else
// {
// std::cout << "File name and index missing\n";
// }
// return 0;
//}
//cel program z graficnim vmesnikom
//#include <QtGui/QApplication>
#include <QApplication> // android qt 5
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.setWindowTitle("Fibonacci Heaps");
w.show();
return a.exec();
}
////TEST TIMES
//#include "benchmark.h"
//int main(int argc, char *argv[])
//{
// Benchmark bench;
//// bench.worstCaseExtractMin(10000);
//// bench.worstCaseExtractMinTest(10000000);
//// bench.worstCaseExtractMinOutFiles(50000000, 30); // to bo miki generiral podatke
// return 0;
//}
//////DijkstraGraphics
//#include <QtGui>
//#include "dijkstrawidget.h"
//int main(int argc, char **argv)
//{
// QApplication app(argc, argv);
// app.setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
// DijkstraWidget *widget = new DijkstraWidget;
// QMainWindow mainWindow;
// mainWindow.setCentralWidget(widget);
// mainWindow.show();
// return app.exec();
//}