Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Public Member Functions | |
synchronized void | delete () |
long | min () |
void | setMin (long m) |
long | max () |
void | setMax (long m) |
void | range (long[] l, long[] u) |
void | setRange (long l, long u) |
void | setValue (long v) |
boolean | bound () |
boolean | isVar () |
IntVar | var () |
IntVar | varWithName (String name) |
void | whenRange (Demon d) |
void | whenRange (Runnable closure) |
void | accept (ModelVisitor visitor) |
Public Member Functions inherited from com.google.ortools.constraintsolver.PropagationBaseObject | |
PropagationBaseObject (Solver s) | |
String | toString () |
Solver | solver () |
void | freezeQueue () |
void | unfreezeQueue () |
void | enqueueDelayedDemon (Demon d) |
void | enqueueVar (Demon d) |
void | reset_action_on_fail () |
void | set_variable_to_clean_on_fail (IntVar v) |
String | name () |
void | setName (String name) |
boolean | hasName () |
String | baseName () |
Public Member Functions inherited from com.google.ortools.constraintsolver.BaseObject | |
BaseObject () | |
Protected Member Functions | |
IntExpr (long cPtr, boolean cMemoryOwn) | |
void | finalize () |
Protected Member Functions inherited from com.google.ortools.constraintsolver.PropagationBaseObject | |
PropagationBaseObject (long cPtr, boolean cMemoryOwn) | |
Protected Member Functions inherited from com.google.ortools.constraintsolver.BaseObject | |
BaseObject (long cPtr, boolean cMemoryOwn) | |
Static Protected Member Functions | |
static long | getCPtr (IntExpr obj) |
static long | swigRelease (IntExpr obj) |
Static Protected Member Functions inherited from com.google.ortools.constraintsolver.PropagationBaseObject | |
static long | getCPtr (PropagationBaseObject obj) |
static long | swigRelease (PropagationBaseObject obj) |
Static Protected Member Functions inherited from com.google.ortools.constraintsolver.BaseObject | |
static long | getCPtr (BaseObject obj) |
static long | swigRelease (BaseObject obj) |
Additional Inherited Members | |
Protected Attributes inherited from com.google.ortools.constraintsolver.BaseObject | |
transient boolean | swigCMemOwn |
The class IntExpr is the base of all integer expressions in
constraint programming.
It contains the basic protocol for an expression:
Definition at line 20 of file IntExpr.java.
|
protected |
Definition at line 23 of file IntExpr.java.
void com.google.ortools.constraintsolver.IntExpr.accept | ( | ModelVisitor | visitor | ) |
Accepts the given visitor.
Reimplemented in com.google.ortools.constraintsolver.IntVar.
Definition at line 148 of file IntExpr.java.
boolean com.google.ortools.constraintsolver.IntExpr.bound | ( | ) |
Returns true if the min and the max of the expression are equal.
Reimplemented in com.google.ortools.constraintsolver.BooleanVar.
Definition at line 101 of file IntExpr.java.
synchronized void com.google.ortools.constraintsolver.IntExpr.delete | ( | ) |
Reimplemented from com.google.ortools.constraintsolver.PropagationBaseObject.
Reimplemented in com.google.ortools.constraintsolver.BaseIntExpr, com.google.ortools.constraintsolver.BooleanVar, and com.google.ortools.constraintsolver.IntVar.
Definition at line 49 of file IntExpr.java.
|
protected |
Reimplemented from com.google.ortools.constraintsolver.PropagationBaseObject.
Reimplemented in com.google.ortools.constraintsolver.BaseIntExpr, com.google.ortools.constraintsolver.BooleanVar, and com.google.ortools.constraintsolver.IntVar.
Definition at line 45 of file IntExpr.java.
|
staticprotected |
Definition at line 28 of file IntExpr.java.
boolean com.google.ortools.constraintsolver.IntExpr.isVar | ( | ) |
Returns true if the expression is indeed a variable.
Reimplemented in com.google.ortools.constraintsolver.IntVar.
Definition at line 108 of file IntExpr.java.
long com.google.ortools.constraintsolver.IntExpr.max | ( | ) |
Reimplemented in com.google.ortools.constraintsolver.BooleanVar.
Definition at line 68 of file IntExpr.java.
long com.google.ortools.constraintsolver.IntExpr.min | ( | ) |
Reimplemented in com.google.ortools.constraintsolver.BooleanVar.
Definition at line 60 of file IntExpr.java.
void com.google.ortools.constraintsolver.IntExpr.range | ( | long[] | l, |
long[] | u ) |
By default calls Min() and Max(), but can be redefined when Min and Max
code can be factorized.
Definition at line 80 of file IntExpr.java.
void com.google.ortools.constraintsolver.IntExpr.setMax | ( | long | m | ) |
Reimplemented in com.google.ortools.constraintsolver.BooleanVar.
Definition at line 72 of file IntExpr.java.
void com.google.ortools.constraintsolver.IntExpr.setMin | ( | long | m | ) |
Reimplemented in com.google.ortools.constraintsolver.BooleanVar.
Definition at line 64 of file IntExpr.java.
void com.google.ortools.constraintsolver.IntExpr.setRange | ( | long | l, |
long | u ) |
This method sets both the min and the max of the expression.
Reimplemented in com.google.ortools.constraintsolver.BooleanVar.
Definition at line 87 of file IntExpr.java.
void com.google.ortools.constraintsolver.IntExpr.setValue | ( | long | v | ) |
This method sets the value of the expression.
Definition at line 94 of file IntExpr.java.
|
staticprotected |
Definition at line 32 of file IntExpr.java.
IntVar com.google.ortools.constraintsolver.IntExpr.var | ( | ) |
Creates a variable from the expression.
Reimplemented in com.google.ortools.constraintsolver.BaseIntExpr, and com.google.ortools.constraintsolver.IntVar.
Definition at line 115 of file IntExpr.java.
IntVar com.google.ortools.constraintsolver.IntExpr.varWithName | ( | String | name | ) |
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 126 of file IntExpr.java.
void com.google.ortools.constraintsolver.IntExpr.whenRange | ( | Demon | d | ) |
Attach a demon that will watch the min or the max of the expression.
Reimplemented in com.google.ortools.constraintsolver.BooleanVar.
Definition at line 134 of file IntExpr.java.
void com.google.ortools.constraintsolver.IntExpr.whenRange | ( | Runnable | closure | ) |
Attach a demon that will watch the min or the max of the expression.
Definition at line 141 of file IntExpr.java.