|
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.Literal
jp.ac.kobe_u.cs.sugar.csp.LinearLiteral
public class LinearLiteral
This class implements a comparison literal of CSP. The comparison represents the condition "linearSum <= 0".
CSP
,
LinearSum
Constructor Summary | |
---|---|
LinearLiteral(LinearSum linearSum)
Constructs a new comparison literal of given linear expression. |
Method Summary | |
---|---|
void |
encode(Encoder encoder,
int[] clause)
|
int[] |
getBound(IntegerVariable v)
|
int |
getCode()
|
LinearSum |
getLinearExpression()
Returns the linear expression of the comparison literal. |
Set<IntegerVariable> |
getVariables()
|
boolean |
isSatisfied()
Returns true when the literal is satisfied. |
boolean |
isSimple()
Returns true when the linear expression is simple. |
boolean |
isUnsatisfiable()
|
boolean |
isValid()
|
int |
propagate()
|
String |
toString()
Returns the string representation of the comparison literal. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LinearLiteral(LinearSum linearSum)
linearSum
- the linear expressionMethod Detail |
---|
public Set<IntegerVariable> getVariables()
getVariables
in class Literal
public int[] getBound(IntegerVariable v) throws SugarException
getBound
in class Literal
SugarException
public boolean isSimple()
isSimple
in class Literal
LinearSum.isSimple()
public LinearSum getLinearExpression()
public boolean isValid() throws SugarException
isValid
in class Literal
SugarException
public boolean isUnsatisfiable() throws SugarException
isUnsatisfiable
in class Literal
SugarException
public int propagate() throws SugarException
propagate
in class Literal
SugarException
public int getCode() throws SugarException
getCode
in class Literal
SugarException
public void encode(Encoder encoder, int[] clause) throws SugarException, IOException
encode
in class Literal
SugarException
IOException
public boolean isSatisfied()
Literal
isSatisfied
in class Literal
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 |