next up previous contents
Next: running product Up: Tensor operations Previous: supindex   Contents

running sum $\sum +$% WIDTH=63 HEIGHT=33

\includegraphics[height=10mm]{images/runningSum}% WIDTH=48 HEIGHT=45

Computes the running sum of the input tensor along a given axis.

The optional numerical argument (in the ``edit'' dialog) can be used to specify a window over which the running sum is performed. If negative, the window is over the entire dimension.

The operator can be placed on the canvas in two ways:

For example, take this rank 2 tensor:

\begin{displaymath}
\left(\begin{array}{cccc}
1 & 2 & 3 & 4\\
5 & 4 & 3 & 2\\
8 & 7 & 6 & 5
\end{array}\right)
\end{displaymath}% WIDTH=239 HEIGHT=121

The running sum of this tensor, along the horizontal dimension, is:

\begin{displaymath}
\left(\begin{array}{cccc}
1 & 3 & 6 & 10\\
5 & 9 & 12 & 14\\
8 & 15 & 21 & 26
\end{array}\right)
\end{displaymath}% WIDTH=289 HEIGHT=121

Running sum will normally be applied to a Ravel or a variable defined via a Ravel.