rule
Interface RuleBase

All Known Implementing Classes:
BooleanRuleBase, FuzzyRuleBase

public abstract interface RuleBase

The RuleBase defines the interface for the different rule bases (BooleanRuleBase and FuzzyRuleBase).


Method Summary
 void backwardChain(java.lang.String goalVarName)
          Uses backward chaining to fire rules and find a value for the given goal variable.
 void displayRules(javax.swing.JTextArea textArea)
          Displays all rules in the given text area.
 void displayVariables(javax.swing.JTextArea textArea)
          Displays all variables in the given text area.
 void forwardChain()
          Uses forward chaining to set variables and fire rules.
 java.util.Vector getGoalVariables()
          Returns a vector of all variables referenced in the consequents of rules in the rule base.
 void reset()
          Resets the rule base for another round of inferencing by setting all variable values to null.
 void setDisplay(javax.swing.JTextArea txtArea)
          Sets the text area for display.
 void trace(java.lang.String text)
          Displays a trace message.
 

Method Detail

setDisplay

public void setDisplay(javax.swing.JTextArea txtArea)
Sets the text area for display.
Parameters:
txtArea - the JTextArea object used to display messages

trace

public void trace(java.lang.String text)
Displays a trace message.
Parameters:
text - the String object that contains the trace text

displayVariables

public void displayVariables(javax.swing.JTextArea textArea)
Displays all variables in the given text area.
Parameters:
textArea - the JTextArea object used for display

displayRules

public void displayRules(javax.swing.JTextArea textArea)
Displays all rules in the given text area.
Parameters:
textArea - the JTextArea object used for display

reset

public void reset()
Resets the rule base for another round of inferencing by setting all variable values to null.

backwardChain

public void backwardChain(java.lang.String goalVarName)
Uses backward chaining to fire rules and find a value for the given goal variable.
Parameters:
goalVarName - the String object that contains the goal

forwardChain

public void forwardChain()
Uses forward chaining to set variables and fire rules.

getGoalVariables

public java.util.Vector getGoalVariables()
Returns a vector of all variables referenced in the consequents of rules in the rule base.
Returns:
the Vector object that contains the variables