choco.integer.constraints.extension
Class GAC2001LargeConstraint

java.lang.Object
  extended by choco.AbstractEntity
      extended by choco.AbstractConstraint
          extended by choco.integer.constraints.AbstractIntConstraint
              extended by choco.integer.constraints.AbstractLargeIntConstraint
                  extended by choco.integer.constraints.extension.CspLargeConstraint
                      extended by choco.integer.constraints.extension.GAC2001LargeConstraint
All Implemented Interfaces:
Constraint, Entity, IntConstraint, IntVarEventListener, VarEventListener, Propagator, java.lang.Cloneable, java.util.EventListener

public class GAC2001LargeConstraint
extends CspLargeConstraint


Field Summary
protected  int[] blocks
           
protected  int[] offsets
           
protected  int size
           
protected  StoredInt[] supports
           
 
Fields inherited from class choco.integer.constraints.extension.CspLargeConstraint
currentTuple, relation
 
Fields inherited from class choco.integer.constraints.AbstractLargeIntConstraint
cIndices, cste, vars
 
Fields inherited from class choco.integer.constraints.AbstractIntConstraint
logger
 
Fields inherited from class choco.AbstractConstraint
active, constAwakeEvent, hook, priority
 
Fields inherited from class choco.AbstractEntity
problem
 
Constructor Summary
GAC2001LargeConstraint(IntDomainVar[] vs, LargeRelation relation)
           
 
Method Summary
 void awake()
          Default initial propagation: full constraint re-propagation.
 void awakeOnBounds(int varIndex)
           
 void awakeOnInf(int idx)
          Default propagation on improved lower bound: propagation on domain revision.
 void awakeOnInst(int idx)
          Default propagation on instantiation: full constraint re-propagation.
 void awakeOnRem(int idx, int x)
          Default propagation on one value removal: propagation on domain revision.
 void awakeOnRemovals(int idx, IntIterator deltaDomain)
          The default implementation of propagation when a variable has been modified consists in iterating all values that have been removed (the delta domain) and propagate them one after another, incrementally.
 void awakeOnSup(int idx)
          Default propagation on improved upper bound: propagation on domain revision.
 int[] getSupport(int indexVar, int value)
           
 boolean isValid(int[] tuple)
           
 int[] lastSupport(int indexVar, int value)
           
 void propagate()
          Propagates the constraint awake events.
 void reviseVar(int indexVar)
           
 int[] seekNextSupport(int indexVar, int value)
           
 void setSupport(int indexVar, int value, int[] support)
           
 
Methods inherited from class choco.integer.constraints.extension.CspLargeConstraint
clone, getRelation, isEntailed, isSatisfied, opposite
 
Methods inherited from class choco.integer.constraints.AbstractLargeIntConstraint
assignIndices, getConstraintIdx, getIntVar, getNbVars, getVar, isCompletelyInstantiated, setConstraintIndex, setVar
 
Methods inherited from class choco.integer.constraints.AbstractIntConstraint
getSelfIndex, isConsistent
 
Methods inherited from class choco.AbstractConstraint
addListener, awakeOnVar, connectVar, constAwake, delete, fail, getEvent, getPlugIn, getPriority, getProblem, getVarIdxInOpposite, isActive, isEquivalentTo, setActive, setEntailed, setPassive, setPlugIn, substituteVar
 
Methods inherited from class choco.AbstractEntity
pretty
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface choco.Propagator
awakeOnVar, constAwake, delete, getEvent, getPlugIn, getPriority
 
Methods inherited from interface choco.prop.VarEventListener
addListener, isActive, setActive, setPassive
 
Methods inherited from interface choco.prop.VarEventListener
addListener, isActive, setActive, setPassive
 

Field Detail

supports

protected StoredInt[] supports

blocks

protected int[] blocks

size

protected int size

offsets

protected int[] offsets
Constructor Detail

GAC2001LargeConstraint

public GAC2001LargeConstraint(IntDomainVar[] vs,
                              LargeRelation relation)
Method Detail

reviseVar

public void reviseVar(int indexVar)
               throws ContradictionException
Throws:
ContradictionException

setSupport

public void setSupport(int indexVar,
                       int value,
                       int[] support)

getSupport

public int[] getSupport(int indexVar,
                        int value)

lastSupport

public int[] lastSupport(int indexVar,
                         int value)

isValid

public boolean isValid(int[] tuple)

seekNextSupport

public int[] seekNextSupport(int indexVar,
                             int value)

awake

public void awake()
           throws ContradictionException
Description copied from class: AbstractConstraint
Default initial propagation: full constraint re-propagation.

Specified by:
awake in interface Propagator
Overrides:
awake in class AbstractConstraint
Throws:
ContradictionException

propagate

public void propagate()
               throws ContradictionException
Description copied from class: AbstractLargeIntConstraint
Propagates the constraint awake events.

Specified by:
propagate in interface Propagator
Overrides:
propagate in class CspLargeConstraint
Throws:
ContradictionException

awakeOnRemovals

public void awakeOnRemovals(int idx,
                            IntIterator deltaDomain)
                     throws ContradictionException
Description copied from class: AbstractIntConstraint
The default implementation of propagation when a variable has been modified consists in iterating all values that have been removed (the delta domain) and propagate them one after another, incrementally.

Specified by:
awakeOnRemovals in interface IntConstraint
Overrides:
awakeOnRemovals in class CspLargeConstraint
Throws:
ContradictionException

awakeOnInf

public void awakeOnInf(int idx)
                throws ContradictionException
Description copied from class: AbstractIntConstraint
Default propagation on improved lower bound: propagation on domain revision.

Specified by:
awakeOnInf in interface IntVarEventListener
Overrides:
awakeOnInf in class AbstractIntConstraint
Throws:
ContradictionException

awakeOnSup

public void awakeOnSup(int idx)
                throws ContradictionException
Description copied from class: AbstractIntConstraint
Default propagation on improved upper bound: propagation on domain revision.

Specified by:
awakeOnSup in interface IntVarEventListener
Overrides:
awakeOnSup in class AbstractIntConstraint
Throws:
ContradictionException

awakeOnRem

public void awakeOnRem(int idx,
                       int x)
                throws ContradictionException
Description copied from class: AbstractIntConstraint
Default propagation on one value removal: propagation on domain revision.

Specified by:
awakeOnRem in interface IntVarEventListener
Overrides:
awakeOnRem in class AbstractIntConstraint
Throws:
ContradictionException

awakeOnBounds

public void awakeOnBounds(int varIndex)
                   throws ContradictionException
Specified by:
awakeOnBounds in interface IntConstraint
Overrides:
awakeOnBounds in class CspLargeConstraint
Throws:
ContradictionException

awakeOnInst

public void awakeOnInst(int idx)
                 throws ContradictionException
Description copied from class: AbstractIntConstraint
Default propagation on instantiation: full constraint re-propagation.

Specified by:
awakeOnInst in interface IntVarEventListener
Overrides:
awakeOnInst in class CspLargeConstraint
Throws:
ContradictionException