IRIS Fuzzy Logic Library

The IRIS Fuzzy Logic Library (FLL) is a collection of C++ classes modeled after The Mathworks' MATLAB Fuzzy Logic Toolkit. The IRIS FLL is a work in progress, but you can view the current Doxygen-generated documentation ... here

Logs

Let me see ... I started this project sometime late in the Fall 2006 semester. I don't know - something just came over me, and pretty soon I was just typing away!

So far, I am happy with the current design of the library. (You can view the current class hierarchy here.) Some of the current features are:

  1. Set of membership functions are based on The Mathworks' MATLAB Fuzzy Logic Toolkit. Making the design work was based heavily on the use of functors based on ideas and suggestions from The Function Pointer Tutorials.
  2. For debugging purposes, all draw() member functions are console-based. I speculate these can be tied in with something like wxWindows for a nicer MATLAB-like interface ...

A sample driver program called driver.cpp is included as a reference that illustrates how to use the library. Here is a part of that file:

    int main()
    {
      Fuzzy::MembershipFn *fis[8];
    
      // Set up some membership functions
    
      fis[0] = new Fuzzy::TriMF( "A" , 70 , 80 , 90 , 70 , 90 );
      fis[0]->discretize(9);
      fis[0]->draw();
      cerr << endl;
    
      fis[1] = new Fuzzy::TrapMF( "B" , 55 , 70 , 80 , 85 , 50 , 90 );
      fis[1]->discretize(9);
      fis[1]->draw();
      cerr << endl;
    
      fis[2] = new Fuzzy::SigMF( "C" , -80 , 100 , 80 , 150 );
      fis[2]->discretize(11);
      fis[2]->draw();
      cerr << endl;
    
      fis[3] = new Fuzzy::pSigMF( "D" , 2 , 3 , -5 , 8 , 0 , 10 );
      fis[3]->discretize(11);
      fis[3]->draw();
      cerr << endl << endl;
    
      // Try out some operators
    
      Fuzzy::Base *Ands = new Fuzzy::TnormList;
      cerr << Ands->getSize() << " t-norms defined: "
           << *Ands << endl;
    
      Fuzzy::Base *Ors = new Fuzzy::TconormList;
      cerr << Ors->getSize() << " t-conorms defined: "
           << *Ors << endl;
      cerr << endl;

      ...

      return 0;
    }

Posted on January 24, 2007

back to top


Archives