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

Public Member Functions

synchronized void delete ()
 
boolean isVar ()
 
IntVar var ()
 
long value ()
 
void removeValue (long v)
 
void removeInterval (long l, long u)
 
void removeValues (long[] values)
 
void setValue (long[] values)
 
void whenBound (Demon d)
 
void whenBound (Runnable closure)
 
void whenDomain (Demon d)
 
void whenDomain (Runnable closure)
 
long size ()
 
boolean contains (long v)
 
IntVarIterator makeHoleIterator (boolean reversible)
 
IntVarIterator makeDomainIterator (boolean reversible)
 
long oldMin ()
 
long oldMax ()
 
int varType ()
 
void accept (ModelVisitor visitor)
 
IntVar isEqual (long constant)
 
IntVar isDifferent (long constant)
 
IntVar isGreaterOrEqual (long constant)
 
IntVar isLessOrEqual (long constant)
 
int index ()
 
- Public Member Functions inherited from com.google.ortools.constraintsolver.IntExpr
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 ()
 
IntVar varWithName (String name)
 
void whenRange (Demon d)
 
void whenRange (Runnable closure)
 
- 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

 IntVar (long cPtr, boolean cMemoryOwn)
 
void finalize ()
 
- Protected Member Functions inherited from com.google.ortools.constraintsolver.IntExpr
 IntExpr (long cPtr, boolean cMemoryOwn)
 
- 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 (IntVar obj)
 
static long swigRelease (IntVar obj)
 
- Static Protected Member Functions inherited from com.google.ortools.constraintsolver.IntExpr
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 IntVar is a subset of IntExpr. In addition to the
IntExpr protocol, it offers persistence, removing values from the domains,
and a finer model for events.

Definition at line 16 of file IntVar.java.

Constructor & Destructor Documentation

◆ IntVar()

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

Definition at line 19 of file IntVar.java.

Member Function Documentation

◆ accept()

void com.google.ortools.constraintsolver.IntVar.accept ( ModelVisitor visitor)

Accepts the given visitor.

Reimplemented from com.google.ortools.constraintsolver.IntExpr.

Definition at line 190 of file IntVar.java.

◆ contains()

boolean com.google.ortools.constraintsolver.IntVar.contains ( long v)

This method returns whether the value 'v' is in the domain of the
variable.

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

Definition at line 145 of file IntVar.java.

◆ delete()

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

Reimplemented from com.google.ortools.constraintsolver.IntExpr.

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

Definition at line 45 of file IntVar.java.

◆ finalize()

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

Reimplemented from com.google.ortools.constraintsolver.IntExpr.

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

Definition at line 41 of file IntVar.java.

◆ getCPtr()

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

Definition at line 24 of file IntVar.java.

◆ index()

int com.google.ortools.constraintsolver.IntVar.index ( )

Returns the index of the variable.

Definition at line 220 of file IntVar.java.

◆ isDifferent()

IntVar com.google.ortools.constraintsolver.IntVar.isDifferent ( long constant)

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

Definition at line 202 of file IntVar.java.

◆ isEqual()

IntVar com.google.ortools.constraintsolver.IntVar.isEqual ( long constant)

IsEqual

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

Definition at line 197 of file IntVar.java.

◆ isGreaterOrEqual()

IntVar com.google.ortools.constraintsolver.IntVar.isGreaterOrEqual ( long constant)

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

Definition at line 207 of file IntVar.java.

◆ isLessOrEqual()

IntVar com.google.ortools.constraintsolver.IntVar.isLessOrEqual ( long constant)

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

Definition at line 212 of file IntVar.java.

◆ isVar()

boolean com.google.ortools.constraintsolver.IntVar.isVar ( )

Returns true if the expression is indeed a variable.

Reimplemented from com.google.ortools.constraintsolver.IntExpr.

Definition at line 56 of file IntVar.java.

◆ makeDomainIterator()

IntVarIterator com.google.ortools.constraintsolver.IntVar.makeDomainIterator ( boolean reversible)

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 in com.google.ortools.constraintsolver.BooleanVar.

Definition at line 164 of file IntVar.java.

◆ makeHoleIterator()

IntVarIterator com.google.ortools.constraintsolver.IntVar.makeHoleIterator ( boolean reversible)

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 in com.google.ortools.constraintsolver.BooleanVar.

Definition at line 154 of file IntVar.java.

◆ oldMax()

long com.google.ortools.constraintsolver.IntVar.oldMax ( )

Returns the previous max.

Definition at line 179 of file IntVar.java.

◆ oldMin()

long com.google.ortools.constraintsolver.IntVar.oldMin ( )

Returns the previous min.

Definition at line 172 of file IntVar.java.

◆ removeInterval()

void com.google.ortools.constraintsolver.IntVar.removeInterval ( long l,
long u )

This method removes the interval 'l' .. 'u' from the domain of
the variable. It assumes that 'l' <= 'u'.

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

Definition at line 84 of file IntVar.java.

◆ removeValue()

void com.google.ortools.constraintsolver.IntVar.removeValue ( long v)

This method removes the value 'v' from the domain of the variable.

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

Definition at line 76 of file IntVar.java.

◆ removeValues()

void com.google.ortools.constraintsolver.IntVar.removeValues ( long[] values)

This method remove the values from the domain of the variable.

Definition at line 91 of file IntVar.java.

◆ setValue()

void com.google.ortools.constraintsolver.IntVar.setValue ( long[] values)

This method intersects the current domain with the values in the array.

Definition at line 98 of file IntVar.java.

◆ size()

long com.google.ortools.constraintsolver.IntVar.size ( )

This method returns the number of values in the domain of the variable.

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

Definition at line 137 of file IntVar.java.

◆ swigRelease()

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

Definition at line 28 of file IntVar.java.

◆ value()

long com.google.ortools.constraintsolver.IntVar.value ( )

This method returns the value of the variable. This method checks
before that the variable is bound.

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

Definition at line 69 of file IntVar.java.

◆ var()

IntVar com.google.ortools.constraintsolver.IntVar.var ( )

Creates a variable from the expression.

Reimplemented from com.google.ortools.constraintsolver.IntExpr.

Definition at line 60 of file IntVar.java.

◆ varType()

int com.google.ortools.constraintsolver.IntVar.varType ( )

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

Definition at line 183 of file IntVar.java.

◆ whenBound() [1/2]

void com.google.ortools.constraintsolver.IntVar.whenBound ( Demon d)

This method attaches a demon that will be awakened when the
variable is bound.

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

Definition at line 106 of file IntVar.java.

◆ whenBound() [2/2]

void com.google.ortools.constraintsolver.IntVar.whenBound ( Runnable closure)

This method attaches a closure that will be awakened when the
variable is bound.

Definition at line 114 of file IntVar.java.

◆ whenDomain() [1/2]

void com.google.ortools.constraintsolver.IntVar.whenDomain ( Demon d)

This method attaches a demon that will watch any domain
modification of the domain of the variable.

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

Definition at line 122 of file IntVar.java.

◆ whenDomain() [2/2]

void com.google.ortools.constraintsolver.IntVar.whenDomain ( Runnable closure)

This method attaches a closure that will watch any domain
modification of the domain of the variable.

Definition at line 130 of file IntVar.java.


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