103 bool force_constraints =
false);
118 std::pair<bool, double> operator()(
const BaseFeature & left,
130 Param param = global.
copy(
"distance_" + what +
":",
true);
133 max_diff_ppm = (param.
getValue(
"unit") ==
"ppm");
137 max_diff_ppm =
false;
140 max_difference = param.
getValue(
"max_difference");
141 exponent = param.
getValue(
"exponent");
143 norm_factor = 1 / max_difference;
145 relevant = (weight != 0.0) && (exponent != 0.0);
152 double max_difference, exponent,
weight, norm_factor;
157 void updateMembers_()
override;
160 inline double distance_(
double diff,
const DistanceParams_ & params)
const;
A functor class for the calculation of distances between features or consensus features.
Definition: FeatureDistance.h:89
Structure for storing distance parameters.
Definition: FeatureDistance.h:124
A more convenient string class.
Definition: String.h:57
double weight
Definition: FeatureDistance.h:152
DistanceParams_()
Definition: FeatureDistance.h:126
double max_intensity_
Maximum intensity of features (for normalization)
Definition: FeatureDistance.h:169
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
A basic LC-MS feature.
Definition: BaseFeature.h:55
bool ignore_adduct_
Compute a distance even if adducts don't match?
Definition: FeatureDistance.h:175
DistanceParams_(const String &what, const Param &global)
Definition: FeatureDistance.h:128
double total_weight_reciprocal_
Reciprocal value of the total weight in the distance function.
Definition: FeatureDistance.h:166
const DataValue & getValue(const String &key) const
Returns a value of a parameter.
Param copy(const String &prefix, bool remove_prefix=false) const
Returns a new Param object containing all entries that start with prefix.
DistanceParams_ params_rt_
Storage of parameters for the individual distance components.
Definition: FeatureDistance.h:163
static const double infinity
Value to return if max. difference is exceeded or if charge states don't match.
Definition: FeatureDistance.h:94
Management and storage of parameters / INI files.
Definition: Param.h:74
bool force_constraints_
Always return infinity if "max. difference" constraints are not met?
Definition: FeatureDistance.h:178
bool ignore_charge_
Compute a distance even if charge states don't match?
Definition: FeatureDistance.h:172
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:91
bool log_transform_
Log-transform intensities when computing intensity distance?
Definition: FeatureDistance.h:181
bool relevant
Definition: FeatureDistance.h:153