choco.cp.solver.constraints.integer.extension
Class GAC3rmLargeConstraint

java.lang.Object
  extended by choco.kernel.solver.propagation.Propagator
      extended by choco.kernel.solver.constraints.AbstractSConstraint<IntDomainVar>
          extended by choco.kernel.solver.constraints.integer.AbstractIntSConstraint
              extended by choco.kernel.solver.constraints.integer.AbstractLargeIntSConstraint
                  extended by choco.cp.solver.constraints.integer.extension.CspLargeSConstraint
                      extended by choco.cp.solver.constraints.integer.extension.GAC3rmLargeConstraint
All Implemented Interfaces:
IExtensionnable, IPretty, SConstraint<IntDomainVar>, IntPropagator, Cloneable, EventListener

public final class GAC3rmLargeConstraint
extends CspLargeSConstraint


Field Summary
protected  int[] blocks
           
protected  int[] offsets
           
protected  DisposableIntIterator[] seekIter
           
protected  int size
           
protected  int[] supports
           
 
Fields inherited from class choco.cp.solver.constraints.integer.extension.CspLargeSConstraint
currentTuple, relation
 
Fields inherited from class choco.kernel.solver.constraints.AbstractSConstraint
cIndices, constraintType, extensions, vars
 
Fields inherited from class choco.kernel.solver.propagation.Propagator
active, constAwakeEvent, priority, propagationEngine
 
Fields inherited from interface choco.kernel.solver.constraints.SConstraint
LOGGER
 
Constructor Summary
GAC3rmLargeConstraint(IntDomainVar[] vs, LargeRelation relation)
           
 
Method Summary
 void awake()
          Propagation: Propagating the constraint for the very first time until local consistency is reached.
 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, DisposableIntIterator 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[] getBoundSupport(int indexVar, int idxBound)
           
 int getFilteredEventMask(int idx)
           
 int[] getSupport(int indexVar, int value)
           
 void initializeSupports(int indexVar)
          initialize the supports of each value of indexVar
 boolean isValid(int[] tuple)
           
 int[] lastBoundSupport(int indexVar, int idxBound)
           
 int[] lastSupport(int indexVar, int value)
           
 AbstractSConstraint<IntDomainVar> opposite(Solver solver)
          Get the opposite constraint
 String pretty()
          pretty printing of the object.
 void propagate()
          Propagation: Propagating the constraint until local consistency is reached.
 void reviseVar(int indexVar)
           
 int[] seekNextSupport(int indexVar, int val)
           
 void setBoundSupport(int indexVar, int idxBound, int[] support)
           
 void setOneSupport(int indexVar, int value, int[] support)
           
 void setSupport(int[] support)
           
 
Methods inherited from class choco.cp.solver.constraints.integer.extension.CspLargeSConstraint
clone, getRelation, isEntailed, isSatisfied
 
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint
getConstraintType, isConsistent, isSatisfied
 
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint
addExtension, addListener, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, setConstraintIndex, setExtension, setVar, toString
 
Methods inherited from class choco.kernel.solver.propagation.Propagator
activate, constAwake, fail, getEvent, getPriority, isActive, setActive, setActiveSilently, setEntailed, setPassive, setPropagationEngine
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

supports

protected int[] supports

blocks

protected int[] blocks

size

protected int size

offsets

protected int[] offsets

seekIter

protected DisposableIntIterator[] seekIter
Constructor Detail

GAC3rmLargeConstraint

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

opposite

public AbstractSConstraint<IntDomainVar> opposite(Solver solver)
Description copied from class: AbstractSConstraint
Get the opposite constraint

Specified by:
opposite in interface SConstraint<IntDomainVar>
Overrides:
opposite in class CspLargeSConstraint
Parameters:
solver - the current solver
Returns:
the opposite constraint @param solver

getFilteredEventMask

public int getFilteredEventMask(int idx)
Overrides:
getFilteredEventMask in class CspLargeSConstraint

initializeSupports

public void initializeSupports(int indexVar)
                        throws ContradictionException
initialize the supports of each value of indexVar

Parameters:
indexVar -
Throws:
ContradictionException

reviseVar

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

setSupport

public void setSupport(int[] support)

setOneSupport

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

setBoundSupport

public void setBoundSupport(int indexVar,
                            int idxBound,
                            int[] support)

getSupport

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

getBoundSupport

public int[] getBoundSupport(int indexVar,
                             int idxBound)

lastSupport

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

lastBoundSupport

public int[] lastBoundSupport(int indexVar,
                              int idxBound)

isValid

public boolean isValid(int[] tuple)

seekNextSupport

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

awake

public void awake()
           throws ContradictionException
Description copied from class: Propagator
Propagation: Propagating the constraint for the very first time until local consistency is reached.

Overrides:
awake in class Propagator
Throws:
ContradictionException - contradiction exception

propagate

public void propagate()
               throws ContradictionException
Description copied from class: Propagator
Propagation: Propagating the constraint until local consistency is reached.

Overrides:
propagate in class CspLargeSConstraint
Throws:
ContradictionException - contradiction exception

awakeOnRemovals

public void awakeOnRemovals(int idx,
                            DisposableIntIterator deltaDomain)
                     throws ContradictionException
Description copied from class: AbstractIntSConstraint
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 IntPropagator
Overrides:
awakeOnRemovals in class CspLargeSConstraint
Throws:
ContradictionException

awakeOnInf

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

Specified by:
awakeOnInf in interface IntPropagator
Overrides:
awakeOnInf in class AbstractIntSConstraint
Throws:
ContradictionException

awakeOnSup

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

Specified by:
awakeOnSup in interface IntPropagator
Overrides:
awakeOnSup in class AbstractIntSConstraint
Throws:
ContradictionException

awakeOnRem

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

Specified by:
awakeOnRem in interface IntPropagator
Overrides:
awakeOnRem in class AbstractIntSConstraint
Throws:
ContradictionException

awakeOnBounds

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

awakeOnInst

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

Specified by:
awakeOnInst in interface IntPropagator
Overrides:
awakeOnInst in class CspLargeSConstraint
Throws:
ContradictionException

pretty

public String pretty()
Description copied from interface: IPretty
pretty printing of the object. This String is not constant and may depend on the context.

Specified by:
pretty in interface IPretty
Overrides:
pretty in class CspLargeSConstraint
Returns:
a readable string representation of the object


Copyright © 2012. All Rights Reserved.