mk_constant_swapping_function function

Create function to propose n pairwise swaps of samples on each call (n is a constant across iterations)

Create function to propose n pairwise swaps of samples on each call (n is a constant across iterations)

This internal function is wrapped by mk_swapping_function()

mk_constant_swapping_function(n_swaps, quiet = FALSE)

Arguments

  • n_swaps: Number of swaps to be proposed (valid range is 1..floor(n_samples/2))
  • quiet: Do not warn if number of swaps is too big.

Returns

Function accepting batch container & iteration number. Return a list with length n vectors 'src' and 'dst', denoting source and destination index for the swap operation on each call