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

AbsLimiter.hpp

00001 #ifndef _AbsLimiter_H
00002 #define _AbsLimiter_H
00003 
00004 
00005 
00052 #include <math.h>
00053 #include "RComplex.hpp"
00054 
00055 class AbsLimiter
00056 {
00057 protected:
00058 
00059 int sign(double a){ if(a==0.0) return 0.0; return (a >= 0.0 ? 1 : -1); }
00060 int minsign(double a, double b){return (fabs(a) <= fabs(b) ? sign(a) : sign(b));}
00061 
00062 public:
00063 virtual ~AbsLimiter(){}
00064 
00065 virtual double average(double a, double b)=0;
00066 virtual RComplex average(const RComplex& a, const RComplex& b)
00067         { return RComplex( average(a.a,b.a), average(a.b, b.b) ); }
00068 };
00069 
00070 #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