Percolation/Mean run density: Difference between revisions
m
Simplified code.
m (Altered a variable identifier.) |
m (Simplified code.) |
||
Line 774:
private static double runTest(double aProbability, int aLength, int aRunCount) {
double count = 0.0;
for ( int run = 0; run < aRunCount; run++ ) {
int previousBit = 0;
int length = aLength;
while ( length-- > 0 ) {
int nextBit = ( random.
if ( previousBit < nextBit ) {
count += 1.0;
Line 790 ⟶ 789:
private static ThreadLocalRandom random = ThreadLocalRandom.current();
}
|