sliding window

26 views
Skip to first unread message

Daniel Stingl

unread,
Nov 11, 2013, 4:08:35 AM11/11/13
to eta...@googlegroups.com
Hello,
I am referring to the sliding window example on http://ewl.cewit.stonybrook.edu/pfodor/misc/etalis_manual/node8.html (5). I saw the post where u said that getDuration was not yet implemented, but i still try to understand that example to find a work around. So, here is how i understand it:
The goal is to get a function that will aggregate the ACME Events of the last 10 days and discard any events that are further in the past. So, I guess ,there is a initial value for hasCount and hasSum = 0. When there is a ACME Event, a new hasCount/hasSum pair 
is created, hasSum has the value of the ACME Event and hasCount has 1.
Now, a second ACME Event appears. Cause of the EQALSOPTIONAL section, it is not matched with the initial
hasSum/hasCount pair, but with the second one. That is, only if the Duration between the creation of the
second getSum/getCount was in the last 10days. The value of he second ACME Event is added on hasSum
and hasCount is set to 2 as the new hasSum/hasCount pair is created.
Now. here is the point i dont understand. GetDuration seems to guard the entire Expression (or even only the 
EQUALSOPTIONAL expression, but that would make even less sense). But this would only check when a new ACME Event arrives,
if  the latest hasSum/hasCount pair was not further in the  past then 10 days. When there are frequently 
new ACME Events, it never would stop aggregating. 
My second thought was, maybe the hasCount/hasSum pair "remembers" the time span of all events it was built of.
But then, the Aggregation would just stop when 10 days have passed, cause then the time span between the first Event end the last would be more then 10 days.
I thought of more ways how getDuration is meant to work, but I never came to a satisfying conclusion. Any help on how getDuration is meant to work or where i got wrong in my thinking would be great.
Best regards,
Daniel

Reply all
Reply to author
Forward
0 new messages