choco.kernel.solver.search
Class IntBranchingTrace

java.lang.Object
  extended by choco.kernel.solver.search.IntBranchingTrace
All Implemented Interfaces:
IntBranchingDecision

public final class IntBranchingTrace
extends Object
implements IntBranchingDecision

A class for keeping a trace of the search algorithm, through an IntBranching (storing the current branching object, as well as the label of the current branch)


Constructor Summary
IntBranchingTrace()
           
 
Method Summary
 void clear()
           
 IntBranchingTrace copy()
           
 int getBranchIndex()
          get the index of the current alternative (branch).
 AbstractIntBranchingStrategy getBranching()
           
 IntDomainVar getBranchingIntVar()
          get and cast the branching object.
 Object getBranchingObject()
          get the branching object.
 RealVar getBranchingRealVar()
          get and cast the branching object.
 SetVar getBranchingSetVar()
          get and cast the branching object.
 int getBranchingValue()
          get the next value to try, if any (optional).
 void incrementBranchIndex()
           
 void remIntVal()
          apply the integer removal decision, i.e. remove the branching value from the domain of the branching int var.
 void setBranchIndex(int branchIndex)
           
 void setBranching(AbstractIntBranchingStrategy branching)
           
 void setBranchingObject(Object branchingObject)
           
 void setBranchingValue(int branchingValue)
          set the next value to try.
 void setIntVal()
          apply the integer assignment decision, i.e. assign the branching value to the branching int var.
 void setValInSet()
          apply the set assignment decision, i.e. put the value into the kernel.
 void setValOutSet()
          apply the set removal decision, i.e. remove the value from the enveloppe.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IntBranchingTrace

public IntBranchingTrace()
Method Detail

getBranching

public final AbstractIntBranchingStrategy getBranching()

setBranching

public final void setBranching(AbstractIntBranchingStrategy branching)

getBranchIndex

public final int getBranchIndex()
Description copied from interface: IntBranchingDecision
get the index of the current alternative (branch).

Specified by:
getBranchIndex in interface IntBranchingDecision
Returns:

setBranchIndex

public final void setBranchIndex(int branchIndex)

incrementBranchIndex

public final void incrementBranchIndex()

getBranchingValue

public final int getBranchingValue()
Description copied from interface: IntBranchingDecision
get the next value to try, if any (optional).

Specified by:
getBranchingValue in interface IntBranchingDecision

setBranchingValue

public final void setBranchingValue(int branchingValue)
Description copied from interface: IntBranchingDecision
set the next value to try.

Specified by:
setBranchingValue in interface IntBranchingDecision

getBranchingObject

public final Object getBranchingObject()
Description copied from interface: IntBranchingDecision
get the branching object. It is often a variable

Specified by:
getBranchingObject in interface IntBranchingDecision

getBranchingIntVar

public final IntDomainVar getBranchingIntVar()
Description copied from interface: IntBranchingDecision
get and cast the branching object.

Specified by:
getBranchingIntVar in interface IntBranchingDecision

getBranchingSetVar

public final SetVar getBranchingSetVar()
Description copied from interface: IntBranchingDecision
get and cast the branching object.

Specified by:
getBranchingSetVar in interface IntBranchingDecision

getBranchingRealVar

public final RealVar getBranchingRealVar()
Description copied from interface: IntBranchingDecision
get and cast the branching object.

Specified by:
getBranchingRealVar in interface IntBranchingDecision

setBranchingObject

public final void setBranchingObject(Object branchingObject)

clear

public void clear()

copy

public IntBranchingTrace copy()

setIntVal

public final void setIntVal()
                     throws ContradictionException
Description copied from interface: IntBranchingDecision
apply the integer assignment decision, i.e. assign the branching value to the branching int var.

Specified by:
setIntVal in interface IntBranchingDecision
Throws:
ContradictionException

remIntVal

public final void remIntVal()
                     throws ContradictionException
Description copied from interface: IntBranchingDecision
apply the integer removal decision, i.e. remove the branching value from the domain of the branching int var.

Specified by:
remIntVal in interface IntBranchingDecision
Throws:
ContradictionException

setValInSet

public final void setValInSet()
                       throws ContradictionException
Description copied from interface: IntBranchingDecision
apply the set assignment decision, i.e. put the value into the kernel.

Specified by:
setValInSet in interface IntBranchingDecision
Throws:
ContradictionException

setValOutSet

public final void setValOutSet()
                        throws ContradictionException
Description copied from interface: IntBranchingDecision
apply the set removal decision, i.e. remove the value from the enveloppe.

Specified by:
setValOutSet in interface IntBranchingDecision
Throws:
ContradictionException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.