window-stream.md

March 29, 2021 · View on GitHub

Scramjet Logo

:WindowStream : NumberStream

A stream for moving window calculation with some simple methods.

In essence it's a stream of Array's containing a list of items - a window. It's best used when created by the `DataStream..window`` method.

Kind: static class
Extends: NumberStream

windowStream.sum([valueOf]) : NumberStream ↺

Calculates moving sum of items, the output NumberStream will contain the moving sum.

Kind: instance method of WindowStream
Chainable

ParamTypeDescription
[valueOf]ValueOfCallbackvalue of method for array items

windowStream.avg([valueOf]) : NumberStream ↺

Calculates the moving average of the window and returns the NumberStream

Kind: instance method of WindowStream
Chainable

ParamTypeDescription
[valueOf]ValueOfCallbackvalue of method for array items