comparison louvain/main_random.cpp @ 8:3bc73f5dc785 draft

Uploaded
author petrn
date Fri, 20 Dec 2019 14:17:59 +0000
parents f6ebec6e235e
children
comparison
equal deleted inserted replaced
7:c56807be3b72 8:3bc73f5dc785
1 using namespace std;
2
3 char *outfile = NULL;
4
5 int
6 main(int argc, char **argv) {
7 srand(time(NULL)+getpid());
8
9 int n = atoi(argv[1]);
10 int degree = atoi(argv[2]);
11
12 for (unsigned int i=0 ; i<n ; i++) {
13 for (unsigned int j=0 ; j<n ; j++) {
14 int r = rand()%n;
15 if (r<degree)
16 cout << i << " " << j << endl;
17 }
18 }
19 }