|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchoco.AbstractEntity
choco.integer.var.AbstractIntDomain
choco.integer.var.IntervalIntDomain
public class IntervalIntDomain
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class choco.integer.var.AbstractIntDomain |
|---|
AbstractIntDomain.IntDomainIterator |
| Field Summary | |
|---|---|
protected StoredInt |
inf
The backtrackable minimal value of the variable. |
protected static java.util.Random |
random
A random generator for random value from the domain |
protected StoredInt |
sup
The backtrackable maximal value of the variable. |
| Fields inherited from class choco.integer.var.AbstractIntDomain |
|---|
currentInfPropagated, currentSupPropagated, logger, variable |
| Fields inherited from class choco.AbstractEntity |
|---|
hook, problem |
| Constructor Summary | |
|---|---|
IntervalIntDomain(IntDomainVarImpl v,
int a,
int b)
|
|
| Method Summary | |
|---|---|
protected boolean |
_removeVal(int x)
Removing a value from the domain of a variable. |
boolean |
contains(int x)
Testing whether an search value is contained within the domain. |
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()
Returns an getIterator. |
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. |
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()
|
java.lang.String |
pretty()
pretty printing of the object. |
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.integer.var.AbstractIntDomain |
|---|
_instantiate, _updateInf, _updateSup, clearDeltaDomain, freezeDeltaDomain, getReleasedDeltaDomain, instantiate, releaseDeltaDomain, removeInterval, removeVal, updateInf, updateSup |
| Methods inherited from class choco.AbstractEntity |
|---|
getProblem |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface choco.Entity |
|---|
getProblem |
| Field Detail |
|---|
protected static java.util.Random random
protected final StoredInt inf
protected final StoredInt sup
| Constructor Detail |
|---|
public IntervalIntDomain(IntDomainVarImpl v,
int a,
int b)
| Method Detail |
|---|
public boolean contains(int x)
IntDomain
public int getNextValue(int x)
IntDomain
public int getPrevValue(int x)
IntDomain
public int getRandomValue()
IntDomain
public int getSize()
IntDomain
public boolean hasNextValue(int x)
IntDomain
public boolean hasPrevValue(int x)
IntDomain
public IntIterator getIterator()
AbstractIntDomain
getIterator in interface IntDomaingetIterator in class AbstractIntDomainpublic boolean remove(int x)
IntDomain
public int getSup()
IntDomain
public 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)
throws ContradictionException
AbstractIntDomain
_removeVal in class AbstractIntDomainContradictionExceptionpublic boolean isEnumerated()
public IntIterator getDeltaIterator()
IntDomain
public java.lang.String pretty()
Entity
pretty in interface Entitypretty in class AbstractEntity
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||