Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

vnl_fft_prime_factors.h

Go to the documentation of this file.
00001 #ifndef vnl_fft_prime_factors_h_
00002 #define vnl_fft_prime_factors_h_
00003 
00004 //:
00005 // \file 
00006 // \author Veit U.B. Schenk, Oxford RRG, 19 Mar 98
00007 // Modifications
00008 // \verbatim
00009 // 10/4/2001 Ian Scott (Manchester) Coverted perceps header to doxygen
00010 // \endverbatim
00011 
00012 
00013 #include <vnl/algo/vnl_fft.h>
00014 
00015 //: Holds prime factor information .
00016 // Helper class  used by the vnl_fft_xd<> FFT routines
00017 //
00018 // Given an integer N of the form
00019 //   N = (2**P)(3**Q)(5**R)
00020 // split N into its primefactors (2, 3, 5)
00021 export template <class T>
00022 struct vnl_fft_prime_factors
00023 {
00024   vnl_fft_prime_factors();
00025 
00026   //: constructor takes the size of the signal.
00027   vnl_fft_prime_factors(int N) { construct(N); }
00028 
00029   ~vnl_fft_prime_factors () { destruct(); }
00030 
00031   //: array of twiddle factors.
00032   T const *trigs () const { return trigs_; }
00033 
00034   //: number which was factorized
00035   int number () const { return number_; }
00036 
00037   //: exponents P, Q, R.
00038   int const *pqr () const { return pqr_; }
00039 
00040   operator bool () const { return trigs_ && info_ >= 0; }
00041 
00042   void resize(int N) {
00043     destruct();
00044     construct(N);
00045   }
00046 
00047 private:
00048   T *trigs_;
00049   int number_;   // the number that is being split into prime-facs
00050   int pqr_[3];   // store P, Q and R
00051   int info_;
00052 
00053   void construct(int N);
00054   void destruct();
00055 
00056   // disallow copying
00057   vnl_fft_prime_factors (vnl_fft_prime_factors<T> const &) { }
00058   void operator= (vnl_fft_prime_factors<T> const &) { }
00059 };
00060 
00061 #endif // vnl_fft_prime_factors_h_

Generated at Wed Mar 12 01:13:15 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000