00001 #ifndef vnl_fftxd_prime_factors_h_ 00002 #define vnl_fftxd_prime_factors_h_ 00003 00004 //: 00005 // \file 00006 // \brief Helper class used by FFTxD 00007 // \author ? 00008 // 00009 // Modifications 00010 // dac (Manchester) 28/03/2001: tidied up documentation 00011 // 00012 00013 template<class T> 00014 00015 //: Helper class used by FFTxD: 00016 // given an integer n of the form 00017 // N = (2**P)(3**Q)(5**R) 00018 // split n into its primefactors (2,3,5) 00019 // 00020 // possible improvements: elements 'number' and 'iPvnl_qr' should 00021 // really be of type 'unsigned int', but since the f2c'd 00022 // fortran code does not know about these things.... 00023 00024 class vnl_fftxd_prime_factors { 00025 public: 00026 vnl_fftxd_prime_factors (int); 00027 ~vnl_fftxd_prime_factors (); 00028 00029 const T *getFactors () const; // array of factors 00030 int getNumber () const; // number which was factorized 00031 const int *getPvnl_qr () const; // number of factors 00032 00033 operator bool () const { return info >= 0; } 00034 00035 private: 00036 T *factors; 00037 int number; // the number that is being split into prime-facs 00038 int iPvnl_qr[3]; // store PQ and R (number = (2^P)+(3^Q)+(5^R) 00039 int info; 00040 00041 // disallow 00042 vnl_fftxd_prime_factors (const vnl_fftxd_prime_factors<T> &); 00043 vnl_fftxd_prime_factors<T>& operator= (const vnl_fftxd_prime_factors<T>&); 00044 }; 00045 00046 #endif // vnl_fftxd_prime_factors_h_