
An element at an index, randomly chosen from a range, will be permuted with an element at a prescribed index position.
With Index range = [0,0], Index = 3, Forbid same is off and (1,2,3,4,5) as the starting permutation, the outcome might be one of the five permutations (3,2,1,4,5), (1,3,2,4,5), (1,2,3,4,5), (1,2,4,3,5), (1,2,5,4,3). If Forbid same were chosen as on, the (1,2,3,4,5) permutation is forbidden and the outcome could only be one of the four remaining permutations.
© djmw, January 5, 2011