#include <FourierTransform.h>
Public Types | |||
|
typedef std::vector< std::complex< double > >::size_type | size_type | ||
| An unsigned integral type large enough to represent the length of any transform. | |||
|
typedef std::vector< std::complex< double > >::iterator | iterator | ||
| The type of a non-const iterator of (complex) transform samples. | |||
|
typedef std::vector< std::complex< double > >::const_iterator | const_iterator | ||
| The type of a const iterator of (complex) transform samples. | |||
Public Member Functions | |||
| FourierTransform (size_type len) | |||
| |||
| FourierTransform (const FourierTransform &rhs) | |||
| Initialize a new FourierTransform that is a copy of another, having the same size and the same buffer contents. | |||
| ~FourierTransform (void) | |||
| Free the resources associated with this FourierTransform. | |||
| FourierTransform & | operator= (const FourierTransform &rhs) | ||
| Make this FourierTransform a copy of another, having the same size and buffer contents. | |||
| std::complex< double > & | operator[] (size_type index) | ||
| Access (read/write) a transform sample by index. | |||
| const std::complex< double > & | operator[] (size_type index) const | ||
| Access (read-only) a transform sample by index. | |||
| iterator | begin (void) | ||
| Return an iterator refering to the beginning of the sequence of complex samples in the transform buffer. | |||
| iterator | end (void) | ||
| complex samples in the transform buffer. | |||
| const_iterator | begin (void) const | ||
| Return a const iterator refering to the beginning of the sequence of complex samples in the transform buffer. | |||
| const_iterator | end (void) const | ||
| complex samples in the transform buffer. | |||
| void | transform (void) | ||
| Compute the Fourier transform of the samples stored in the transform buffer. | |||
| size_type | size (void) const | ||
| Return the length of the transform (in samples). | |||
Loris uses the FFTW library to perform efficient Fourier transforms of arbitrary length. Clients store and access the in-place transform data as a sequence of std::complex< double >. Samples are stored in the FourierTransform instance using subscript or iterator access, the transform is computed by the transform member, and the transformed samples replace the input samples, and are accessed by subscript or iterator. FourierTransform computes a complex transform, so it can be used to invert a transform of real samples as well. Uses the standard library complex class, which implements arithmetic operations. Does not use FFTW "wisdom" to speed up transform computation.
|
|
Initialize a new FourierTransform that is a copy of another, having the same size and the same buffer contents.
|
|
|
Return a const iterator refering to the beginning of the sequence of complex samples in the transform buffer.
|
|
|
Return an iterator refering to the beginning of the sequence of complex samples in the transform buffer.
|
|
|
complex samples in the transform buffer.
|
|
|
complex samples in the transform buffer.
|
|
|
Make this FourierTransform a copy of another, having the same size and buffer contents.
|
|
|
Access (read-only) a transform sample by index. Use this member to fill the transform buffer before computing the transform, and to access the samples after computing the transform. (inlined for speed)
|
|
|
Access (read/write) a transform sample by index. Use this member to fill the transform buffer before computing the transform, and to access the samples after computing the transform. (inlined for speed)
|
|
|
Return the length of the transform (in samples).
|
|
|
Compute the Fourier transform of the samples stored in the transform buffer. The samples stored in the transform buffer (accessed by index or by iterator) are replaced by the transformed samples, in-place. |
1.3.4