|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rule.FuzzyRuleBase
The FuzzyRuleBase
class implements a set of rules and rule
variables along with a method for forward chaining.
Field Summary | |
(package private) static int |
nextId
|
Constructor Summary | |
FuzzyRuleBase(java.lang.String name)
Create a new fuzzy rule base. |
Method Summary | |
void |
addConditionalRule(FuzzyRule rule)
Adds a conditional rule to this rule base. |
void |
addUnconditionalRule(FuzzyRule rule)
Adds an unconditional rule to this rule base. |
void |
addVariable(FuzzyRuleVariable variable)
Adds a variable to this rule base |
void |
backwardChain(java.lang.String goalVarName)
Not supported in a fuzzy rule base. |
void |
clear()
Clears the ruleset of all variables and rules, set the ruleset name to the empty string (""), and set all ruleset options to default values. |
FuzzyClause |
createClause(ContinuousFuzzyRuleVariable lhs,
int oper,
java.lang.String hedges,
java.lang.String setName)
Creates a fuzzy clause for use in constructing a rule. |
void |
displayRules(javax.swing.JTextArea textArea)
Displays the rules in the given text area. |
void |
displayVariables(javax.swing.JTextArea textArea)
Displays the variables in the given text area. |
void |
forwardChain()
Perform the forward chaining processing of a fuzzy rulebase. |
double |
getAlphaCut()
Retrieves the current alphacut threshold. |
int |
getCorrelationMethod()
Retrieves the current correlation method. |
int |
getDefuzzifyMethod()
Retrieves the current defuzzification method. |
java.util.Vector |
getGoalVariables()
Not supported in a fuzzy rule base. |
int |
getInferenceMethod()
Retrieves the current inference method. |
java.util.BitSet |
getInitialFactBase()
Retrieves the initial fact base. |
java.lang.String |
getName()
Retrieves the name of the rulebase. |
java.util.Hashtable |
getRules()
Retrieve the list of rules. |
FuzzyRuleVariable |
getVariable(java.lang.String name)
Retrives the fuzzy variable associated with the given name. |
java.util.Hashtable |
getVariables()
Retrieve the list of variables. |
void |
reset()
Reset the ruleset so that rules can be fired again by setting each variable is to 0.0 and all rules to their original state. |
void |
setAlphaCut(double alphaCut)
Sets the alphacut threshold to the specified value. |
void |
setCorrelationMethod(int correlationMethod)
Sets the correlation method to the specified type. |
void |
setDefuzzifyMethod(int defuzzifyMethod)
Sets the defuzzification method to the specified type. |
void |
setDisplay(javax.swing.JTextArea textArea)
Sets the text area for the display of information. |
void |
setInferenceMethod(int inferenceMethod)
Sets the inference method to the specified type. |
void |
setName(java.lang.String name)
Sets the name of the rulebase. |
void |
trace(java.lang.String text)
Adds the given text to the trace information. |
Methods inherited from class java.lang.Object |
|
Field Detail |
static int nextId
Constructor Detail |
public FuzzyRuleBase(java.lang.String name)
name
- the String object that contains the name of the rule baseMethod Detail |
public void setDisplay(javax.swing.JTextArea textArea)
textArea
- the JTextArea to be used for the display of informationpublic void trace(java.lang.String text)
text
- the String the text to be displayed as part of the
trace informationpublic void forwardChain()
Fire the rules in the ruleset.
The order of processing is as follows:
public void reset()
public void setName(java.lang.String name)
name
- the new name of the rulebasepublic java.lang.String getName()
public void setAlphaCut(double alphaCut)
alphaCut
- the double value for the new alphacut thresholdpublic double getAlphaCut()
public void setCorrelationMethod(int correlationMethod)
correlationMethod
- the integer that represents to new
correlation mehtod type (enumerated in
the FuzzyDefs class)public int getCorrelationMethod()
public void setDefuzzifyMethod(int defuzzifyMethod)
defyzzifyMethod
- the integer that represents the new defuzzification method
(enumerated in FuzzyDefs class)public int getDefuzzifyMethod()
public void setInferenceMethod(int inferenceMethod)
inferenceMethod
- the new inference method (enumerated in the
FuzzyDefs class)public int getInferenceMethod()
public void addVariable(FuzzyRuleVariable variable)
variable
- the Variable to be added to the rule basepublic FuzzyRuleVariable getVariable(java.lang.String name)
name
- the String that contains the name of the variablepublic java.util.Hashtable getVariables()
public void addConditionalRule(FuzzyRule rule)
rule
- the FuzzyRule object to be addedpublic void addUnconditionalRule(FuzzyRule rule)
rule
- the FuzzyRule object to be addedpublic java.util.Hashtable getRules()
public FuzzyClause createClause(ContinuousFuzzyRuleVariable lhs, int oper, java.lang.String hedges, java.lang.String setName)
lhs
- the ContinuousFuzzyRuleVariable object that is the
lefthand side of the clause (must be a reference to an
existing variable)oper
- the integer that represents the relation connecting
the left- and righthand sides of the clausehedges
- the String object that contains the list of hedges
to be applied to the fuzzy set (if
not used in the rule, hedges must be the empty string, and
not null)setName
- the String that contains the righthand side of the
clause, the name of a fuzzy set.public java.util.BitSet getInitialFactBase()
public void clear()
public void displayVariables(javax.swing.JTextArea textArea)
textArea
- the JTextArea object where the variables are displayedpublic void displayRules(javax.swing.JTextArea textArea)
textArea
- the JTextArea object where the rules are displayedpublic void backwardChain(java.lang.String goalVarName)
goalVarName
- the String objectpublic java.util.Vector getGoalVariables()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |