public class IntDecision extends Decision<IntVar>
IntVar
branch, max_branching, var| Constructor and Description |
|---|
IntDecision(PoolManager<IntDecision> poolManager)
Create an decision based on an
IntVar |
| Modifier and Type | Method and Description |
|---|---|
void |
apply()
Apply the current decision
|
IntDecision |
duplicate() |
IntDecision |
flip() |
void |
free()
Free the decision, ie, it can be reused
|
Integer |
getDecisionValue()
Return the value object involves in the decision
|
DecisionOperator<IntVar> |
getDecOp() |
boolean |
isEquivalentTo(Decision dec) |
void |
reverse()
Reverse the decision operator
|
void |
set(IntVar v,
int value,
DecisionOperator<IntVar> assignment)
Instantiate this decision with the parameters
|
String |
toString() |
boolean |
why(RuleStore ruleStore,
IntVar var,
IEventType evt,
int value)
Add new rules to the rule store
|
buildNext, getArity, getDecisionVariable, getPosition, hasNext, rewind, set, setPosition, setRefutable, triesLeftpublic IntDecision(PoolManager<IntDecision> poolManager)
IntVarpoolManager - decision pool manager, to recycle decisionspublic Integer getDecisionValue()
DecisiongetDecisionValue in class Decision<IntVar>public void apply()
throws ContradictionException
Decisionapply in class Decision<IntVar>ContradictionException - if the application of this decision failspublic void set(IntVar v, int value, DecisionOperator<IntVar> assignment)
v - a variablevalue - a valueassignment - a decision operatorpublic void reverse()
Decisionpublic void free()
Decisionpublic IntDecision duplicate()
public boolean isEquivalentTo(Decision dec)
isEquivalentTo in class Decision<IntVar>dec - a decisionpublic DecisionOperator<IntVar> getDecOp()
public IntDecision flip()
public boolean why(RuleStore ruleStore, IntVar var, IEventType evt, int value)
ICauseruleStore - the rule storevar - the modified variableevt - the undergoing eventvalue - the value (for REMOVE only)Copyright © 2018. All rights reserved.