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