Class SetDecision
- java.lang.Object
-
- org.chocosolver.solver.search.strategy.decision.Decision<SetVar>
-
- org.chocosolver.solver.search.strategy.decision.SetDecision
-
- All Implemented Interfaces:
Serializable,ICause
public class SetDecision extends Decision<SetVar>
A decision based on aSetVar- Since:
- Jan. 2013
- Author:
- Jean-Guillaume Fages
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.chocosolver.solver.search.strategy.decision.Decision
branch, max_branching, var
-
-
Constructor Summary
Constructors Constructor Description SetDecision(PoolManager<SetDecision> poolManager)Create an decision based on anSetVar
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply()Apply the current decisionvoidfree()Free the decision, ie, it can be reusedIntegergetDecisionValue()Return the value object involves in the decisionvoidreverse()Reverse the decision operatorvoidset(SetVar v, int value, DecisionOperator<SetVar> operator)Instantiate this decision with the parametersStringtoString()-
Methods inherited from class org.chocosolver.solver.search.strategy.decision.Decision
buildNext, duplicate, getArity, getDecisionVariable, getPosition, hasNext, isEquivalentTo, rewind, set, setPosition, setRefutable, triesLeft
-
-
-
-
Constructor Detail
-
SetDecision
public SetDecision(PoolManager<SetDecision> poolManager)
Create an decision based on anSetVar- Parameters:
poolManager- decision pool manager, to recycle decisions
-
-
Method Detail
-
getDecisionValue
public Integer getDecisionValue()
Description copied from class:DecisionReturn the value object involves in the decision- Specified by:
getDecisionValuein classDecision<SetVar>- Returns:
- a value object
-
apply
public void apply() throws ContradictionExceptionDescription copied from class:DecisionApply the current decision- Specified by:
applyin classDecision<SetVar>- Throws:
ContradictionException- if the application of this decision fails
-
set
public void set(SetVar v, int value, DecisionOperator<SetVar> operator)
Instantiate this decision with the parameters- Parameters:
v- a variablevalue- a value
-
reverse
public void reverse()
Description copied from class:DecisionReverse the decision operator
-
free
public void free()
Description copied from class:DecisionFree the decision, ie, it can be reused
-
-