Re: Fwd: Re: Window / History in Data Flow Variables
On Fri, 2014-04-11 at 12:34 +0530, Suminda Dharmasena wrote:
> > Is it possible to add a way to access historic values in a data flow
> > variable.
> > E.g. b = a + a[-1]
> > b is the sum of current and previous a.
> > This will be useful in signal processing and technical analysis.
I am not convinced that this is feasible or desirable. A dataflow
variable is a single assignment entity which should be immutable once
set. A dataflow queue allows for a sequence of values, but it should be
the responsibility of the consuming operator to keep a history should it
need it. The alternative is for the operator to have a feedback queue
onto which it writes results consumed so that they can be reconsumed as
input on another queue (the a[-1] above would be am, or some such.