Class: FloatAccumulatorParam

eclairjs. FloatAccumulatorParam

new FloatAccumulatorParam()

Source:

Extends

Methods

addAccumulator(r, t) → {object}

Add additional data to the accumulator value. Is allowed to modify and return `r` for efficiency (to avoid allocating objects).
Parameters:
Name Type Description
r object the current value of the accumulator
t object the data to be added to the accumulator
Inherited From:
Source:
Returns:
the new value of the accumulator
Type
object

addInPlace(r1, r2) → {object}

Merge two accumulated values together. Is allowed to modify and return the first value for efficiency (to avoid allocating objects).
Parameters:
Name Type Description
r1 object one set of accumulated data
r2 object another set of accumulated data
Inherited From:
Source:
Returns:
both data sets merged together
Type
object

zero(initialValue) → {object}

Return the "zero" (identity) value for an accumulator type, given its initial value. For example, if R was a vector of N dimensions, this would return a vector of N zeroes.
Parameters:
Name Type Description
initialValue object
Inherited From:
Source:
Returns:
Type
object