Stream

All functions under streaming namespace return an object of this class. These compute the required result(s) from the stream of data arriving in real time.

Methods

build

build()

Alias for Stream#compute; currently applicable to [freqTable()](file:///Users/neilsbohr/dev/winkjs/wink-statistics/docs/streaming.html#.freqTable).


compute

compute()

Incrementally computes the results in real-time with each successive call.

Number and type of input arguments depend on the API used.


reset

reset()

Resets all the computations carried out so far. Computations start afresh from this point again.


result

result(fractionDigitsopt) → {Object}

Provides detailed result(s) from the computations carried out so far. The result(s) will vary as per the API used.

It can be called, as and when required to return the accumulated result till that point.

Parameters
Name Type Attributes Default Description
fractionDigits Number <optional>
4

number of decimals in the returned numerical values. May not apply in every case such as [max()](file:///Users/neilsbohr/dev/winkjs/wink-statistics/docs/streaming.html#.max) or [min()](file:///Users/neilsbohr/dev/winkjs/wink-statistics/docs/streaming.html#.min).

Returns

Containing detailed results in form of name/value pairs.

Type
Object

value

value() → {Number}

Probes the current value of primary result at any time.

Returns
Type
Number