MultiplyDivide

Parent Previous Next

Full Library / Math Operator / Math and Trig / MultiplyDivide
Block Name: MultiplyDivide

Code File Location: VisualSim/actor/lib/MultiplyDivide

Block Overview

Currently, the type system is quite liberal about the resolved types it will permit at the inputs. In particular, it may permit the multiply and divide inputs to resolve to types that cannot in fact be multiplied or divided. In these cases, a run-time error will occur. In the future, we hope that the type system will intercept such errors before run time.

This actor does not require that each input channel have a token upon firing. It will multiply or divide available tokens at the inputs and ignore the channels that do not have tokens. It consumes at most one input token from each port. If no input tokens are available on the multiply inputs, then a numerator of one is assumed for the division operations. The "one" is obtained by calling the one() method of the first token seen at the divide input. If no input tokens are available at all, then no output is produced.

Field Detail

divide

public TypedIOPort divide


output

public TypedIOPort output


multiply

public TypedIOPort multiply


Created with the Personal Edition of HelpNDoc: Free Kindle producer