Class SimpleCartesianProductConstraintConverter
- java.lang.Object
 - 
- de.rwth.swc.coffee4j.engine.converter.constraints.AbstractIndexBasedConstraintConverter
 - 
- de.rwth.swc.coffee4j.engine.converter.constraints.methodbased.SimpleCartesianProductConstraintConverter
 
 
 
- 
- All Implemented Interfaces:
 IndexBasedConstraintConverter
public class SimpleCartesianProductConstraintConverter extends AbstractIndexBasedConstraintConverter
ConvertsMethodBasedConstraintobjects to theirTupleListrepresentation by executing theirConstraintFunctionwith 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 theConstraintFunctionreturnsfalse, a corresponding tuple is added to theTupleListrepresentation. Naturally, this is a very expensive conversion process, especially if there are many large parameters involved. 
- 
- 
Constructor Summary
Constructors Constructor Description SimpleCartesianProductConstraintConverter(List<Parameter> parameters) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TupleListconvertedConstraint(Constraint constraint, it.unimi.dsi.fastutil.objects.Object2IntMap<String> parameterIdMap, it.unimi.dsi.fastutil.ints.Int2ObjectMap<Parameter> idToParameterMap, int id)template method implemented by sub-classes to convert the givenConstraintinto aTupleList.- 
Methods inherited from class de.rwth.swc.coffee4j.engine.converter.constraints.AbstractIndexBasedConstraintConverter
convert, convert 
 - 
 
 - 
 
- 
- 
Method Detail
- 
convertedConstraint
protected TupleList convertedConstraint(Constraint constraint, it.unimi.dsi.fastutil.objects.Object2IntMap<String> parameterIdMap, it.unimi.dsi.fastutil.ints.Int2ObjectMap<Parameter> idToParameterMap, int id)
Description copied from class:AbstractIndexBasedConstraintConvertertemplate method implemented by sub-classes to convert the givenConstraintinto aTupleList.- Specified by:
 convertedConstraintin classAbstractIndexBasedConstraintConverter- Parameters:
 constraint- constraint to be converted.parameterIdMap- map from parameter name to Id.idToParameterMap- map from Id toParameter.id- id to assign.- Returns:
 - converted constraint.
 
 
 - 
 
 -