mk_constant_swapping_function: Create function to propose n pairwise swaps of samples on...

View source: R/shuffle_samples.R

mk_constant_swapping_functionR Documentation

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

Description

This internal function is wrapped by mk_swapping_function()

Usage

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.

Value

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


designit documentation built on May 29, 2024, 12:04 p.m.