Commit 62d1053e authored by Lynch, Vickie's avatar Lynch, Vickie
Browse files

Refs #21752 fix another warning

parent 68d1d0cf
...@@ -132,11 +132,11 @@ std::vector<double> getWeightedZscore(const vector<TYPE> &data, ...@@ -132,11 +132,11 @@ std::vector<double> getWeightedZscore(const vector<TYPE> &data,
} }
double weightedMean = sumWeightedData / sumWeights; double weightedMean = sumWeightedData / sumWeights;
for (size_t it = 0; it != data.size(); ++it) { for (size_t it = 0; it != data.size(); ++it) {
weightedVariance += std::pow(data[it] - weightedMean, 2) * weightedVariance += std::pow(static_cast<double>(data[it]) - weightedMean, 2) *
std::pow(weights[it] / sumWeights, 2); std::pow(static_cast<double>(weights[it]) / sumWeights, 2);
} }
for (auto it = data.cbegin(); it != data.cend(); ++it) { for (auto it = data.cbegin(); it != data.cend(); ++it) {
Zscore.push_back(fabs((*it - weightedMean) / std::sqrt(weightedVariance))); Zscore.push_back(fabs((static_cast<double>(*it) - weightedMean) / std::sqrt(weightedVariance)));
} }
return Zscore; return Zscore;
} }
......
...@@ -100,8 +100,6 @@ private: ...@@ -100,8 +100,6 @@ private:
Mantid::Geometry::Instrument_const_sptr inst; Mantid::Geometry::Instrument_const_sptr inst;
/// Run number of the peaks /// Run number of the peaks
int m_runNumber; int m_runNumber;
/// Unique peak number
int m_peakNumber;
/// Dimension type /// Dimension type
eDimensionType dimType; eDimensionType dimType;
/// Goniometer matrix /// Goniometer matrix
......
...@@ -114,7 +114,7 @@ const std::string FindPeaksMD::numberOfEventsNormalization = ...@@ -114,7 +114,7 @@ const std::string FindPeaksMD::numberOfEventsNormalization =
FindPeaksMD::FindPeaksMD() FindPeaksMD::FindPeaksMD()
: peakWS(), peakRadiusSquared(), DensityThresholdFactor(0.0), m_maxPeaks(0), : peakWS(), peakRadiusSquared(), DensityThresholdFactor(0.0), m_maxPeaks(0),
m_addDetectors(true), m_densityScaleFactor(1e-6), prog(nullptr), inst(), m_addDetectors(true), m_densityScaleFactor(1e-6), prog(nullptr), inst(),
m_runNumber(-1), m_peakNumber(1), dimType(), m_goniometer() {} m_runNumber(-1), dimType(), m_goniometer() {}
//---------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------
/** Initialize the algorithm's properties. /** Initialize the algorithm's properties.
......
Supports Markdown
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