|
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.BooleanLiteral
public class BooleanLiteral
This class implements a boolean literal of CSP.
CSP
Constructor Summary | |
---|---|
BooleanLiteral(BooleanVariable v,
boolean negative)
Constructs a new boolean literal of the given boolean variable and negative flag. |
Method Summary | |
---|---|
void |
encode(Encoder encoder,
int[] clause)
|
BooleanVariable |
getBooleanVariable()
Returns the boolean variable of CSP. |
int |
getCode()
|
boolean |
getNegative()
Returns the negative flag of the boolean literal. |
boolean |
isSatisfied()
Returns true when the literal is satisfied. |
boolean |
isSimple()
Always returns true since boolean literals are simple. |
boolean |
isUnsatisfiable()
|
boolean |
isValid()
|
int |
propagate()
|
String |
toString()
Returns the string representation of the boolean literal. |
Methods inherited from class jp.ac.kobe_u.cs.sugar.csp.Literal |
---|
getBound, getVariables |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BooleanLiteral(BooleanVariable v, boolean negative)
v
- the boolean variable of CSPnegative
- the negative flagMethod Detail |
---|
public boolean isSimple()
isSimple
in class Literal
public BooleanVariable getBooleanVariable()
public boolean getNegative()
public boolean isValid() throws SugarException
isValid
in class Literal
SugarException
public boolean isUnsatisfiable() throws SugarException
isUnsatisfiable
in class Literal
SugarException
public int propagate()
propagate
in class Literal
public boolean isSatisfied()
Literal
isSatisfied
in class Literal
public int getCode()
getCode
in class Literal
public void encode(Encoder encoder, int[] clause) throws SugarException, IOException
encode
in class Literal
SugarException
IOException
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 |