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

RefinementBatch: several fcts now declared const

parent 89267323
......@@ -209,7 +209,7 @@ bool RefinementBatch::refine(unsigned int max_iter)
return success;
}
int RefinementBatch::residuals(Eigen::VectorXd& fvec)
int RefinementBatch::residuals(Eigen::VectorXd& fvec) const
{
if (_residual_type == ResidualType::QSpace) {
return qSpaceResiduals(fvec);
......@@ -220,7 +220,7 @@ int RefinementBatch::residuals(Eigen::VectorXd& fvec)
}
}
int RefinementBatch::qSpaceResiduals(Eigen::VectorXd& fvec)
int RefinementBatch::qSpaceResiduals(Eigen::VectorXd& fvec) const
{
UnitCell uc = _cell->fromParameters(_u0, _uOffsets, _cellParameters);
const Eigen::Matrix3d& UB = uc.reciprocalBasis();
......@@ -245,7 +245,7 @@ int RefinementBatch::qSpaceResiduals(Eigen::VectorXd& fvec)
return 0;
}
int RefinementBatch::realSpaceResiduals(Eigen::VectorXd& fvec)
int RefinementBatch::realSpaceResiduals(Eigen::VectorXd& fvec) const
{
UnitCell uc = _cell->fromParameters(_u0, _uOffsets, _cellParameters);
const Eigen::Matrix3d& UB = uc.reciprocalBasis();
......
......@@ -52,13 +52,13 @@ class RefinementBatch {
bool refine(unsigned int max_iter = 100);
//! Compute the residual vector for the current set of parameters.
int residuals(Eigen::VectorXd& fvec);
int residuals(Eigen::VectorXd& fvec) const;
//! Compute reciprocal space residual
int qSpaceResiduals(Eigen::VectorXd& fvec);
int qSpaceResiduals(Eigen::VectorXd& fvec) const;
//! Compute real (detector) space residuals
int realSpaceResiduals(Eigen::VectorXd& fvec);
int realSpaceResiduals(Eigen::VectorXd& fvec) const;
//! Returns the list of peaks used for refinement.
std::vector<ohkl::Peak3D*> peaks() const;
......
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