11 #include <OpenMS/config.h>
31 template<
class ModelT =
int>
35 typedef std::pair<double, double>
DPair;
36 typedef std::vector<DPair>
DVec;
44 return static_cast<const ModelT*
>(
this)->rm_fit_impl(begin, end);
58 return static_cast<const ModelT*
>(
this)->rm_rsq_impl(begin, end);
64 return static_cast<const ModelT*
>(
this)->rm_rss_impl(begin, end, coefficients);
71 return static_cast<const ModelT*
>(
this)->rm_inliers_impl(begin, end, coefficients, max_threshold);
Generic plug-in template base class using 'Curiously recurring template pattern' (CRTP) to allow for ...
Definition: RANSACModel.h:33
ModelParameters rm_fit(const DVecIt &begin, const DVecIt &end) const
fit a model and return its parameters
Definition: RANSACModel.h:42
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:62
DVec::const_iterator DVecIt
Definition: RANSACModel.h:37
std::vector< double > ModelParameters
Definition: RANSACModel.h:38
DVec rm_inliers(const DVecIt &begin, const DVecIt &end, const ModelParameters &coefficients, double max_threshold) const
Definition: RANSACModel.h:69
std::pair< double, double > DPair
Definition: RANSACModel.h:35
std::vector< DPair > DVec
Definition: RANSACModel.h:36
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:56
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22