public class BooleanDomain extends Domain
BooleanVariables, namely the set {T,F}. ValueChoiceFunctions
for this domain are dynamically managed by the BooleanSatisfiabilitySolver, which
guarantees the existence of a ValueChoiceFunction named "modelX" for each model X
in {0 ... maxModels-1} of the current ConstraintNetwork. Note that the ConstraintNetwork
is never left in an inconsistent state, therefore the ValueChoiceFunction
called "model0" is always defined.defaultValueChoiceFunction, logger, myVariable, valueChoiceFunctions| Constructor and Description |
|---|
BooleanDomain(BooleanVariable v)
Create a
BooleanDomain for a BooleanVariable. |
BooleanDomain(BooleanVariable v,
boolean... values)
Create a
BooleanDomain for a BooleanVariable given a
specification of its allowed values. |
| Modifier and Type | Method and Description |
|---|---|
void |
allowFalse()
Unmask the value F for this domain.
|
void |
allowTrue()
Unmask the value T for this domain.
|
boolean |
canBeFalse()
Assess whether the domain contains the value F.
|
boolean |
canBeTrue()
Assess whether the domain contains the value T.
|
int |
compareTo(java.lang.Object o) |
java.lang.String |
toString()
Get a string representation of this domain (must be implemented by the
Domain developer. |
chooseValue, chooseValue, getValueChoiceFunctions, getVariable, registerValueChoiceFunction, removeValueChoiceFunctions, setDefaultValueChoiceFunctionpublic BooleanDomain(BooleanVariable v)
BooleanDomain for a BooleanVariable. The domain is
set to {T,F}.v - The variable of which this is a domain.public BooleanDomain(BooleanVariable v, boolean... values)
BooleanDomain for a BooleanVariable given a
specification of its allowed values. The specification must be of size 2.v - The variable of which this is a domain.values - The initial allowed values for this domain.public void allowTrue()
public void allowFalse()
public boolean canBeTrue()
true iff the domain contains the value T.public boolean canBeFalse()
true iff the domain contains the value F.public int compareTo(java.lang.Object o)