|
||||||||||
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.AbstractBinIntSConstraint
choco.cp.solver.constraints.integer.ModuloXYC2
public final class ModuloXYC2
Created by IntelliJ IDEA. User: Richaud Date: 9 janv. 2007 Time: 16:58:01 To change this template use File | Settings | File Templates.
Field Summary | |
---|---|
protected int |
m
The search constant of the constraint |
Fields inherited from class choco.kernel.solver.constraints.integer.AbstractBinIntSConstraint |
---|
v0, v1 |
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 | |
---|---|
ModuloXYC2(IntDomainVar x0,
IntDomainVar x1,
int c)
Constructs the constraint with the specified variables and constant. |
Method Summary | |
---|---|
void |
awake()
Propagation: Propagating the constraint for the very first time until local consistency is reached. |
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 valeur)
Default propagation on one value removal: propagation on domain revision. |
void |
awakeOnSup(int idx)
Default propagation on improved upper bound: propagation on domain revision. |
int |
getFilteredEventMask(int idx)
|
boolean |
isSatisfied()
Checks if the constraint is satisfied when the variables are instantiated. |
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 ! |
String |
pretty()
tests if the constraint is consistent with respect to the current state of domains |
void |
propagate()
The one and only propagation method, using foward checking |
void |
reviseV0OnInf(BitSet supports)
|
void |
reviseV0OnInst(int inst)
|
void |
reviseV0OnRem(BitSet supports,
int valeur)
|
void |
reviseV0OnSup(BitSet supports)
|
void |
reviseV1OnInf()
|
void |
reviseV1OnInst(int inst)
|
void |
reviseV1OnRem(int valeur)
|
void |
reviseV1OnSup()
|
int |
searchInfV1()
|
BitSet |
searchSupports()
|
BitSet |
searchSupportsP()
|
int |
searchSupV1()
|
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint |
---|
awakeOnBounds, awakeOnRemovals, getConstraintType, isConsistent |
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
addExtension, addListener, clone, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, isEntailed, opposite, 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 final int m
Constructor Detail |
---|
public ModuloXYC2(IntDomainVar x0, IntDomainVar x1, int c)
x0
- first IntDomainVarx1
- second IntDomainVarc
- The search constant used in the disequality.Method Detail |
---|
public int getFilteredEventMask(int idx)
getFilteredEventMask
in class Propagator
public void awake() throws ContradictionException
Propagator
awake
in class Propagator
ContradictionException
- contradiction exceptionpublic void propagate() throws ContradictionException
propagate
in class Propagator
ContradictionException
- contradiction exceptionpublic BitSet searchSupportsP()
public BitSet searchSupports()
public void awakeOnInf(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnInf
in interface IntPropagator
awakeOnInf
in class AbstractIntSConstraint
ContradictionException
public void reviseV0OnInf(BitSet supports) throws ContradictionException
ContradictionException
public void reviseV1OnInf() throws ContradictionException
ContradictionException
public int searchInfV1()
public void awakeOnSup(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnSup
in interface IntPropagator
awakeOnSup
in class AbstractIntSConstraint
ContradictionException
public void reviseV0OnSup(BitSet supports) throws ContradictionException
ContradictionException
public void reviseV1OnSup() throws ContradictionException
ContradictionException
public int searchSupV1()
public void awakeOnInst(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnInst
in interface IntPropagator
awakeOnInst
in class AbstractIntSConstraint
ContradictionException
public void reviseV0OnInst(int inst) throws ContradictionException
ContradictionException
public void reviseV1OnInst(int inst) throws ContradictionException
ContradictionException
public void awakeOnRem(int idx, int valeur) throws ContradictionException
AbstractIntSConstraint
awakeOnRem
in interface IntPropagator
awakeOnRem
in class AbstractIntSConstraint
ContradictionException
public void reviseV0OnRem(BitSet supports, int valeur) throws ContradictionException
ContradictionException
public void reviseV1OnRem(int valeur) throws ContradictionException
ContradictionException
public boolean isSatisfied()
isSatisfied
in interface SConstraint<IntDomainVar>
isSatisfied
in class AbstractIntSConstraint
public boolean isSatisfied(int[] tuple)
AbstractIntSConstraint
isSatisfied
in interface IntPropagator
isSatisfied
in class AbstractIntSConstraint
public String pretty()
pretty
in interface IPretty
pretty
in class AbstractSConstraint<IntDomainVar>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |