|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectKnowledgeBaseImpl
public class KnowledgeBaseImpl
Implement KnowledgeBase.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface KnowledgeBase |
---|
KnowledgeBase.KnowledgeBaseListener |
Field Summary | |
---|---|
int |
INCREMENTAL_STACK_GROWTH
Must be a positive value. |
int |
INITIAL_STACK_SIZE
Must be a positive value. |
Fields inherited from interface KnowledgeBase |
---|
KB_UNSATISFIABLE |
Method Summary | |
---|---|
int |
assertNegative(int var,
int state)
Asserts var!=state as true. |
int |
assertPositive(int var,
int state)
Asserts var=state as true. |
static KnowledgeBaseImpl |
createKB(MappedList vars,
MultiValuedCNF cnf,
KnowledgeBase.KnowledgeBaseListener lstn)
Will return the created KB, or null if it was unsatisfiable. |
int |
currentState()
Returns the current state of the KB, if retract is later called with this value, the KB will return to this state. |
int |
numClauses()
|
int |
numLiterals()
|
int |
numPossibleStates(FiniteVariable fv)
|
void |
retract(int size)
The parameter state should be the returned value from either an assertPositive call or from a currentState call. |
void |
write(PrintStream out)
|
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int INITIAL_STACK_SIZE
public int INCREMENTAL_STACK_GROWTH
Method Detail |
---|
public int currentState()
KnowledgeBase
currentState
in interface KnowledgeBase
public int numClauses()
numClauses
in interface KnowledgeBase
public int numLiterals()
numLiterals
in interface KnowledgeBase
public static KnowledgeBaseImpl createKB(MappedList vars, MultiValuedCNF cnf, KnowledgeBase.KnowledgeBaseListener lstn)
public int numPossibleStates(FiniteVariable fv)
numPossibleStates
in interface KnowledgeBase
public int assertPositive(int var, int state)
assertPositive
in interface KnowledgeBase
public int assertNegative(int var, int state)
public void retract(int size)
KnowledgeBase
retract
in interface KnowledgeBase
public void write(PrintStream out)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |