public class IntVar extends IntExpr
swigCMemOwn
Constructor and Description |
---|
IntVar(long cPtr,
boolean cMemoryOwn) |
Modifier and Type | Method and Description |
---|---|
void |
accept(ModelVisitor visitor)
Accepts the given visitor.
|
boolean |
contains(long v)
This method returns whether the value 'v' is in the domain of the
variable. |
void |
delete() |
protected void |
finalize() |
static long |
getCPtr(IntVar obj) |
int |
index()
Returns the index of the variable.
|
IntVar |
isDifferent(long constant) |
IntVar |
isEqual(long constant)
IsEqual
|
IntVar |
isGreaterOrEqual(long constant) |
IntVar |
isLessOrEqual(long constant) |
boolean |
isVar()
Returns true if the expression is indeed a variable.
|
IntVarIterator |
makeDomainIterator(boolean reversible)
Creates a domain iterator.
|
IntVarIterator |
makeHoleIterator(boolean reversible)
Creates a hole iterator.
|
long |
oldMax()
Returns the previous max.
|
long |
oldMin()
Returns the previous min.
|
void |
removeInterval(long l,
long u)
This method removes the interval 'l' ..
|
void |
removeValue(long v)
This method removes the value 'v' from the domain of the variable.
|
void |
removeValues(long[] values)
This method remove the values from the domain of the variable.
|
void |
setValue(long[] values)
This method intersects the current domain with the values in the array.
|
long |
size()
This method returns the number of values in the domain of the variable.
|
static long |
swigRelease(IntVar obj) |
long |
value()
This method returns the value of the variable.
|
IntVar |
var()
Creates a variable from the expression.
|
int |
varType() |
void |
whenBound(Demon d)
This method attaches a demon that will be awakened when the
variable is bound. |
void |
whenBound(java.lang.Runnable closure)
This method attaches a closure that will be awakened when the
variable is bound. |
void |
whenDomain(Demon d)
This method attaches a demon that will watch any domain
modification of the domain of the variable. |
void |
whenDomain(java.lang.Runnable closure)
This method attaches a closure that will watch any domain
modification of the domain of the variable. |
bound, getCPtr, max, min, range, setMax, setMin, setRange, setValue, swigRelease, varWithName, whenRange, whenRange
baseName, enqueueDelayedDemon, enqueueVar, freezeQueue, getCPtr, hasName, name, reset_action_on_fail, set_variable_to_clean_on_fail, setName, solver, swigRelease, toString, unfreezeQueue
getCPtr, swigRelease
public static long getCPtr(IntVar obj)
public static long swigRelease(IntVar obj)
public boolean isVar()
IntExpr
public IntVar var()
IntExpr
public long value()
public void removeValue(long v)
public void removeInterval(long l, long u)
public void removeValues(long[] values)
public void setValue(long[] values)
public void whenBound(Demon d)
public void whenBound(java.lang.Runnable closure)
public void whenDomain(Demon d)
public void whenDomain(java.lang.Runnable closure)
public long size()
public boolean contains(long v)
public IntVarIterator makeHoleIterator(boolean reversible)
public IntVarIterator makeDomainIterator(boolean reversible)
public long oldMin()
public long oldMax()
public int varType()
public void accept(ModelVisitor visitor)
public IntVar isEqual(long constant)
public IntVar isDifferent(long constant)
public IntVar isGreaterOrEqual(long constant)
public IntVar isLessOrEqual(long constant)
public int index()
Copyright © 2025. All rights reserved.