jp.ac.kobe_u.cs.sugar.csp
Class IntegerDomain
java.lang.Object
jp.ac.kobe_u.cs.sugar.csp.IntegerDomain
public class IntegerDomain
- extends Object
This class implements an integer domain class.
- See Also:
CSP
MAX_SET_SIZE
public static final int MAX_SET_SIZE
- See Also:
- Constant Field Values
IntegerDomain
public IntegerDomain(int lb,
int ub)
throws SugarException
- Throws:
SugarException
IntegerDomain
public IntegerDomain(SortedSet<Integer> domain)
IntegerDomain
public IntegerDomain(IntegerDomain d)
size
public int size()
isEmpty
public boolean isEmpty()
getLowerBound
public int getLowerBound()
getUpperBound
public int getUpperBound()
contains
public boolean contains(int value)
sizeLE
public int sizeLE(int value)
bound
public IntegerDomain bound(int lb,
int ub)
throws SugarException
- Throws:
SugarException
values
public Iterator<Integer> values(int lb,
int ub)
values
public Iterator<Integer> values()
cup
public IntegerDomain cup(IntegerDomain d1)
throws SugarException
- Throws:
SugarException
cap
public IntegerDomain cap(IntegerDomain d1)
throws SugarException
- Throws:
SugarException
neg
public IntegerDomain neg()
throws SugarException
- Throws:
SugarException
abs
public IntegerDomain abs()
throws SugarException
- Throws:
SugarException
add
public IntegerDomain add(int a)
throws SugarException
- Throws:
SugarException
add
public IntegerDomain add(IntegerDomain d)
throws SugarException
- Throws:
SugarException
sub
public IntegerDomain sub(int a)
throws SugarException
- Throws:
SugarException
sub
public IntegerDomain sub(IntegerDomain d)
throws SugarException
- Throws:
SugarException
mul
public IntegerDomain mul(int a)
throws SugarException
- Throws:
SugarException
mul
public IntegerDomain mul(IntegerDomain d)
throws SugarException
- Throws:
SugarException
div
public IntegerDomain div(int a)
throws SugarException
- Throws:
SugarException
div
public IntegerDomain div(IntegerDomain d)
throws SugarException
- Throws:
SugarException
mod
public IntegerDomain mod(int a)
throws SugarException
- Throws:
SugarException
mod
public IntegerDomain mod(IntegerDomain d)
throws SugarException
- Throws:
SugarException
pow
public IntegerDomain pow(int a)
throws SugarException
- Throws:
SugarException
min
public IntegerDomain min(IntegerDomain d)
throws SugarException
- Throws:
SugarException
max
public IntegerDomain max(IntegerDomain d)
throws SugarException
- Throws:
SugarException
appendValues
public void appendValues(StringBuilder sb)
toString
public String toString()
- Overrides:
toString
in class Object
Sugar: A SAT-based Constraint Solver