Go to the first, previous, next, last section, table of contents.


CNFRuleBase -- Rule base and Fuzzy inference engine

SYNOPSIS

#include <CNCL/FRuleBase.h>

TYPE

CN_FRULEBASE

BASE CLASSES

CNNamed

DERIVED CLASSES

None

RELATED CLASSES

None

DESCRIPTION

Constructors:

CNFRuleBase();
CNFRuleBase(CNParam *param);
CNFRuleBase(CNStringR name);
Initializes the CNFRuleBase with name as the object's name.


In addition to the member functions required by CNCL, CNFRuleBase provides:

void add_rule(CNFRule *rule);
void add_rule(CNFRule &rule);
Adds rule to base.
void add_in_var(CNFVar *rule);
void add_in_var(CNFVar &rule);
void add_out_var(CNFVar *rule);
void add_out_var(CNFVar &rule);
Adds input/output variables to the base.
int get_n_rules()const;
int get_n_in_vars()const;
int get_n_out_vars()const;
Returns the number of rules/input variables/output variables in this base.
int resolution()const;
Returns the output fuzzy set resolution.
void inference(CNFVar *var, CNFSet *set , double match, CNFSetArray &res);
Computes the inference set for variable var and value set, using value match of LHS aggregation. The result is stored in the array fuzzy set res.
void evaluate(CNFVar *var, CNFSetArray &res);
Computes output set for variable var, combining the inference() results of all rules. The result is stored in the array fuzzy set res.
void aggregate_all();
Aggregates all rules.
void evaluate_all();
Evaluates all variables.
void defuzzy_all();
Defuzzifies all output variables.
void debug_rules(ostream &strm=cout, int lvl=0);
Debugs the output on &strm for fuzzy rules.


Go to the first, previous, next, last section, table of contents.