pairwise_swapping function

Proposes pairwise swap of samples on each call.

Proposes pairwise swap of samples on each call.

This function will ensure that one of the locations is always non-empty. It should not return trivial permutations (e.g., src=c(1,2) and dst=c(1,2)).

pairwise_swapping(batch_container, iteration)

Arguments

  • batch_container: The batch-container.
  • iteration: The current iteration number.

Returns

Function accepting batch container & iteration number. It returns a list with length 1 vectors 'src' and 'dst', denoting source and destination index for the swap operation