SugenoRule Class Reference

A Sugeno rule. More...

#include <SugenoRule.h>

Inheritance diagram for SugenoRule:
Rule RCObject

List of all members.

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.
ConclusionTypegetConclusion ()
 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 &lt)

Detailed Description

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.


Member Typedef Documentation

typedef std::vector<double> SugenoRule::ConclusionType

Reimplemented from Rule.

Definition at line 44 of file SugenoRule.h.


Constructor & Destructor Documentation

SugenoRule::SugenoRule ( Connective  c = AND,
RuleBase belongsTo = NULL 
) [inline]

Default constructor.

Definition at line 42 of file SugenoRule.h.


Member Function Documentation

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).

Returns:
the activation of the conclusion

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.

Returns:
the vector of coefficients for the liner 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.

Parameters:
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).

Parameters:
cT the ConclusionType (a vector<double>)

Definition at line 39 of file SugenoRule.cpp.

References RuleBase::getNumberOfInputs(), and Rule::ruleBasePtr.


The documentation for this class was generated from the following files: