new SoupPermutations(set)
Creates a new SoupPermutations object
Parameters:
Name | Type | Description |
---|---|---|
set |
array | The set to permute |
- Source:
Members
currentPermutationNumber
Number of the current permutation
- Source:
possiblePermutations
Number of possible permutations of this set
- Source:
Methods
current() → {Array}
Gets a copy of the current permutation
- Source:
Returns:
An array with the current permutation of the set
- Type
- Array
hasNext() → {boolean}
Checks if more permutations can be made from the set
- Source:
Returns:
True if more permutations can be made, false otherwise
- Type
- boolean
next() → {Array}
Calculate and return the next permutation. Will throw an exception if called when {@SoupPermutations#hasNext} returns false
- Source:
Returns:
An array with the next permutation of the set
- Type
- Array