00001 #ifndef _G2Contrast_H 00002 #define _G2Contrast_H 00003 00004 00005 00026 #include <math.h> 00027 #include "AContrastFunction.hpp" 00028 00029 class G2Contrast : public AContrastFunction 00030 { 00031 private: 00032 00033 double a; 00034 00035 public: 00036 G2Contrast(double ax=1.0){a=ax;} 00037 virtual ~G2Contrast(){} 00038 00039 virtual double G(double u){double val=-a*u*u; return (-1.0*exp(val))/a;} 00040 virtual double g(double u){double val=-a*u*u; return u*exp(val);} 00041 virtual double gdiff(double u){double val=-a*u*u; return a*u*u*exp(val); } 00042 }; 00043 00044 #endif