Shark Machine Learning Library
  • About Shark
  • Sourceforge
    • Project Summary
    • Downloads
    • Subversion Repository
  • Getting Started
  • Tutorials
  • FAQ
  • Main Modules
    • ReClaM
    • EALib
    • MOO-EALib
    • Fuzzy
  • Tools
    • Mixture
    • Array
    • Rng
    • LinAlg
    • FileUtil
  • Main Page
  • Related Pages
  • Classes

Operators.h

Go to the documentation of this file.
00001 
00011 /* $log$ */
00012 
00013 
00014 #ifndef OPERATORS_H
00015 #define OPERATORS_H
00016 
00017 #include <Fuzzy/FuzzySet.h>
00018 #include <Fuzzy/SingletonFS.h>
00019 #include <Fuzzy/ComposedFS.h>
00020 #include <Fuzzy/Implication.h>
00021 #include <vector>
00022 #include <Fuzzy/NDimFS.h>
00023 
00030 class Operators {
00031 public:
00032 
00040     static RCPtr<ComposedFS>  max(const RCPtr<FuzzySet>& f1, const RCPtr<FuzzySet>& f2);
00041 
00042 
00043     // inline static RCPtr<SingletonFS> min(const RCPtr<FuzzySet>& ,const RCPtr<SingletonFS>&);
00044     // inline static RCPtr<SingletonFS>  min(const RCPtr<SingletonFS>&,const RCPtr<FuzzySet>& );
00045 
00053     static RCPtr<FuzzySet> min( const RCPtr<FuzzySet>& f1, const RCPtr<FuzzySet>& f2 );
00054     // sup min composition for (vector of ) singleton input:
00055     // instead of singletons one must pass directly their
00056     // double values i.e. Singleton.defuzzify()
00057 
00058 
00077     static RCPtr<ComposedNDimFS> supMinComp(const std::vector<double> & input, Implication* imp);
00078 
00079 // Connective Functions
00080 
00088     inline static double minimum( double a, double b ) {
00089         return(b < a ? b : a);
00090     };
00091 
00099     inline static double maximum( double a, double b ) {
00100         return(a < b ? b : a);
00101     };
00102 
00110     inline static double prod( double a, double b ) {
00111         return(a*b);
00112     };
00113 
00114 
00122     inline static double probor( double a, double b ) {
00123         return(a+b-a*b);
00124     };
00125     
00126 private:
00127     
00128     inline static  RCPtr<SingletonFS> minLFS(const RCPtr<FuzzySet>&  s,const RCPtr<FuzzySet>& fs);
00129 };
00130 
00131 #endif