|
|||||||||||
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 BooleanDomain
public boolean isFalse()
isFalse
in interface BooleanDomain
public int getSize()
getSize
in interface NumDomain
public boolean isBound()
isBound
in interface Domain
public boolean isInDomain(boolean bool)
isInDomain
in interface BooleanDomain
public void setTrue()
setTrue
in interface BooleanDomain
jopt.csp.variable.PropagationFailureException
- If domain is emptypublic void setFalse()
setFalse
in interface BooleanDomain
jopt.csp.variable.PropagationFailureException
- If domain is emptypublic void setChoicePointStack(ChoicePointStack cps)
setChoicePointStack
in interface ChoicePointDataSource
public boolean choicePointStackSet()
choicePointStackSet
in interface ChoicePointDataSource
public java.lang.Object getDomainState()
getDomainState
in interface Domain
Domain.restoreDomainState(java.lang.Object)
public void restoreDomainState(java.lang.Object state)
restoreDomainState
in interface Domain
state
- The state information to which this domain should be setDomain.restoreDomainState(java.lang.Object)
public jopt.csp.util.NumberIterator values()
values
in interface NumDomain
public jopt.csp.util.NumberIterator deltaValues()
deltaValues
in interface NumDomain
public jopt.csp.util.NumSet toSet()
toSet
in interface NumDomain
public jopt.csp.util.NumSet getDeltaSet()
getDeltaSet
in interface NumDomain
public void clearDelta()
clearDelta
in interface Domain
public java.lang.String toString()
public int getMax()
IntDomain
getMax
in interface IntDomain
public int getMin()
IntDomain
getMin
in interface IntDomain
public boolean isInDomain(java.lang.Number val)
public boolean isInDomain(int val)
IntDomain
isInDomain
in interface IntDomain
public java.lang.Number getNextHigher(java.lang.Number val)
public int getNextHigher(int val)
IntDomain
getNextHigher
in interface IntDomain
public java.lang.Number getNextLower(java.lang.Number val)
public int getNextLower(int val)
IntDomain
getNextLower
in interface IntDomain
public void setMax(int val)
IntDomain
setMax
in interface IntDomain
public void setMin(int val)
IntDomain
setMin
in interface IntDomain
public void setValue(int val)
IntDomain
setValue
in interface IntDomain
public 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 IntDomain
public void setDomain(jopt.csp.util.NumSet s)
NumDomain
setDomain
in interface NumDomain
public void removeDomain(jopt.csp.util.NumSet vals)
NumDomain
removeDomain
in interface NumDomain
public java.lang.Object clone()
Domain
clone
in interface Domain
clone
in class AbstractDomain
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |