Function ADS::twoOptMove

Function Documentation

inline Nodes ADS::twoOptMove(Nodes pi, int i, int j)

the circuit of I2( pi ) without the edges ( pi[ i ] , pi[ i + 1 ] ) and ( pi[ j ] , pi[ j + 1 ] ), 0 <= i < j < n, not consecutive: the stretch pi[ i + 1 .

. j ] reversed

Pre:

0 <= i < j < n

Post:

a circuit of the same cities