1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2024-11-10 08:55:37 +00:00

StatArray: ambiguity removed in mean function

This commit is contained in:
Antonin Portelli 2015-03-20 16:05:11 +00:00
parent d93f75dac6
commit b90d410e6b

View File

@ -53,7 +53,6 @@ public:
// statistics
void bin(Index binSize);
T mean(const Index pos = 0, const Index n = -1) const;
T mean(void) const;
T covariance(const StatArray<T, os> &array, const Index pos = 0,
const Index n = -1) const;
T covarianceMatrix(const StatArray<T, os> &array, const Index pos = 0,
@ -160,8 +159,7 @@ T StatArray<T, os>::mean(const Index pos, const Index n) const
{
result = this->segment(pos+os, m).redux(&ReducOp::sum<T>);
}
return result/static_cast<double>(n);
return result/static_cast<double>(m);
}
template <typename T, Index os>