|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jFuzzyLogic.rule.FuzzyRule
public class FuzzyRule
Fuzzy rule Rule: If (x1 is termX1) AND (x2 is termX2) .... Then (y1 is termY1) AND (y2 is termY2) [weight: 1.0] Notes: - "If" clause is called "antecedent" - "then" clause is called "consequent" - There may be 1 or more antecedents connected using a 'RuleConnectionMethod' (e.g. AND, OR) - As there are many ways to implement 'AND' and 'OR' connectors, you can customize them
| Field Summary | |
|---|---|
(package private) FuzzyRuleExpression |
antecedents
Rule antecedent ('if' part) |
(package private) java.util.LinkedList<FuzzyRuleTerm> |
consequents
Rule consequent ('then' part) |
(package private) double |
degreeOfSupport
Degree of support |
(package private) java.lang.String |
name
Rule's name |
(package private) double |
weight
Rule's weight |
| Constructor Summary | |
|---|---|
FuzzyRule(java.lang.String name)
Default constructor Default weight: 1.0 Default connection method: AND (minimum) |
|
| Method Summary | |
|---|---|
FuzzyRule |
addAntecedent(Variable variable,
java.lang.String termName,
boolean negated)
Add a condition "... |
FuzzyRule |
addConsequent(Variable variable,
java.lang.String termName,
boolean negated)
Add consequent "( variable is termName)" to this rule |
void |
evaluate(RuleImplicationMethod ruleImplicationMethod)
Evaluate this rule using 'RuleImplicationMethod' |
FuzzyRuleExpression |
getAntecedents()
|
java.util.LinkedList<FuzzyRuleTerm> |
getConsequents()
|
double |
getDegreeOfSupport()
|
java.lang.String |
getName()
|
double |
getWeight()
|
void |
setAntecedents(FuzzyRuleExpression antecedents)
|
void |
setConsequents(java.util.LinkedList<FuzzyRuleTerm> consequents)
|
void |
setDegreeOfSupport(double degreeOfSupport)
|
void |
setName(java.lang.String name)
|
void |
setWeight(double weight)
|
java.lang.String |
toString()
|
java.lang.String |
toStringFCL()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
FuzzyRuleExpression antecedents
java.util.LinkedList<FuzzyRuleTerm> consequents
double degreeOfSupport
java.lang.String name
double weight
| Constructor Detail |
|---|
public FuzzyRule(java.lang.String name)
| Method Detail |
|---|
public FuzzyRule addAntecedent(Variable variable,
java.lang.String termName,
boolean negated)
variable - : Variable to evaluatetermName - : FuzzyRuleTerm for this condition
public FuzzyRule addConsequent(Variable variable,
java.lang.String termName,
boolean negated)
variable - : Variable to evaluatetermName - : FuzzyRuleTerm for this condition
public void evaluate(RuleImplicationMethod ruleImplicationMethod)
ruleImplicationMethod - : Rule implication method to usepublic FuzzyRuleExpression getAntecedents()
public java.util.LinkedList<FuzzyRuleTerm> getConsequents()
public double getDegreeOfSupport()
public java.lang.String getName()
public double getWeight()
public void setAntecedents(FuzzyRuleExpression antecedents)
public void setConsequents(java.util.LinkedList<FuzzyRuleTerm> consequents)
public void setDegreeOfSupport(double degreeOfSupport)
public void setName(java.lang.String name)
public void setWeight(double weight)
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringFCL()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||