When mode="complete"
, the function returns a square matrix which
dimensions are equal to the product of the grid dimensions.
When mode="neighbors"
, the function returns a list which length is equal
to the product of the grid dimensions; the length of each item is equal to the
number of neighbors. Neurons are considered to have 8 neighbors at most
(i.e., two neurons are neighbors if they have a distance of type
'maximum' which is equal to 1).