Jump to content

Percolation/Mean cluster density: Difference between revisions

m
Simplified code.
m (Removed unnecessary line of code.)
m (Simplified code.)
Line 943:
private void createGrid(int aGridSize, double aProbability) {
private static ThreadLocalRandom random = ThreadLocalRandom.current();
 
grid = new int[aGridSize][aGridSize];
for ( int row = 0; row < aGridSize; row++ ) {
Line 955 ⟶ 957:
private int[][] grid;
private int clusterCount;
private static ThreadLocalRandom random = ThreadLocalRandom.current();
 
private static final int CLUSTERED = -1;
908

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.