public class IntegerVariable extends java.lang.Object implements java.lang.Comparable<IntegerVariable>
CSP| Constructor and Description |
|---|
IntegerVariable(IntegerDomain domain) |
IntegerVariable(java.lang.String name,
IntegerDomain domain) |
| Modifier and Type | Method and Description |
|---|---|
int |
bound(int lb,
int ub) |
int |
compareTo(IntegerVariable v) |
void |
decode(java.util.BitSet satValues) |
boolean |
equals(java.lang.Object obj) |
int |
getCode()
Returns the code value in the encoded representation.
|
java.lang.String |
getComment()
Returns the comment set to the integer variable.
|
IntegerDomain |
getDomain() |
java.util.List<Clause> |
getDomainClauses() |
Encoding |
getEncoding() |
java.lang.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 |
isBoolean() |
boolean |
isDominant() |
boolean |
isModified() |
boolean |
isPbEncoding() |
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(java.lang.String comment)
Sets the comment to the integer variable.
|
void |
setDominant(boolean dominant) |
void |
setEncoding(Encoding encoding) |
void |
setModified(boolean modified) |
void |
setValue(int value)
Sets the value of the integer variable.
|
java.lang.String |
toString()
Returns the string representation of the integer variable.
|
public IntegerVariable(java.lang.String name,
IntegerDomain domain)
throws SugarException
SugarExceptionpublic IntegerVariable(IntegerDomain domain) throws SugarException
SugarExceptionpublic java.lang.String getName()
public IntegerDomain getDomain()
public boolean isAux()
public java.lang.String getComment()
public void setComment(java.lang.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
SugarExceptionpublic int getCode()
public void setCode(int code)
code - the code valuepublic boolean isDominant()
public void setDominant(boolean dominant)
public Encoding getEncoding()
public void setEncoding(Encoding encoding)
public boolean isPbEncoding()
public boolean isBoolean()
public int getValue()
public void setValue(int value)
value - the value to setpublic boolean isUnsatisfiable()
public boolean isSatisfied()
public int getSatVariablesSize()
public java.util.List<Clause> getDomainClauses()
public void decode(java.util.BitSet satValues)
public int compareTo(IntegerVariable v)
compareTo in interface java.lang.Comparable<IntegerVariable>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object