The number of elements in the permutation vector. The elements are numbered 1:N
K
The number of exchange pairs to be returned at each access
initialize
Set to 1 to initialize. Set to 0 for additional pairs.
Value
Details
On first call, set initialize to 1. On subsequent accesses, initialize should be 0.
The function returns at most K exchange pairs at each access. The function should
be repeatedly called until result is false.