|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jFuzzyLogic.rule.FuzzyRuleExpression
public class FuzzyRuleExpression
General rule expression term E.g.: "(temp IS hot AND pressure IS high) OR pressure IS low"
Field Summary | |
---|---|
(package private) boolean |
negated
Is it negated? |
(package private) RuleConnectionMethod |
ruleConnectionMethod
How are term1 and term2 connected? |
(package private) java.lang.Object |
term1
Term1 can be a either a 'FuzzyRuleTerm' or 'FuzzyRuleExpression' |
(package private) java.lang.Object |
term2
Term2 can be a either a 'FuzzyRuleTerm' or 'FuzzyRuleExpression' |
Constructor Summary | |
---|---|
FuzzyRuleExpression()
Default Constructor |
|
FuzzyRuleExpression(java.lang.Object term1,
java.lang.Object term2,
RuleConnectionMethod ruleConnectionMethod)
Constructor |
Method Summary | |
---|---|
void |
add(FuzzyRuleTerm fuzzyRuleTerm)
Add a new term (using default AND method) |
private void |
addVariables(java.util.LinkedList linkedListVariables)
Add every variable to this list |
double |
evaluate()
Evaluate this expression |
RuleConnectionMethod |
getRuleConnectionMethod()
|
java.lang.Object |
getTerm1()
|
java.lang.Object |
getTerm2()
|
boolean |
isFuzzyRuleExpression(java.lang.Object term)
Is this term an expression ('FuzzyRuleExpression') |
boolean |
isFuzzyRuleTerm(java.lang.Object term)
Is this term a FuzzyRuleTerm |
boolean |
isNegated()
|
boolean |
isValidTerm(java.lang.Object term)
Is this a valid term? (only a few objects are acceped as 'terms') |
java.util.Iterator |
iteratorVariables()
Iterate on every variable |
void |
setNegated(boolean negated)
|
void |
setRuleConnectionMethod(RuleConnectionMethod ruleConnectionMethod)
|
void |
setTerm1(java.lang.Object term1)
|
void |
setTerm2(java.lang.Object term2)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
boolean negated
RuleConnectionMethod ruleConnectionMethod
java.lang.Object term1
java.lang.Object term2
Constructor Detail |
---|
public FuzzyRuleExpression()
public FuzzyRuleExpression(java.lang.Object term1, java.lang.Object term2, RuleConnectionMethod ruleConnectionMethod)
term1
- : term 1 (can be a either a 'FuzzyRuleTerm' or 'FuzzyRuleExpression')term2
- : term 2 (can be a either a 'FuzzyRuleTerm' or 'FuzzyRuleExpression')ruleConnectionMethod
- : connection method between terms (which method is used for each 'and', 'or', 'not'...)Method Detail |
---|
public void add(FuzzyRuleTerm fuzzyRuleTerm)
fuzzyRuleTerm
- : term to addprivate void addVariables(java.util.LinkedList linkedListVariables)
linkedListVariables
- public double evaluate()
public RuleConnectionMethod getRuleConnectionMethod()
public java.lang.Object getTerm1()
public java.lang.Object getTerm2()
public boolean isFuzzyRuleExpression(java.lang.Object term)
term
- : term to analize
public boolean isFuzzyRuleTerm(java.lang.Object term)
term
- : term to analize
public boolean isNegated()
public boolean isValidTerm(java.lang.Object term)
term
- : Term to evaluatepublic java.util.Iterator iteratorVariables()
public void setNegated(boolean negated)
public void setRuleConnectionMethod(RuleConnectionMethod ruleConnectionMethod)
public void setTerm1(java.lang.Object term1)
public void setTerm2(java.lang.Object term2)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |