zeroVonNeumannNeighborhood

fun zeroVonNeumannNeighborhood(dimension: Int, radius: Int = 1, includeCenter: Boolean = false): List<IntArray>(source)

A von Neumann neighborhood includes all points where the Manhattan distance (sum of absolute differences in all dimensions) from the center is less than or equal to the radius. This function uses a direct iteration around a bounding box. This function returns the von Neumann neighborhood around an array of zeroes of size dimension

Return

the points in the neighborhood

Parameters

dimension

size of the zero-based center point

radius

the radius for the neighborhood. The default is 1.

includeCenter

indicates if the center point should be included in the returned array