A composite of rules. More...
#include <RuleBase.h>
Public Types | |
| typedef std::list< RCPtr < LinguisticVariable > > | inputTemplate |
| typedef std::list< RCPtr < LinguisticVariable > > | outputTemplate |
| typedef RuleSet::const_iterator | BaseIterator |
| typedef inputTemplate::const_iterator | FormatIterator |
| typedef outputTemplate::const_iterator | ConclIt |
Public Member Functions | |
| RuleBase () | |
| ~RuleBase () | |
| void | addRule (const RCPtr< Rule > &rule) |
| Add a rule to the rulebase. | |
| void | removeRule (const RCPtr< Rule > &rule) |
| Remove a rule from the rulbase. | |
| int | getNumberOfRules () |
| Return the number of rules in the rulebase. | |
| const std::string | print () const |
| Return a string with the all the rules of the rulabase. | |
| const RCPtr< Rule > | getRule (int whichone) |
| Return a certain rule of the rulebase. | |
| BaseIterator | getFirstIterator () const |
| BaseIterator | getLastIterator () const |
| FormatIterator | getFirstFormatIterator () const |
| FormatIterator | getLastFormatIterator () const |
| FormatIterator | getFirstConclIt () const |
| FormatIterator | getLastConclIt () const |
| void | setInputFormat (inputTemplate &in) |
| Sets the Input Format. | |
| void | addToInputFormat (const RCPtr< LinguisticVariable > &lv) |
| Adds a liniguistic variable to the Imput Format. | |
| void | addToInputFormat (const RCPtr< LinguisticVariable > &lv1, const RCPtr< LinguisticVariable > &lv2) |
| Adds two liniguistic variables to the Imput Format. | |
| void | addToInputFormat (const RCPtr< LinguisticVariable > &lv1, const RCPtr< LinguisticVariable > &lv2, const RCPtr< LinguisticVariable > &lv3) |
| Adds three liniguistic variables to the Imput Format. | |
| void | addToInputFormat (const RCPtr< LinguisticVariable > &lv1, const RCPtr< LinguisticVariable > &lv2, const RCPtr< LinguisticVariable > &lv3, const RCPtr< LinguisticVariable > &lv4) |
| Adds four liniguistic variable to the Imput Format. | |
| void | addToOutputFormat (const RCPtr< LinguisticVariable > &lv) |
| Adds a liniguistic variable to the Ouput Format. | |
| void | addToOutputFormat (const RCPtr< LinguisticVariable > &lv1, const RCPtr< LinguisticVariable > &lv2) |
| Adds two liniguistic variables to the Ouput Format. | |
| void | removeFromInputFormat (const RCPtr< LinguisticVariable > &lv) |
| Removes a liniguistic variable from the Imput Format. | |
| unsigned int | getNumberOfInputs () const |
| Returns the number of linguistic variables in the Input Format. | |
A composite of rules.
A rulebase combines several rules.
Definition at line 30 of file RuleBase.h.
| typedef RuleSet::const_iterator RuleBase::BaseIterator |
Definition at line 80 of file RuleBase.h.
| typedef outputTemplate::const_iterator RuleBase::ConclIt |
Definition at line 98 of file RuleBase.h.
| typedef inputTemplate::const_iterator RuleBase::FormatIterator |
Definition at line 88 of file RuleBase.h.
| typedef std::list< RCPtr<LinguisticVariable> > RuleBase::inputTemplate |
Definition at line 37 of file RuleBase.h.
| typedef std::list< RCPtr<LinguisticVariable> > RuleBase::outputTemplate |
Definition at line 38 of file RuleBase.h.
| RuleBase::RuleBase | ( | ) |
Definition at line 24 of file RuleBase.cpp.
| RuleBase::~RuleBase | ( | ) |
Definition at line 16 of file RuleBase.cpp.
Add a rule to the rulebase.
| rule | the rule to be added |
Definition at line 28 of file RuleBase.cpp.
Referenced by build_rule_base_from_xml(), and Rule::Rule().
| void RuleBase::addToInputFormat | ( | const RCPtr< LinguisticVariable > & | lv1, | |
| const RCPtr< LinguisticVariable > & | lv2, | |||
| const RCPtr< LinguisticVariable > & | lv3, | |||
| const RCPtr< LinguisticVariable > & | lv4 | |||
| ) |
Adds four liniguistic variable to the Imput Format.
The linguistic variables must be added in the correct order with respect to the corresponding positions in the input vector.
| lv1 | the first linguistic variable to be added | |
| lv2 | the secound linguistic variable to be added | |
| lv3 | the third linguitic variable to be added | |
| lv4 | the fourth linguitic variable to be added |
Definition at line 104 of file RuleBase.cpp.
References addToInputFormat().
| void RuleBase::addToInputFormat | ( | const RCPtr< LinguisticVariable > & | lv1, | |
| const RCPtr< LinguisticVariable > & | lv2, | |||
| const RCPtr< LinguisticVariable > & | lv3 | |||
| ) |
Adds three liniguistic variables to the Imput Format.
The linguistic variables must be added in the correct order with respect to the corresponding positions in the input vector.
| lv1 | the first linguistic variable to be added | |
| lv2 | the secound linguistic variable to be added | |
| lv3 | the third linguitic variable to be added |
Definition at line 96 of file RuleBase.cpp.
References addToInputFormat().
| void RuleBase::addToInputFormat | ( | const RCPtr< LinguisticVariable > & | lv1, | |
| const RCPtr< LinguisticVariable > & | lv2 | |||
| ) |
Adds two liniguistic variables to the Imput Format.
The linguistic variables must be added in the correct order with respect to the corresponding positions in the input vector.
| lv1 | the first linguistic variable to be added | |
| lv2 | the secound linguistic variable to be added |
Definition at line 90 of file RuleBase.cpp.
References addToInputFormat().
| void RuleBase::addToInputFormat | ( | const RCPtr< LinguisticVariable > & | lv | ) |
Adds a liniguistic variable to the Imput Format.
The linguistic variables must be added in the correct order with respect to the corresponding positions in the input vector.
| lv | the linguistic variable to be added |
Definition at line 60 of file RuleBase.cpp.
Referenced by addToInputFormat(), and build_rule_base_from_xml().
| void RuleBase::addToOutputFormat | ( | const RCPtr< LinguisticVariable > & | lv1, | |
| const RCPtr< LinguisticVariable > & | lv2 | |||
| ) |
Adds two liniguistic variables to the Ouput Format.
The linguistic variables must be added in the correct order with respect to the corresponding positions in the input vector.
| lv1 | the firs linguistic variable to be added | |
| lv2 | the secound linguistic variable to be added |
Definition at line 115 of file RuleBase.cpp.
References addToOutputFormat().
| void RuleBase::addToOutputFormat | ( | const RCPtr< LinguisticVariable > & | lv | ) |
Adds a liniguistic variable to the Ouput Format.
The linguistic variables must be added in the correct order with respect to the corresponding positions in the input vector.
| lv | the linguistic variable to be added |
Definition at line 65 of file RuleBase.cpp.
Referenced by addToOutputFormat(), and build_rule_base_from_xml().
| FormatIterator RuleBase::getFirstConclIt | ( | ) | const [inline] |
Definition at line 102 of file RuleBase.h.
Referenced by InferenceMachine::computeInference(), and save_rule_base_to_xml().
| FormatIterator RuleBase::getFirstFormatIterator | ( | ) | const [inline] |
Definition at line 92 of file RuleBase.h.
Referenced by Rule::addPremise(), InferenceMachine::characteristicCurve(), and save_rule_base_to_xml().
| BaseIterator RuleBase::getFirstIterator | ( | ) | const [inline] |
Definition at line 82 of file RuleBase.h.
Referenced by InferenceMachine::computeInference(), and save_rule_base_to_xml().
| FormatIterator RuleBase::getLastConclIt | ( | ) | const [inline] |
Definition at line 106 of file RuleBase.h.
Referenced by InferenceMachine::computeInference(), and save_rule_base_to_xml().
| FormatIterator RuleBase::getLastFormatIterator | ( | ) | const [inline] |
Definition at line 96 of file RuleBase.h.
Referenced by save_rule_base_to_xml().
| BaseIterator RuleBase::getLastIterator | ( | ) | const [inline] |
Definition at line 86 of file RuleBase.h.
Referenced by save_rule_base_to_xml().
| unsigned int RuleBase::getNumberOfInputs | ( | ) | const [inline] |
Returns the number of linguistic variables in the Input Format.
@ return, the number of linguistic variables in the Input Format
Definition at line 206 of file RuleBase.h.
Referenced by SugenoRule::calculateConsequence(), InferenceMachine::characteristicCurve(), and SugenoRule::setConclusion().
| int RuleBase::getNumberOfRules | ( | ) | [inline] |
Return the number of rules in the rulebase.
Definition at line 58 of file RuleBase.h.
Referenced by InferenceMachine::computeInference(), and getRule().
Return a certain rule of the rulebase.
| whichone | the number of the rule that shall be returned |
Definition at line 46 of file RuleBase.cpp.
References getNumberOfRules().
| const std::string RuleBase::print | ( | ) | const |
Return a string with the all the rules of the rulabase.
Definition at line 77 of file RuleBase.cpp.
| void RuleBase::removeFromInputFormat | ( | const RCPtr< LinguisticVariable > & | lv | ) |
Removes a liniguistic variable from the Imput Format.
| lv | the linguistic variable to be removed |
Definition at line 69 of file RuleBase.cpp.
Remove a rule from the rulbase.
| rule | the rule to be added |
Definition at line 32 of file RuleBase.cpp.
| void RuleBase::setInputFormat | ( | inputTemplate & | in | ) |
Sets the Input Format.
| in | the InputTemplate (list of linguistic vaiables) |
Definition at line 73 of file RuleBase.cpp.