Mercurial > repos > petr-novak > repeatrxplorer
comparison louvain/main_random.cpp @ 0:1d1b9e1b2e2f draft
Uploaded
author | petr-novak |
---|---|
date | Thu, 19 Dec 2019 10:24:45 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:1d1b9e1b2e2f |
---|---|
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 } |