|
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.Clause
public class Clause
This class implements a clause in CSP.
CSP
Constructor Summary | |
---|---|
Clause()
Constructs a new clause. |
|
Clause(List<Literal> literals)
Constructs a new clause with give literals. |
|
Clause(Literal literal)
|
Method Summary | |
---|---|
void |
add(Literal literal)
Adds the given literal to the clause. |
void |
addAll(List<Literal> literals)
Adds all given literals to the clause. |
void |
encode(Encoder encoder)
|
String |
getComment()
Returns the comment set to the clause. |
Set<IntegerVariable> |
getCommonVariables()
|
List<Literal> |
getLiterals()
Returns the literals of the clause. |
boolean |
isModified()
|
boolean |
isSatisfied()
Returns true when the clause is satisfied. |
boolean |
isSimple()
Returns true when the clause is simple. |
boolean |
isUnsatisfiable()
|
boolean |
isValid()
|
int |
propagate()
|
int |
removeFalsefood()
|
void |
setComment(String comment)
Sets the comment to the clause. |
int |
simpleSize()
|
int |
size()
|
String |
toString()
Returns the string representation of the clause. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Clause(List<Literal> literals)
literals
- the literals of the clausepublic Clause()
public Clause(Literal literal)
Method Detail |
---|
public List<Literal> getLiterals()
public void addAll(List<Literal> literals)
literals
- the literals to be addedpublic void add(Literal literal)
literal
- the literal to be added.public int size()
public String getComment()
public void setComment(String comment)
comment
- the comment to setpublic boolean isModified()
public Set<IntegerVariable> getCommonVariables()
public int simpleSize()
public boolean isSimple()
Literal.isSimple()
public boolean isValid() throws SugarException
SugarException
public boolean isUnsatisfiable() throws SugarException
SugarException
public int propagate() throws SugarException
SugarException
public int removeFalsefood() throws SugarException
SugarException
public boolean isSatisfied()
public void encode(Encoder encoder) throws SugarException, IOException
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 |