Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.constraintsolver.IntExpr Class Reference
Inheritance diagram for com.google.ortools.constraintsolver.IntExpr:
com.google.ortools.constraintsolver.PropagationBaseObject com.google.ortools.constraintsolver.BaseObject com.google.ortools.constraintsolver.BaseIntExpr com.google.ortools.constraintsolver.IntVar com.google.ortools.constraintsolver.BooleanVar

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
 

Detailed Description

The class IntExpr is the base of all integer expressions in
constraint programming.
It contains the basic protocol for an expression:

  • setting and modifying its bound
  • querying if it is bound
  • listening to events modifying its bounds
  • casting it into a variable (instance of IntVar)

Definition at line 20 of file IntExpr.java.

Constructor & Destructor Documentation

◆ IntExpr()

com.google.ortools.constraintsolver.IntExpr.IntExpr ( long cPtr,
boolean cMemoryOwn )
protected

Definition at line 23 of file IntExpr.java.

Member Function Documentation

◆ accept()

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.

◆ bound()

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.

◆ delete()

synchronized void com.google.ortools.constraintsolver.IntExpr.delete ( )

◆ finalize()

void com.google.ortools.constraintsolver.IntExpr.finalize ( )
protected

◆ getCPtr()

static long com.google.ortools.constraintsolver.IntExpr.getCPtr ( IntExpr obj)
staticprotected

Definition at line 28 of file IntExpr.java.

◆ isVar()

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.

◆ max()

long com.google.ortools.constraintsolver.IntExpr.max ( )

Reimplemented in com.google.ortools.constraintsolver.BooleanVar.

Definition at line 68 of file IntExpr.java.

◆ min()

long com.google.ortools.constraintsolver.IntExpr.min ( )

Reimplemented in com.google.ortools.constraintsolver.BooleanVar.

Definition at line 60 of file IntExpr.java.

◆ range()

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.

◆ setMax()

void com.google.ortools.constraintsolver.IntExpr.setMax ( long m)

Reimplemented in com.google.ortools.constraintsolver.BooleanVar.

Definition at line 72 of file IntExpr.java.

◆ setMin()

void com.google.ortools.constraintsolver.IntExpr.setMin ( long m)

Reimplemented in com.google.ortools.constraintsolver.BooleanVar.

Definition at line 64 of file IntExpr.java.

◆ setRange()

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.

◆ setValue()

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.

◆ swigRelease()

static long com.google.ortools.constraintsolver.IntExpr.swigRelease ( IntExpr obj)
staticprotected

Definition at line 32 of file IntExpr.java.

◆ var()

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.

◆ varWithName()

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.

◆ whenRange() [1/2]

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.

◆ whenRange() [2/2]

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.


The documentation for this class was generated from the following file: