public final class IntCompositions extends Object implements IntCombinatorialPort
Implementation note: the description of the algorithm can be found here https://stackoverflow.com/a/6609080/946635
IntCombinatorialPort.Iterator| Constructor and Description |
|---|
IntCompositions(int integer,
int nCompositions) |
| Modifier and Type | Method and Description |
|---|---|
int[] |
getReference()
Returns the reference to the current iteration element
|
void |
reset()
Resets the iteration
|
int[] |
take()
Calculates and returns the next combination or null, if no more combinations exist.
|
public void reset()
IntCombinatorialPortreset in interface IntCombinatorialPortpublic int[] getReference()
IntCombinatorialPortgetReference in interface IntCombinatorialPortpublic int[] take()
IntCombinatorialPorttake in interface IntCombinatorialPortCopyright © 2017. All rights reserved.