|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectsatisfiabilityApplet.tauTautology.Subcircuit
by Catherine Block id# 6319 Date: Dec 6, 2004 Time: 5:35:39 PM CS 180H For majority gate, only takes 2 inputs A Subcircuit is either a single variable input or a variable representing a nested subcircuit
Field Summary | |
static int |
number
|
Constructor Summary | |
Subcircuit(int i,
boolean setToFalse)
Constructor for integer {0,1} input |
|
Subcircuit(Subcircuit lInput,
Subcircuit rInput,
Gate gate)
Constructor for a two input circuit with a gate ('and' or 'or') Creates a unique variable name representing this circuit |
|
Subcircuit(VariableModified v)
Constructor used for a single variable input |
Method Summary | |
java.lang.Object |
clone()
|
boolean |
isNegated()
Is this subcirucuit negated? |
boolean |
isSingleInput()
True if this subcircuit is just a single input (either negated or regular) |
void |
negate()
negates this subcircuit (if it is already negated, this will un-negate |
java.lang.String |
oldToString()
For testing only |
java.lang.String |
substitutionPrinter(int depth)
TODO pretty printer to visually show depth of circuit |
java.lang.String |
toString()
String representation of subcirucits in CNF format (recursive) |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static int number
Constructor Detail |
public Subcircuit(int i, boolean setToFalse)
i
- Integer input representing boolean value from {0,1}setToFalse
- Indicates that the truth value of this input should be set to falsepublic Subcircuit(VariableModified v)
v
- The variable inputpublic Subcircuit(Subcircuit lInput, Subcircuit rInput, Gate gate)
lInput
- The subcircuit representing the left inputrInput
- The subcircuit representing the right inputgate
- The logical gate for the circuit (must be Grammar.and or Grammar.or)Method Detail |
public void negate()
public boolean isNegated()
public boolean isSingleInput()
public java.lang.Object clone()
public java.lang.String toString()
public java.lang.String oldToString()
public java.lang.String substitutionPrinter(int depth)
depth
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |