|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchoco.AbstractEntity
choco.AbstractConstraint
choco.integer.constraints.AbstractIntConstraint
choco.integer.constraints.AbstractUnIntConstraint
choco.integer.constraints.NotEqualXC
public class NotEqualXC
Implements a constraint X <= C, with X a variable and C a constant.
| Field Summary | |
|---|---|
protected int |
cste
The search constant of the constraint |
| Fields inherited from class choco.integer.constraints.AbstractUnIntConstraint |
|---|
cIdx0, v0 |
| 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 | |
|---|---|
NotEqualXC(IntDomainVar x0,
int c)
Constructs the constraint with the specified variables and constant. |
|
| Method Summary | |
|---|---|
void |
awakeOnInf(int idx)
in case the bounds have changed and the domain is approximated by an interval, we need to re-propagate |
void |
awakeOnInst(int idx)
When the one and only variable of the constraint becomes instantiated Need to check that the value of the variable is not the value forbidden by the constraint |
void |
awakeOnRem(int idx,
int x)
When a value is removed from the domain of the one and only variable: Nothing to be propagated. |
void |
awakeOnSup(int idx)
in case the bounds have changed and the domain is approximated by an interval, we need to re-propagate |
void |
awakeOnVar(int idx)
in case the bounds have changed and the domain is approximated by an interval, we need to re-propagate |
java.lang.Object |
clone()
returns a copy of the constraint. |
boolean |
isConsistent()
tests if the constraint is consistent with respect to the current state of domains |
java.lang.Boolean |
isEntailed()
When the whole domain of v0 is below or above cste,
we know for sure whether the constraint will be satisfied or not |
boolean |
isEquivalentTo(Constraint compareTo)
tests the equivalence (logical equality of the conditions) between two constraints. |
boolean |
isSatisfied()
tests if the constraint is satisfied when the variables are instantiated. |
AbstractConstraint |
opposite()
computes the constraint modelling the counter-opposite condition of this |
java.lang.String |
pretty()
Pretty print of the constraint. |
void |
propagate()
The single propagation method. |
| Methods inherited from class choco.integer.constraints.AbstractUnIntConstraint |
|---|
assignIndices, getConstraintIdx, getIntVar, getNbVars, getVar, isCompletelyInstantiated, setConstraintIndex, setVar |
| Methods inherited from class choco.integer.constraints.AbstractIntConstraint |
|---|
awakeOnBounds, awakeOnRemovals, getSelfIndex |
| Methods inherited from class choco.AbstractConstraint |
|---|
addListener, awake, connectVar, constAwake, delete, fail, getEvent, getPlugIn, getPriority, getProblem, getVarIdxInOpposite, isActive, setActive, setEntailed, setPassive, setPlugIn, substituteVar |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface choco.Propagator |
|---|
awake, 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 |
|---|
protected final int cste
| Constructor Detail |
|---|
public NotEqualXC(IntDomainVar x0,
int c)
x0 - the search valued domain variablec - the search constant used in the inequality.| Method Detail |
|---|
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Constraint
clone in interface Constraintclone in class AbstractConstraintjava.lang.CloneNotSupportedExceptionpublic java.lang.String pretty()
pretty in interface Entitypretty in class AbstractEntity
public void propagate()
throws ContradictionException
propagate in interface Propagatorpropagate in class AbstractUnIntConstraintContradictionException
public void awakeOnVar(int idx)
throws ContradictionException
awakeOnVar in interface VarEventListenerawakeOnVar in interface PropagatorawakeOnVar in class AbstractConstraintContradictionException
public void awakeOnInf(int idx)
throws ContradictionException
awakeOnInf in interface IntVarEventListenerawakeOnInf in class AbstractIntConstraintContradictionException
public void awakeOnSup(int idx)
throws ContradictionException
awakeOnSup in interface IntVarEventListenerawakeOnSup in class AbstractIntConstraintContradictionException
public void awakeOnInst(int idx)
throws ContradictionException
awakeOnInst in interface IntVarEventListenerawakeOnInst in class AbstractIntConstraintidx - index of the variable (always 0)
ContradictionException
public void awakeOnRem(int idx,
int x)
throws ContradictionException
awakeOnRem in interface IntVarEventListenerawakeOnRem in class AbstractIntConstraintidx - index of the variable (always 0)x - value that was removed
ContradictionExceptionpublic java.lang.Boolean isEntailed()
v0 is below or above cste,
we know for sure whether the constraint will be satisfied or not
isEntailed in interface PropagatorisEntailed in class AbstractConstraintpublic boolean isSatisfied()
public boolean isConsistent()
isConsistent in interface PropagatorisConsistent in class AbstractIntConstraintpublic AbstractConstraint opposite()
Constraint
opposite in interface Constraintopposite in class AbstractConstraintpublic final boolean isEquivalentTo(Constraint compareTo)
Constraint
isEquivalentTo in interface ConstraintisEquivalentTo in class AbstractConstraintcompareTo - the constraint to be compared to
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||