public class FixedBoolVarImpl extends FixedIntVarImpl implements BoolVar
ReExpression.Operator
constante
mIdx, model, monitors, MSG_EMPTY, MSG_INST, name, propagators
MAX_INT_BOUND, MIN_INT_BOUND
BOOL, CSTE, INT, KIND, REAL, SET, TYPE, VAR, VIEW
NO_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, asBoolVar, asIntVar, asRealVar, asSetVar, clearEvents, compareTo, contradiction, getCause, getDindex, getId, getIndexInPropagator, getMask, getModel, getName, getNbProps, getPIndices, getPropagator, getPropagators, getViews, isAConstant, isBool, link, removeMonitor, setPIndice, storeEvents, swapOnActivate, swapOnPassivate, unlink
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
boolVar, extractVar, intVar
contains, getDomainSize, getLB, getNoChild, getRange, getRangeIterator, getUB, getValue, getValueIterator, hasEnumeratedDomain, instantiateTo, isBool, isExpressionLeaf, isInstantiatedTo, monitorDelta, nextValue, nextValueOut, previousValue, previousValueOut, removeAllValuesBut, removeInterval, removeValue, removeValues, reverseValue, transformEvent, transformValue, updateBounds, updateLowerBound, updateUpperBound, why
_schedIter, addMonitor, asBoolVar, asIntVar, asRealVar, asSetVar, clearEvents, contradiction, createDelta, getCause, getDelta, getDindex, getEnvironment, getIndexInPropagator, getMask, getModel, getName, getNbProps, getPIndices, getPropagator, getPropagators, getViews, isAConstant, isInstantiated, link, notifyMonitors, notifyPropagators, notifyViews, removeMonitor, setPIndice, storeEvents, subscribeView, swapOnActivate, swapOnPassivate, unlink
compareTo
forEach, iterator, spliterator
public int getTypeAndKind()
Variable
int 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 Variable
getTypeAndKind
in class FixedIntVarImpl
public ESat getBooleanValue()
getBooleanValue
in interface BoolVar
public boolean setToTrue(ICause cause) throws ContradictionException
setToTrue
in interface BoolVar
ContradictionException
public boolean setToFalse(ICause cause) throws ContradictionException
setToFalse
in interface BoolVar
ContradictionException
public BoolVar not()
not
in interface ReExpression
not
in interface BoolVar
public boolean isLit()
ILogical
public boolean isNot()
ILogical
public void setNot(boolean isNot)
ILogical
public String toString()
toString
in class FixedIntVarImpl
Copyright © 2018. All rights reserved.