|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectsatisfiabilityApplet.cnfParser.Disjunction
by Catherine Block id# 6319 Date: Sep 6, 2004 Time: 11:02:35 AM CS 180H satisfiabilityApplet.cnfParser.Disjunction represents the 'or' of two literals. The destructor method must be used to properly destroy this object.
Constructor Summary | |
satisfiabilityApplet.cnfParser.Disjunction(java.util.List tokens)
Constructor creates a new satisfiabilityApplet.cnfParser.Disjunction. |
Method Summary | |
java.lang.Object |
clone()
|
int |
compareTo(java.lang.Object obj)
Compares based on number of distinct variables (size of clause) Note: this class has a natural ordering that is inconsistent with equals |
void |
convert()
Mutator method that will effectively convert a DNF entry into its negated CNF form by switching the "not" status of all the variables |
void |
destructor()
Destructor method must be called to properly destroy all the contents of this object |
boolean |
isAlwaysTrue()
|
static boolean |
isNext(java.util.List tokens)
Determines if a satisfiabilityApplet.cnfParser.Disjunction is next in a clauseList of tokens |
boolean |
isTrue()
Checks this disjunction to see if any of the literals has a set value of true. |
int |
numberOfVariables()
Returns the number of distinct variables in this disjunction |
void |
setLiteralsToTrue()
Sets the value of all unset literals to true |
java.lang.String |
toPolynomial()
A polynomial representation of this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions |
java.lang.String |
toString()
|
java.util.List |
value()
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public satisfiabilityApplet.cnfParser.Disjunction(java.util.List tokens) throws satisfiabilityApplet.cnfParser.ParseError
tokens
- - A clauseList of tokens with the front representing a satisfiabilityApplet.cnfParser.Disjunction
satisfiabilityApplet.cnfParser.ParseError
- - The tokens did not parse into a satisfiabilityApplet.cnfParser.DisjunctionMethod Detail |
public static boolean isNext(java.util.List tokens)
tokens
-
public int numberOfVariables()
public void setLiteralsToTrue()
public java.util.List value()
public boolean isTrue()
public boolean isAlwaysTrue()
public void convert()
public java.lang.Object clone()
public java.lang.String toPolynomial()
public int compareTo(java.lang.Object obj) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable
obj
- The clause to compare
java.lang.ClassCastException
public void destructor()
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |