|
||||||||||
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.global.SemiLeximinSConstraint
public final class SemiLeximinSConstraint
SemiLeximinConstraint
is a constraint that ensures
the leximin ordering between one vector of variables and one of integers.
Field Summary |
---|
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 | |
---|---|
SemiLeximinSConstraint(int[] x,
IntDomainVar[] y,
IEnvironment environment)
Creates a new LeximinConstraint instance. |
Method Summary | |
---|---|
void |
awake()
This method is invoked during the first propagation. |
void |
awakeOnInf(int idx)
Cette m�thode r�agit si une variable a vu sa borne inf�rieure augmenter. |
void |
awakeOnInst(int idx)
This method is called when a variable has been instanciated |
void |
awakeOnSup(int idx)
Cette m�thode r�agit si une variable a vu sa borne sup�rieure diminuer. |
boolean |
isSatisfied()
This method checks if the constraint is satisfied, once the variables have all been satisfied. |
String |
pretty()
Prints details about the constraint and its variables. |
void |
printOccVectors()
Prints some of the useful private fields that are used by the gac algorithm. |
void |
propagate()
This methode propagates the constraint events. |
void |
setPointersAndFlags()
The setPointersAndFlags method sets the values
α, β, γ and δ, used by the algorithm. |
void |
setX(int[] x)
|
String |
toString()
The rather classical toString method... |
void |
updatePointersAndFlags(int idx,
boolean inf)
The setPointersAndFlags method updates the values
α, β, γ and δ, used by the algorithm,
when the domain of a variable has changed. |
void |
updateVectors(int idx)
This methods updates the vectors used by the gac algorithm. |
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint |
---|
awakeOnBounds, awakeOnRem, awakeOnRemovals, getConstraintType, isConsistent, isSatisfied |
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 |
Methods inherited from class choco.kernel.solver.propagation.Propagator |
---|
activate, constAwake, fail, getEvent, getFilteredEventMask, getPriority, isActive, setActive, setActiveSilently, setEntailed, setPassive, setPropagationEngine |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SemiLeximinSConstraint(int[] x, IntDomainVar[] y, IEnvironment environment)
LeximinConstraint
instance.
x
- the first array of integersy
- the second array of integer variablesenvironment
- Method Detail |
---|
public void updateVectors(int idx)
idx
- indicepublic void setPointersAndFlags() throws ContradictionException
setPointersAndFlags
method sets the values
α, β, γ and δ, used by the algorithm.
ContradictionException
- if the model instance is inconsistantpublic void updatePointersAndFlags(int idx, boolean inf) throws ContradictionException
setPointersAndFlags
method updates the values
α, β, γ and δ, used by the algorithm,
when the domain of a variable has changed.
idx
- the index of the variable whose domain has changedinf
- a boolean
value indicating whether the change
occured with the lower bound (true
) or with thee upper bound
(false
).
ContradictionException
- if the model instance is inconsistantpublic void awake() throws ContradictionException
awake
in class Propagator
ContradictionException
- if a variable has an empty domain.public void propagate() throws ContradictionException
propagate
in class Propagator
ContradictionException
- if a variable has an empty domain.public void awakeOnInst(int idx) throws ContradictionException
awakeOnInst
in interface IntPropagator
awakeOnInst
in class AbstractIntSConstraint
idx
- the index of the instanciated variable.
ContradictionException
public void awakeOnInf(int idx) throws ContradictionException
awakeOnInf
in interface IntPropagator
awakeOnInf
in class AbstractIntSConstraint
idx
- l'indice de la variable qui a �t� instanci�e.
ContradictionException
public void awakeOnSup(int idx) throws ContradictionException
awakeOnSup
in interface IntPropagator
awakeOnSup
in class AbstractIntSConstraint
idx
- l'indice de la variable qui a �t� instanci�e.
ContradictionException
public boolean isSatisfied()
isSatisfied
in interface SConstraint<IntDomainVar>
isSatisfied
in class AbstractIntSConstraint
true
iff the constraint is satisfied.public String pretty()
pretty
in interface IPretty
pretty
in class AbstractSConstraint<IntDomainVar>
public String toString()
toString
method...
toString
in class AbstractSConstraint<IntDomainVar>
String
representing the object.public void printOccVectors()
public void setX(int[] x)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |