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
protected void finalize() -
delete
public void delete() -
getKUnboundBooleanVarValue
public static int getKUnboundBooleanVarValue() -
min
public long min() -
setMin
public void setMin(long m) -
max
public long max() -
setMax
public void setMax(long m) -
setRange
public void setRange(long mi, long ma) Description copied from class:IntExprThis method sets both the min and the max of the expression. -
bound
public boolean bound()Description copied from class:IntExprReturns true if the min and the max of the expression are equal. -
value
public long value()Description copied from class:IntVarThis method returns the value of the variable. This method checks
before that the variable is bound. -
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
Description copied from class:IntVarThis method attaches a demon that will be awakened when the
variable is bound. -
whenRange
Description copied from class:IntExprAttach a demon that will watch the min or the max of the expression. -
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
public long size()Description copied from class:IntVarThis method returns the number of values in the domain of the variable. -
contains
public boolean contains(long v) Description copied from class:IntVarThis method returns whether the value 'v' is in the domain of the
variable. -
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
public int varType() -
isEqual
Description copied from class:IntVarIsEqual -
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()
-