Class DotProduct

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

    public class DotProduct
    extends TypedAtomicActor

    Compute the dot product of two arrays or matrices. This actor has two input ports, from which it receives two ArrayTokens or two Matrix Tokens. The elements of the ArrayTokens or MatrixTokens must be of type ScalarToken. The output is the dot product of the two arrays or matrices.

    This actor requires that each input port have a token upon firing. On each firing, it produces exactly one token, which is of type ScalarToken.

    Since:
    Ptolemy II 1.0
    Version:
    $Id$
    Author:
    Jeff Tsay, Paul Whitaker, Adam Cataldo
    Pt.AcceptedRating:
    Red (acataldo)
    Pt.ProposedRating:
    Yellow (pwhitake)
    • Field Detail

      • input1

        public TypedIOPort input1
        The first input port. This has type ArrayToken. The elements of the ArrayToken must be of type ScalarToken.
      • input2

        public TypedIOPort input2
        The second input port. This has type ArrayToken. The elements of the ArrayToken must be of type ScalarToken.
      • output

        public TypedIOPort output
        The output port, which has type ScalarToken.