Skip to content

function variance(const E1 &) reducing

template <input_expression E1, typename T = expression_value_type<E1>>
KFR_FUNCTION T variance(const E1& x)

Computes the variance of the given input expression.

This function calculates the variance of the elements in the input expression x.

Template parameters
E1 The type of the input expression.
T The value type of the expression elements.
Parameters
x The input expression for which the variance is to be computed. Must be a sized expression.
Returns
The variance of the elements in the input expression.

Defined at base/reduce.hpp:429