Class MultipleIterator


  • public final class MultipleIterator
    extends Object
    Provides methods to iterate over multiple distributions.
    • 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.