public class FixedBoolVarImpl extends FixedIntVarImpl implements BoolVar
ArExpression.OperatorconstantemIdx, model, monitors, MSG_BOUND, MSG_EMPTY, MSG_INST, MSG_LOW, MSG_REMOVE, MSG_UNKNOWN, MSG_UPP, name, pindices, propagatorsMAX_INT_BOUND, MIN_INT_BOUNDBOOL, CSTE, INT, KIND, REAL, SET, TYPE, VAR, VIEWNO_CHILD| Constructor and Description |
|---|
FixedBoolVarImpl(String name,
int constant,
Model model) |
| Modifier and Type | Method and Description |
|---|---|
void |
_setNot(BoolVar not) |
ESat |
getBooleanValue() |
int |
getTypeAndKind()
Return a MASK composed of 2 main information: TYPE and KIND.
|
boolean |
hasNot() |
boolean |
isLit()
Current tree is a literal
|
boolean |
isNot()
Current tree is rooted with NOT logical operator
This is a one way relationship: in case a = not(b)
a.isNot() returns true whereas b.isNot() returns false (unless b = not(c)...)
|
BoolVar |
not() |
void |
setNot(boolean isNot)
States whether or not this variable is the negation of another.
|
boolean |
setToFalse(ICause cause) |
boolean |
setToTrue(ICause cause) |
String |
toString() |
addMonitor, contains, createDelta, getDelta, getDomainSize, getLB, getRange, getRangeIterator, getUB, getValue, getValueIterator, hasEnumeratedDomain, instantiateTo, isInstantiated, isInstantiatedTo, iterator, monitorDelta, nextValue, nextValueOut, notifyMonitors, notifyPropagators, notifyViews, previousValue, previousValueOut, removeAllValuesBut, removeInterval, removeValue, removeValues, subscribeView, updateBounds, updateLowerBound, updateUpperBound_schedIter, compareTo, contradiction, getDindex, getId, getIndexInPropagator, getModel, getName, getNbProps, getPIndices, getPropagator, getPropagators, getViews, isAConstant, isBool, link, removeMonitor, setPIndice, unlinkclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcontains, getDomainSize, getLB, getRange, getRangeIterator, getUB, getValue, getValueIterator, hasEnumeratedDomain, instantiateTo, intVar, isBool, isExpressionLeaf, isInstantiatedTo, monitorDelta, nextValue, nextValueOut, previousValue, previousValueOut, removeAllValuesBut, removeInterval, removeValue, removeValues, reverseValue, transformEvent, transformValue, updateBounds, updateLowerBound, updateUpperBound, why_schedIter, addMonitor, contradiction, createDelta, getDelta, getDindex, getEnvironment, getIndexInPropagator, getModel, getName, getNbProps, getPIndices, getPropagator, getPropagators, getViews, isAConstant, isInstantiated, link, notifyMonitors, notifyPropagators, notifyViews, removeMonitor, setPIndice, subscribeView, unlinkcompareToforEach, iterator, spliteratorabs, add, add, add, dist, dist, div, div, eq, eq, eq, extractVar, ge, ge, getExpressionChild, getModel, gt, gt, ieval, le, le, lt, lt, max, max, max, min, min, min, mod, mod, mul, mul, mul, ne, ne, neg, pow, pow, sqr, sub, subpublic int getTypeAndKind()
Variableint type = var.getTypeAndKind() & Variable.TYPE;To get the KIND of a variable:
int kind = var.getTypeAndKind() & Variable.KIND;To check a specific type or kind of a variable:
boolean isVar = (var.getTypeAndKind() & Variable.VAR) !=0;
boolean isInt = (var.getTypeAndKind() & Variable.INT) !=0;
getTypeAndKind in interface VariablegetTypeAndKind in class FixedIntVarImplpublic ESat getBooleanValue()
getBooleanValue in interface BoolVarpublic boolean setToTrue(ICause cause) throws ContradictionException
setToTrue in interface BoolVarContradictionExceptionpublic boolean setToFalse(ICause cause) throws ContradictionException
setToFalse in interface BoolVarContradictionExceptionpublic boolean isLit()
ILogicalpublic boolean isNot()
ILogicalpublic void setNot(boolean isNot)
ILogicalpublic String toString()
toString in class FixedIntVarImplCopyright © 2017. All rights reserved.