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 SummaryConstructorsConstructorDescriptionCombinationIterator(int[] maxValues) Creates a combination set for a set of variables with the given number of maxValues
- 
Method SummaryMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.IteratorforEachRemaining
- 
Constructor Details- 
CombinationIteratorpublic 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- 
hasNextpublic boolean hasNext()
- 
nextpublic int[] next()
- 
removepublic void remove()
 
-