|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IntDomain
An interface for all domains of search variables
Field Summary | |
---|---|
static Logger |
LOGGER
|
Method Summary | |
---|---|
void |
clearDeltaDomain()
cleans the data structure implementing the delta domain |
boolean |
contains(int x)
Testing whether an search value is contained within the domain. |
IDeltaDomain |
copyDelta()
|
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. |
int |
fastPrevValue(int x)
Accessing the largest value stored in the domain and strictly smaller than x, assuming x is less or equal to the upper 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 |
DisposableIntIterator |
getDeltaIterator()
Returns an getIterator over the set of values that have been removed from the domain since the last propagation |
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()
|
boolean |
releaseDeltaDomain()
after an iteration over the delta domain, the delta domain is reopened again. |
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 interface choco.IPretty |
---|
pretty |
Field Detail |
---|
static final Logger LOGGER
Method Detail |
---|
DisposableIntIterator getIterator()
int getInf()
int getSup()
int updateInf(int x)
int updateSup(int x)
boolean contains(int x)
boolean remove(int x)
void restrict(int x)
int getSize()
int getNextValue(int x)
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 }
int fastNextValue(int x)
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 }
int getPrevValue(int x)
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 }
int fastPrevValue(int x)
IntDomain
,
use the following loop:
int lb = dom.getInf(); for (int val = dom.getSup(); val >= lb; val = dom.fastPrevValue(val)) { // operate on value 'val' here }
boolean hasNextValue(int x)
boolean hasPrevValue(int x)
int getRandomValue()
DisposableIntIterator getDeltaIterator()
void freezeDeltaDomain()
boolean releaseDeltaDomain()
boolean getReleasedDeltaDomain()
void clearDeltaDomain()
boolean isEnumerated()
boolean isBoolean()
IDeltaDomain copyDelta()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |