public interface SetVar extends Variable
Modifier and Type | Method and Description |
---|---|
boolean |
force(int element,
ICause cause)
Adds element to the lower bound, i.e.
|
IntVar |
getCard()
get the constrained cardinality variable of this set.
|
ISet |
getLB()
Get SetVar Lower Bound : the set of integers that must belong to every solution (i.e.
|
ISet |
getUB()
Get SetVar Upper Bound : the set of integers that may belong to a solution (i.e.
|
default ISet |
getValue()
Retrieves the current value of the variable if instantiated, otherwise the lower bound (kernel).
|
boolean |
hasCard() |
boolean |
instantiateTo(int[] value,
ICause cause)
Enforces the set variable to contain exactly the set of integers given in parameter
|
ISetDeltaMonitor |
monitorDelta(ICause propagator)
Allow propagator to monitor element removal/enforcing of this
|
boolean |
remove(int element,
ICause cause)
Removes element from the upper bound, i.e.
|
void |
setCard(IntVar card)
ensure a variable is equal to the cardinality of this set.
|
_schedIter, addMonitor, asBoolVar, asIntVar, asRealVar, asSetVar, clearEvents, contradiction, createDelta, getCause, getDelta, getDindex, getEnvironment, getIndexInPropagator, getMask, getModel, getName, getNbProps, getPIndices, getPropagator, getPropagators, getTypeAndKind, getViews, isAConstant, isInstantiated, link, notifyMonitors, notifyPropagators, notifyViews, removeMonitor, setPIndice, storeEvents, subscribeView, swapOnActivate, swapOnPassivate, unlink
compareTo
ISet getLB()
force
to update the domainISet getUB()
remove
to update the domainIntVar getCard()
boolean hasCard()
void setCard(IntVar card)
card
- a variable of the same model.boolean force(int element, ICause cause) throws ContradictionException
element
element
- value to addcause
- cause of value additionContradictionException
boolean remove(int element, ICause cause) throws ContradictionException
element
anymoreelement
- value to removecause
- cause of value removalContradictionException
boolean instantiateTo(int[] value, ICause cause) throws ContradictionException
value
- a set of integerscause
- cause of instantiationContradictionException
default ISet getValue()
ISetDeltaMonitor monitorDelta(ICause propagator)
propagator
- observerCopyright © 2018. All rights reserved.