Fix a bug

fix a bug in the neighbourhood function computation. The
index of the cycle was used uninitialized