hanning

hanning#

Generate a Hanning window

template<int Dim, typename ShapeType, typename T = float, std::enable_if_t<!std::is_array_v<typename remove_cvref<ShapeType>::type>, bool> = true>
inline auto matx::hanning(ShapeType &&s)#

Creates a Hanning window operator of shape s with the window applies along the x, y, z, or w dimension

Returns values for a Hanning window across the selected dimension.

Template Parameters:
  • T – Data type

  • Dim – Dimension to create window over

  • RANK – The RANK of the shape

Parameters:

s – The shape of the tensor

template<int Dim, int RANK, typename T = float>
inline auto matx::hanning(const index_t (&s)[RANK])#

Creates a Hanning window operator of shape s with the window applies along the x, y, z, or w dimension

Returns values for a Hanning window across the selected dimension.

Template Parameters:
  • T – Data type

  • Dim – Dimension to create window over

  • RANK – The RANK of the shape

Parameters:

s – The C-array shape of the tensor

Examples#

// Assign a Hanning window of size `win_size` to `ov`
(ov = hanning<0>({win_size})).run(exec);