diff --git a/lib/StatArray.hpp b/lib/StatArray.hpp index 46ea9ca..27c4d63 100644 --- a/lib/StatArray.hpp +++ b/lib/StatArray.hpp @@ -152,7 +152,7 @@ void StatArray::bin(Index binSize) template T StatArray::mean(const Index pos, const Index n) const { - T result; + T result = T(); const Index m = (n >= 0) ? n : size(); if (m) @@ -167,7 +167,7 @@ template T StatArray::covariance(const StatArray &array, const Index pos, const Index n) const { - T s1, s2, prs, res; + T s1, s2, prs, res = T(); const Index m = (n >= 0) ? n : size(); if (m) @@ -189,7 +189,7 @@ template T StatArray::covarianceMatrix(const StatArray &array, const Index pos, const Index n) const { - T s1, s2, prs, res; + T s1, s2, prs, res = T(); const Index m = (n >= 0) ? n : size(); if (m)