Sugar version 1.13 Core API Specification

jp.ac.kobe_u.cs.sugar.csp
Class IntegerDomain

java.lang.Object
  extended by jp.ac.kobe_u.cs.sugar.csp.IntegerDomain

public class IntegerDomain
extends Object

This class implements an integer domain class.

See Also:
CSP

Field Summary
static int MAX_SET_SIZE
           
 
Constructor Summary
IntegerDomain(IntegerDomain d)
           
IntegerDomain(int lb, int ub)
           
IntegerDomain(SortedSet<Integer> domain)
           
 
Method Summary
 IntegerDomain abs()
           
 IntegerDomain add(int a)
           
 IntegerDomain add(IntegerDomain d)
           
 void appendValues(StringBuilder sb)
           
 IntegerDomain bound(int lb, int ub)
           
 IntegerDomain cap(IntegerDomain d1)
           
 boolean contains(int value)
           
 IntegerDomain cup(IntegerDomain d1)
           
 IntegerDomain div(int a)
           
 IntegerDomain div(IntegerDomain d)
           
 int getLowerBound()
           
 int getUpperBound()
           
 boolean isEmpty()
           
 IntegerDomain max(IntegerDomain d)
           
 IntegerDomain min(IntegerDomain d)
           
 IntegerDomain mod(int a)
           
 IntegerDomain mod(IntegerDomain d)
           
 IntegerDomain mul(int a)
           
 IntegerDomain mul(IntegerDomain d)
           
 IntegerDomain neg()
           
 IntegerDomain pow(int a)
           
 int size()
           
 int sizeLE(int value)
           
 IntegerDomain sub(int a)
           
 IntegerDomain sub(IntegerDomain d)
           
 String toString()
           
 Iterator<Integer> values()
           
 Iterator<Integer> values(int lb, int ub)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_SET_SIZE

public static final int MAX_SET_SIZE
See Also:
Constant Field Values
Constructor Detail

IntegerDomain

public IntegerDomain(int lb,
                     int ub)
              throws SugarException
Throws:
SugarException

IntegerDomain

public IntegerDomain(SortedSet<Integer> domain)

IntegerDomain

public IntegerDomain(IntegerDomain d)
Method Detail

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 version 1.13 Core API Specification

Sugar: A SAT-based Constraint Solver