Mantid
Loading...
Searching...
No Matches
Functions | Variables
Mantid::API::MinimizerStatus Namespace Reference

Canonical minimizer "OutputStatus" strings. More...

Functions

bool isConverged (const std::string &status, const bool strict=false)
 Whether a Fit "OutputStatus" string should be treated as a converged fit.
 

Variables

const std::string CHANGES_IN_FUNCTION_TOO_SMALL = "Changes in function value are too small"
 Reported by Levenberg-Marquardt when the change in the cost function between iterations has fallen below tolerance (an essentially-converged stop).
 
const std::string CHANGES_IN_PARAMETER_TOO_SMALL = "Changes in parameter value are too small"
 Reported by Levenberg-Marquardt when the change in the parameter values between iterations has fallen below tolerance (an essentially-converged stop).
 
const std::string SUCCESS = "success"
 Reported when a minimizer has fully converged.
 

Detailed Description

Canonical minimizer "OutputStatus" strings.

These are the single source of truth for the status text a minimizer reports (and that consumers such as the Fit algorithm and FitPeaks compare against), so the wording only lives in one place.

Function Documentation

◆ isConverged()

bool Mantid::API::MinimizerStatus::isConverged ( const std::string &  status,
const bool  strict = false 
)
inline

Whether a Fit "OutputStatus" string should be treated as a converged fit.

In strict mode only "success" is accepted. Otherwise the tolerance-limited stopping conditions count too: a minimiser started from an already-optimal set of parameters stops that way routinely, and treating it as a failure is wrong. Kept here beside the strings so callers do not each re-implement the comparison.

Definition at line 41 of file IFuncMinimizer.h.

References CHANGES_IN_FUNCTION_TOO_SMALL, CHANGES_IN_PARAMETER_TOO_SMALL, and SUCCESS.

Referenced by export_MinimizerStatus(), and Mantid::Algorithms::FitPeaks::fitStatusIsConverged().

Variable Documentation

◆ CHANGES_IN_FUNCTION_TOO_SMALL

const std::string Mantid::API::MinimizerStatus::CHANGES_IN_FUNCTION_TOO_SMALL = "Changes in function value are too small"
inline

Reported by Levenberg-Marquardt when the change in the cost function between iterations has fallen below tolerance (an essentially-converged stop).

Definition at line 31 of file IFuncMinimizer.h.

Referenced by export_MinimizerStatus(), Mantid::Algorithms::FindReflectometryLines3::fitStatusIsAccepted(), isConverged(), and Mantid::CurveFitting::FuncMinimisers::LevenbergMarquardtMinimizer::iterate().

◆ CHANGES_IN_PARAMETER_TOO_SMALL

const std::string Mantid::API::MinimizerStatus::CHANGES_IN_PARAMETER_TOO_SMALL = "Changes in parameter value are too small"
inline

Reported by Levenberg-Marquardt when the change in the parameter values between iterations has fallen below tolerance (an essentially-converged stop).

Definition at line 34 of file IFuncMinimizer.h.

Referenced by export_MinimizerStatus(), Mantid::Algorithms::FindReflectometryLines3::fitStatusIsAccepted(), isConverged(), and Mantid::CurveFitting::FuncMinimisers::LevenbergMarquardtMinimizer::iterate().

◆ SUCCESS

const std::string Mantid::API::MinimizerStatus::SUCCESS = "success"
inline