Reduction

A reduction function is a function that takes a sequence of values and calculates a single result value, the reduction.

reduction = Reduce(value[1], …, value[n])

Examples:

  • The sum of all values:

    reduction = value[1] + … + value[n]

  • The number of samples:

    reduction = n

  • The average of all values:

    reduction = (value[1] + … + value[n]) / n

A reduction behavior is a calculation operation, that internally uses a reduction function.

Example:

The rolling average operation applies the average at every sample position to the last length samples of the input to determine a new output sample.

output[i] = Average(input[i-length+1], …, input[i])

Here the reduction function "average" is used by the reduction behavior "rolling".

At the moment select combinations of behavior and function are made available as calculation operations.

The naming follows the pattern:

<Behavior>_<Function>

This means that for the rolling average the name is:

Accumulate_Rolling_Average

See also