choco.cp.common.util.preprocessor.detector
Class AbstractIntegerVariableEqualitiesDetector
java.lang.Object
choco.cp.common.util.preprocessor.AbstractDetector
choco.cp.common.util.preprocessor.AbstractAdvancedDetector
choco.cp.common.util.preprocessor.detector.AbstractIntegerVariableEqualitiesDetector
- Direct Known Subclasses:
- AbstractIntegerVariableEqualitiesDetector.IntegerVariableEqualitiesModelDetector, AbstractIntegerVariableEqualitiesDetector.IntegerVariableEqualitiesSolverDetector
public abstract class AbstractIntegerVariableEqualitiesDetector
- extends AbstractAdvancedDetector
User : cprudhom
Mail : cprudhom(a)emn.fr
Date : 1 avr. 2010br/>
Since : Choco 2.1.1
A class detector to detect equalities between IntegerVariable within a model.
Method Summary |
protected abstract void |
action(Constraint c)
Do an action on c , depending on implementation. |
void |
apply()
Apply the detection defined within the detector. |
protected abstract void |
apply(int k,
int nbIntVars,
int[] color,
gnu.trove.TIntObjectHashMap<IntegerVariableMerger> domainByColor)
Merge equal IntegerVariable into a unique one. |
Methods inherited from class choco.cp.common.util.preprocessor.AbstractAdvancedDetector |
add, add, commit, delete, delete, forget, forget, keep, keep, replaceBy, rollback |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractIntegerVariableEqualitiesDetector
public AbstractIntegerVariableEqualitiesDetector(CPModel model)
apply
public void apply()
- Apply the detection defined within the detector.
- Specified by:
apply
in class AbstractAdvancedDetector
action
protected abstract void action(Constraint c)
- Do an action on
c
, depending on implementation.
- Parameters:
c
-
apply
protected abstract void apply(int k,
int nbIntVars,
int[] color,
gnu.trove.TIntObjectHashMap<IntegerVariableMerger> domainByColor)
- Merge equal IntegerVariable into a unique one.
- Parameters:
k
- number of unique variablesnbIntVars
- number of integer variable within the modelcolor
- array of indice of unique variablesdomainByColor
- domain of unique variables
Copyright © 2012. All Rights Reserved.