|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rule.FuzzyRule
The FuzzyRule
class implements a fuzzy rule with multiple antecedent clauses
and a single consequent clause.
Constructor Summary | |
(package private) |
FuzzyRule(FuzzyRuleBase rb,
java.lang.String name,
FuzzyClause rhs)
Creates a new fuzzy unconditional rule (a Fact). |
(package private) |
FuzzyRule(FuzzyRuleBase rb,
java.lang.String name,
FuzzyClause[] lhsClauses,
FuzzyClause rhs)
Creates a new fuzzy rule with one or more antecedent clauses and a single consequent clause. |
(package private) |
FuzzyRule(FuzzyRuleBase rb,
java.lang.String name,
FuzzyClause lhs,
FuzzyClause rhs)
Creates a new fuzzy rule with a single antecedent and a single consequent clause. |
Method Summary | |
(package private) void |
addRdReference(int id)
Adds to the set of variables referenced in this rule. |
(package private) void |
addWrReference(int id)
Adds to the set of variables set by this rule. |
(package private) void |
fire(double alphaCut,
java.util.BitSet workingSet)
Fires this rule. |
java.util.Vector |
getAntecedents()
Retrieves the antecedent clauses of this rule. |
FuzzyClause |
getConsequent()
Retrieves the consequent clause. |
java.lang.String |
getName()
Retrieves the name of this rule. |
java.util.BitSet |
getRdReferences()
Retrieves the set of the variables referenced in this rule. |
java.util.BitSet |
getWrReferences()
Retrieves the set of the variables set by this rule. |
boolean |
isFired()
Retrieves the flag that indicates if this rule has been fired. |
(package private) void |
reset()
Resets the rule (fired flag). |
java.lang.String |
toString()
Retrieve a string describing the contents of the object. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
FuzzyRule(FuzzyRuleBase rb, java.lang.String name, FuzzyClause lhs, FuzzyClause rhs)
rb
- the FuzzyRuleBase object this rule belongs toname
- the String object that contains the name of the rulelhs
- the FuzzyClause object that contains the
antecedent clauserhs
- the FuzzyClause object the contains the consequent
clauseFuzzyRule(FuzzyRuleBase rb, java.lang.String name, FuzzyClause[] lhsClauses, FuzzyClause rhs)
rb
- the FuzzyRuleBase object this rule belongs toname
- the String object that contains the name of the rulelhsClauses
- the FuzzyClause[] object that contains the
antecedent clausesrhs
- the consequent FuzzyClause object the contains the consequent
clauseFuzzyRule(FuzzyRuleBase rb, java.lang.String name, FuzzyClause rhs)
rb
- the FuzzyRuleBase object that this rule belongs toname
- the String that contains the rule namerhs
- the FuzzyClause object that contains the consequent clauseMethod Detail |
public java.lang.String getName()
void addRdReference(int id)
id
- the integer that represents the id of the variable referencedpublic java.util.BitSet getRdReferences()
void addWrReference(int id)
id
- the integer that represents the id of the variable referencedpublic java.util.BitSet getWrReferences()
public boolean isFired()
void reset()
public java.util.Vector getAntecedents()
public FuzzyClause getConsequent()
void fire(double alphaCut, java.util.BitSet workingSet)
If this is an unconditional rule (there are no antecedents), simply evaluates the consequent for its side-effects.
If this is a conditional rule (there are antecedents), evaluates the antecedents:
alphaCut
- the double value for the alphaCutworkingSet
- the BitSet object that contains the working setpublic java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |