von Neumann Neighborhood BFS
fun vonNeumannNeighborhoodBFS(center: IntArray, 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 an outward expanding approach from the center point using breadth-first search (BFS).
Return
the points in the neighborhood
Parameters
center
the point around which the neighborhood resides
radius
the radius for the neighborhood. The default is 1.
include Center
indicates if the center point should be included in the returned array