jopt.csp.spi.arcalgorithm.domain
Interface IntDomain

All Superinterfaces:
Domain, NumDomain
All Known Subinterfaces:
BooleanDomain
All Known Implementing Classes:
BaseIntDomain, BooleanComputedDomain, BooleanIntDomain, IntComputedDomain, SummationIntComputedDomain

public interface IntDomain
extends NumDomain

Interface implemented by integer domains


Method Summary
 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
 int getNextLower(int val)
          Returns the next lower value in the domain or current value if none exists
 boolean isInDomain(int val)
          Returns true if value is in domain
 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 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 setValue(int val)
          Attempts to reduce domain to a single value.
 
Methods inherited from interface jopt.csp.spi.arcalgorithm.domain.NumDomain
deltaValues, getDeltaSet, getSize, removeDomain, setDomain, toSet, values
 
Methods inherited from interface jopt.csp.spi.arcalgorithm.domain.Domain
changed, clearDelta, clone, getDomainState, isBound, restoreDomainState
 

Method Detail

getMax

public int getMax()
Returns maximum value of domain


getMin

public int getMin()
Returns minimum value of domain


isInDomain

public boolean isInDomain(int val)
Returns true if value is in domain


setMax

public void setMax(int val)
            throws jopt.csp.variable.PropagationFailureException
Attempts to reduce domain to a maximum value.

Throws:
jopt.csp.variable.PropagationFailureException - If domain is empty

setMin

public void setMin(int val)
            throws jopt.csp.variable.PropagationFailureException
Attempts to reduce domain to a minimum value.

Throws:
jopt.csp.variable.PropagationFailureException - If domain is empty

setValue

public void setValue(int val)
              throws jopt.csp.variable.PropagationFailureException
Attempts to reduce domain to a single value.

Throws:
jopt.csp.variable.PropagationFailureException - If domain is empty

removeValue

public void removeValue(int val)
                 throws jopt.csp.variable.PropagationFailureException
Attempts to remove a single value from the domain

Throws:
jopt.csp.variable.PropagationFailureException - If domain is empty

setRange

public void setRange(int start,
                     int end)
              throws jopt.csp.variable.PropagationFailureException
Attempts to reduce domain to within a range of values

Throws:
jopt.csp.variable.PropagationFailureException - If domain is empty

removeRange

public void removeRange(int start,
                        int end)
                 throws jopt.csp.variable.PropagationFailureException
Attempts to reduce domain by removing a range of values

Throws:
jopt.csp.variable.PropagationFailureException - If domain is empty

getNextHigher

public int getNextHigher(int val)
Returns the next higher value in the domain or current value if none exists


getNextLower

public int getNextLower(int val)
Returns the next lower value in the domain or current value if none exists