Variable beluga::mean

Variable Documentation

constexpr detail::mean_fn beluga::mean

Calculate the weighted mean (or average) of a range of values.

The inputs are a range of values, a range of corresponding weights, and an optional projection function to convert to the right value-type.

It supports floating-point numbers, vectors, quaternions, and Lie group elements like SE2 and SE3.

The weights are assumed to already be normalized. Non-normalized weights will yield incorrect results.