|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjopt.csp.spi.arcalgorithm.domain.AbstractDomain
jopt.csp.spi.arcalgorithm.domain.BooleanComputedDomain
| Constructor Summary | |
BooleanComputedDomain(BooleanDomain domA,
BooleanDomain domB,
boolean notB,
boolean constVal,
GenericBooleanConstant genConstVal,
int operation)
Creates new boolean computed domain based on a an expression built from other boolean domains |
|
BooleanComputedDomain(jopt.csp.variable.CspConstraint constraint)
Creates new boolean domain that wraps a constraint |
|
| Method Summary | |
boolean |
choicePointStackSet()
Returns true if a call to setChoicePointStack will fail |
void |
clearDelta()
Clears the delta set for this domain |
java.lang.Object |
clone()
Returns a copy of this domain |
jopt.csp.util.NumberIterator |
deltaValues()
Returns iterator of values in node's delta |
jopt.csp.util.NumSet |
getDeltaSet()
Returns the delta set for this domain |
java.lang.Object |
getDomainState()
Stores all necessary information for this domain allowing it to be restored to a previous state at a later point in time. |
int |
getMax()
Returns maximum value of domain |
int |
getMin()
Returns minimum value of domain |
int |
getNextHigher(int val)
Returns the next higher value in the domain or current value if none exists |
java.lang.Number |
getNextHigher(java.lang.Number val)
|
int |
getNextLower(int val)
Returns the next lower value in the domain or current value if none exists |
java.lang.Number |
getNextLower(java.lang.Number val)
|
int |
getSize()
Returns size of domain |
boolean |
isBound()
Returns true if domain is bound to a value |
boolean |
isFalse()
Returns true if this domain is bound to a false value |
boolean |
isInDomain(boolean bool)
Returns true if value is in domain |
boolean |
isInDomain(int val)
Returns true if value is in domain |
boolean |
isInDomain(java.lang.Number val)
|
boolean |
isTrue()
Returns true if this domain is bound to a true value |
void |
removeDomain(jopt.csp.util.NumSet vals)
Attempts to reduce a domain by removing a set of values |
void |
removeRange(int start,
int end)
Attempts to reduce domain by removing a range of values |
void |
removeValue(int val)
Attempts to remove a single value from the domain |
void |
restoreDomainState(java.lang.Object state)
Restores a domain to a previous state using the information contained in the state parameter. |
void |
setChoicePointStack(ChoicePointStack cps)
Sets the choicepoint stack associated with this domain. |
void |
setDomain(jopt.csp.util.NumSet s)
Attempts to reduce a domain by restricting it to a set of values |
void |
setFalse()
Attempts to reduce domain to a false value |
void |
setMax(int val)
Attempts to reduce domain to a maximum value. |
void |
setMin(int val)
Attempts to reduce domain to a minimum value. |
void |
setRange(int start,
int end)
Attempts to reduce domain to within a range of values |
void |
setTrue()
Attempts to reduce domain to a true value |
void |
setValue(int val)
Attempts to reduce domain to a single value. |
jopt.csp.util.NumSet |
toSet()
Returns set of Numbers and NumIntervals representing domain |
java.lang.String |
toString()
|
jopt.csp.util.NumberIterator |
values()
Returns iterator of values in node's domain |
| Methods inherited from class jopt.csp.spi.arcalgorithm.domain.AbstractDomain |
addDomainChangeListener, addRangeChangeListener, addValueChangeListener, changed, removeDomainChangeListener, removeRangeChangeListener, removeValueChangeListener |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jopt.csp.spi.arcalgorithm.domain.Domain |
changed |
| Constructor Detail |
public BooleanComputedDomain(jopt.csp.variable.CspConstraint constraint)
public BooleanComputedDomain(BooleanDomain domA,
BooleanDomain domB,
boolean notB,
boolean constVal,
GenericBooleanConstant genConstVal,
int operation)
| Method Detail |
public boolean isTrue()
isTrue in interface BooleanDomainpublic boolean isFalse()
isFalse in interface BooleanDomainpublic int getSize()
getSize in interface NumDomainpublic boolean isBound()
isBound in interface Domainpublic boolean isInDomain(boolean bool)
isInDomain in interface BooleanDomainpublic void setTrue()
setTrue in interface BooleanDomainjopt.csp.variable.PropagationFailureException - If domain is emptypublic void setFalse()
setFalse in interface BooleanDomainjopt.csp.variable.PropagationFailureException - If domain is emptypublic void setChoicePointStack(ChoicePointStack cps)
setChoicePointStack in interface ChoicePointDataSourcepublic boolean choicePointStackSet()
choicePointStackSet in interface ChoicePointDataSourcepublic java.lang.Object getDomainState()
getDomainState in interface DomainDomain.restoreDomainState(java.lang.Object)public void restoreDomainState(java.lang.Object state)
restoreDomainState in interface Domainstate - The state information to which this domain should be setDomain.restoreDomainState(java.lang.Object)public jopt.csp.util.NumberIterator values()
values in interface NumDomainpublic jopt.csp.util.NumberIterator deltaValues()
deltaValues in interface NumDomainpublic jopt.csp.util.NumSet toSet()
toSet in interface NumDomainpublic jopt.csp.util.NumSet getDeltaSet()
getDeltaSet in interface NumDomainpublic void clearDelta()
clearDelta in interface Domainpublic java.lang.String toString()
public int getMax()
IntDomain
getMax in interface IntDomainpublic int getMin()
IntDomain
getMin in interface IntDomainpublic boolean isInDomain(java.lang.Number val)
public boolean isInDomain(int val)
IntDomain
isInDomain in interface IntDomainpublic java.lang.Number getNextHigher(java.lang.Number val)
public int getNextHigher(int val)
IntDomain
getNextHigher in interface IntDomainpublic java.lang.Number getNextLower(java.lang.Number val)
public int getNextLower(int val)
IntDomain
getNextLower in interface IntDomainpublic void setMax(int val)
IntDomain
setMax in interface IntDomainpublic void setMin(int val)
IntDomain
setMin in interface IntDomainpublic void setValue(int val)
IntDomain
setValue in interface IntDomainpublic void removeValue(int val)
IntDomain
removeValue in interface IntDomain
public void setRange(int start,
int end)
IntDomain
setRange in interface IntDomain
public void removeRange(int start,
int end)
IntDomain
removeRange in interface IntDomainpublic void setDomain(jopt.csp.util.NumSet s)
NumDomain
setDomain in interface NumDomainpublic void removeDomain(jopt.csp.util.NumSet vals)
NumDomain
removeDomain in interface NumDomainpublic java.lang.Object clone()
Domain
clone in interface Domainclone in class AbstractDomain
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||