⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tfuzzycontroller.h

📁 人工智能中模糊逻辑算法 FuzzyLib 2.0 is a comprehensive C++ Fuzzy Logic library for constructing fuzzy logic sy
💻 H
字号:
////////////////////////////////////////////////////////////////////////////////
#ifndef TFuzzyController_h
#define TFuzzyController_h
////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////
//Fuzzy Logic Processing Sequence
////////////////////////////////////////////////////////////////////////////////
// 1. Aggregation		of predicate truths for each rule
// 2. Correlation		of predicate truths for each rule to consequent
// 3. Composition		of consequents of all rules
// 4. Defuzzification	of composition's result
////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////
#include "TFuzzyRule.h"
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
#define	MAX_RULES_PER_CONTROLLER		16
////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////
class TFuzzyController
{
  public:
    TVariable* 		input_variables[MAX_PREMISES_PER_PREDICATE];
    TFuzzyRule*		rules[MAX_RULES_PER_CONTROLLER];
    TVariable* 		output_variable;

  public:
	TFuzzyController();
	virtual ~TFuzzyController();

	void clear_input_variables();
	void add_input_variable(TVariable* variable);
	void remove_input_variable(TVariable* variable);
    void edit_input_variables();

	void clear_rules();
	void add_rule(TFuzzyRule* rule);
	void remove_rule(TFuzzyRule* rule);
    void edit_rules();

    
	TFuzzySet* GenerateOutputSet(
		   				int aggregation_method=ZADEH,			// ZADEH, MEAN, ... PRODUCT, BONDEDSUM
                	    int correlation_method=TRUNCATE,		// TRUNCATE, SCALE
	           			int alphaCut_type=STRONG,				// STRONG, WEAK
                    	int composition_method=ZADEH			// ZADEH, MEAN, ... PRODUCT, BONDEDSUM
					  );

	double	   GenerateOutput(
		   				int aggregation_method=ZADEH,			// ZADEH, MEAN, ... PRODUCT, BONDEDSUM
                	    int correlation_method=TRUNCATE,		// TRUNCATE, SCALE
	           			int alphaCut_type=STRONG,				// STRONG, WEAK
                    	int composition_method=ZADEH,			// ZADEH, MEAN, ... PRODUCT, BONDEDSUM
                        int defuzzification_method=CENTROID		// CENTROID, MAXIMUM_HIGHT, ...
					  );

	bool   operator == 	(TFuzzyController& controller2);	// comparison
};
////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////
#endif
////////////////////////////////////////////////////////////////////////////////

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -