00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 #ifndef CLIPPER_FFFEAR
00047 #define CLIPPER_FFFEAR
00048
00049
00050 #include "function_object_bases.h"
00051
00052
00053 namespace clipper {
00054
00055
00057
00063 class FFFear_slow_basic {
00064 public:
00066 FFFear_slow_basic( const Xmap<float>& xmap ) : xmp( &xmap ) {}
00068 FFFear_slow_basic( Xmap<float>& result, const NXmap<float>& srchval, const NXmap<float>& srchwgt, const Xmap<float>& xmap ) : xmp( &xmap ) { (*this)( result, srchval, srchwgt ); }
00069 bool operator() ( Xmap<float>& result, const NXmap<float>& srchval, const NXmap<float>& srchwgt ) const;
00070 private:
00071 const Xmap<float>* xmp;
00072 };
00073
00075
00082 class FFFear_fft_basic {
00083 public:
00085 FFFear_fft_basic( const Xmap<float>& xmap ) { init( xmap ); }
00087 FFFear_fft_basic( Xmap<float>& result, const NXmap<float>& srchval, const NXmap<float>& srchwgt, const Xmap<float>& xmap ) { init( xmap ); (*this)( result, srchval, srchwgt ); }
00089 void init( const Xmap<float>& xmap );
00090 bool operator() ( Xmap<float>& result, const NXmap<float>& srchval, const NXmap<float>& srchwgt ) const;
00091 private:
00092 ftype vol;
00093 FFTmap_p1 rho1;
00094 FFTmap_p1 rho2;
00095 };
00096
00097
00099
00102 template<class T> class FFFear_slow : public FFFear_base<T> {
00103 public:
00105 FFFear_slow() {}
00107 FFFear_slow( const Xmap<T>& xmap ) { init( xmap ); }
00109 FFFear_slow( Xmap<T>& result, const NXmap<T>& srchval, const NXmap<T>& srchwgt, const Xmap<T>& xmap, const NX_operator& nxop ) { init( xmap ); (*this)( result, srchval, srchwgt, nxop ); }
00111 void init( const Xmap<T>& xmap ) { xmp = ⟼ }
00112 bool operator() ( Xmap<T>& result, const NXmap<T>& srchval, const NXmap<T>& srchwgt, const NX_operator& nxop ) const;
00113 bool operator() ( Xmap<T>& result, const NXmap<T>& srchval, const NXmap<T>& srchwgt ) const;
00114 private:
00115 const Xmap<T>* xmp;
00116 };
00117
00118
00120
00123 template<class T> class FFFear_fft : public FFFear_base<T> {
00124 public:
00125 enum FFTtype { Default, Normal, Sparse };
00126
00127 FFFear_fft() {}
00129 FFFear_fft( const Xmap<T>& xmap ) { init( xmap ); }
00131 FFFear_fft( Xmap<T>& result, const NXmap<T>& srchval, const NXmap<T>& srchwgt, const Xmap<T>& xmap, const NX_operator& nxop ) { init( xmap ); (*this)( result, srchval, srchwgt, nxop ); }
00133 void init( const Xmap<T>& xmap );
00134 void set_fft_type( FFTtype type );
00135 void set_resolution( Resolution reso );
00136 bool operator() ( Xmap<T>& result, const NXmap<T>& srchval, const NXmap<T>& srchwgt, const NX_operator& nxop ) const;
00137 bool operator() ( Xmap<T>& result, const NXmap<T>& srchval, const NXmap<T>& srchwgt, const RTop_orth& rtop ) const;
00138 bool operator() ( Xmap<T>& result, const NXmap<T>& srchval, const NXmap<T>& srchwgt ) const;
00139 private:
00140 Cell cell;
00141 FFTmap_p1 rho1, rho2;
00142 FFTtype ffttype;
00143 };
00144
00145
00146 }
00147
00148 #endif