public class PairPermutationGenerator extends PermutationGenerator
| Modifier and Type | Field and Description |
|---|---|
protected int |
i |
protected int |
j |
nElements, nGenerated, nPermutations, permutation| Constructor and Description |
|---|
PairPermutationGenerator(int nElements) |
| Modifier and Type | Method and Description |
|---|---|
protected long |
computeNumberOfPermutations() |
static long |
computeNumberOfPermutations(int n) |
int[] |
next()
return the next permutation or throw a NoSuchElementException if there is none.
|
void |
reset() |
getNumberOfGeneratedPermutations, getNumberOfPermutations, hasNext, initPermutations, printOn, printOnpublic void reset()
reset in class PermutationGeneratorpublic static long computeNumberOfPermutations(int n)
protected long computeNumberOfPermutations()
computeNumberOfPermutations in class PermutationGeneratorpublic int[] next()
PermutationGeneratornext in class PermutationGenerator