Commit 348fee4c authored by Lynch, Vickie's avatar Lynch, Vickie
Browse files

Refs #21752 clang-format

parent 62d1053e
......@@ -132,11 +132,13 @@ std::vector<double> getWeightedZscore(const vector<TYPE> &data,
}
double weightedMean = sumWeightedData / sumWeights;
for (size_t it = 0; it != data.size(); ++it) {
weightedVariance += std::pow(static_cast<double>(data[it]) - weightedMean, 2) *
std::pow(static_cast<double>(weights[it]) / sumWeights, 2);
weightedVariance +=
std::pow(static_cast<double>(data[it]) - weightedMean, 2) *
std::pow(static_cast<double>(weights[it]) / sumWeights, 2);
}
for (auto it = data.cbegin(); it != data.cend(); ++it) {
Zscore.push_back(fabs((static_cast<double>(*it) - weightedMean) / std::sqrt(weightedVariance)));
Zscore.push_back(fabs((static_cast<double>(*it) - weightedMean) /
std::sqrt(weightedVariance)));
}
return Zscore;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment