public class Combinations extends java.util.AbstractSet<Vector> implements CloneableSerializable
Modifier and Type | Class and Description |
---|---|
protected static class |
Combinations.AbstractCombinationsIterator<IteratorType extends Combinations.AbstractCombinationsIterator<IteratorType,ClassType>,ClassType>
Partial implementation of a CombinationsIterator.
|
class |
Combinations.IndexIterator
Iterator that returns the index into a set: 0, 1, 2, ...
|
static class |
Combinations.SubsetIterator<ClassType>
Creates a new instance of SubsetIterator, one that returns the elements
from a given set
|
Constructor and Description |
---|
Combinations(int N,
int k)
Creates a new instance of Combinations
|
Modifier and Type | Method and Description |
---|---|
Combinations |
clone()
Creates a new clone (shallow copy) of this object.
|
int |
getK()
Getter for k
|
int |
getN()
Getter for N
|
java.util.Iterator<Vector> |
iterator() |
int |
size() |
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
public Combinations(int N, int k)
N
- Universe set sizek
- Number of objects to choose from the universe set.public Combinations clone()
CloneableSerializable
clone
in interface CloneableSerializable
clone
in class java.lang.Object
public java.util.Iterator<Vector> iterator()
public int size()
public int getN()
public int getK()