public class UniqueRandomPermGenerator extends RandomPermutationGenerator
| Modifier and Type | Field and Description |
|---|---|
protected SortedArrayIntSet |
visited |
orig, rand, seednElements, 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() |
computeNumberOfPermutationsgetNumberOfGeneratedPermutations, getNumberOfPermutations, hasNext, initPermutations, printOn, printOnprotected SortedArrayIntSet visited
public UniqueRandomPermGenerator(int nElements,
int nPermutations,
int seed)
public void reset()
reset in class RandomPermutationGeneratorpublic int[] next()
PermutationGeneratornext in class RandomPermutationGenerator