public class UniqueRandomPermGenerator extends RandomPermutationGenerator
Modifier and Type | Field and Description |
---|---|
protected SortedArrayIntSet |
visited |
orig, rand, seed
nElements, nGenerated, nPermutations, permutation
Constructor and Description |
---|
UniqueRandomPermGenerator(int nElements,
int nPermutations,
int seed) |
Modifier and Type | Method and Description |
---|---|
int[] |
next()
return the next permutation or throw a NoSuchElementException if there is none.
|
void |
reset() |
computeNumberOfPermutations
getNumberOfGeneratedPermutations, getNumberOfPermutations, hasNext, initPermutations, printOn, printOn
protected SortedArrayIntSet visited
public UniqueRandomPermGenerator(int nElements, int nPermutations, int seed)
public void reset()
reset
in class RandomPermutationGenerator
public int[] next()
PermutationGenerator
next
in class RandomPermutationGenerator