rook_W

simulate.rook_W(nrow, ncol, normalize=False)

Binary rook adjacency on an nrow x ncol lattice (row-major ids).

Parameters

Name Type Description Default
nrow int Lattice dimensions; the matrix has nrow * ncol units. required
ncol int Lattice dimensions; the matrix has nrow * ncol units. required
normalize bool Row-normalize the adjacency before returning. False

Returns

Name Type Description
np.ndarray The (N, N) adjacency: 1 where two cells share an edge.