Mercurial > repos > petr-novak > repeatrxplorer
view louvain/main_random.cpp @ 0:1d1b9e1b2e2f draft
Uploaded
author | petr-novak |
---|---|
date | Thu, 19 Dec 2019 10:24:45 -0500 |
parents | |
children |
line wrap: on
line source
using namespace std; char *outfile = NULL; int main(int argc, char **argv) { srand(time(NULL)+getpid()); int n = atoi(argv[1]); int degree = atoi(argv[2]); for (unsigned int i=0 ; i<n ; i++) { for (unsigned int j=0 ; j<n ; j++) { int r = rand()%n; if (r<degree) cout << i << " " << j << endl; } } }