|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.solver.propagation.Propagator
choco.kernel.solver.constraints.AbstractSConstraint<IntDomainVar>
choco.kernel.solver.constraints.integer.AbstractIntSConstraint
choco.kernel.solver.constraints.integer.AbstractLargeIntSConstraint
choco.cp.solver.constraints.integer.extension.CspLargeSConstraint
choco.cp.solver.constraints.integer.extension.GACstrPositiveLargeSConstraint
public final class GACstrPositiveLargeSConstraint
GAC maintained by STR
Field Summary | |
---|---|
protected int |
arity
size of the scope |
protected List<Integer> |
futureVars
Variables that are not proved to be GAC yet |
protected BitSet[] |
gacValues
Values that have found a support for each variable |
protected IStateIntVector |
ltuples
The backtrackable list of tuples representing the current allowed tuples of the constraint |
protected int[] |
nbGacValues
|
protected int[] |
offsets
original lower bounds |
protected TuplesList |
relation
|
protected ValidityChecker |
valcheck
|
Fields inherited from class choco.cp.solver.constraints.integer.extension.CspLargeSConstraint |
---|
currentTuple |
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 | |
---|---|
GACstrPositiveLargeSConstraint(IntDomainVar[] vs,
LargeRelation relation,
IEnvironment environment)
|
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. |
void |
filter(int idx)
|
void |
gacstr()
Main propagation loop. |
void |
gacstr(int idx)
Main Incremental propagation loop. |
double |
getCartesianProduct()
|
int |
getFilteredEventMask(int idx)
|
void |
initializeData()
|
boolean |
isSatisfied(int[] tuple)
TEMPORARY: if not overriden by the constraint, throws an error to avoid bug using reified constraints in constraints that have not been changed to fulfill this api yet ! |
void |
maintainList()
maintain the list by checking all variable within isValid |
void |
maintainList(int idx)
maintain the list by checking only the variable that has changed when checking if a tuple is valid. |
String |
pretty()
pretty printing of the object. |
void |
propagate()
Propagation: Propagating the constraint until local consistency is reached. |
void |
pruningPhase()
|
Methods inherited from class choco.cp.solver.constraints.integer.extension.CspLargeSConstraint |
---|
clone, getRelation, isEntailed, opposite |
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 |
---|
protected TuplesList relation
protected ValidityChecker valcheck
protected int arity
protected int[] offsets
protected List<Integer> futureVars
protected BitSet[] gacValues
protected int[] nbGacValues
protected IStateIntVector ltuples
Constructor Detail |
---|
public GACstrPositiveLargeSConstraint(IntDomainVar[] vs, LargeRelation relation, IEnvironment environment)
Method Detail |
---|
public int getFilteredEventMask(int idx)
getFilteredEventMask
in class CspLargeSConstraint
public void initializeData()
public void pruningPhase() throws ContradictionException
ContradictionException
public void maintainList(int idx)
idx
- : the variable changedpublic void maintainList()
public void gacstr(int idx) throws ContradictionException
ContradictionException
public void gacstr() throws ContradictionException
ContradictionException
public double getCartesianProduct()
public void propagate() throws ContradictionException
Propagator
propagate
in class CspLargeSConstraint
ContradictionException
- contradiction exceptionpublic void awakeOnRemovals(int idx, DisposableIntIterator deltaDomain) throws ContradictionException
AbstractIntSConstraint
awakeOnRemovals
in interface IntPropagator
awakeOnRemovals
in class CspLargeSConstraint
ContradictionException
public void awakeOnInf(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnInf
in interface IntPropagator
awakeOnInf
in class AbstractIntSConstraint
ContradictionException
public void awakeOnSup(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnSup
in interface IntPropagator
awakeOnSup
in class AbstractIntSConstraint
ContradictionException
public void awakeOnRem(int idx, int x) throws ContradictionException
AbstractIntSConstraint
awakeOnRem
in interface IntPropagator
awakeOnRem
in class AbstractIntSConstraint
ContradictionException
public void awakeOnBounds(int varIndex) throws ContradictionException
awakeOnBounds
in interface IntPropagator
awakeOnBounds
in class CspLargeSConstraint
ContradictionException
public void awakeOnInst(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnInst
in interface IntPropagator
awakeOnInst
in class CspLargeSConstraint
ContradictionException
public void awake() throws ContradictionException
Propagator
awake
in class Propagator
ContradictionException
- contradiction exceptionpublic void filter(int idx) throws ContradictionException
ContradictionException
public boolean isSatisfied(int[] tuple)
AbstractIntSConstraint
isSatisfied
in interface IntPropagator
isSatisfied
in class CspLargeSConstraint
public String pretty()
IPretty
pretty
in interface IPretty
pretty
in class CspLargeSConstraint
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |