-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraph.h
executable file
·47 lines (39 loc) · 1.3 KB
/
graph.h
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
// File: graph.h
// -- simple graph handling header file
//-----------------------------------------------------------------------------
// Community detection
// Based on the article "Fast unfolding of community hierarchies in large networks"
// Copyright (C) 2008 V. Blondel, J.-L. Guillaume, R. Lambiotte, E. Lefebvre
//
// This program must not be distributed without agreement of the above mentionned authors.
//-----------------------------------------------------------------------------
// Author : E. Lefebvre, adapted by J.-L. Guillaume
// Email : [email protected]
// Location : Paris, France
// Time : February 2008
//-----------------------------------------------------------------------------
// see readme.txt for more details
#ifndef GRAPH_H
#define GRAPH_H
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#define WEIGHTED 0
#define UNWEIGHTED 1
using namespace std;
class Graph {
public:
vector<vector<pair<int,int> > > links;
Graph (char *filename, int type);
void clean(int type);
void renumber(int type);
void display(int type);
void display_binary(char *filename, int type);
};
#endif // GRAPH_H