emk_gen_even

Function emk_gen_even 

Source
pub fn emk_gen_even(n: usize, k: usize) -> GenBoxed<(usize, usize)>
Expand description

Generate all combinations by homogeneous revolving-door

The emk_comb_gen function generates all combinations by using a homogeneous revolving-door algorithm.

Arguments:

  • n: The parameter n represents the total number of elements in the combination set. It determines the range of indices that can be used in the combinations.
  • k: The parameter k represents the number of elements that will be swapped in each combination.

Returns:

The function emk_gen returns a GenBoxed<(usize, usize)>, which is a boxed generator that yields tuples of two usize values.