Java Reference
Java Reference
Detailed Description
Definition at line 11 of file BooleanVar.java.
Public Member Functions | |
| synchronized void | delete () |
| long | min () |
| void | setMin (long m) |
| long | max () |
| void | setMax (long m) |
| void | setRange (long mi, long ma) |
| This method sets both the min and the max of the expression. More... | |
| boolean | bound () |
| Returns true if the min and the max of the expression are equal. More... | |
| long | value () |
| This method returns the value of the variable. More... | |
| void | removeValue (long v) |
| This method removes the value 'v' from the domain of the variable. More... | |
| void | removeInterval (long l, long u) |
| This method removes the interval 'l' . More... | |
| void | whenBound (Demon d) |
| This method attaches a demon that will be awakened when the variable is bound. More... | |
| void | whenRange (Demon d) |
| Attach a demon that will watch the min or the max of the expression. More... | |
| void | whenDomain (Demon d) |
| This method attaches a demon that will watch any domain modification of the domain of the variable. More... | |
| long | size () |
| This method returns the number of values in the domain of the variable. More... | |
| boolean | contains (long v) |
| This method returns whether the value 'v' is in the domain of the variable. More... | |
| IntVarIterator | makeHoleIterator (boolean reversible) |
| Creates a hole iterator. More... | |
| IntVarIterator | makeDomainIterator (boolean reversible) |
| Creates a domain iterator. More... | |
| String | toString () |
| int | varType () |
| IntVar | isEqual (long constant) |
| IsEqual. More... | |
| IntVar | isDifferent (long constant) |
| IntVar | isGreaterOrEqual (long constant) |
| IntVar | isLessOrEqual (long constant) |
| void | restoreValue () |
| String | baseName () |
| Returns a base name for automatic naming. More... | |
| int | rawValue () |
| boolean | isVar () |
| Returns true if the expression is indeed a variable. More... | |
| IntVar | var () |
| Creates a variable from the expression. More... | |
| void | removeValues (long[] values) |
| This method remove the values from the domain of the variable. More... | |
| void | setValue (long[] values) |
| This method intersects the current domain with the values in the array. More... | |
| void | setValue (long v) |
| This method sets the value of the expression. More... | |
| void | whenBound (Runnable closure) |
| This method attaches a closure that will be awakened when the variable is bound. More... | |
| void | whenDomain (Runnable closure) |
| This method attaches a closure that will watch any domain modification of the domain of the variable. More... | |
| long | oldMin () |
| Returns the previous min. More... | |
| long | oldMax () |
| Returns the previous max. More... | |
| void | accept (ModelVisitor visitor) |
| Accepts the given visitor. More... | |
| int | index () |
| Returns the index of the variable. More... | |
| void | range (int[] l, int[] u) |
| By default calls Min() and Max(), but can be redefined when Min and Max code can be factorized. More... | |
| IntVar | varWithName (String name) |
| Creates a variable from the expression and set the name of the resulting var. More... | |
| void | whenRange (Runnable closure) |
| Attach a demon that will watch the min or the max of the expression. More... | |
| Solver | solver () |
| void | freezeQueue () |
| This method freezes the propagation queue. More... | |
| void | unfreezeQueue () |
| This method unfreezes the propagation queue. More... | |
| void | enqueueDelayedDemon (Demon d) |
| This method pushes the demon onto the propagation queue. More... | |
| void | enqueueVar (Demon d) |
| void | reset_action_on_fail () |
| This method clears the failure callback. More... | |
| void | set_variable_to_clean_on_fail (IntVar v) |
| Shortcut for variable cleaner. More... | |
| String | name () |
| Object naming. More... | |
| void | setName (String name) |
| boolean | hasName () |
| Returns whether the object has been named or not. More... | |
Static Public Member Functions | |
| static int | getKUnboundBooleanVarValue () |
Protected Member Functions | |
| BooleanVar (long cPtr, boolean cMemoryOwn) | |
Constructor & Destructor Documentation
◆ BooleanVar()
|
inlineprotected |
Definition at line 14 of file BooleanVar.java.
Member Function Documentation
◆ accept()
|
inlineinherited |
Accepts the given visitor.
Reimplemented from IntExpr.
Definition at line 165 of file gen/java/com/google/ortools/constraintsolver/IntVar.java.
◆ baseName()
|
inline |
Returns a base name for automatic naming.
Reimplemented from PropagationBaseObject.
Definition at line 141 of file BooleanVar.java.
◆ bound()
|
inline |
Returns true if the min and the max of the expression are equal.
Reimplemented from IntExpr.
Definition at line 63 of file BooleanVar.java.
◆ contains()
|
inline |
This method returns whether the value 'v' is in the domain of the variable.
Reimplemented from IntVar.
Definition at line 95 of file BooleanVar.java.
◆ delete()
|
inline |
Reimplemented from IntVar.
Definition at line 28 of file BooleanVar.java.
◆ enqueueDelayedDemon()
|
inlineinherited |
This method pushes the demon onto the propagation queue.
It will be processed directly if the queue is empty. It will be enqueued according to its priority otherwise.
Definition at line 72 of file PropagationBaseObject.java.
◆ enqueueVar()
|
inlineinherited |
Definition at line 76 of file PropagationBaseObject.java.
◆ freezeQueue()
|
inlineinherited |
This method freezes the propagation queue.
It is useful when you need to apply multiple modifications at once.
Definition at line 58 of file PropagationBaseObject.java.
◆ getKUnboundBooleanVarValue()
|
inlinestatic |
Definition at line 39 of file BooleanVar.java.
◆ hasName()
|
inlineinherited |
Returns whether the object has been named or not.
Definition at line 108 of file PropagationBaseObject.java.
◆ index()
|
inlineinherited |
Returns the index of the variable.
Definition at line 195 of file gen/java/com/google/ortools/constraintsolver/IntVar.java.
◆ isDifferent()
|
inline |
Reimplemented from IntVar.
Definition at line 122 of file BooleanVar.java.
◆ isEqual()
|
inline |
◆ isGreaterOrEqual()
|
inline |
Reimplemented from IntVar.
Definition at line 127 of file BooleanVar.java.
◆ isLessOrEqual()
|
inline |
Reimplemented from IntVar.
Definition at line 132 of file BooleanVar.java.
◆ isVar()
|
inlineinherited |
Returns true if the expression is indeed a variable.
Reimplemented from IntExpr.
Definition at line 42 of file gen/java/com/google/ortools/constraintsolver/IntVar.java.
◆ makeDomainIterator()
|
inline |
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.
Reimplemented from IntVar.
Definition at line 104 of file BooleanVar.java.
◆ makeHoleIterator()
|
inline |
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.
Reimplemented from IntVar.
Definition at line 99 of file BooleanVar.java.
◆ max()
|
inline |
Reimplemented from IntExpr.
Definition at line 51 of file BooleanVar.java.
◆ min()
|
inline |
Reimplemented from IntExpr.
Definition at line 43 of file BooleanVar.java.
◆ name()
|
inlineinherited |
Object naming.
Definition at line 97 of file PropagationBaseObject.java.
◆ oldMax()
|
inlineinherited |
Returns the previous max.
Definition at line 154 of file gen/java/com/google/ortools/constraintsolver/IntVar.java.
◆ oldMin()
|
inlineinherited |
Returns the previous min.
Definition at line 147 of file gen/java/com/google/ortools/constraintsolver/IntVar.java.
◆ range()
|
inlineinherited |
By default calls Min() and Max(), but can be redefined when Min and Max code can be factorized.
Definition at line 61 of file IntExpr.java.
◆ rawValue()
|
inline |
Definition at line 145 of file BooleanVar.java.
◆ removeInterval()
|
inline |
This method removes the interval 'l' .
. 'u' from the domain of the variable. It assumes that 'l' <= 'u'.
Reimplemented from IntVar.
Definition at line 75 of file BooleanVar.java.
◆ removeValue()
|
inline |
This method removes the value 'v' from the domain of the variable.
Reimplemented from IntVar.
Definition at line 71 of file BooleanVar.java.
◆ removeValues()
|
inlineinherited |
This method remove the values from the domain of the variable.
Definition at line 75 of file gen/java/com/google/ortools/constraintsolver/IntVar.java.
◆ reset_action_on_fail()
|
inlineinherited |
This method clears the failure callback.
Definition at line 83 of file PropagationBaseObject.java.
◆ restoreValue()
|
inline |
Definition at line 137 of file BooleanVar.java.
◆ set_variable_to_clean_on_fail()
|
inlineinherited |
Shortcut for variable cleaner.
Definition at line 90 of file PropagationBaseObject.java.
◆ setMax()
|
inline |
Reimplemented from IntExpr.
Definition at line 55 of file BooleanVar.java.
◆ setMin()
|
inline |
Reimplemented from IntExpr.
Definition at line 47 of file BooleanVar.java.
◆ setName()
|
inlineinherited |
Definition at line 101 of file PropagationBaseObject.java.
◆ setRange()
|
inline |
This method sets both the min and the max of the expression.
Reimplemented from IntExpr.
Definition at line 59 of file BooleanVar.java.
◆ setValue() [1/2]
|
inlineinherited |
This method sets the value of the expression.
Definition at line 75 of file IntExpr.java.
◆ setValue() [2/2]
|
inlineinherited |
This method intersects the current domain with the values in the array.
Definition at line 82 of file gen/java/com/google/ortools/constraintsolver/IntVar.java.
◆ size()
|
inline |
This method returns the number of values in the domain of the variable.
Reimplemented from IntVar.
Definition at line 91 of file BooleanVar.java.
◆ solver()
|
inlineinherited |
Definition at line 50 of file PropagationBaseObject.java.
◆ toString()
|
inline |
Reimplemented from PropagationBaseObject.
Definition at line 109 of file BooleanVar.java.
◆ unfreezeQueue()
|
inlineinherited |
This method unfreezes the propagation queue.
All modifications that happened when the queue was frozen will be processed.
Definition at line 65 of file PropagationBaseObject.java.
◆ value()
|
inline |
This method returns the value of the variable.
This method checks before that the variable is bound.
Reimplemented from IntVar.
Definition at line 67 of file BooleanVar.java.
◆ var()
|
inlineinherited |
Creates a variable from the expression.
Reimplemented from IntExpr.
Definition at line 46 of file gen/java/com/google/ortools/constraintsolver/IntVar.java.
◆ varType()
|
inline |
Reimplemented from IntVar.
Definition at line 113 of file BooleanVar.java.
◆ varWithName()
|
inlineinherited |
Creates a variable from the expression and set the name of the resulting var.
If the expression is already a variable, then it will set the name of the expression, possibly overwriting it. This is just a shortcut to Var() followed by set_name().
Definition at line 104 of file IntExpr.java.
◆ whenBound() [1/2]
|
inline |
This method attaches a demon that will be awakened when the variable is bound.
Reimplemented from IntVar.
Definition at line 79 of file BooleanVar.java.
◆ whenBound() [2/2]
|
inlineinherited |
This method attaches a closure that will be awakened when the variable is bound.
Definition at line 96 of file gen/java/com/google/ortools/constraintsolver/IntVar.java.
◆ whenDomain() [1/2]
|
inline |
This method attaches a demon that will watch any domain modification of the domain of the variable.
Reimplemented from IntVar.
Definition at line 87 of file BooleanVar.java.
◆ whenDomain() [2/2]
|
inlineinherited |
This method attaches a closure that will watch any domain modification of the domain of the variable.
Definition at line 110 of file gen/java/com/google/ortools/constraintsolver/IntVar.java.
◆ whenRange() [1/2]
|
inline |
Attach a demon that will watch the min or the max of the expression.
Reimplemented from IntExpr.
Definition at line 83 of file BooleanVar.java.
◆ whenRange() [2/2]
|
inlineinherited |
Attach a demon that will watch the min or the max of the expression.
Definition at line 119 of file IntExpr.java.
The documentation for this class was generated from the following file: