Function brille::make_relative_neighbour_indices

Function Documentation

bArray<int> brille::make_relative_neighbour_indices(const int extent = 1)

Construct an bArray with 3 elements per array of all (2N+1)³-1 combinations of {-N,-N+1,…,N-1,N} for N=extent, skipping over (0,0,0).

Typically extent=1 and the returned bArray is [(-1,-1,-1,),(-1,-1,0),(-1,-1,1),(-1,0,-1),…,(0,0,-1),(0,0,1),…,(1,0,1),(1,1,-1),(1,1,0),(1,1,1)]