Skip to content
Snippets Groups Projects
Commit 348834c2 authored by Anthony Lim's avatar Anthony Lim
Browse files

refs #20620 review comment

parent f4400a67
No related branches found
No related tags found
No related merge requests found
......@@ -231,10 +231,8 @@ PhaseQuadMuon::squash(const API::MatrixWorkspace_sptr &ws,
const double X0 = xPointData.front();
// calculate exponential decay outside of the loop
std::vector<double> expDecay(xPointData.size()); // make a copy
for (size_t i = 0; i < xPointData.size(); ++i) {
expDecay[i] = exp(-(xPointData[i] - X0) / muLife);
}
std::vector<double> expDecay = xPointData.rawData();
std::transform(expDecay.begin(), expDecay.end(), expDecay.begin(), [X0, muLife](double x) { return exp(-(x - X0) / muLife); });
for (size_t i = 0; i < npoints; i++) {
for (size_t h = 0; h < nspec; h++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment