Iterates over the neighbors of a site, where neighbors are those
sites immediately adjacent to it in each direction; this does not
include sites diagonal to the site. In D dimensions, there are 2D
such neighbors. The neighbor definition may or may not be defined
as obeying periodicity, as desired.
Method to test the neighbor iterator. Constructs a lattice
with sites defined to hold a color. Configures iterator,
loops over neighbor sites and defines up/down neighbors to
have colors yellow and blue, respectively. Then puts up a window
with the lattice drawn as an array of squares, with central site colored
red and with neighbor sites identified by their colors. 3-D lattice is shown
with a set of slices through the planes in the 3rd dimension.