Class SimpleCartesianProductConstraintConverter

  • All Implemented Interfaces:
    IndexBasedConstraintConverter

    public class SimpleCartesianProductConstraintConverter
    extends AbstractIndexBasedConstraintConverter
    Converts MethodBasedConstraint objects to their TupleList representation by executing their ConstraintFunction with every possible value combination of its parameters. This means the cartesian product of its parameters values is used. For example, if a constraint uses parameters "param1" with value "1" and "2" and "param2" with value "5" and "6", then the constraint it tested with all these combinations: {"1", "5"}, {"1", "6"}, {"2", "5"} ,{"2", "6"}. For all combinations for which the ConstraintFunction returns false, a corresponding tuple is added to the TupleList representation. Naturally, this is a very expensive conversion process, especially if there are many large parameters involved.
    • Constructor Detail

      • SimpleCartesianProductConstraintConverter

        public SimpleCartesianProductConstraintConverter​(List<Parameter> parameters)
        Parameters:
        parameters - parameters containing the values for the conversion. Must not be null.