main.cpp
875 Bytes
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
#include "PaperGraphWidget.h"
#include <QtWidgets/QApplication>
#include <QDebug>
#include <algorithm>
#include <exception>
#include <fstream>
#include <iterator>
#include <string>
#include <map>
#include <vector>
#include <boost/graph/fruchterman_reingold.hpp>
//#include <boost/graph/kamada_kawai_spring_layout.hpp>
#include <boost/graph/random_layout.hpp>
#include <boost/graph/circle_layout.hpp>
#include <boost/algorithm/string.hpp> //boost::split
#include <boost/bimap.hpp>
using namespace std;
/**
* Constants
*/
const char* PAPER_FILENAME = "dblp-paper.txt";
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
PaperGraphWidget w;
try {
ifstream fin(PAPER_FILENAME);
w.print_graph(fin);
fin.close();
} catch (const std::exception& e) {
qDebug() << "Error: " << e.what();
return EXIT_FAILURE;
}
w.show();
return app.exec();
}