Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

SugenoOp.hpp

00001 #ifndef __SugenoOp__
00002 #define __SugenoOp__
00003 
00024 #include <stdio.h>
00025 
00026 
00027 #include "AFuzzyOp.hpp"
00028 
00029 class SugenoOp : public AFuzzyOp 
00030 {
00031 private:
00032 
00033 double  lambda;
00034 
00035 public:
00036 SugenoOp(double coeff=1.0){lambda= coeff;}
00037 virtual ~SugenoOp(){}
00038 
00039 
00040 virtual double not(double value){ return (1.0 - value)/(1.0 + lambda*value); }
00041 
00042 virtual double and(double v1, double v2)
00043         {
00044         double val= (lambda+1.0)*(a+b-1.0)-lambda*a*b;
00045 
00046         return (0.0 < val ? val : 0.0 );
00047         }
00048 
00049 virtual double or(double v1, double v2)
00050         {
00051         double val= a+b-lambda*a*b;
00052 
00053         return (1.0 < val ? 1.0 : val );
00054         }
00055 
00056 
00057 virtual void report(FILE* file){}
00058 };
00059 
00060 
00061 #endif
SourceForge.net Logo
Restoreinpaint sourceforge project `C++/Java Image Processing, Restoration, Inpainting Project'.

Bernard De Cuyper: Open Project Leader: Concept, design and development.
Bernard De Cuyper & Eddy Fraiha 2002, 2003. Bernard De Cuyper 2004. Open and free, for friendly usage only.
Modifications on Belgium ground of this piece of artistic work, by governement institutions or companies, must be notified to Bernard De Cuyper.
bern_bdc@hotmail.com