The cosine transforms of scipy.fft.dct, unscaled, on one line of n points by a Fourier transform: type 1 the real transform of the even extension (2(n − 1) points); type 2 the real transform of the points reordered evens then odds reversed, each frequency turned by roots (e^{−iπk/2n}), as Makhoul's; type 3 its inverse, by the inverse real transform; type 4 of an even n the complex transform of n/2 points, the even ones and the odd ones reversed paired and turned by roots (e^{−iπ(4j+1)/4n}), each frequency by turns (e^{−iπk/n}); of an odd n the complex transform of n points, 8n-th roots split as eighth roots times n-th ones (u n + 8 v = 1, as n is odd): the point 2j + 1 (mod n) the j-th times χ₈(2j + 1) + i χ₋₈(2j + 1), each value ±√2 (signs) times the real part of one frequency (picks), v (2k + 1) or its opposite (mod n), by those characters of u (2k + 1).
More...
#include <fft.hpp>
|
| template<bool Fused> |
| void | apply (const R *u, R *y, R *even, std::complex< R > *spectrum, std::complex< R > *space) const |
| | y from u, even (the real transform's points) and spectrum its spaces, space the plan's; the path's products, Fused as its kernels' (fft_fuses), taken at each call, as a line is shared. Inlined into its caller, so that one built for FMA takes it whole (with_fma_instruction).
|
| |
|
| int | type {1} |
| | 1 to 4.
|
| |
| std::size_t | n {0} |
| | The points.
|
| |
| std::shared_ptr< const real_fft_plan< R > > | real |
| | Types 1 to 3.
|
| |
| std::shared_ptr< const fft_plan< R > > | complex |
| | Type 4.
|
| |
| std::vector< std::complex< R > > | roots |
| | See above.
|
| |
| std::vector< std::complex< R > > | turns |
| | Type 4 of an even n.
|
| |
| std::vector< std::size_t > | picks |
| | Type 4 of an odd n: the frequency each value is.
|
| |
| std::vector< R > | signs |
| | Its factor, ±√2.
|
| |
template<std::floating_point R>
struct numerical::detail::cosine_line< R >
The cosine transforms of scipy.fft.dct, unscaled, on one line of n points by a Fourier transform: type 1 the real transform of the even extension (2(n − 1) points); type 2 the real transform of the points reordered evens then odds reversed, each frequency turned by roots (e^{−iπk/2n}), as Makhoul's; type 3 its inverse, by the inverse real transform; type 4 of an even n the complex transform of n/2 points, the even ones and the odd ones reversed paired and turned by roots (e^{−iπ(4j+1)/4n}), each frequency by turns (e^{−iπk/n}); of an odd n the complex transform of n points, 8n-th roots split as eighth roots times n-th ones (u n + 8 v = 1, as n is odd): the point 2j + 1 (mod n) the j-th times χ₈(2j + 1) + i χ₋₈(2j + 1), each value ±√2 (signs) times the real part of one frequency (picks), v (2k + 1) or its opposite (mod n), by those characters of u (2k + 1).
Definition at line 3240 of file fft.hpp.
◆ apply()
template<std::floating_point R>
y from u, even (the real transform's points) and spectrum its spaces, space the plan's; the path's products, Fused as its kernels' (fft_fuses), taken at each call, as a line is shared. Inlined into its caller, so that one built for FMA takes it whole (with_fma_instruction).
Definition at line 3255 of file fft.hpp.
◆ complex
template<std::floating_point R>
template<std::floating_point R>
◆ picks
template<std::floating_point R>
Type 4 of an odd n: the frequency each value is.
Definition at line 3248 of file fft.hpp.
◆ real
template<std::floating_point R>
◆ roots
template<std::floating_point R>
◆ signs
template<std::floating_point R>
Its factor, ±√2.
Definition at line 3249 of file fft.hpp.
◆ turns
template<std::floating_point R>
Type 4 of an even n.
Definition at line 3247 of file fft.hpp.
◆ type
template<std::floating_point R>
The documentation for this struct was generated from the following file: