Class ComplexAddSubtract

  • All Implemented Interfaces:
    java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class ComplexAddSubtract
    extends AddSubtract
    A complex number adder/subtractor. This adder has two input ports, both of which are multiports, and one output port, which is not. The types on the ports are complex. Data that arrives on the input port named plus will be added, and data that arrives on the input port named minus will be subtracted. Any token type supporting addition and subtraction can be used. In most domains, either input port can be left unconnected. Thus, to get a simple adder (with no subtractor), just leave the minus input unconnected.

    This actor does not require that each input channel have a token upon firing. It will add or subtract 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 at all, then no output is produced.

    Since:
    Ptolemy II 6.1
    Version:
    $Id$
    Author:
    Adam Cataldo
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)