37 #include <OpenMS/config.h> 57 template<
class ModelT =
int>
61 typedef std::pair<double, double>
DPair;
62 typedef std::vector<DPair>
DVec;
70 return static_cast<const ModelT*
>(
this)->rm_fit_impl(begin, end);
84 return static_cast<const ModelT*
>(
this)->rm_rsq_impl(begin, end);
90 return static_cast<const ModelT*
>(
this)->rm_rss_impl(begin, end, coefficients);
97 return static_cast<const ModelT*
>(
this)->rm_inliers_impl(begin, end, coefficients, max_threshold);
ModelParameters rm_fit(const DVecIt &begin, const DVecIt &end) const
fit a model and return its parameters
Definition: RANSACModel.h:68
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
DVec::const_iterator DVecIt
Definition: RANSACModel.h:63
std::vector< double > ModelParameters
Definition: RANSACModel.h:64
std::vector< DPair > DVec
Definition: RANSACModel.h:62
std::pair< double, double > DPair
Definition: RANSACModel.h:61
double rm_rsq(const DVecIt &begin, const DVecIt &end) const
Returns the R-squared of the data applied to the model (computed on-the-fly).
Definition: RANSACModel.h:82
DVec rm_inliers(const DVecIt &begin, const DVecIt &end, const ModelParameters &coefficients, double max_threshold) const
Definition: RANSACModel.h:95
double rm_rss(const DVecIt &begin, const DVecIt &end, const ModelParameters &coefficients) const
calculates the residual sum of squares of the input points according to the model ...
Definition: RANSACModel.h:88
Generic plug-in template base class using 'Curiously recurring template pattern' (CRTP) to allow for ...
Definition: RANSACModel.h:58