choco.set.search
Class AbstractSetBranching
java.lang.Object
choco.branch.AbstractBranching
choco.search.AbstractIntBranching
choco.set.search.AbstractSetBranching
- All Implemented Interfaces:
- Branching, IntBranching
- Direct Known Subclasses:
- AssignSetVar
public abstract class AbstractSetBranching
- extends AbstractIntBranching
Method Summary |
boolean |
branchOn(java.lang.Object x,
int n)
Deprecated. replaced by the management incremental search (with a stack of BranchingTrace storing the
environment (local variables) associated to each choice point |
boolean |
finishedBranching(java.lang.Object x,
int i)
Checks whether all branches have already been explored at the
current choice point. |
int |
getNextBranch(java.lang.Object x,
int i)
Computes the search index of the next branch of the choice point. |
void |
goDownBranch(java.lang.Object x,
int numBranch)
Performs the action,
so that we go down a branch from the current choice point. |
void |
goUpBranch(java.lang.Object x,
int i,
int numBranch)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractSetBranching
public AbstractSetBranching()
getNextBranch
public int getNextBranch(java.lang.Object x,
int i)
- Description copied from interface:
IntBranching
- Computes the search index of the next branch of the choice point.
- Parameters:
x
- the object on which the alternative is seti
- the index of the current branch
- Returns:
- the index of the next branch
finishedBranching
public boolean finishedBranching(java.lang.Object x,
int i)
- Description copied from interface:
IntBranching
- Checks whether all branches have already been explored at the
current choice point.
- Parameters:
x
- the object on which the alternative is seti
- the index of the last branch
- Returns:
- true if no more branches can be generated
goDownBranch
public void goDownBranch(java.lang.Object x,
int numBranch)
throws ContradictionException
- Description copied from interface:
IntBranching
- Performs the action,
so that we go down a branch from the current choice point.
- Specified by:
goDownBranch
in interface IntBranching
- Overrides:
goDownBranch
in class AbstractIntBranching
- Parameters:
x
- the object on which the alternative is setnumBranch
- the label of the branch that we want to go down
- Throws:
ContradictionException
- if a domain empties or a contradiction is
infered
goUpBranch
public void goUpBranch(java.lang.Object x,
int i,
int numBranch)
throws ContradictionException
- Throws:
ContradictionException
branchOn
public boolean branchOn(java.lang.Object x,
int n)
throws ContradictionException
- Deprecated. replaced by the management incremental search (with a stack of BranchingTrace storing the
environment (local variables) associated to each choice point
- Description copied from interface:
IntBranching
- A method exploring the i-th branch of choice point.
- Parameters:
x
- the current branching objectn
- the index of the branch
- Returns:
- true if the subtree below that branch lead to a solution or not
- Throws:
ContradictionException
- if a domain empties or a contradiction is
infered