aima.logic.propositional.algorithms
Class Model
java.lang.Object
aima.logic.propositional.algorithms.Model
- All Implemented Interfaces:
- Visitor, PLVisitor
public class Model
- extends java.lang.Object
- implements PLVisitor
Constructor Summary |
Model()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Model
public Model()
getStatus
public java.lang.Boolean getStatus(Symbol symbol)
isTrue
public boolean isTrue(Symbol symbol)
isFalse
public boolean isFalse(Symbol symbol)
extend
public Model extend(Symbol symbol,
boolean b)
extend
public Model extend(java.lang.String s,
boolean b)
print
public void print()
isTrue
public boolean isTrue(Sentence clause)
isFalse
public boolean isFalse(Sentence clause)
isUnknown
public boolean isUnknown(Sentence clause)
flip
public Model flip(Symbol s)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
visitSymbol
public java.lang.Object visitSymbol(Symbol s,
java.lang.Object arg)
- Specified by:
visitSymbol
in interface PLVisitor
visitTrueSentence
public java.lang.Object visitTrueSentence(TrueSentence ts,
java.lang.Object arg)
- Specified by:
visitTrueSentence
in interface PLVisitor
visitFalseSentence
public java.lang.Object visitFalseSentence(FalseSentence fs,
java.lang.Object arg)
- Specified by:
visitFalseSentence
in interface PLVisitor
visitNotSentence
public java.lang.Object visitNotSentence(UnarySentence fs,
java.lang.Object arg)
- Specified by:
visitNotSentence
in interface PLVisitor
visitBinarySentence
public java.lang.Object visitBinarySentence(BinarySentence bs,
java.lang.Object arg)
- Specified by:
visitBinarySentence
in interface PLVisitor
visitMultiSentence
public java.lang.Object visitMultiSentence(MultiSentence fs,
java.lang.Object argd)
- Specified by:
visitMultiSentence
in interface PLVisitor
getAssignedSymbols
public java.util.Set<Symbol> getAssignedSymbols()
matches
public boolean matches(java.lang.String variable,
boolean value)