Commit 89267323 authored by Wuttke, Joachim's avatar Wuttke, Joachim Committed by Wuttke, Joachim
Browse files

RefinementBatch: rm unused _cost_function

It's set, and cleared, but nowhere read.
parent 54b70b22
......@@ -197,9 +197,6 @@ bool RefinementBatch::refine(unsigned int max_iter)
if (!_constraints.empty())
_params.setKernel(constraintKernel(_params.nparams(), _constraints));
_cost_function.clear();
_cost_function.shrink_to_fit();
min.initialize(_params, _peaks.size() * 3);
min.set_f([&](Eigen::VectorXd& fvec) { return residuals(fvec); });
bool success = min.fit(max_iter);
......@@ -245,8 +242,6 @@ int RefinementBatch::qSpaceResiduals(Eigen::VectorXd& fvec)
}
}
_cost_function.push_back(0.5 * fvec.norm());
return 0;
}
......@@ -292,8 +287,6 @@ int RefinementBatch::realSpaceResiduals(Eigen::VectorXd& fvec)
}
}
_cost_function.push_back(0.5 * fvec.norm());
return 0;
}
......
......@@ -112,7 +112,6 @@ class RefinementBatch {
std::vector<std::vector<int>> _constraints;
std::vector<Eigen::Matrix3d> _wts;
std::vector<std::reference_wrapper<InstrumentState>> _states;
std::vector<double> _cost_function;
};
} // namespace ohkl
......
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