Afl Library __link__ -
1. Overview & Purpose AFL (not to be confused with AFLP for genomics or Adobe Flash Library) is a lightweight, header-only C++ library for Associative Fuzzy Logic . It implements a form of fuzzy logic where fuzzy sets and rules are stored and manipulated using associative containers (like std::map ), making it highly flexible and dynamic.
| Class | Description | |-------|-------------| | FuzzySet | Represents a membership function (triangular, trapezoidal, Gaussian). Contains parameters (a,b,c,d) and methods to compute membership degree. | | LinguisticVariable | Holds multiple FuzzySets (e.g., "Temperature" with sets: Cold, Warm, Hot). Uses std::map<string, FuzzySet> . | | FuzzyRule | IF-THEN rule with antecedent and consequent (both are std::map<string, double> or strings). | | FuzzyEngine | Main inference engine. Stores linguistic variables and rules. Performs fuzzification, inference (Mamdani), and defuzzification (Centroid, Bisector, etc.). | afl library
Usually MIT or BSD – permissive. 2. Architecture & Core Components The library is structured around four main classes (all in namespace afl ): | Class | Description | |-------|-------------| | FuzzySet
// Rules: IF temperature IS warm THEN fan_speed IS medium engine.addRule("temperature", "warm", "fan_speed", "medium"); engine.addRule("temperature", "hot", "fan_speed", "high"); Uses std::map<string, FuzzySet>