Grand Aggregate C++ Sequence Methods

All Grand Aggregate C++ Sequence methods produce a double result or a scalar value of the object's type, except methods count() and approxDistinctCount(), which return a uint8 or uint4 value.

uint8 count() const
Returns the number of elements.
T aggMax() const
Returns the maximum element value.
T aggMin() const
Returns the minimum element value.
T aggSum() const
Returns the sum of all elements.
T aggPrd() const
Returns the product of all elements.
double aggAvg() const
Returns the average of all elements.
double aggVar() const
Returns the variance of elements.
double aggVarSamp() const
Returns the sample variance of elements.
double aggDev() const
Returns the standard deviation of elements.
double aggDevSamp() const
Returns the sample standard deviation of elements.
uint4 approxDistinctCount() const
Returns the approximate count of distinct values.

Example

Following is an example code snippet demonstrating a grand aggregate function:

    Sequence<float> close = quote.close_iterator();
    double avg = close.aggAvg();
    ...