choco.integer.var
Interface IntDomain

All Superinterfaces:
Entity
All Known Subinterfaces:
ExplainedIntDomain, PalmIntDomain
All Known Implementing Classes:
AbstractIntDomain, BitSetIntDomain, IntervalIntDomain, JumpBitSetIntDomain, JumpIntervalIntDomain, PalmBitSetIntDomain, PalmIntervalIntDomain

public interface IntDomain
extends Entity

An interface for all domains of search variables


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.
 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
 IntIterator 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.
 IntIterator 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 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.Entity
getProblem, pretty
 

Method Detail

getIterator

IntIterator getIterator()
Retrieve an getIterator for traversing the sequence of values contained in the domain


getInf

int getInf()
Access the minimal value stored in the domain.


getSup

int getSup()
Access the maximal value stored in the domain/


updateInf

int updateInf(int x)
Augment the minimal value stored in the domain. returns the new lower bound (x or more, in case x was not in the domain)


updateSup

int updateSup(int x)
Diminish the maximal value stored in the domain. returns the new upper bound (x or more, in case x was not in the domain).


contains

boolean contains(int x)
Testing whether an search value is contained within the domain.


remove

boolean remove(int x)
Removing a single value from the domain.


restrict

void restrict(int x)
Restricting the domain to a singleton


getSize

int getSize()
Access the total number of values stored in the domain.


getNextValue

int getNextValue(int x)
Accessing the smallest value stored in the domain and strictly greater than x. Does not require x to be in the domain.


getPrevValue

int getPrevValue(int x)
Accessing the largest value stored in the domain and strictly smaller than x. Does not require x to be in the domain.


hasNextValue

boolean hasNextValue(int x)
Testing whether there are values in the domain that are strictly greater than x. Does not require x to be in the domain.


hasPrevValue

boolean hasPrevValue(int x)
Testing whether there are values in the domain that are strictly smaller than x. Does not require x to be in the domain.


getRandomValue

int getRandomValue()
Draws a value at random from the domain.


getDeltaIterator

IntIterator getDeltaIterator()
Returns an getIterator over the set of values that have been removed from the domain since the last propagation


freezeDeltaDomain

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


releaseDeltaDomain

boolean releaseDeltaDomain()
after an iteration over the delta domain, the delta domain is reopened again.

Returns:
true iff the delta domain is reopened empty (no updates have been made to the domain while it was frozen, false iff the delta domain is reopened with pending value removals (updates were made to the domain, while the delta domain was frozen).

getReleasedDeltaDomain

boolean getReleasedDeltaDomain()
checks whether the delta domain has indeed been released (ie: chechks that no domain updates are pending)


clearDeltaDomain

void clearDeltaDomain()
cleans the data structure implementing the delta domain


isEnumerated

boolean isEnumerated()