Percolation/Mean cluster density: Difference between revisions

Updated D entry
m (J: just in case anyone wants the definitions without having to wade through the entire narrative here.)
(Updated D entry)
Line 156:
}
 
size_t countClusters(bool justCount=false)(Grid grid) pure nothrow {
pure nothrow @safe @nogc {
immutable side = grid.length;
static if (justCount)
Line 163 ⟶ 164:
Cell clusterID = 1;
 
void walk(in size_t r, in size_t c) nothrow @safe @nogc {
grid[r][c] = clusterID; // Fill grid.