Package ptolemy.actor.lib
Polymorphic actor classes.
- Since:
- Ptolemy II 0.2
-
Interface Summary Interface Description ExceptionSubscriber An ExceptionSubscriber is an entity that is informed of exceptions and the handling policy for exceptions caught byCatchExceptionAttribute
.SequenceActor This is a marker interface for actors that operate on sequences. -
Class Summary Class Description AbsoluteValue Produce an output token on each firing with a value that is equal to the absolute value of the input.Accumulator Output the initial value plus the sum of all the inputs since the last time a true token was received at the reset port.AddSubtract A polymorphic adder/subtractor.ArrayAccumulate An actor that accumulates input arrays into a growing array that includes the contents of all input arrays.ArrayAppend An actor that appends ArrayTokens together.ArrayAverage Compute the average of the elements in an array.ArrayContains Determine whether an element is contained in an array.ArrayElement Extract an element from an array.ArrayElementAsMatrix Extract an element from an array by accessing the array as a matrix.ArrayExtract Extract a subarray from an array.ArrayLength Output the length of an array.ArrayLevelCrossing Search an array from the specified starting index and report the index of the first item in the array that is below or above the specified threshold.ArrayMaximum Extract the maximum element from an array.ArrayMinimum Extract the minimum element from an array.ArrayPeakSearch This actor outputs the indices and values of peaks in an input array.ArrayRemoveElement Remove occurrences of a specified element from an array.ArraySort Sort the elements of an input array.ArraySum Compute the sum of the elements in an array.ArrayToElements An actor that disassembles an ArrayToken to a multiport output.ArrayToMatrix Convert an array to a row or column vector encoded as a matrix token.ArrayUpdate Replace an element in an array with a new value.Assert Check that an assertion predicate is satisfied, and throw an exception if not.Assert.AssertPort Class for ports created by the user for this actor.Average Output the average of the inputs after the last time a true token is received at the reset port.Bernoulli Produce a random sequence of booleans.BooleanMultiplexor A multiplexor with a boolean-valued select control signal.BooleanSelect Conditionally merge the streams at two input ports depending on the value of the boolean control input.BooleanSwitch Split an input stream onto two output ports depending on a boolean control input.BusAssembler Aggregate all input relation channels into one output "bus" relation.BusDisassembler Split the input bus relation into individual (possibly bus) output port relations.CatchExceptionAttribute This attribute catches exceptions and attempts to handle them with the specified policy.ClassWrapper This actor wraps (an instance of) a Java class specified by the className parameter.Clock Deprecated. Use DiscreteClock.Commutator A polymorphic commutator, which merges a set of input sequences into a single output sequence.ComputeHistogram Compute a histogram.ConfigurationSelect Conditionally merge the streams at two input ports depending on the value of the boolean parameter.ConfigurationSwitch Split an input stream onto two output ports depending on a boolean selector parameter.Const Produce a constant output.Counter This actor implements an up-down counter of received tokens.CurrentDate Produce an output token on each firing with a value that is the current date.CurrentMicrostep Produce an output token on each firing with a value that is the current microstep, also called the current index, of superdense time.CurrentTime Produce an output token on each firing with a value that is the current time.DateConstructor Construct date token by parsing all date elements (year, day, month, ...).DateElements Output elements of date (year, month, day, hour, etc.) from date.DB Produce a token that is the value of the input in decibels.Default A Synchronous default operator.DelayStart This actor, which has no ports, delays the execution of the model until a specified time by sleeping the thread that calls the initialize() method until the specified time.Dictionary A store for key-value pairs.Differential Output the current input minus the previous input, or if there has been no previous input, the current input itself.Discard A simple sink actor that consumes and discards input tokens.DiscreteClock This actor produces a periodic signal, a sequence of events at regularly spaced intervals.DiscreteRandomSource An actor that produces tokens with a given probability mass function.Distributor A polymorphic distributor, which splits an input stream into a set of output streams.DoubleReader Deprecated. Use ExpressionReader instead.ElementsToArray On each firing, this actor reads exactly one token from each channel of the input port and assembles the tokens into an ArrayToken.ExceptionManager The ExceptionManager catches exceptions and attempts to handle them with the specified policy.ExceptionManagerModel A composite entity that is the model contained by an ExceptionManager.Exec Execute a command as a separately running subprocess.ExecutionTime Read the input token, if there is one, execute an (uninteresting) computation to consume a specified amount of real time or to execute it a fixed number of times, and produce on the output the actual execution time (in milliseconds).Exit A simple sink actor that consumes and discards input tokens and then calls System.exit() in wrapup.Expression On each firing, evaluate an expression that may include references to the inputs, current time, and a count of the firing.FileWriter This actor reads tokens from any number of input channels and writes their string values to the specified output file.Gaussian Produce a random sequence with a Gaussian distribution.GetCausalityInterface Actor that reads the causality interface of its container or an actor inside the container and produces a string describing it.GradientAdaptiveLattice An adaptive FIR filter with a lattice structure.IIR This actor is an implementation of an infinite impulse response IIR filter.Interpolator Produce an interpolation based on the parameters.Lattice An FIR filter with a lattice structure.LevinsonDurbin This actor uses the Levinson-Durbin algorithm to compute the linear predictor coefficients of a random process, given its autocorrelation function as an input.LimitedFiringSource Base class for source actors that will only fire a limited number of times.Limiter Produce an output token on each firing with a value that is equal to the input if the input lies between the bottom and top parameters.LinearDifferenceEquationSystem Linear Difference Equation System.LookupTable Output to the output port the value in the array of tokens specified by the table parameter at the index specified by the input port.MathFunction Deprecated. This breaks the class mechanism.MatrixToArray Convert a matrix to an array.Maximum Read at most one token from each input channel and broadcast the one with the greatest value to the maximumValue output.MaxIndex Deprecated. Use Maximum instead.MicrostepDelay This actor delays the input by one microstep.Minimum Read at most one token from each input channel and broadcast the one with the least value to the minimumValue output.ModifyDate Modify date by adding or subtracting a value to one of the date fields.MovingAverage This actor outputs the moving average of the input sequence.MovingMaximum Deprecated. Use RunningMaximum.Multiplexor This actor selects from the channels on the input port, copying the input from one channel to the output, based on the most recently received value on the select input.MultiplyDivide A polymorphic multiplier and/or divider.NonStrictTest This actor compares the inputs against the value specified by the correctValues parameter.OrderedMerge This actor merges two monotonically nondecreasing streams of tokens into one monotonically nondecreasing stream.OrderedRecordAssembler On each firing, read one token from each input port and assemble them into a RecordToken.Pause An actor that pauses execution of a model when it receives a true token on any input channel.PhaseUnwrap This actor unwraps a phase plot, removing discontinuities of magnitude 2*PI.PoissonClock This actor produces discrete events according to a Poisson process.Publisher This actor publishes input tokens on a named channel.PublisherNonStrictTest This actor publishes input tokens on a named channel and compares the inputs against the value specified by the correctValues parameter.PublisherTest This actor publishes input tokens on a named channel and compares the inputs against the value specified by the correctValues parameter.Pulse Produce a pulse with a shape specified by the parameters.Quantizer Produce an output token on each firing with a value that is a quantized version of the input.Ramp Produce an output token on each firing with a value that is incremented by the specified step each iteration.RandomInteger Generated integers that are uniformly sampled from the range of 32-bit integers.RandomSource A base class for sources of random numbers.Reader Deprecated. Use ExpressionReader instead.RecordAssembler On each firing, read one token from each connected input port and assemble them into a RecordToken.RecordDisassembler On each firing, read one RecordToken from the input port and send out the fields of the RecordToken to multiple output ports.Recorder Record all input tokens for later querying.RecordUpdater On each firing, read one token from each input port and assemble them into a RecordToken that contains the union of the original input record and each of the update ports.RecursiveLattice A recursive (all-pole) filter with a lattice structure.Remainder Compute the remainder after dividing the input by the divisor.RemoveNilTokens Read in tokens and silently discard any tokens that are marked as nil.ResettableTimer Produce an output after the time specified on the input has elapsed.Rician Produce a random sequence with a Rician distribution.RunningMaximum Output the maximum value seen since the start of execution of the model.RunningMinimum Output the minimum value seen since the start of execution of the model.Sampler This actor generates discrete events by sampling the input signal whenever the trigger input is present.Scale Produce an output token on each firing with a value that is equal to a scaled version of the input.Select A polymorphic select, which routes specified input channels to the output.Sequence This actor produces a sequence of values, optionally periodically repeating them.Sequencer This actor takes a sequence of inputs tagged with a sequence number and produces them on the output port in the order given by the sequence number.SequenceSource Base class for sequence sources.SequentialClock Deprecated. Use Clock instead.SetVariable Set the value of a variable.SingleEvent This actor produces an event with the specified value at the specified time.SingleTokenCommutator The SingleTokenCommutator has a multiport input port and an output port.Sink Base class for simple data sinks.Sleep On each firing, read at most one token from each input channel, sleep by the specified amount of real time, and then produce the same input tokens on the respective output channels.Source Base for simple data sources.Stop An actor that stops execution of a model when it receives a true token on any input channel.StringConst Produce a constant output of type string.SubMatrix This actor extract a submatrix from an input matrix.Subscriber This actor subscribes to tokens on a named channel.SubscriptionAggregator Aggregate data produced by multiple publishers.Switch A polymorphic switch, which routes inputs to specified output channels.Synchronizer This actor implements a token synchronizer.SynchronizeToRealTime Attribute that regulates the passage of time to wait for real time to catch up.Test This actor compares the inputs against the value specified by the correctValues parameter.TestExceptionAttribute This actor tests for exceptions that are expected to occur when running a test model.TestExceptionHandler Deprecated. UseTestExceptionAttribute
instead.ThrowException An actor that throws an IllegalActionException when it receives a true token on any input channel.ThrowModelError An actor that throws a model error when it receives a true token on any input channel.TimeDelay This actor delays the input by a specified amount of time given by the delay port or parameter, which defaults to 1.0.TimeDelay.PendingEvent Data structure to store pending events.TimedSource Base class for time-based sources.TopLevelCurrentTime Deprecated. Use CurrentTime with useLocalTime unchecked.Transformer This is an abstract base class for actors that transform an input stream into an output stream.Triangular Produce a random sequence with a triangular distribution.TrigFunction Produce an output token on each firing with a value that is equal to the specified trigonometric function of the input.TriggeredClock Deprecated. Use DiscreteClock.TypeTest An actor that can be used for regression test of the type resolution system.UnaryMathFunction Produce an output token on each firing with a value that is equal to the specified math function of the input.Uniform Produce a random sequence with a uniform distribution.UnionDisassembler On each firing, read one UnionToken from the input port and send out the value to the output port that matches the label name of the input token.UnionMerge On each firing, read all tokens from every input port and wrap each token into a UnionToken of which the label matches the name of the originating input port.URLDirectoryReader Deprecated. Use DirectoryListing instead.URLReader This actor reads tokens from an URL, and output them.VariableClock Deprecated. Use Clock instead.VariableSleep An actor that calls Thread.sleep() on the current thread the first time fire() is called.VectorAssembler On each firing, read exactly one token from each channel of the input port and assemble the tokens into a DoubleMatrixToken with one column.VectorDisassembler An actor that disassembles a DoubleMatrixToken to a multiport output.WallClockTime Upon firing, this actor outputs the elapsed real time in seconds since the start time of the model, as reported by the director.Writer Deprecated. FileWriter actor replaces this.