|
Sugar version 1.13 Core API Specification |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjp.ac.kobe_u.cs.sugar.csp.IntegerVariable
public class IntegerVariable
This class implements an integer variable of CSP.
CSP
Constructor Summary | |
---|---|
IntegerVariable(IntegerDomain domain)
|
|
IntegerVariable(String name,
IntegerDomain domain)
|
Method Summary | |
---|---|
int |
bound(int lb,
int ub)
|
int |
compareTo(IntegerVariable v)
|
void |
decode(BitSet satValues)
|
void |
encode(Encoder encoder)
|
boolean |
equals(Object obj)
|
int |
getCode()
Returns the code value in the encoded representation. |
int |
getCodeLE(int value)
|
int |
getCodeLE(int a,
int b)
|
String |
getComment()
Returns the comment set to the integer variable. |
IntegerDomain |
getDomain()
|
String |
getName()
Returns the name of the integer variable. |
int |
getSatVariablesSize()
|
int |
getValue()
Returns the value of the integer variable. |
int |
hashCode()
|
boolean |
isAux()
Returns true when the integer variable is aux. |
boolean |
isModified()
|
boolean |
isSatisfied()
Returns true when the value is within the bounds. |
boolean |
isUnsatisfiable()
|
void |
setCode(int code)
Sets the code value in the encoded representation. |
void |
setComment(String comment)
Sets the comment to the integer variable. |
void |
setModified(boolean modified)
|
void |
setValue(int value)
Sets the value of the integer variable. |
String |
toString()
Returns the string representation of the integer variable. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IntegerVariable(String name, IntegerDomain domain) throws SugarException
SugarException
public IntegerVariable(IntegerDomain domain) throws SugarException
SugarException
Method Detail |
---|
public String getName()
public IntegerDomain getDomain()
public boolean isAux()
public String getComment()
public void setComment(String comment)
comment
- the comment to setpublic boolean isModified()
public void setModified(boolean modified)
modified
- the modified to setpublic int bound(int lb, int ub) throws SugarException
SugarException
public int getCode()
public void setCode(int code)
code
- the code valuepublic int getValue()
public void setValue(int value)
value
- the value to setpublic boolean isUnsatisfiable()
public boolean isSatisfied()
public int getSatVariablesSize()
public int getCodeLE(int value)
public int getCodeLE(int a, int b)
public void encode(Encoder encoder) throws IOException
IOException
public void decode(BitSet satValues)
public int compareTo(IntegerVariable v)
compareTo
in interface Comparable<IntegerVariable>
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
|
Sugar version 1.13 Core API Specification |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |