![]() |
A fuzzy logic C++ library
|
A rule base of 2 inputs, represented as a table (computed only when needed). Private class, do not use in your code! More...
#include <rb_table.hpp>
Collaboration diagram for slifis::RB_TABLE:Public Member Functions | |
| RB_TABLE () | |
| bool | Print (FILE *fp, const char *msg=0) |
| Printing table. | |
| bool | Compute () |
| Export rule base in a "table" view (suited only for 2-inputs FIS). | |
| void | AssignRuleBase (const RULE_BASE *rule_base) |
| const FUZZY_IN & | GetFuzzySet_row () const |
| const FUZZY_IN & | GetFuzzySet_col () const |
| std::string | GetOutputIndexString (size_t row, size_t col) const |
| Return a string with all the output indexes used at (row, col) | |
| std::string | GetRuleIndexString (size_t row, size_t col) const |
| Returns a string showing which rules target this cell. | |
| bool | HasSomethingHere (size_t row, size_t col) const |
Returns true if cell at (row, col) is concerned by a rule. | |
| bool | IsComputed () const |
Public Attributes | |
| size_t | NbFunc_row |
| Initialised when computing table. | |
| size_t | NbFunc_col |
| Initialised when computing table. | |
Private Attributes | |
| std::vector< std::vector < std::vector< int > > > | v_o |
| holds a set of output MF index, one per cell | |
| std::vector< std::vector < std::vector< int > > > | v_r |
| holds a set of rule indexes, one per cell | |
| bool | _IsComputed |
| size_t | _idx_col |
| Index of input set of fis for horizontal axis of table. | |
| size_t | _idx_row |
| Index of input set of fis for vertical axis of table. | |
| const RULE_BASE * | p_rb |
| pointer on original rule base | |
Friends | |
| class | RULE_BASE |
A rule base of 2 inputs, represented as a table (computed only when needed). Private class, do not use in your code!
| bool slifis::RB_TABLE::Print | ( | FILE * | fp, |
| const char * | msg = 0 |
||
| ) |
| bool slifis::RB_TABLE::Compute | ( | ) |
Export rule base in a "table" view (suited only for 2-inputs FIS).
References __IN__, __OUT__, slifis::RULE_IDX::GetNbTerms(), slifis::RULE_IDX::GetOutMfIndex(), slifis::RULE_IDX::GetTerms(), SLIFIS_WARNING_1, and slifis::RULE_IDX::UsesInput().
Referenced by slifis_plot::PLOT_RB_2D::Draw().
| void slifis::RB_TABLE::AssignRuleBase | ( | const RULE_BASE * | rule_base | ) | [inline] |
References p_rb.
Referenced by slifis::RULE_BASE::RULE_BASE().
| const FUZZY_IN & slifis::RB_TABLE::GetFuzzySet_row | ( | ) | const |
Referenced by slifis_plot::PLOT_RB_2D::Draw().
| const FUZZY_IN & slifis::RB_TABLE::GetFuzzySet_col | ( | ) | const |
Referenced by slifis_plot::PLOT_RB_2D::Draw().
| std::string slifis::RB_TABLE::GetOutputIndexString | ( | size_t | row, |
| size_t | col | ||
| ) | const |
Return a string with all the output indexes used at (row, col)
Returns a string showing which output function the cell rules triggers.
Referenced by slifis_plot::PLOT_RB_2D::P_DrawIndexes().
| std::string slifis::RB_TABLE::GetRuleIndexString | ( | size_t | row, |
| size_t | col | ||
| ) | const |
Returns a string showing which rules target this cell.
Referenced by slifis_plot::PLOT_RB_2D::P_DrawIndexes().
| bool slifis::RB_TABLE::HasSomethingHere | ( | size_t | row, |
| size_t | col | ||
| ) | const [inline] |
Returns true if cell at (row, col) is concerned by a rule.
References v_o.
Referenced by slifis_plot::PLOT_RB_2D::P_DrawIndexes().
| bool slifis::RB_TABLE::IsComputed | ( | ) | const [inline] |
References _IsComputed.
Referenced by slifis_plot::PLOT_RB_2D::Draw().
friend class RULE_BASE [friend] |
| size_t slifis::RB_TABLE::NbFunc_row |
Initialised when computing table.
| size_t slifis::RB_TABLE::NbFunc_col |
Initialised when computing table.
std::vector< std::vector< std::vector<int> > > slifis::RB_TABLE::v_o [private] |
holds a set of output MF index, one per cell
Referenced by HasSomethingHere().
std::vector< std::vector< std::vector<int> > > slifis::RB_TABLE::v_r [private] |
holds a set of rule indexes, one per cell
bool slifis::RB_TABLE::_IsComputed [private] |
Referenced by slifis::RULE_BASE::Changed(), and IsComputed().
size_t slifis::RB_TABLE::_idx_col [private] |
Index of input set of fis for horizontal axis of table.
size_t slifis::RB_TABLE::_idx_row [private] |
Index of input set of fis for vertical axis of table.
const RULE_BASE* slifis::RB_TABLE::p_rb [private] |
pointer on original rule base
Referenced by AssignRuleBase().
1.7.6.1