common.h : add neighborhood function.