-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
87 lines (66 loc) · 1.65 KB
/
main.cpp
File metadata and controls
87 lines (66 loc) · 1.65 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
#include "mainwindow.h"
#include <QApplication>
#include <QFileDialog>
#include <boost/dynamic_bitset.hpp>
#include <QMessageBox>
#include <QTextStream>
#include <QDebug>
#include <iostream>
#include "graph.h"
//#include "filereader.h"
int main(int argc, char *argv[])
{
/* QApplication a(argc, argv);
QTextStream out(stdout);
MainWindow w;
w.show();
return a.exec();*/
/* Graph g2(4);
g2.addEdge(0, 1);
g2.addEdge(0, 2);
g2.addEdge(0, 3);
g2.addEdge(1, 2);
g2.addEdge(1, 3);
g2.addEdge(2, 3);
cout << "\nColoring of Graph 2 \n";
//g2.LFRColoring();
// g2.LFRBitColoring();
g2.EqualBitColoring();*/
// std::list<std::string> fileList;
// fileList = chooseFile(argc, argv);
// return 0;
Graph g2(6);
g2.addEdge(0, 1);
g2.addEdge(0, 3);
g2.addEdge(0, 5);
g2.addEdge(1, 2);
g2.addEdge(1, 4);
g2.addEdge(2, 3);
g2.addEdge(2, 4);
g2.addEdge(3, 5);
g2.addEdge(4, 5);
g2.EqualBitColoring();
std::clock_t start;
double duration;
/*
int gSize = 1000;
Graph g(gSize);
for (int i = 0; i<gSize; i++) {
for (int j = i+1; j<gSize; j++) {
//if (j%3==0)
g.addEdge(i,j);
}
}
start = std::clock();
g.LFRBitColoring();
duration = ( std::clock() - start ) / (double) CLOCKS_PER_SEC;
std::cout<<"printf: "<< duration <<'\n';*/
}
/*int main(int, char*[])
{
boost::dynamic_bitset<> b0(2, 0ul);
std::cout << "bits(0) = " << b0 << std::endl;
b0.resize(3);
std::cout << "bits(0) po resize = " << b0 << std::endl;
}
*/