/// Slides a window of user-defined shape, with user-defined strides, over the tensor and produces for each window position the result obtained by
/// reducing the tensors in the window to a scalar, using the user-supplied reduction function.
///
/// Given an input of shape \f$(d_1,\dots,d_n)\f$, a window shape of \f$(w_1,\dots,w_n)\f$ and window movement strides of \f$(s_1,\dots,s_n)\f$, the shape
/// of the output is \f$(d'_1,\dots,d'_n)\f$ where \f$d'_i = \lceil \frac {d_i - w_i + 1}{s_i} \rceil\f$.
/// | `reduction_function` | The scalar function used to reduce the input tensor. Must take two arguments of type \f$E[]\f$ and return type \f$E[]\f$. |
/// | `window_shape` | The shape \f$(w_1,\dots,w_n)\f$ of the reduction window. |
/// | `window_movement_strides` | Movement strides \f$(s_1,\dots,s_n)\f$ to apply to the sliding window. |
/// | `arg_reductee` | \f$E[d_1,\dots,d_n]~(n \geq 0)\f$ | An input tensor of any shape, with the element type matching that expected by the reduction function. |
/// | `arg_init` | \f$E[]\f$ | A scalar to be used as an initial value for reduction computations. |
/// | \f$E[d'_1,\dots,d'_n]\f$ | The tensor \f$T\f$, where \f$T[i_1,\dots,i_n] = \mathit{reduce}(\mathit{reduction\_function},\mathit{arg\_init},V)\f$ where \f$V\f$ is the set of values in the input tensor within the window defined by the lower bound \f$(s_1i_1,\dots,s_ni_n)\f$ and the noninclusive upper bound \f$(s_1i_1 + w_1,\dots,s_ni_n + w_n)\f$. |
classReduceWindow:publicRequiresTensorViewArgs
{
public:
/// \brief Constructs a reduce-window operation.
///
/// \param arg_reductee The tensor view to be reduced.
/// \param arg_init The initial value for reduction.
/// \param reduction_function The reduction function to use.
/// \param window_shape The window shape.
/// \param window_movement_strides The window movement strides.
/// | \f$E[d_1,\dots,d_n]\f$ | The tensor \f$T\f$, where \f$T[i_1,\dots,i_n] = \texttt{arg}[j_1,\dots,j_n]\f$ and \f$j_k = d_k - i_k - 1\f$ if axis \f$k\f$ is in the reverse set; else \f$j_k = i_k\f$. |
classReverse:publicRequiresTensorViewArgs
{
public:
/// \brief Constructs a reverse operation.
///
/// \param arg The input tensor view, some of whose axes are to be reversed.
/// | `selection_function` | The scalar function used to select between two values. Must take two arguments of type \f$E[]\f$ and return type \f$\mathit{Bool}[]\f$. |
/// | `scatter_function` | The scalar function used to apply a scattered value. Must take two arguments of type \f$E[]\f$ and return type \f$E[]\f$. |
/// | `window_shape` | The shape \f$(w_1,\dots,w_n)\f$ of the selection window. |
/// | `window_movement_strides` | Movement strides \f$(s_1,\dots,s_n)\f$ to apply to the sliding window. |
/// | `arg_selectee` | \f$E[d_1,\dots,d_n]~(n \geq 0)\f$ | An input tensor of any shape, with the element type matching that expected by the selection function. |
/// | `arg_source` | \f$E[d'_1,\dots,d'_n]~(n \geq 0)\f$ | The input tensor from which to scatter values. |
/// | `arg_init` | \f$E[]\f$ | A scalar to be used as an initial value in each output cell. |