103 bool force_constraints =
false);
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;
A basic LC-MS feature.
Definition: BaseFeature.h:59
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:93
A functor class for the calculation of distances between features or consensus features.
Definition: FeatureDistance.h:91
~FeatureDistance() override
Destructor.
static const double infinity
Value to return if max. difference is exceeded or if charge states don't match.
Definition: FeatureDistance.h:94
bool ignore_adduct_
Compute a distance even if adducts don't match?
Definition: FeatureDistance.h:175
std::pair< bool, double > operator()(const BaseFeature &left, const BaseFeature &right)
Evaluation operator - checks constraints and computes the distance between two features.
FeatureDistance & operator=(const FeatureDistance &other)
Assignment operator.
bool force_constraints_
Always return infinity if "max. difference" constraints are not met?
Definition: FeatureDistance.h:178
DistanceParams_ params_intensity_
Definition: FeatureDistance.h:163
double max_intensity_
Maximum intensity of features (for normalization)
Definition: FeatureDistance.h:169
bool log_transform_
Log-transform intensities when computing intensity distance?
Definition: FeatureDistance.h:181
double distance_(double diff, const DistanceParams_ ¶ms) const
Computes a distance component given absolute difference and parameters.
void updateMembers_() override
Docu in base class.
FeatureDistance(double max_intensity=1.0, bool force_constraints=false)
Constructor.
bool ignore_charge_
Compute a distance even if charge states don't match?
Definition: FeatureDistance.h:172
double total_weight_reciprocal_
Reciprocal value of the total weight in the distance function.
Definition: FeatureDistance.h:166
Management and storage of parameters / INI files.
Definition: Param.h:70
Param copy(const std::string &prefix, bool remove_prefix=false) const
Returns a new Param object containing all entries that start with prefix.
const ParamValue & getValue(const std::string &key) const
Returns a value of a parameter.
A more convenient string class.
Definition: String.h:60
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
Structure for storing distance parameters.
Definition: FeatureDistance.h:125
DistanceParams_()
Definition: FeatureDistance.h:126
bool max_diff_ppm
Definition: FeatureDistance.h:153
DistanceParams_(const String &what, const Param &global)
Definition: FeatureDistance.h:128
double exponent
Definition: FeatureDistance.h:152