public class FixedBoolVarImpl extends FixedIntVarImpl implements BoolVar
constante, empty
_plugexpl, mIdx, modificationEvents, monitors, MSG_BOUND, MSG_EMPTY, MSG_INST, MSG_LOW, MSG_REMOVE, MSG_UNKNOWN, MSG_UPP, name, solver
Constructor and Description |
---|
FixedBoolVarImpl(String name,
int constant,
Solver solver) |
Modifier and Type | Method and Description |
---|---|
void |
_setNot(BoolVar not) |
IntVar |
duplicate()
Duplicate
this . |
void |
duplicate(Solver solver,
gnu.trove.map.hash.THashMap<Object,Object> identitymap)
Duplicate
this (which naturally adds it into solver ). |
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, contradiction, createDelta, getDelta, getDomainSize, getLB, getRangeIterator, getUB, getValue, getValueIterator, hasEnumeratedDomain, instantiateTo, isInstantiated, isInstantiatedTo, monitorDelta, nextValue, notifyMonitors, notifyPropagators, notifyViews, previousValue, recordMask, removeInterval, removeValue, subscribeView, updateLowerBound, updateUpperBound
compareTo, getId, getIndexInPropagator, getName, getNbProps, getPIndices, getPropagator, getPropagators, getSolver, getViews, isBool, link, removeMonitor, unlink
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
contains, getDomainSize, getLB, getRangeIterator, getUB, getValue, getValueIterator, hasEnumeratedDomain, instantiateTo, isBool, isInstantiatedTo, monitorDelta, nextValue, previousValue, removeInterval, removeValue, updateLowerBound, updateUpperBound
addMonitor, contradiction, createDelta, getDelta, getIndexInPropagator, getName, getNbProps, getPIndices, getPropagator, getPropagators, getSolver, getViews, isInstantiated, link, notifyMonitors, notifyPropagators, notifyViews, recordMask, removeMonitor, subscribeView, unlink
compareTo
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 boolean isLit()
ILogical
public boolean isNot()
ILogical
public void setNot(boolean isNot)
ILogical
public String toString()
toString
in class FixedIntVarImpl
public IntVar duplicate()
Variable
this
.duplicate
in interface Variable
duplicate
in class FixedIntVarImpl
this
public void duplicate(Solver solver, gnu.trove.map.hash.THashMap<Object,Object> identitymap)
Variable
this
(which naturally adds it into solver
).duplicate
in interface Variable
duplicate
in class FixedIntVarImpl
solver
- target solveridentitymap
- a map to guarantee uniqueness of objectsCopyright © 2015. All rights reserved.