Package edu.cmu.tetrad.util
Class CombinationIterator
java.lang.Object
edu.cmu.tetrad.util.CombinationIterator
- All Implemented Interfaces:
Iterator
Iterates through all the posible combinations for a set of variables (each with a different number of possible
values). For example, if the number of values for each variable is two, this would iterate through a truth table. Not
to be confused with a combinatorial (taking n values from m possible values).
- Author:
- Juan Casares
-
Constructor Summary
ConstructorsConstructorDescriptionCombinationIterator
(int[] maxValues) Creates a combination set for a set of variables with the given number of maxValues -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
CombinationIterator
public CombinationIterator(int[] maxValues) Creates a combination set for a set of variables with the given number of maxValues- Parameters:
maxValues
- An int array consisting of the maximum values of each variable, in order.
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
public int[] next() -
remove
public void remove()
-