|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IntDomainVar
An interface for all implementations of search valued domain variables
Field Summary | |
---|---|
static int |
BINARYTREE
Static constant to create integer variables domain implemented with a binary tree |
static int |
BIPARTITELIST
Static constant to create integer variables domain implemented with a bipartite list of elements |
static int |
BITSET
Public user API: static constants associated to the encoding of the variable domain these constants are passed as parameters to the constructor of IntVars BITSET = a chained list of values |
static int |
BOOLEAN
Static constant to create integer variables domain implemented with a boolean domain |
static int |
BOUNDS
Public user API: static constants associated to the encoding of the variable domain these constants are passed as parameters to the constructor of IntVars BOUNDS = an interval (keeping the lower and upper bounds) |
static int |
LINKEDLIST
Static constant to create integer variables domain implemented with linked list of values in the domain |
static int |
ONE_VALUE
|
Fields inherited from interface choco.kernel.solver.variables.Var |
---|
LOGGER |
Method Summary | |
---|---|
boolean |
canBeEqualTo(IntDomainVar x)
Public user API: Domains : testing whether two variables have intersecting domains. |
boolean |
canBeInstantiatedTo(int x)
Public user API: Domains : testing whether a value is in the domain. |
boolean |
fastCanBeInstantiatedTo(int x)
Checks if a value is still in the domain assuming the value is in the initial bound of the domain |
int |
fastNextDomainValue(int i)
retrieves the value immediately (but strictly) after i in the domain, assuming the value is greater or equal to the lower bound. |
int |
fastPrevDomainValue(int i)
retrieves the value immediately (but strictly) before i in the domain, assuming the value is less or equal to the upper bound. |
IntDomain |
getDomain()
Public user API: Domains : returns the object responsible for storing the enumeration of values in the domain |
int |
getDomainSize()
Public user API: Domains : retrieves the number of values in the domain. |
int |
getInf()
Returns the lower bound of the variable domain (e.g. the smallest value that the variable can be assigned). |
int |
getNextDomainValue(int i)
Public user API: Domains : retrieves the value immediately (but strictly) after i in the domain |
int |
getPrevDomainValue(int i)
Public user API: Domains : retrieves the value immediately (but strictly) before i in the domain. |
int |
getRandomDomainValue()
Public user API: Domains : retrieves a value drawn at random (uniform distribution) from the domain. |
int |
getSup()
Returns the upper bound of the variable domain (e.g. the greatest value that the variable can be assigned). |
int |
getValue()
Deprecated. replaced by getVal |
boolean |
hasBooleanDomain()
Public user API: Domains : whether the domain is a 0/1 domain |
boolean |
hasEnumeratedDomain()
Public user API: Domains : whether an enumeration of values (in addition to the enclosing interval) is stored |
boolean |
instantiate(int x,
int idx)
Deprecated. |
boolean |
instantiate(int x,
SConstraint cause,
boolean forceAwake)
Propagation events instantiating a variable (ie: removing all other values from the domain) |
boolean |
removeInterval(int a,
int b,
int idx)
Deprecated. |
boolean |
removeInterval(int a,
int b,
SConstraint cause,
boolean forceAwake)
Propagation events updating the domain of a variable (by removing an interval, ie, a sequence of consecutive values) |
boolean |
removeVal(int x,
int idx)
Deprecated. |
boolean |
removeVal(int x,
SConstraint cause,
boolean forceAwake)
Propagation events updating the domain of a variable (by removing a value) |
void |
remVal(int x)
Public user API: Propagation events removing a value from the domain of a variable. |
void |
setInf(int x)
Public user API: Propagation events updating the lower bound of a variable (ie: removing all value strictly below the new lower bound from the domain). |
void |
setMax(int x)
Deprecated. replaced by setMax |
void |
setMin(int x)
Deprecated. replaced by setInf |
void |
setSup(int x)
Public user API: Propagation events updating the upper bound of a variable (ie: removing all value strictly above the new upper bound from the domain). |
boolean |
updateInf(int x,
int idx)
Deprecated. |
boolean |
updateInf(int x,
SConstraint cause,
boolean forceAwake)
Propagation events updating the lower bound of a variable (ie: removing all value strictly below the new lower bound from the domain). |
boolean |
updateSup(int x,
int idx)
Deprecated. |
boolean |
updateSup(int x,
SConstraint cause,
boolean forceAwake)
Propagation events updating the upper bound of a variable (ie: removing all value strictly above the new upper bound from the domain). |
void |
wipeOut()
Public user API: Propagation events wiping out the domain of the variable (removing all values) and throwing a contradiction |
Methods inherited from interface choco.kernel.solver.variables.integer.IntVar |
---|
getVal, isInstantiatedTo, setVal |
Methods inherited from interface choco.kernel.solver.variables.Var |
---|
addConstraint, getConstraint, getConstraintsIterator, getConstraintVector, getEvent, getIndexVector, getName, getNbConstraints, getPriority, getVarIndex, isInstantiated |
Methods inherited from interface choco.IPretty |
---|
pretty |
Methods inherited from interface choco.kernel.common.IIndex |
---|
getIndex |
Methods inherited from interface choco.IExtensionnable |
---|
addExtension, getExtension |
Field Detail |
---|
static final int BITSET
static final int BOUNDS
static final int LINKEDLIST
static final int BINARYTREE
static final int BIPARTITELIST
static final int BOOLEAN
static final int ONE_VALUE
Method Detail |
---|
void remVal(int x) throws ContradictionException
x
- the removed value
ContradictionException
- contradiction exceptionvoid setInf(int x) throws ContradictionException
x
- the new lower bound
ContradictionException
- contradiction exceptionvoid setMin(int x) throws ContradictionException
x
- the new inf value
ContradictionException
- contradiction exceptionvoid setSup(int x) throws ContradictionException
x
- the new upper bound
ContradictionException
- contradiction exceptionvoid setMax(int x) throws ContradictionException
x
- the new max value
ContradictionException
- contradiction exceptionvoid wipeOut() throws ContradictionException
ContradictionException
- contradiction exceptionboolean hasEnumeratedDomain()
boolean hasBooleanDomain()
IntDomain getDomain()
boolean canBeInstantiatedTo(int x)
x
- the tested value
boolean fastCanBeInstantiatedTo(int x)
boolean canBeEqualTo(IntDomainVar x)
x
- the other variable
int getRandomDomainValue()
int getNextDomainValue(int i)
i
- the pivot value. May or may not be in the domain
int fastNextDomainValue(int i)
int getPrevDomainValue(int i)
i
- the pivot value. May or may not be in the domain
int fastPrevDomainValue(int i)
int getDomainSize()
int getInf()
int getSup()
int getValue()
boolean updateInf(int x, SConstraint cause, boolean forceAwake) throws ContradictionException
x
- a lower bound of the domain (the new one, if better than the one currently stored)cause
- constraint that modified the x
forceAwake
-
ContradictionException
- contradiction exception@Deprecated boolean updateInf(int x, int idx) throws ContradictionException
ContradictionException
boolean updateSup(int x, SConstraint cause, boolean forceAwake) throws ContradictionException
x
- an upper bound of the domain (the new one, if better than the one currently stored)cause
- forceAwake
-
ContradictionException
- contradiction exception@Deprecated boolean updateSup(int x, int idx) throws ContradictionException
ContradictionException
boolean removeVal(int x, SConstraint cause, boolean forceAwake) throws ContradictionException
x
- the value that is not in the domaincause
- forceAwake
-
ContradictionException
- contradiction exception@Deprecated boolean removeVal(int x, int idx) throws ContradictionException
ContradictionException
boolean removeInterval(int a, int b, SConstraint cause, boolean forceAwake) throws ContradictionException
a
- the lower bound of the forbidden intervalb
- the upper bound of the forbidden intervalcause
- forceAwake
-
ContradictionException
- contradiction exception@Deprecated boolean removeInterval(int a, int b, int idx) throws ContradictionException
ContradictionException
boolean instantiate(int x, SConstraint cause, boolean forceAwake) throws ContradictionException
x
- the value of the variablecause
- forceAwake
-
ContradictionException
- contradiction exception@Deprecated boolean instantiate(int x, int idx) throws ContradictionException
ContradictionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |