Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add backward move to ScanLagAllowIncompleteCursor #81

Closed
buybackoff opened this issue Jan 27, 2017 · 2 comments
Closed

Add backward move to ScanLagAllowIncompleteCursor #81

buybackoff opened this issue Jan 27, 2017 · 2 comments

Comments

@buybackoff
Copy link
Member

buybackoff commented Jan 27, 2017

Currently, add and sub work both for next and previous moves. This works OK even for moving regression, but some calculations just do not support previous move, e.g. MovingMedian. Should fallback to MoveAt() (state recreation) for such cases, and this will perform just like non-online version.

Also change the name of this cursor, it is weird.

@buybackoff
Copy link
Member Author

Call it WindowState cursor or something like this. Should add an option to cache values in a sorted dequeue (or SortedDequeueMap).

Later should add an internal property to Series which estimates complexity of MN/MP/MA moves and some very simple rule to chain and aggregate those complexities. In theory, for truly "online algorithms", we must always cache the entire state inside a cursor so that it could be completely updated with new values and without lagged cursors. But in practice, lagged cursors save memory and are faster for containers, but could do evaluation twice for nested calculations.

@buybackoff
Copy link
Member Author

"ScanLagAllowIncompleteCursor" really!? what does this mean!? ... no more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant