5 const float valueToReturnOnFailure)
7 double sum = 0.0, wsum = 0.0;
8 for (
unsigned i=0;
i<len; ++
i)
10 const float w = data[
i].second;
13 sum += w*data[
i].first;
20 return valueToReturnOnFailure;
static float energyWeightedAverage(const FPair *data, unsigned len, float valueToReturnOnFailure)
std::pair< float, float > FPair
char data[epos_bytes_allocation]