Percolation/Mean run density: Difference between revisions

m
Altered a variable identifier.
(New post.)
m (Altered a variable identifier.)
Line 779:
int length = aLength;
while ( length-- > 0 ) {
int nextBit = ( RANDOMrandom.nextInt(RANDOM_MAXIMUM + 1) < threshold ) ? 1 : 0;
if ( previousBit < nextBit ) {
count += 1.0;
Line 789:
}
 
private static ThreadLocalRandom RANDOMrandom = ThreadLocalRandom.current();
private static final int RANDOM_MAXIMUM = Integer.MAX_VALUE - 1;
871

edits