com.apama.aggregates
Aggregate wavg(TYPE d, TYPE weight) TYPE


Parameters:
d - Operates on decimals or floats.
weight - The weight to assign to this item. Same type as d.
The weighted average of the values in the window.

Ignores any items in the window with a NaN value or weight. Returns NaN if any weight is infinite or if the values contain both positive and negative infinities or if the window is empty. If there is only one type of infinity amongst the values that infinity will be returned regardless of its weight or the weight or value of the other elements.