private void nextNeighbourhood ( ) { if ( cycleNeighbourhoods || k < getNeighbourhoods ( ) . size ( ) - 1 ) { // try again with next neighbourhood in next step k = ( k + 1 ) % getNeighbourhoods ( ) . size ( ) ; } else { // no next neighbourhood... stop stop ( ) ; } }
Switches to the next neighbourhood in the list if any going back to the start if cycling is enabled and all neighbourhoods have been used .