int numNodes = 100;
int numEdges = 1000;
long seed = System.currentTimeMillis();
Random random = new Random(seed);
//normal
Distribution n = new NormalDistribution(2);
n = n.initialize(numNodes,numEdges);
int degreeSum = 0;
for (int i=0;i<numNodes;i++) {
int degree=n.nextValue(random);
degreeSum+=degree;
}
System.out.println(degreeSum);
random = new Random(seed);
n = new NormalDistribution(2);
n = n.initialize(numNodes,numEdges);
for (int i=0;i<numNodes;i++) {
degreeSum-=n.nextValue(random);
}
assertEquals(0,degreeSum);
//scale free
n = new PowerLawDistribution(2.9);
n = n.initialize(numNodes,numEdges);
degreeSum = 0;
for (int i=0;i<numNodes;i++) {
int degree=n.nextValue(random);
//System.out.println(degree);
degreeSum+=degree;
}
System.out.println(degreeSum);