Over 10 Million Study Resources Now at Your Fingertips

Download as :
Rating : ⭐⭐⭐⭐⭐
Price : $10.99
Pages: 2

All this method does create local copy fuzzyrule class

448 |

Chapter 10

From Theory to Application: Coding a Fuzzy Logic Module

As you can see, all this method does is create a local copy of a FuzzyRule class. A FuzzyRule contains an instance of a FuzzyTerm denoting the ante-cedent and another denoting the consequent. These instances are copies of the FuzzyTerms used to construct the FuzzyRule. This is one reason why each FuzzyTerm subclass must implement the virtual constructor method Clone.

Here’s the listing so you can see exactly what’s going on.


FuzzyRule(FuzzyTerm& ant,
FuzzyTerm& con):m_pAntecedent(ant.Clone()), m_pConsequence(con.Clone()) {}

Okay, I think that’s enough comment on the design of classes used to create and execute fuzzy rules. If you want to dig into the guts a little further, I
advise you to check out the implementation of the FzAND, FzOR, FzVery, and

Fuzzy Logic | 449

Continuing with the code shown earlier in this section, here is how the rule base for the rocket launcher can be added to the fuzzy module:

/* first initialize the fuzzy module with FLVs */

How It Works
Login account
Login Your Account
Add to cart
Add to Cart
Make payment
Document download
Download File
PageId: ELI92080B8
Uploaded by :
Page 1 Preview
all this method does create local copy fuzzyrule c
Sell Your Old Documents & Earn Wallet Balance