#include <InferenceMachine.h>

Public Types | |
| typedef std::vector< RCPtr < FuzzySet > > | OutputType |
| typedef std::vector< double > | InputType |
Public Member Functions | |
| InferenceMachine (RuleBase *const rb=NULL) | |
| Constructor. | |
| virtual | ~InferenceMachine () |
| Destructor. | |
| virtual OutputType | computeInference (const InputType it) const |
| Computes the inference. | |
| virtual OutputType | computeInference (double a) const |
| Computes the inference. | |
| virtual OutputType | computeInference (double a, double b) const |
| Computes the inference. | |
| virtual OutputType | computeInference (double a, double b, double c) const |
| Computes the inference. | |
| virtual OutputType | computeInference (double a, double b, double c, double d) const |
| Computes the inference. | |
| void | setRuleBase (RuleBase *const rB) |
| Set the associated rule base. | |
| void | characteristicCurve (const std::string fileName="curve.dat", long int resolution=50) const |
| Plots the defuzzification results for the whole input range into a gnuplot-suited file. | |
Protected Member Functions | |
| virtual OutputType | buildTreeFast (RuleBase::BaseIterator &actual, unsigned int remainingRules, int conclusionNumber, const InputType in) const =0 |
Protected Attributes | |
| RuleBase * | ruleBasePtr |
A virtual basis class for the different inference machines.
Definition at line 30 of file InferenceMachine.h.
| typedef std::vector<double> InferenceMachine::InputType |
Definition at line 33 of file InferenceMachine.h.
| typedef std::vector< RCPtr<FuzzySet> > InferenceMachine::OutputType |
Definition at line 32 of file InferenceMachine.h.
| InferenceMachine::InferenceMachine | ( | RuleBase *const | rb = NULL |
) |
Constructor.
| rb | the associated rulebase. |
Definition at line 23 of file InferenceMachine.cpp.
| InferenceMachine::~InferenceMachine | ( | ) | [virtual] |
| virtual OutputType InferenceMachine::buildTreeFast | ( | RuleBase::BaseIterator & | actual, | |
| unsigned int | remainingRules, | |||
| int | conclusionNumber, | |||
| const InputType | in | |||
| ) | const [protected, pure virtual] |
Referenced by computeInference().
| void InferenceMachine::characteristicCurve | ( | const std::string | fileName = "curve.dat", |
|
| long int | resolution = 50 | |||
| ) | const |
Plots the defuzzification results for the whole input range into a gnuplot-suited file.
For evaluation the borders of the linguistic variables are taken into consideration.
| fileName | name of the file where the data of characteristic curve is saved | |
| resolution | the resolution of the characterestic curve |
Definition at line 90 of file InferenceMachine.cpp.
References RuleBase::getFirstFormatIterator(), RuleBase::getNumberOfInputs(), and ruleBasePtr.
| InferenceMachine::OutputType InferenceMachine::computeInference | ( | double | a, | |
| double | b, | |||
| double | c, | |||
| double | d | |||
| ) | const [virtual] |
Computes the inference.
| a | first crisp value | |
| b | second crisp value | |
| c | thrid crisp value | |
| d | forth crisp value |
Definition at line 68 of file InferenceMachine.cpp.
References computeInference().
| InferenceMachine::OutputType InferenceMachine::computeInference | ( | double | a, | |
| double | b, | |||
| double | c | |||
| ) | const [virtual] |
Computes the inference.
| a | first crisp value | |
| b | second crisp value | |
| c | thrid crisp value |
Definition at line 60 of file InferenceMachine.cpp.
References computeInference().
| InferenceMachine::OutputType InferenceMachine::computeInference | ( | double | a, | |
| double | b | |||
| ) | const [virtual] |
Computes the inference.
| a | first crisp value | |
| b | second crisp value |
Definition at line 53 of file InferenceMachine.cpp.
References computeInference().
| InferenceMachine::OutputType InferenceMachine::computeInference | ( | double | a | ) | const [virtual] |
Computes the inference.
| a | a crisp value |
Definition at line 47 of file InferenceMachine.cpp.
References computeInference().
| InferenceMachine::OutputType InferenceMachine::computeInference | ( | const InputType | it | ) | const [virtual] |
Computes the inference.
| it | a vector of crisp values (an InputType) |
Definition at line 25 of file InferenceMachine.cpp.
References buildTreeFast(), RuleBase::getFirstConclIt(), RuleBase::getFirstIterator(), RuleBase::getLastConclIt(), RuleBase::getNumberOfRules(), ComposedFS::MIN, and ruleBasePtr.
Referenced by computeInference().
| void InferenceMachine::setRuleBase | ( | RuleBase *const | rB | ) | [inline] |
Set the associated rule base.
| rB | the rule base |
Definition at line 123 of file InferenceMachine.h.
References ruleBasePtr.
RuleBase* InferenceMachine::ruleBasePtr [protected] |
Definition at line 113 of file InferenceMachine.h.
Referenced by characteristicCurve(), computeInference(), and setRuleBase().