36 #ifndef OPENMS_FILTERING_CALIBRATION_MZTRAFOMODEL_H 37 #define OPENMS_FILTERING_CALIBRATION_MZTRAFOMODEL_H 99 enum MODELTYPE { LINEAR, LINEAR_WEIGHTED, QUADRATIC, QUADRATIC_WEIGHTED, SIZE_OF_MODELTYPE };
100 static const std::string names_of_modeltype[];
108 static MODELTYPE nameToEnum(
const std::string& name);
115 static const std::string& enumToName(
MODELTYPE mt);
137 static void setCoefficientLimits(
double offset,
double scale,
double power);
156 bool isTrained()
const;
161 double getRT()
const;
175 double predict(
double mz)
const;
188 static Size findNearest(
const std::vector<MZTrafoModel>& tms,
double rt);
193 public std::binary_function<MZTrafoModel, MZTrafoModel, bool>
197 return left < right.
rt_;
201 return left.
rt_ < right;
205 return left.
rt_ < right.
rt_;
230 double rt_left = -std::numeric_limits<double>::max(),
231 double rt_right = std::numeric_limits<double>::max()
258 bool train(std::vector<double> error_mz,
259 std::vector<double> theo_mz,
260 std::vector<double> weights,
275 void getCoefficients(
double& intercept,
double& slope,
double& power);
293 void setCoefficients(
double intercept,
double slope,
double power);
307 #endif // OPENMS_FILTERING_CALIBRATION_MZTRAFOMODEL_H static double limit_offset_
Definition: MZTrafoModel.h:76
static double limit_scale_
Definition: MZTrafoModel.h:77
A more convenient string class.
Definition: String.h:57
Comparator by position. As this class has dimension 1, this is basically an alias for MZLess...
Definition: MZTrafoModel.h:192
MODELTYPE
Definition: MZTrafoModel.h:99
std::vector< double > coeff_
Definition: MZTrafoModel.h:71
static double limit_power_
Definition: MZTrafoModel.h:78
A simple struct to carry all the parameters required for a RANSAC run.
Definition: RANSAC.h:59
Create and apply models of a mass recalibration function.
Definition: MZTrafoModel.h:67
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
bool use_ppm_
Definition: MZTrafoModel.h:72
bool operator()(const MZTrafoModel &left, const double &right) const
Definition: MZTrafoModel.h:199
double rt_
Definition: MZTrafoModel.h:73
A helper class, holding all calibration points.
Definition: CalibrationData.h:65
bool operator()(const MZTrafoModel &left, const MZTrafoModel &right) const
Definition: MZTrafoModel.h:203
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:128
bool operator()(const double &left, const MZTrafoModel &right) const
Definition: MZTrafoModel.h:195
String toString(T i)
toString functions (single argument)
Definition: StringUtils.h:69
static Math::RANSACParam * ransac_params_
Definition: MZTrafoModel.h:75