Class Combinations


  • public final class Combinations
    extends Object
    Generates the available state combinations for a set of variables or counts.
    • Method Detail

      • enumerate

        public static void enumerate​(List<Variable> variables,
                                     CombinationAction combinationAction,
                                     CombinationOptions options)
        Enumerates the state combinations for a set of variables.
        Parameters:
        variables - The variables to generate state combinations for.
        options - Options affecting which combinations are generated.
        combinationAction - Called for each combination with an array (re-used for each call) of zero based indexes for each variable. An index can be null (depending on [options]), if the state is unknown.
      • enumerate

        public static void enumerate​(int[] counts,
                                     CombinationAction combinationAction,
                                     CombinationOptions options)
        Enumerates the combinations for a set of counts.
        Parameters:
        counts - The counts to generate combinations for.
        options - Options affecting which combinations are generated.
        combinationAction - Called for each combination with an array (re-used for each call) of zero based indexes for each count. An index can be null (depending on [options]), if the state is null/unknown.