|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.cp.solver.variables.integer.AbstractIntDomain
choco.cp.solver.variables.integer.IntervalIntDomain
public class IntervalIntDomain
Field Summary | |
---|---|
protected IntervalIntDomainIterator |
_iterator
|
Fields inherited from class choco.cp.solver.variables.integer.AbstractIntDomain |
---|
currentInfPropagated, currentSupPropagated |
Fields inherited from interface choco.kernel.solver.variables.integer.IntDomain |
---|
LOGGER |
Constructor Summary | |
---|---|
IntervalIntDomain(IntDomainVarImpl v,
int a,
int b,
IEnvironment environment,
PropagationEngine propagationEngine)
|
Method Summary | |
---|---|
protected boolean |
_removeVal(int x,
SConstraint cause)
Removing a value from the domain of a variable. |
boolean |
contains(int x)
Testing whether an search value is contained within the domain. |
int |
fastNextValue(int x)
Accessing the smallest value stored in the domain and strictly greater than x, assuming x is greater or equal to the lower bound. |
void |
freezeDeltaDomain()
The delta domain container is "frozen" (it can no longer accept new value removals) so that this set of values can be iterated as such |
int |
getInf()
Access the minimal value stored in the domain. |
DisposableIntIterator |
getIterator()
Retrieve an getIterator for traversing the sequence of values contained in the domain |
int |
getNextValue(int x)
Accessing the smallest value stored in the domain and strictly greater than x. |
int |
getPrevValue(int x)
Accessing the largest value stored in the domain and strictly smaller than x. |
int |
getRandomValue()
Draws a value at random from the domain. |
boolean |
getReleasedDeltaDomain()
checks whether the delta domain has indeed been released (ie: chechks that no domain updates are pending) |
int |
getSize()
Access the total number of values stored in the domain. |
int |
getSup()
Access the maximal value stored in the domain/ |
boolean |
hasNextValue(int x)
Testing whether there are values in the domain that are strictly greater than x. |
boolean |
hasPrevValue(int x)
Testing whether there are values in the domain that are strictly smaller than x. |
boolean |
isBoolean()
Is it a 0/1 domain ? |
boolean |
isEnumerated()
|
String |
pretty()
pretty printing of the object. |
boolean |
releaseDeltaDomain()
release the delta domain |
boolean |
remove(int x)
Removing a single value from the domain. |
void |
restrict(int x)
Restricting the domain to a singleton |
int |
updateInf(int x)
Augment the minimal value stored in the domain. |
int |
updateSup(int x)
Diminish the maximal value stored in the domain. |
Methods inherited from class choco.cp.solver.variables.integer.AbstractIntDomain |
---|
clearDeltaDomain, copyDelta, fastPrevValue, getDeltaIterator, instantiate, removeInterval, removeVal, toString, updateInf, updateSup |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected IntervalIntDomainIterator _iterator
Constructor Detail |
---|
public IntervalIntDomain(IntDomainVarImpl v, int a, int b, IEnvironment environment, PropagationEngine propagationEngine)
Method Detail |
---|
public boolean contains(int x)
IntDomain
public int getNextValue(int x)
IntDomain
IntDomain
,
use the following loop:
int ub = dom.getSup(); for (int val = dom.getInf(); val <= ub; val = dom.getNextValue(val)) { // operate on value 'val' here }
public final int fastNextValue(int x)
IntDomain
IntDomain
,
use the following loop:
int ub = dom.getSup(); for (int val = dom.getInf(); val <= ub; val = dom.fastNextValue(val)) { // operate on value 'val' here }
fastNextValue
in interface IntDomain
fastNextValue
in class AbstractIntDomain
public int getPrevValue(int x)
IntDomain
IntDomain
,
use the following loop:
int lb = dom.getInf(); for (int val = dom.getSup(); val >= lb; val = dom.getPrevValue(val)) { // operate on value 'val' here }
public int getRandomValue()
IntDomain
public final int getSize()
IntDomain
public boolean hasNextValue(int x)
IntDomain
public boolean hasPrevValue(int x)
IntDomain
public DisposableIntIterator getIterator()
IntDomain
public boolean remove(int x)
IntDomain
public final int getSup()
IntDomain
public final int getInf()
IntDomain
public void restrict(int x)
IntDomain
public int updateInf(int x)
IntDomain
public int updateSup(int x)
IntDomain
protected boolean _removeVal(int x, SConstraint cause) throws ContradictionException
AbstractIntDomain
x
- the value to removecause
- constraint causing the modification
ContradictionException
- contradiction excpetionpublic boolean isEnumerated()
public boolean isBoolean()
IntDomain
public String pretty()
IPretty
public void freezeDeltaDomain()
IntDomain
freezeDeltaDomain
in interface IntDomain
freezeDeltaDomain
in class AbstractIntDomain
public boolean releaseDeltaDomain()
releaseDeltaDomain
in interface IntDomain
releaseDeltaDomain
in class AbstractIntDomain
public boolean getReleasedDeltaDomain()
getReleasedDeltaDomain
in interface IntDomain
getReleasedDeltaDomain
in class AbstractIntDomain
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |