Class ApplyFunctionOverSequence

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

    @Deprecated
    public class ApplyFunctionOverSequence
    extends TypedAtomicActor
    Deprecated.
    Use SequenceToArray followed by ApplyFunction.
    Apply a function over one or more input sequences. This actor will collect tokens from each input port into arrays and, when enough input tokens have arrived, pass those arrays to the function specified either at the function parameter or the port.

    To use this actor, create any number of input ports, add a parameter named tokenConsumptionRate to each input port, and set the value of this parameter to the number of tokens that you would like to be collected into an array for each function application. Also, create and set a parameter named tokenProductionRate in the output port. (If tokenConsumptionRate or tokenProductionRate are not defined, then they will be assumed to have value one). Then define a function that takes as many array-valued arguments as there are input ports and returns an array-valued result. For example, the following function will compute the FFT of the input array using the FFT() function in the expression language:

     function(x:{double}) abs(FFT(x, 8))
     
    Note that if the tokenConsumptionRate of a port is changed during the execution of the model, the change is ignored until the next execution of the model.
    Since:
    Ptolemy II 4.1
    Version:
    $Id$
    Author:
    Steve Neuendorffer (Contributor: Edward A. Lee)
    See Also:
    ApplyFunction
    Pt.AcceptedRating:
    Yellow (neuendor)
    Pt.ProposedRating:
    Green (neuendor)