jopt.csp.spi.arcalgorithm.domain
Class BaseNumDomain

java.lang.Object
  extended byjopt.csp.spi.arcalgorithm.domain.AbstractDomain
      extended byjopt.csp.spi.arcalgorithm.domain.BaseNumDomain
All Implemented Interfaces:
ChoicePointDataSource, ChoicePointEntryListener, Domain, DomainChangeSource
Direct Known Subclasses:
BaseDoubleDomain, BaseFloatDomain, BaseIntDomain, BaseLongDomain

public abstract class BaseNumDomain
extends AbstractDomain
implements ChoicePointEntryListener

Base class for numeric domains


Method Summary
 void clearDelta()
          Clears the delta set for this domain
abstract  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 getSize()
          Returns size of domain
 boolean isNestedChild()
          Returns true if this domain is a nested child of a larger aggregate domain
 void restoreDomainState(java.lang.Object state)
          Restores a domain to a previous state using the information contained in the state parameter.
 void setNestedChild(boolean nestedChild)
          Sets a flag indicating this domain is a nested child domain of a larger aggregate domain
 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.solver.ChoicePointEntryListener
afterChoicePointPopEvent, afterChoicePointPushEvent, beforeChoicePointPopEvent, beforeChoicePointPushEvent
 
Methods inherited from interface jopt.csp.spi.arcalgorithm.domain.Domain
isBound
 
Methods inherited from interface jopt.csp.spi.solver.ChoicePointDataSource
choicePointStackSet, setChoicePointStack
 

Method Detail

isNestedChild

public boolean isNestedChild()
Returns true if this domain is a nested child of a larger aggregate domain


setNestedChild

public void setNestedChild(boolean nestedChild)
Sets a flag indicating this domain is a nested child domain of a larger aggregate domain


getSize

public final int getSize()
Returns size of domain


values

public final jopt.csp.util.NumberIterator values()
Returns iterator of values in node's domain


deltaValues

public jopt.csp.util.NumberIterator deltaValues()
Returns iterator of values in node's delta


toSet

public final jopt.csp.util.NumSet toSet()
Returns set of Numbers and NumIntervals representing domain


getDeltaSet

public final jopt.csp.util.NumSet getDeltaSet()
Returns the delta set for this domain


clearDelta

public final void clearDelta()
Clears the delta set for this domain

Specified by:
clearDelta in interface Domain

getDomainState

public final 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.

Specified by:
getDomainState in interface Domain
Returns:
an Object containing the values of this domain

restoreDomainState

public final void restoreDomainState(java.lang.Object state)
Restores a domain to a previous state using the information contained in the state parameter.

Specified by:
restoreDomainState in interface Domain
Parameters:
state - The state information to which this domain should be set
See Also:
Domain.restoreDomainState(java.lang.Object)

clone

public abstract java.lang.Object clone()
Description copied from interface: Domain
Returns a copy of this domain

Specified by:
clone in interface Domain
Specified by:
clone in class AbstractDomain

toString

public final java.lang.String toString()