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.booleanbound()Returns true if the min and the max of the expression are equal.booleancontains(long v) This method returns whether the value 'v' is in the domain of the
variable.voiddelete()protected voidfinalize()static longgetCPtr(BooleanVar obj) static intisDifferent(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.longmax()longmin()intrawValue()voidremoveInterval(long l, long u) This method removes the interval 'l' ..voidremoveValue(long v) This method removes the value 'v' from the domain of the variable.voidvoidsetMax(long m) voidsetMin(long m) voidsetRange(long mi, long ma) This method sets both the min and the max of the expression.longsize()This method returns the number of values in the domain of the variable.static longswigRelease(BooleanVar obj) toString()longvalue()This method returns the value of the variable.intvarType()voidThis method attaches a demon that will be awakened when the
variable is bound.voidwhenDomain(Demon d) This method attaches a demon that will watch any domain
modification of the domain of the variable.voidAttach 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, whenDomainMethods inherited from class com.google.ortools.constraintsolver.IntExpr
getCPtr, range, setValue, swigRelease, varWithName, whenRangeMethods 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, unfreezeQueueMethods 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:IntVarThis method removes the value 'v' from the domain of the variable.- Overrides:
removeValuein classIntVar
-
removeInterval
public void removeInterval(long l, long u) Description copied from class:IntVarThis method removes the interval 'l' .. 'u' from the domain of
the variable. It assumes that 'l' <= 'u'.- Overrides:
removeIntervalin classIntVar
-
whenBound
-
whenRange
-
whenDomain
Description copied from class:IntVarThis method attaches a demon that will watch any domain
modification of the domain of the variable.- Overrides:
whenDomainin classIntVar
-
size
-
contains
-
makeHoleIterator
Description copied from class:IntVarCreates 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:
makeHoleIteratorin classIntVar
-
makeDomainIterator
Description copied from class:IntVarCreates 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:
makeDomainIteratorin classIntVar
-
toString
- Overrides:
toStringin classPropagationBaseObject
-
varType
-
isEqual
-
isDifferent
- Overrides:
isDifferentin classIntVar
-
isGreaterOrEqual
- Overrides:
isGreaterOrEqualin classIntVar
-
isLessOrEqual
- Overrides:
isLessOrEqualin classIntVar
-
restoreValue
public void restoreValue() -
baseName
Description copied from class:PropagationBaseObjectReturns a base name for automatic naming.- Overrides:
baseNamein classPropagationBaseObject
-
rawValue
public int rawValue()
-