next up previous contents
Next: High-level Reduction Operations Up: Reduction Operations Previous: Reduction Operations   Contents

Basic Reduction Operations

The following reduction operations are imlemented. $a_i$ are the values that are reduced, $i \in [1 \ldots n]$.
count:
The number of values

\begin{displaymath}\mathrm{count} := n \end{displaymath}

sum:
The sum of the values

\begin{displaymath}\mathrm{sum} := \sum_i a_i \end{displaymath}

product:
The product of the values

\begin{displaymath}\mathrm{product} := \prod_i a_i \end{displaymath}

sum2:
The sum of the squares of the values

\begin{displaymath}\mathrm{sum2} := \sum_i a_i^2 \end{displaymath}

sumabs:
The sum of the absolute values

\begin{displaymath}\mathrm{sum2} := \sum_i \vert a_i\vert \end{displaymath}

sumabs2:
The sum of the squares of the absolute values

\begin{displaymath}\mathrm{sumabs2} := \sum_i \vert a_i\vert^2 \end{displaymath}

min:
The minimum of the values

\begin{displaymath}\mathrm{min} := \min_i a_i \end{displaymath}

max:
The maximum of the values

\begin{displaymath}\mathrm{max} := \max_i a_i \end{displaymath}

maxabs:
The maximum of the absolute values

\begin{displaymath}\mathrm{maxabs} := \max_i \vert a_i\vert \end{displaymath}

Note that the above definitions are for both real and complex values. For $n=0$, the result of the reduction operation is $0$, except for $\mathrm{product}$, which is $1$, $\mathrm{min}$, which is $+\infty$, and $\mathrm{max}$, which is $-\infty$. We define the minimum of complex values by

\begin{displaymath}
\min \left( a+ib, x+iy \right) := \min \left( a,x \right) + i \min
\left (b,y \right)
\end{displaymath}

and define the maximum equivalently.


next up previous contents
Next: High-level Reduction Operations Up: Reduction Operations Previous: Reduction Operations   Contents