Class BooleanVar
java.lang.Object
com.google.ortools.constraintsolver.BaseObject
com.google.ortools.constraintsolver.PropagationBaseObject
com.google.ortools.constraintsolver.IntExpr
com.google.ortools.constraintsolver.IntVar
com.google.ortools.constraintsolver.BooleanVar
-
Field Summary
Fields inherited from class com.google.ortools.constraintsolver.BaseObject
swigCMemOwn
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbaseName()
Returns a base name for automatic naming.boolean
bound()
Returns true if the min and the max of the expression are equal.boolean
contains
(long v) This method returns whether the value 'v' is in the domain of the
variable.void
delete()
protected void
finalize()
static long
getCPtr
(BooleanVar obj) static int
isDifferent
(long constant) isEqual
(long constant) IsEqualisGreaterOrEqual
(long constant) isLessOrEqual
(long constant) makeDomainIterator
(boolean reversible) Creates a domain iterator.makeHoleIterator
(boolean reversible) Creates a hole iterator.long
max()
long
min()
int
rawValue()
void
removeInterval
(long l, long u) This method removes the interval 'l' ..void
removeValue
(long v) This method removes the value 'v' from the domain of the variable.void
void
setMax
(long m) void
setMin
(long m) void
setRange
(long mi, long ma) This method sets both the min and the max of the expression.long
size()
This method returns the number of values in the domain of the variable.static long
swigRelease
(BooleanVar obj) toString()
long
value()
This method returns the value of the variable.int
varType()
void
This method attaches a demon that will be awakened when the
variable is bound.void
whenDomain
(Demon d) This method attaches a demon that will watch any domain
modification of the domain of the variable.void
Attach a demon that will watch the min or the max of the expression.Methods inherited from class com.google.ortools.constraintsolver.IntVar
accept, getCPtr, index, isVar, oldMax, oldMin, removeValues, setValue, swigRelease, var, whenBound, whenDomain
Methods inherited from class com.google.ortools.constraintsolver.IntExpr
getCPtr, range, setValue, swigRelease, varWithName, whenRange
Methods inherited from class com.google.ortools.constraintsolver.PropagationBaseObject
enqueueDelayedDemon, enqueueVar, freezeQueue, getCPtr, hasName, name, reset_action_on_fail, set_variable_to_clean_on_fail, setName, solver, swigRelease, unfreezeQueue
Methods inherited from class com.google.ortools.constraintsolver.BaseObject
getCPtr, swigRelease
-
Constructor Details
-
BooleanVar
public BooleanVar(long cPtr, boolean cMemoryOwn)
-
-
Method Details
-
getCPtr
-
swigRelease
-
finalize
-
delete
-
getKUnboundBooleanVarValue
public static int getKUnboundBooleanVarValue() -
min
-
setMin
-
max
-
setMax
-
setRange
-
bound
-
value
-
removeValue
public void removeValue(long v) Description copied from class:IntVar
This method removes the value 'v' from the domain of the variable.- Overrides:
removeValue
in classIntVar
-
removeInterval
public void removeInterval(long l, long u) Description copied from class:IntVar
This method removes the interval 'l' .. 'u' from the domain of
the variable. It assumes that 'l' <= 'u'.- Overrides:
removeInterval
in classIntVar
-
whenBound
-
whenRange
-
whenDomain
Description copied from class:IntVar
This method attaches a demon that will watch any domain
modification of the domain of the variable.- Overrides:
whenDomain
in classIntVar
-
size
-
contains
-
makeHoleIterator
Description copied from class:IntVar
Creates a hole iterator. When 'reversible' is false, the returned
object is created on the normal C++ heap and the solver does NOT
take ownership of the object.- Overrides:
makeHoleIterator
in classIntVar
-
makeDomainIterator
Description copied from class:IntVar
Creates a domain iterator. When 'reversible' is false, the
returned object is created on the normal C++ heap and the solver
does NOT take ownership of the object.- Overrides:
makeDomainIterator
in classIntVar
-
toString
- Overrides:
toString
in classPropagationBaseObject
-
varType
-
isEqual
-
isDifferent
- Overrides:
isDifferent
in classIntVar
-
isGreaterOrEqual
- Overrides:
isGreaterOrEqual
in classIntVar
-
isLessOrEqual
- Overrides:
isLessOrEqual
in classIntVar
-
restoreValue
public void restoreValue() -
baseName
Description copied from class:PropagationBaseObject
Returns a base name for automatic naming.- Overrides:
baseName
in classPropagationBaseObject
-
rawValue
public int rawValue()
-