|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsavi.alg.sat3.Clause
public class Clause
Object representing a clause.
Field Summary | |
---|---|
protected int[] |
varsIndex
list of variables index |
protected boolean[] |
varsNegation
array of negation for variables |
Constructor Summary | |
---|---|
Clause(int varsCount,
int clauseLen)
Creates a new instance of Clause, generate random clause from parameters. |
|
Clause(java.util.Vector dimacsClause)
Creates a new instance of Clause from one dimacs format line. |
Method Summary | |
---|---|
java.lang.String |
getCnfRepresentation()
Return dimacs text representation of the clause. |
int |
getLiteralCount()
Return number of literals in clause. |
java.lang.String |
getLiteralStringRepresentation()
Return text representation of the clause. |
boolean |
isSatisfact(boolean[] vars)
Return true if the clause is satisfied vith given variables assignment. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int[] varsIndex
protected boolean[] varsNegation
Constructor Detail |
---|
public Clause(int varsCount, int clauseLen)
varsCount
- number of ClausesclauseLen
- number of literals in clausepublic Clause(java.util.Vector dimacsClause)
dimacsClause
- vector with numbers representing clauseMethod Detail |
---|
public boolean isSatisfact(boolean[] vars)
vars
- variables assignment
public int getLiteralCount()
public java.lang.String getLiteralStringRepresentation()
public java.lang.String getCnfRepresentation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |