A Sugeno rule. More...
#include <SugenoRule.h>
Public Types | |
| typedef std::vector< double > | ConclusionType |
Public Member Functions | |
| SugenoRule (Connective c=AND, RuleBase *belongsTo=NULL) | |
| Default constructor. | |
| void | setConclusion (ConclusionType &cT) |
| Set the conclusion given a ConclusionType(the vector of coefficients for the liner combination). | |
| void | setConclusion (double a, double b, double c) |
| Set the conclusion given three coenfficients for the linear combination. | |
| ConclusionType * | getConclusion () |
| Return the vector of coefficients for the linear combination of the conclusion. | |
| double | calculateConsequence (const std::vector< double > &Inputs) |
| Calculate the consequence (i.e. | |
| void | addConclusion (LinguisticTerm <) |
A Sugeno rule.
A Suegno rule its a rule with a linear combination of the imput values beeing the conclusion, like:
IF Tiredness IS high OR Soberness IS low THEN FitnessToDrive is 30-5*Tiredness+15*Soberness
Definition at line 30 of file SugenoRule.h.
| typedef std::vector<double> SugenoRule::ConclusionType |
Reimplemented from Rule.
Definition at line 44 of file SugenoRule.h.
| SugenoRule::SugenoRule | ( | Connective | c = AND, |
|
| RuleBase * | belongsTo = NULL | |||
| ) | [inline] |
Default constructor.
Definition at line 42 of file SugenoRule.h.
| void SugenoRule::addConclusion | ( | LinguisticTerm & | lt | ) | [inline] |
Definition at line 81 of file SugenoRule.h.
| double SugenoRule::calculateConsequence | ( | const std::vector< double > & | Inputs | ) |
Calculate the consequence (i.e.
the resulting activation of the conclusion given the input).
Definition at line 15 of file SugenoRule.cpp.
References RuleBase::getNumberOfInputs(), and Rule::ruleBasePtr.
Referenced by SugenoIM::computeSugenoInference().
| ConclusionType* SugenoRule::getConclusion | ( | ) | [inline] |
Return the vector of coefficients for the linear combination of the conclusion.
Definition at line 68 of file SugenoRule.h.
| void SugenoRule::setConclusion | ( | double | a, | |
| double | b, | |||
| double | c | |||
| ) |
Set the conclusion given three coenfficients for the linear combination.
| a | first coefficient for the linear combination | |
| b | secound coefficient for the linear combination | |
| c | third coefficient for the linear combination |
Definition at line 31 of file SugenoRule.cpp.
| void SugenoRule::setConclusion | ( | ConclusionType & | cT | ) |
Set the conclusion given a ConclusionType(the vector of coefficients for the liner combination).
| cT | the ConclusionType (a vector<double>) |
Definition at line 39 of file SugenoRule.cpp.
References RuleBase::getNumberOfInputs(), and Rule::ruleBasePtr.