Package com.bayesserver
Class MultipleIterator
- java.lang.Object
-
- com.bayesserver.MultipleIterator
-
public final class MultipleIterator extends Object
Provides methods to iterate over multiple distributions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
MultipleIterator.Combination
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
iterate(VariableContextCollection[] subsets, int[] subsetRows, MultipleIterator.Combination combination)
Iterates over all the variables and their states found in [subsets].static void
iterate(VariableContextCollection supersetVariables, VariableContextCollection[] subsets, int[] subsetRows, MultipleIterator.Combination combination)
Iterates over all the variables and their states found in [subsets].
-
-
-
Method Detail
-
iterate
public static void iterate(VariableContextCollection[] subsets, int[] subsetRows, MultipleIterator.Combination combination)
Iterates over all the variables and their states found in [subsets]. At each iteration [combination] is called, and [subsetRows] contains the equivalent row in each subset.- Parameters:
subsets
- The distribution to iterate over.subsetRows
- Contains the equivalent row in each subset at a particular iteration (combination).combination
- A method which is called for each iteration.
-
iterate
public static void iterate(VariableContextCollection supersetVariables, VariableContextCollection[] subsets, int[] subsetRows, MultipleIterator.Combination combination)
Iterates over all the variables and their states found in [subsets]. At each iteration [combination] is called, and [subsetRows] contains the equivalent row in each subset.- Parameters:
supersetVariables
- The collection of unique variables (and maybe times) contained in the subsets.subsets
- The distribution who want to iterate over.subsetRows
- Contains the equivalent row in each subset at a particular iteration (combination).combination
- A method which is called for each iteration.
-
-