23 #ifndef INCLUDED_FFT_FFT_SHIFT_H 24 #define INCLUDED_FFT_FFT_SHIFT_H 41 : d_fftlen(fft_length),
42 d_lenpos(fft_length / 2 + (fft_length % 2)),
43 d_lenneg(fft_length / 2),
50 void shift(std::vector<T>&
v) {
shift(&v.front(), v.size()); }
54 void shift(T* data,
size_t fft_len)
57 std::copy_n(data, d_lenpos, d_buf.begin());
58 std::copy_n(data + d_lenpos, d_lenneg, data);
59 std::copy_n(d_buf.begin(), d_lenpos, data + d_lenneg);
66 if (d_fftlen == fft_length)
68 d_fftlen = fft_length;
69 d_lenpos = d_fftlen / 2 + (d_fftlen % 2);
70 d_lenneg = d_fftlen / 2;
71 assert(d_lenpos + d_lenneg == d_fftlen);
72 d_buf.resize(d_lenpos);
85 #endif // INCLUDED_FFT_FFT_SHIFT_H void resize(size_t fft_length)
Definition: fft_shift.h:64
fft_shift(size_t fft_length)
Definition: fft_shift.h:40
Definition: cc_common.h:45
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:43
void shift(std::vector< T > &v)
Definition: fft_shift.h:50
reorder FFT results which are ordered from 0 to 1 in normalized frequency to -0.5 to 0...
Definition: fft_shift.h:37
void shift(T *data, size_t fft_len)
Definition: fft_shift.h:54