Numeric.h

Go to the documentation of this file.
00001 
00020 #ifndef         NUMERIC_H_
00021 # define        NUMERIC_H_
00022 
00023 #include <vector>  // for STL vector
00024 #include "Set.h"   // for Set
00025 
00026 
00028 namespace IRIS {
00029 
00030   using namespace std;
00031 
00034   namespace Fuzzy {
00035 
00039     class Numeric : public Set
00040     {
00041 
00042       public:
00043 
00045         typedef vector<double> vector;    
00046 
00047     //  CONSTRUCTORS  /////////////////////////////////////////////////////
00048 
00050         Numeric( );
00053         Numeric( const string& name );
00054 
00055     //  DESTRUCTORS  //////////////////////////////////////////////////////
00056 
00058         ~Numeric( );
00059 
00060     //  SET MEMBER FUNCTIONS (MUTATORS)  //////////////////////////////////
00061 
00063         double& operator[]( unsigned i );
00065         void clear( );
00066 
00067         // additional virtual functions for derived classes
00072         virtual void discretize( unsigned degree ) = 0;
00073 
00074     //  GET MEMBER FUNCTIONS (ACCESSORS)  /////////////////////////////////
00075 
00077         double operator[]( unsigned i ) const ;
00080         vector getVector() const ;
00081 
00082         // implemented virtual functions from IRIS::Fuzzy::Set
00083         virtual   void    draw( ) const ;
00084 
00085         // additional virtual functions for derived classes
00088         virtual double eval( double x ) const = 0;
00091         virtual double operator() ( double val ) const = 0;
00092 
00093       protected:
00094 
00095         vector x;  // vectorized form of this member
00096                    // function
00097 
00098     }; // end of Numeric class
00099 
00100   } // end of Fuzzy namespace
00101 
00102 } // end of IRIS namespace
00103 
00104 #endif      /* !NUMERIC_H_ */

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