choco.palm.cbj.search
Class JumpAssignVar
java.lang.Object
choco.branch.AbstractBranching
choco.search.AbstractIntBranching
choco.search.AbstractLargeIntBranching
choco.search.AssignVar
choco.palm.cbj.search.JumpAssignVar
- All Implemented Interfaces:
- Branching, IntBranching
public class JumpAssignVar
- extends AssignVar
An variable assigning heuristic used by search algorithm.
Method Summary |
void |
goDownBranch(java.lang.Object x,
int i)
Actually posts the choice taken if this search tree node. |
void |
goUpBranch(java.lang.Object x,
int i,
Explanation e)
A previous choice is undone. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JumpAssignVar
public JumpAssignVar(IVarSelector varSel,
IValIterator valHeuri)
- Builds an assign variable heuristic.
- Parameters:
varSel
- a variable selectorvalHeuri
- a value iterator
JumpAssignVar
public JumpAssignVar(IVarSelector varSel,
IValSelector valHeuri)
- Builds an assign variable heuristic.
- Parameters:
varSel
- a variable selectorvalHeuri
- a value selector
goDownBranch
public void goDownBranch(java.lang.Object x,
int i)
throws ContradictionException
- Actually posts the choice taken if this search tree node. Here the
variable will be instantiated to the value i.
- Specified by:
goDownBranch
in interface IntBranching
- Overrides:
goDownBranch
in class AssignVar
- Parameters:
x
- the variable involved in the choicei
- the value chosen for this variable
- Throws:
ContradictionException
- if a contradiction occurs due to this
choice
goUpBranch
public void goUpBranch(java.lang.Object x,
int i,
Explanation e)
throws ContradictionException
- A previous choice is undone. Here the bad value is removed from the
domain and correctly explained.
- Parameters:
x
- the involved variablei
- the bad valuee
- the explanation about inconsistancy
- Throws:
ContradictionException
- if a contradiction occurs due to the
implied domain reduction