TrapMF.h

Go to the documentation of this file.
00001 
00022 #ifndef         TRAPMF_H_
00023 # define        TRAPMF_H_
00024 
00025 #include "MembershipFn.h"   // for MembershipFn
00026 
00027 namespace IRIS {
00028 
00029   using namespace std;
00030 
00031   namespace Fuzzy {
00032 
00034     class TrapMF : public MembershipFn
00035     {
00036 
00037       public:
00038 
00040         static const unsigned NUM_PARMS = 4;
00041 
00042     //  CONSTRUCTORS  /////////////////////////////////////////////////////
00043 
00051         TrapMF( double a=0 , double b=0 , double c=0 , double d=0 );
00062         TrapMF( const string& name , 
00063                 double   a=0 , double   b=0 , double c=0 , double d=0 , 
00064                 double min=0 , double max=0                );
00067         TrapMF( const MembershipFn::parm_list& parm );
00068 
00069     //  DESTRUCTORS  //////////////////////////////////////////////////////
00070 
00072         ~TrapMF( );
00073 
00074     //  SET MEMBER FUNCTIONS (MUTATORS)  //////////////////////////////////
00075 
00082         void set ( double a=0 , double b=0 , double c=0 , double d=0 );
00083 
00084         // implemented virtual functions from IRIS::Fuzzy::Numeric
00085         virtual void discretize( unsigned degree );
00086 
00087     //  GET MEMBER FUNCTIONS (ACCESSORS)  /////////////////////////////////
00088 
00094         void get ( double &a , double &b , double &c , double &d );
00095 
00096         // implemented virtual functions from IRIS::Fuzzy::Numeric
00097         virtual double eval( double x ) const;
00098         virtual double operator() ( double val ) const;
00099 
00100         // implemented virtual functions from IRIS::Fuzzy::Set
00101         virtual void draw() const;
00102 
00103     }; // end of TrapMF class
00104 
00105   } // end of Fuzzy namespace
00106 
00107 } // end of IRIS namespace
00108 
00109 #endif      /* !TRAPMF_H_ */

Generated on Tue Dec 12 13:41:39 2006 for IRIS Intelligent Systems Tools by  doxygen 1.4.6