Full Library / Math Operator / Math and Trig / Average
Block Name: Average
Code File Location: VisualSim/actor/lib/Average
Block Overview
- Output
the average of the inputs after the last time a true token is received
at the reset port. One output is produced each time the actor is fired.
The inputs and outputs can be any token type that supports addition and
division by an integer. The output type is constrained to be the same
as the input type.
Note that the type system will
fail to catch some errors. Static type checking may result in a
resolved type that does not support addition and division. In this
case, a run-time error will occur.
input
- Any token type that supports addition and dividion by integer.
reset
public TypedIOPort reset
- The reset port of type BooleanToken. If this input port receives a True token, then the averaging process will be reset.
ouptut
- Gives the output as the same data type as the input.
Created with the Personal Edition of HelpNDoc: Free EPub producer