Virtual Testbed
Ship dynamics simulator for extreme conditions
|
Multidimensional convolution based on Fourier transform. More...
#include <convolution.hh>
Public Types | |
typedef Fourier_transform< T, N > | transform_type |
typedef transform_type::shape_type | shape_type |
typedef transform_type::array_type | array_type |
typedef blitz::RectDomain< N > | domain_type |
Public Member Functions | |
Convolution (const shape_type &signal_shape, const shape_type &kernel_shape) | |
void | shape (const shape_type &signal_shape, const shape_type &kernel_shape) |
void | padded_block_shape (const shape_type &block_size, const shape_type &padding) |
shape_type | padded_block_shape () const noexcept |
const shape_type & | block_shape () const noexcept |
const shape_type & | padding () const noexcept |
array_type | operator() (array_type signal, array_type kernel) |
array_type | convolve (array_type signal, array_type kernel) |
Multidimensional convolution based on Fourier transform.
Definition at line 21 of file convolution.hh.
auto vtb::core::Convolution< T, N >::convolve | ( | array_type | signal, |
array_type | kernel | ||
) |
Zero-pad kernel to be of length block_size + padding
.
Take forward FFT of padded kernel.
Decompose input signal into blocks of length block_size
.
Zero-pad each part to be of length block_size + padding
.
Take forward FFT of each padded part.
Multiply two FFTs.
Take backward FFT of the result.
Copy padded part back overlapping it with adjacent parts.
Definition at line 36 of file convolution.cc.