
DDFOrderedMerge |
ptolemy.domains.ddf.lib.DDFOrderedMerge |
This actor merges two monotonically nondecreasing streams of tokens
into one monotonically nondecreasing stream. On each firing, it reads
data from one of the inputs. On the first firing, it simply records
that token. On the second firing, it reads data from the other input
and outputs the smaller of the recorded token and the one it just read.
If they are equal, then it outputs the recorded token. It then records
the larger token. On each subsequent firing, it reads a token from the
input port that did not provide the recorded token, and produces at the
output the smaller of the recorded token and the one just read.
<p>
If both input sequences are nondecreasing, then the output sequence
will be nondecreasing.
Note that if the inputs are not nondecreasing, then the output is
rather complex. The key is that in each firing, it produces the smaller
of the recorded token and the token it is currently reading.
This derived class only updates rate parameters to indicate the next input
port.
Author(s): Gang Zhou
Version:$Id: DDFOrderedMerge.doc.html,v 1.1 2006/02/22 18:40:26 mangal Exp $
Pt.Proposed Rating:Yellow (zgang)
Pt.Accepted Rating:Yellow (cxh)
inputA_tokenConsumptionRate
The rate parameter for the input port A.The type is int.
inputB_tokenConsumptionRate
The rate parameter for the input port B. The type is int.