choco.set.search
Class AbstractSetBranching

java.lang.Object
  extended by choco.branch.AbstractBranching
      extended by choco.search.AbstractIntBranching
          extended by choco.set.search.AbstractSetBranching
All Implemented Interfaces:
Branching, IntBranching
Direct Known Subclasses:
AssignSetVar

public abstract class AbstractSetBranching
extends AbstractIntBranching


Field Summary
 
Fields inherited from class choco.branch.AbstractBranching
LOG_DECISION_MSG, LOG_DOWN_MSG, LOG_UP_MSG, logger, manager, nextBranching
 
Constructor Summary
AbstractSetBranching()
           
 
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 choco.search.AbstractIntBranching
explore, goUpBranch, logDownBranch, logUpBranch
 
Methods inherited from class choco.branch.AbstractBranching
getDecisionLogMsg, getNextBranching, setNextBranching, setSolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface choco.branch.IntBranching
getFirstBranch
 
Methods inherited from interface choco.branch.Branching
selectBranchingObject
 

Constructor Detail

AbstractSetBranching

public AbstractSetBranching()
Method Detail

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 set
i - 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 set
i - 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 set
numBranch - 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 object
n - 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