| Constructor and Description |
|---|
BooleanLiteral(BooleanVariable v,
boolean negative)
Constructs a new boolean literal of the given boolean variable and negative flag.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
Literal |
neg() |
int |
propagate() |
java.lang.String |
toString()
Returns the string representation of the boolean literal.
|
getBound, getVariablespublic BooleanLiteral(BooleanVariable v, boolean negative)
v - the boolean variable of CSPnegative - the negative flagpublic boolean isSimple()
public BooleanVariable getBooleanVariable()
public boolean getNegative()
public boolean isValid()
throws SugarException
isValid in class LiteralSugarExceptionpublic boolean isUnsatisfiable()
throws SugarException
isUnsatisfiable in class LiteralSugarExceptionpublic boolean isSatisfied()
LiteralisSatisfied in class Literalpublic Literal neg() throws SugarException
neg in class LiteralSugarExceptionpublic java.lang.String toString()
toString in class java.lang.Object