35 #ifndef OPENMS_ANALYSIS_MAPMATCHING_FEATUREDISTANCE_H 36 #define OPENMS_ANALYSIS_MAPMATCHING_FEATUREDISTANCE_H 104 bool force_constraints =
false);
119 std::pair<bool, double> operator()(
const BaseFeature & left,
131 Param param = global.
copy(
"distance_" + what +
":",
true);
134 max_diff_ppm = (param.
getValue(
"unit") ==
"ppm");
138 max_diff_ppm =
false;
141 max_difference = param.
getValue(
"max_difference");
142 exponent = param.
getValue(
"exponent");
144 norm_factor = 1 / max_difference;
146 relevant = (weight != 0.0) && (exponent != 0.0);
153 double max_difference, exponent,
weight, norm_factor;
158 void updateMembers_();
161 inline double distance_(
double diff,
const DistanceParams_ & params)
const;
184 #endif // OPENMS_ANALYSIS_MAPMATCHING_FEATUREDISTANCE_H A functor class for the calculation of distances between features or consensus features.
Definition: FeatureDistance.h:90
Structure for storing distance parameters.
Definition: FeatureDistance.h:125
A more convenient string class.
Definition: String.h:57
double weight
Definition: FeatureDistance.h:153
DistanceParams_()
Definition: FeatureDistance.h:127
double max_intensity_
Maximum intensity of features (for normalization)
Definition: FeatureDistance.h:170
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
A basic LC-MS feature.
Definition: BaseFeature.h:56
DistanceParams_(const String &what, const Param &global)
Definition: FeatureDistance.h:129
double total_weight_reciprocal_
Reciprocal value of the total weight in the distance function.
Definition: FeatureDistance.h:167
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:164
static const double infinity
Value to return if max. difference is exceeded or if charge states don't match.
Definition: FeatureDistance.h:95
Management and storage of parameters / INI files.
Definition: Param.h:75
bool force_constraints_
Always return infinity if "max. difference" constraints are not met?
Definition: FeatureDistance.h:176
bool ignore_charge_
Compute a distance even if charge states don't match?
Definition: FeatureDistance.h:173
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
bool log_transform_
Log-transform intensities when computing intensity distance?
Definition: FeatureDistance.h:179
bool relevant
Definition: FeatureDistance.h:154