Mercurial > repos > petrn > repeatexplorer
diff louvain/graph.h @ 8:3bc73f5dc785 draft
Uploaded
| author | petrn |
|---|---|
| date | Fri, 20 Dec 2019 14:17:59 +0000 |
| parents | f6ebec6e235e |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/louvain/graph.h Fri Dec 20 14:17:59 2019 +0000 @@ -0,0 +1,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 : jean-loup.guillaume@lip6.fr +// 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,float> > > links; + + Graph (char *filename, int type); + + void clean(int type); + void renumber(int type); + void display(int type); + void display_binary(char *filename, char *filename_w, int type); +}; + +#endif // GRAPH_H
