|
||||||||||
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.BipartiteIntDomain
public class BipartiteIntDomain
Field Summary | |
---|---|
protected BipartiteIntDomainIterator |
_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 | |
---|---|
BipartiteIntDomain(IntDomainVarImpl v,
int[] sortedValues,
IEnvironment environment,
PropagationEngine propagationEngine)
Constructs a new domain for the specified variable and bounds. |
|
BipartiteIntDomain(IntDomainVarImpl v,
int low,
int up,
IEnvironment environment,
PropagationEngine propagationEngine)
Constructs a new domain for the specified variable and bounds. |
Method Summary | |
---|---|
protected boolean |
_removeVal(int x,
SConstraint cause)
Removing a value from the domain of a variable. |
boolean |
contains(int x)
This method is volontarely inefficient! |
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)
Be careful, there is no order in the domain values in this implementation ! |
int |
getPrevValue(int x)
Be careful, there is no order in the domain values in this implementation ! |
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 |
isBoolean()
Is it a 0/1 domain ? |
boolean |
isEnumerated()
|
String |
pretty()
pretty printing of the object. |
boolean |
remove(int x)
Removing a single value from the domain. |
boolean |
removeInterval(int a,
int b,
SConstraint cause,
boolean forceAwake)
Internal var: remove an interval (a sequence of consecutive values) from the domain of a variable caused by its i-th constraint. |
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, fastNextValue, fastPrevValue, freezeDeltaDomain, getDeltaIterator, getReleasedDeltaDomain, instantiate, releaseDeltaDomain, removeVal, toString, updateInf, updateSup |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected BipartiteIntDomainIterator _iterator
Constructor Detail |
---|
public BipartiteIntDomain(IntDomainVarImpl v, int[] sortedValues, IEnvironment environment, PropagationEngine propagationEngine)
v
- The involved variable.sortedValues
- arry of sorted values.environment
- propagationEngine
- public BipartiteIntDomain(IntDomainVarImpl v, int low, int up, IEnvironment environment, PropagationEngine propagationEngine)
v
- The involved variable.low
- Minimal value.up
- Maximal value.environment
- propagationEngine
- Method Detail |
---|
public int getInf()
IntDomain
public int getSup()
IntDomain
public boolean contains(int x)
public int getSize()
IntDomain
public int getNextValue(int x)
x
- the previous value in the list
public int getPrevValue(int x)
x
- a value in the list
public boolean hasNextValue(int x)
IntDomain
public boolean hasPrevValue(int x)
IntDomain
public boolean removeInterval(int a, int b, SConstraint cause, boolean forceAwake) throws ContradictionException
AbstractIntDomain
removeInterval
in class AbstractIntDomain
a
- the first removed valueb
- the last removed valuecause
- constraint causing the modification
ContradictionException
- contradiction exceptionprotected boolean _removeVal(int x, SConstraint cause) throws ContradictionException
x
- the value to removecause
-
ContradictionException
- contradiction excpetionpublic boolean remove(int x)
IntDomain
public void restrict(int x)
IntDomain
public int updateInf(int x)
IntDomain
public int updateSup(int x)
IntDomain
public int getRandomValue()
IntDomain
public DisposableIntIterator getIterator()
IntDomain
public boolean isEnumerated()
public boolean isBoolean()
IntDomain
public String pretty()
IPretty
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |