complex_to_complex Class Template Reference

Complex-to-complex Fast Fourier Transformation. More...

#include <complex_to_complex.h>

Inheritance diagram for complex_to_complex:

factorization

List of all members.

Public Member Functions

 complex_to_complex ()
 Default constructor.
 complex_to_complex (std::size_t n)
 Initialization for transforms of length n.
af::shared< real_type > wa () const
 Access to the pre-computed "twiddle factors.".
template<typename ComplexOrRealIterOrPtrType>
void forward (ComplexOrRealIterOrPtrType seq_begin, real_type *scratch=0)
 In-place "forward" Fourier transformation of a sequence of length n().
template<typename ComplexOrRealIterOrPtrType>
void backward (ComplexOrRealIterOrPtrType seq_begin, real_type *scratch=0)
 In-place "backward" Fourier transformation of a sequence of length n().
template<typename Tag>
void transform (select_sign< Tag > tag, complex_type *seq_begin, real_type *scratch=0)
 Generic in-place Fourier transformation of a contiguous sequence.
template<typename Tag>
void transform (select_sign< Tag > tag, real_type *c, real_type *ch=0)
 Generic in-place Fourier transformation of a contiguous sequence.


Detailed Description

template<typename RealType, typename ComplexType = std::complex<RealType>>
class scitbx::fftpack::complex_to_complex< RealType, ComplexType >

Complex-to-complex Fast Fourier Transformation.

Constructor & Destructor Documentation

complex_to_complex ( std::size_t  n  )  [inline]

Initialization for transforms of length n.

This constructor determines the factorization of n, pre-computes some constants, determines the "twiddle factors" needed in the transformation (n complex values), and allocates scratch space (n complex values).


Member Function Documentation

void forward ( ComplexOrRealIterOrPtrType  seq_begin,
real_type *  scratch = 0 
) [inline]

In-place "forward" Fourier transformation of a sequence of length n().

Equivalent to, but much faster than the following Python code:

          for i in range(n):
            Sum = 0
            for k in range(n):
              Sum += Seq_in[k] * exp(-2*pi*1j*i*k/n)
            Seq_out.append(Sum)
          
Note that 1j is the imaginary number (sqrt(-1)) in Python.

void backward ( ComplexOrRealIterOrPtrType  seq_begin,
real_type *  scratch = 0 
) [inline]

In-place "backward" Fourier transformation of a sequence of length n().

Equivalent to, but much faster than the following Python code:

          for i in range(n):
            Sum = 0
            for k in range(n):
              Sum += Seq_in[k] * exp(+2*pi*1j*i*k/n)
            Seq_out.append(Sum)
          
Note that 1j is the imaginary number (sqrt(-1)) in Python.


The documentation for this class was generated from the following file:

Generated on Tue Sep 1 17:12:36 2009 for cctbx by  doxygen 1.5.6