Implementing definition of neighbour.