Class MEAL::LeastSquares
-
class LeastSquares : public Reference::Able
General properties of least squares minimization
Subclassed by MEAL::ReceptionModel::Solver
Public Functions
-
virtual std::string get_name() const = 0
Return the name of the fit algorithm.
-
void set_maximum_iterations(unsigned maximum_iterations)
Set the maximum number of iterations in fit algorithm.
-
inline unsigned get_maximum_iterations() const
Get the maximum number of iterations in fit algorithm.
-
void set_convergence_chisq(float chisq)
Set the convergence threshold as an absolute value of chisq.
-
void set_convergence_delta(float delta_parameters)
Set the convergence threshold as relative change in parameters.
-
void set_maximum_reduced_chisq(float maximum_reduced_chisq)
Set the reduced chi-squared above which the fit is considered bad.
-
inline void set_debug(bool flag = true)
Set the verbosity during solve.
-
inline void set_solved(bool val)
Set the solved flag (can be used to flag bad data).
-
inline bool get_solved() const
Return true when the fit has been solved.
-
inline void set_singular(bool val)
Set the singular flag (can be used to flag bad data).
-
inline bool get_singular() const
Return true when the fit has failed due to singularity.
-
inline unsigned get_iterations() const
The number of iterations in last call to solve method.
-
inline float get_chisq() const
The chi-squared in last call to solve method.
-
inline unsigned get_nfree() const
The number of degrees of freedom in last call to solve method.
-
inline unsigned get_nparam_infit() const
Get the number of parameters in fit.
-
inline unsigned get_ndat_constraint() const
The total number of constraints (one-dimensional data).
-
inline double get_log_det_curvature() const
The logarithm of the determinant of the chi-squared curvature matrix.
-
inline double get_log_cond_curvature() const
The logarithm of the condition number of the chi-squared curvature matrix.
-
inline void get_covariance(matrix &c) const
Get the covariance matrix of the last fit.
-
virtual std::string get_name() const = 0