Reduction Functions - ETAS MDA V8.6 User Manual

Table of Contents

Advertisement

ETAS
Arguments:
T result: the reduction over signal since the last reset
l
T input: the signal to be reduced
l
bool reset: reduction is restarted when true
l
Note: T can be any type supported by the given reduction function.
The Accumulate_Reset reduction behavior accumulates the input samples
with the given reduction function. The reduction is restarted when the reset
input is true. The result is a signal with all the intermediate results, i.e. result
[i] = reduce(signal[k], ..., signal[i]) where k is the index of the
last time reset was true or 1 if it never was true.
Example: Accumulate_Reset_Maximum
Signal
1
5
3
2
Accumulate_Samples
Calculates a rolling reduction over a given number of samples.
Syntax:
result = Accumulate_Samples_<reduction_function>
l
(input, count)
Arguments:
T result: the reduction over the last count samples
l
T input: the signal to reduce
l
const int count: the number of samples to reduce
l
Note: T can be any type supported by the given reduction function.
The Accumulate_Samples function calculates the reduction over the last count
samples before and including the current sample. At the beginning when there
are less than count samples, all available samples are reduced.
Note: Accumulate_RollingSample<R>(input, count) = Accu-
mulate_Rolling<R>(input, State_Delay(Master(), -Infin-
ity, count))
4.4.3.3

Reduction Functions

A reduction function is a function that takes a sequence of values and cal-
culates a single result value, the reduction.
reduction = Reduce(value[1], ..., value[n])
MDA V8.6 – User Guide
Reset
Result
false
1
false
5
false
5
true
2
4 Calculated Signals
77

Advertisement

Table of Contents
loading

Table of Contents